/** * Stand up a Manifold creator contract on a chain that has none. * * COLORGASM (CLGSM) only exists on mainnet, so the Sepolia rehearsal needs its * own creator contract to redeem against. This deploys Manifold's real * ERC721Creator, from frozen bytecode in fixtures/ERC721Creator.json — the same * implementation the Studio deploys behind a proxy, so the extension is * exercised against the genuine creator core and not a mock. * * npx hardhat run scripts/deploy-creator.js --network sepolia * * Env: * NAME="COLORGASM" SYMBOL="CLGSM" * * If you would rather use a contract you made in Manifold Studio on Sepolia, * skip this and put its address in deployments/sepolia.json as "creator" (or * pass CREATOR=0x… to the other scripts). * * Refuses to run on mainnet — there the creator already exists. */ import { connect, deployCreator, main, saveDeployment } from "./_lib.js"; main(async () => { const { ethers, net, signer } = await connect(); if (net === "mainnet") { throw new Error( "COLORGASM already exists on mainnet — do not deploy another creator there.", ); } const name = process.env.NAME ?? "COLORGASM"; const symbol = process.env.SYMBOL ?? "CLGSM"; const creator = await deployCreator(ethers, name, symbol, signer); const address = await creator.getAddress(); console.log(`creator ${address} ${name} (${symbol})`); console.log(`owner ${await creator.owner()}`); if ((await creator.owner()) !== signer.address) { console.warn("! the deployer is not the owner — registerExtension will need the owner"); } saveDeployment(net, { chainId: Number((await ethers.provider.getNetwork()).chainId), creator: address, creatorName: name, creatorSymbol: symbol, }); console.log( `\nnext: mint the originals to redeem against\n` + ` npx hardhat run scripts/seed-originals.js --network ${net}`, ); });