-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script for deploying latest set of full-suite minters (#470)
* Initial deploy script for updated minter suite deploys * Format * Deploy params * Format * Update README with mainnet deployment details
- Loading branch information
1 parent
56c6699
commit 7bd0f91
Showing
4 changed files
with
244 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,213 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
// Created By: Art Blocks Inc. | ||
|
||
import hre from "hardhat"; | ||
import { ethers } from "hardhat"; | ||
|
||
import { MinterDAExpV4__factory } from "./contracts/factories/MinterDAExpV4__factory"; | ||
import { MinterDAExpSettlementV1__factory } from "./contracts/factories/MinterDAExpSettlementV1__factory"; | ||
import { MinterDALinV4__factory } from "./contracts/factories/MinterDALinV4__factory"; | ||
import { MinterHolderV4__factory } from "./contracts/factories/MinterHolderV4__factory"; | ||
import { MinterMerkleV5__factory } from "./contracts/factories/MinterMerkleV5__factory"; | ||
import { MinterSetPriceV4__factory } from "./contracts/factories/MinterSetPriceV4__factory"; | ||
import { MinterSetPriceERC20V4__factory } from "./contracts/factories/MinterSetPriceERC20V4__factory"; | ||
|
||
////////////////////////////////////////////////////////////////////////////// | ||
// CONFIG BEGINS HERE | ||
////////////////////////////////////////////////////////////////////////////// | ||
|
||
// GOERLI (ARTIST-STAGING) ADDRESSSES | ||
// Art Blocks V3 Core Staging (Goerli) | ||
const CORE_CONTRACT_ADDRESS = "0xb614c578062a62714c927cd8193f0b8bfb90055c"; | ||
// MinterFilterV1 | ||
const FILTER_CONTRACT_ADDRESS = "0x6eA558Bb1A3C5437970AdA80f8c686448A9c31fC"; | ||
// Note: deployed w/ same mainnet/testnet address | ||
const DELEGATION_REGISTRY_ADDRESS = | ||
"0x00000000000076A84feF008CDAbe6409d2FE638B"; | ||
|
||
// MAINNET ADDRESSES | ||
// // Art Blocks (BLOCKS) | ||
// const CORE_CONTRACT_ADDRESS = "0x99a9B7c1116f9ceEB1652de04d5969CcE509B069"; | ||
// // MinterFilterV1 | ||
// const FILTER_CONTRACT_ADDRESS = "0x092B8F64e713d66b38522978BCf4649db14b931E"; | ||
// // Note: deployed w/ same mainnet/testnet address | ||
// const DELEGATION_REGISTRY_ADDRESS = | ||
// "0x00000000000076A84feF008CDAbe6409d2FE638B"; | ||
|
||
////////////////////////////////////////////////////////////////////////////// | ||
// CONFIG ENDS HERE | ||
////////////////////////////////////////////////////////////////////////////// | ||
|
||
async function main() { | ||
const [deployer] = await ethers.getSigners(); | ||
|
||
////////////////////////////////////////////////////////////////////////////// | ||
// DEPLOYMENT BEGINS HERE | ||
////////////////////////////////////////////////////////////////////////////// | ||
|
||
// Use already deployed Minter Filter contract. | ||
console.log(`Using MinterFilterV1 deployed at ${FILTER_CONTRACT_ADDRESS}`); | ||
|
||
// Deploy MinterDAExpV4 minter. | ||
const minterDAExpV4Factory = new MinterDAExpV4__factory(deployer); | ||
const minterDAExpV4 = await minterDAExpV4Factory.deploy( | ||
CORE_CONTRACT_ADDRESS, | ||
FILTER_CONTRACT_ADDRESS | ||
); | ||
await minterDAExpV4.deployed(); | ||
console.log(`MinterDAExpV4 deployed at ${minterDAExpV4.address}`); | ||
|
||
// Deploy MinterDAExpSettlementV1 minter. | ||
const minterDAExpSettlementV1Factory = new MinterDAExpSettlementV1__factory( | ||
deployer | ||
); | ||
const minterDAExpSettlementV1 = await minterDAExpSettlementV1Factory.deploy( | ||
CORE_CONTRACT_ADDRESS, | ||
FILTER_CONTRACT_ADDRESS | ||
); | ||
await minterDAExpSettlementV1.deployed(); | ||
console.log( | ||
`MinterDAExpSettlementV1 deployed at ${minterDAExpSettlementV1.address}` | ||
); | ||
|
||
// Deploy MinterDALinV4 minter. | ||
const minterDALinV4Factory = new MinterDALinV4__factory(deployer); | ||
const minterDALinV4 = await minterDALinV4Factory.deploy( | ||
CORE_CONTRACT_ADDRESS, | ||
FILTER_CONTRACT_ADDRESS | ||
); | ||
await minterDALinV4.deployed(); | ||
console.log(`MinterDALinV4 deployed at ${minterDALinV4.address}`); | ||
|
||
// Deploy MinterHolderV4 minter. | ||
const minterHolderV4Factory = new MinterHolderV4__factory(deployer); | ||
const minterHolderV4 = await minterHolderV4Factory.deploy( | ||
CORE_CONTRACT_ADDRESS, | ||
FILTER_CONTRACT_ADDRESS, | ||
DELEGATION_REGISTRY_ADDRESS | ||
); | ||
await minterHolderV4.deployed(); | ||
console.log(`MinterHolderV4 deployed at ${minterHolderV4.address}`); | ||
|
||
// Deploy MinterMerkleV5 minter. | ||
const minterMerkleV5Factory = new MinterMerkleV5__factory(deployer); | ||
const minterMerkleV5 = await minterMerkleV5Factory.deploy( | ||
CORE_CONTRACT_ADDRESS, | ||
FILTER_CONTRACT_ADDRESS, | ||
DELEGATION_REGISTRY_ADDRESS | ||
); | ||
await minterMerkleV5.deployed(); | ||
console.log(`MinterMerkleV5 deployed at ${minterMerkleV5.address}`); | ||
|
||
// Deploy MinterSetPriceV4 minter. | ||
const minterSetPriceV4Factory = new MinterSetPriceV4__factory(deployer); | ||
const minterSetPriceV4 = await minterSetPriceV4Factory.deploy( | ||
CORE_CONTRACT_ADDRESS, | ||
FILTER_CONTRACT_ADDRESS | ||
); | ||
await minterSetPriceV4.deployed(); | ||
console.log(`MinterSetPriceV4 deployed at ${minterSetPriceV4.address}`); | ||
|
||
// Deploy MinterSetPriceERC20V4 minter. | ||
const minterSetPriceERC20V4Factory = new MinterSetPriceERC20V4__factory( | ||
deployer | ||
); | ||
const minterSetPriceERC20V4 = await minterSetPriceERC20V4Factory.deploy( | ||
CORE_CONTRACT_ADDRESS, | ||
FILTER_CONTRACT_ADDRESS | ||
); | ||
await minterSetPriceERC20V4.deployed(); | ||
console.log( | ||
`MinterSetPriceERC20V4 deployed at ${minterSetPriceERC20V4.address}` | ||
); | ||
|
||
// Reminder re: MinterFilter allowlisting. | ||
console.log( | ||
`REMINDER: Allowlist these minters on your MinterFilterV1 deployed at: ${FILTER_CONTRACT_ADDRESS}` | ||
); | ||
|
||
////////////////////////////////////////////////////////////////////////////// | ||
// DEPLOYMENT ENDS HERE | ||
////////////////////////////////////////////////////////////////////////////// | ||
|
||
////////////////////////////////////////////////////////////////////////////// | ||
// VERIFICATION BEGINS HERE | ||
////////////////////////////////////////////////////////////////////////////// | ||
|
||
// Output instructions for manual Etherscan verification. | ||
const network = await ethers.provider.getNetwork(); | ||
const networkName = network.name == "homestead" ? "mainnet" : network.name; | ||
const standardVerify = "yarn hardhat verify"; | ||
|
||
console.log(`If automated verification below fails, verify deployment with:`); | ||
console.log( | ||
`${standardVerify} --network ${networkName} ${minterDAExpV4.address} ${CORE_CONTRACT_ADDRESS} ${FILTER_CONTRACT_ADDRESS}` | ||
); | ||
console.log( | ||
`${standardVerify} --network ${networkName} ${minterDAExpSettlementV1.address} ${CORE_CONTRACT_ADDRESS} ${FILTER_CONTRACT_ADDRESS}` | ||
); | ||
console.log( | ||
`${standardVerify} --network ${networkName} ${minterDALinV4.address} ${CORE_CONTRACT_ADDRESS} ${FILTER_CONTRACT_ADDRESS}` | ||
); | ||
console.log( | ||
`${standardVerify} --network ${networkName} ${minterHolderV4.address} ${CORE_CONTRACT_ADDRESS} ${FILTER_CONTRACT_ADDRESS} ${DELEGATION_REGISTRY_ADDRESS}` | ||
); | ||
console.log( | ||
`${standardVerify} --network ${networkName} ${minterMerkleV5.address} ${CORE_CONTRACT_ADDRESS} ${FILTER_CONTRACT_ADDRESS} ${DELEGATION_REGISTRY_ADDRESS}` | ||
); | ||
console.log( | ||
`${standardVerify} --network ${networkName} ${minterSetPriceV4.address} ${CORE_CONTRACT_ADDRESS} ${FILTER_CONTRACT_ADDRESS}` | ||
); | ||
console.log( | ||
`${standardVerify} --network ${networkName} ${minterSetPriceERC20V4.address} ${CORE_CONTRACT_ADDRESS} ${FILTER_CONTRACT_ADDRESS}` | ||
); | ||
|
||
// Perform automated verification | ||
await hre.run("verify:verify", { | ||
address: minterDAExpV4.address, | ||
constructorArguments: [CORE_CONTRACT_ADDRESS, FILTER_CONTRACT_ADDRESS], | ||
}); | ||
await hre.run("verify:verify", { | ||
address: minterDAExpSettlementV1.address, | ||
constructorArguments: [CORE_CONTRACT_ADDRESS, FILTER_CONTRACT_ADDRESS], | ||
}); | ||
await hre.run("verify:verify", { | ||
address: minterDALinV4.address, | ||
constructorArguments: [CORE_CONTRACT_ADDRESS, FILTER_CONTRACT_ADDRESS], | ||
}); | ||
await hre.run("verify:verify", { | ||
address: minterHolderV4.address, | ||
constructorArguments: [ | ||
CORE_CONTRACT_ADDRESS, | ||
FILTER_CONTRACT_ADDRESS, | ||
DELEGATION_REGISTRY_ADDRESS, | ||
], | ||
}); | ||
await hre.run("verify:verify", { | ||
address: minterMerkleV5.address, | ||
constructorArguments: [ | ||
CORE_CONTRACT_ADDRESS, | ||
FILTER_CONTRACT_ADDRESS, | ||
DELEGATION_REGISTRY_ADDRESS, | ||
], | ||
}); | ||
await hre.run("verify:verify", { | ||
address: minterSetPriceV4.address, | ||
constructorArguments: [CORE_CONTRACT_ADDRESS, FILTER_CONTRACT_ADDRESS], | ||
}); | ||
await hre.run("verify:verify", { | ||
address: minterSetPriceERC20V4.address, | ||
constructorArguments: [CORE_CONTRACT_ADDRESS, FILTER_CONTRACT_ADDRESS], | ||
}); | ||
|
||
////////////////////////////////////////////////////////////////////////////// | ||
// VERIFICATION ENDS HERE | ||
////////////////////////////////////////////////////////////////////////////// | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch((error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |