We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const collectionUriPrefixes = new Set(); while (collectionUriPrefixes.size < 6) { collectionUriPrefixes.add(Math.floor(Math.random() * 3000) + 1); } // Convert set to array and assign as environment variables const envPrefixes = [...collectionUriPrefixes].map((num, index) => `COLLECTION_URI_PREFIX_${index + 1}=${num}`); for (const envPrefix of envPrefixes) { process.env[envPrefix.split('=')[0]] = envPrefix.split('=')[1]; } // Attach to deployed contract const contract = await NftContractProvider.getContract(); // Update root hash (if changed) for (let i = 1; i <= 6; i++) { const envVarName = `COLLECTION_URI_PREFIX_${i}`; const envVarValue = process.env[envVarName]; if ((await contract.uriPrefix(i)) !== envVarValue) { console.log(`Updating URI prefix ${i} to: ${envVarValue}`); await (await contract.setUriPrefix(i, envVarValue)).wait(); } }```
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: