Skip to content

Commit

Permalink
Add script for deploying latest set of full-suite minters (#470)
Browse files Browse the repository at this point in the history
* Initial deploy script for updated minter suite deploys

* Format

* Deploy params

* Format

* Update README with mainnet deployment details
  • Loading branch information
jakerockland authored Jan 31, 2023
1 parent 56c6699 commit 7bd0f91
Show file tree
Hide file tree
Showing 4 changed files with 244 additions and 10 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,33 +119,54 @@ These are the smart contracts that receive funds, and split them between the art
- V0 (deprecated): [0x1DEC9E52f1320F7Deb29cBCd7B7d67f3dF785142](https://etherscan.io/address/0x1DEC9E52f1320F7Deb29cBCd7B7d67f3dF785142#code)
- V1: [0x934cdc04C434b8dBf3E1265F4f198D70566f7355](https://etherscan.io/address/0x934cdc04C434b8dBf3E1265F4f198D70566f7355#code)
- V2: [0x7B7917e083CeA6d9f6a3060a7330c1072fcb4e40](https://etherscan.io/address/0x7B7917e083CeA6d9f6a3060a7330c1072fcb4e40#code)
- V3: N/A, never used in prod.
- V4: [0x234B25288011081817B5cC199C3754269cCb76D2](https://etherscan.io/address/0x234B25288011081817B5cC199C3754269cCb76D2#code)

#### MinterSetPriceERC20 (Set Price with ERC20)

- V0 (deprecated): [0x48742D38a0809135EFd643c1150BfC13768C3907](https://etherscan.io/address/0x48742D38a0809135EFd643c1150BfC13768C3907#code)
- V1: [0x0BbB93c5d118D1dee49e96BCAdc161403f4F8612](https://etherscan.io/address/0x0BbB93c5d118D1dee49e96BCAdc161403f4F8612#code)
- V2: [0xe4c6EeF13649e9C4Ad8ae8A9C7fA9A7F26B4287a](https://etherscan.io/address/0xe4c6EeF13649e9C4Ad8ae8A9C7fA9A7F26B4287a#code)
- V3: N/A, never used in prod.
- V4: [0x9fEcd2FbC6D890fB93632DcE9b1a01c4090A7E2d](https://etherscan.io/address/0x9fEcd2FbC6D890fB93632DcE9b1a01c4090A7E2d#code)

#### MinterDALin (Linear Dutch Auction)

- V0 (deprecated): [0xd219f61Bb5A3ffDeCB4362610977F1dAB3930eE2](https://etherscan.io/address/0xd219f61Bb5A3ffDeCB4362610977F1dAB3930eE2#code)
- V1: [0x32710950B014c2D29EA24f480Dd02c7e4610663b](https://etherscan.io/address/0x32710950B014c2D29EA24f480Dd02c7e4610663b#code)
- V2: [0xdaa6D1e224f4B9f7c4f1368C362C4333A8e385A6](https://etherscan.io/address/0xdaa6D1e224f4B9f7c4f1368C362C4333A8e385A6#code)
- V3: N/A, never used in prod.
- V4: [0x419501DD208BFf237e3E32C40D074065e12DfF4d](https://etherscan.io/address/0x419501DD208BFf237e3E32C40D074065e12DfF4d#code)

#### MinterDAExp (Exponential Decay Dutch Auction)

- V0 (deprecated): [0xFc74fD0f2c7EaD04f1E5E9fd82Aef55620710D7C](https://etherscan.io/address/0xFc74fD0f2c7EaD04f1E5E9fd82Aef55620710D7C#code)
- V1: [0xD94C7060808f3c876824E57e685702f3834D2e13](https://etherscan.io/address/0xD94C7060808f3c876824E57e685702f3834D2e13#code)
- V2: [0x706d6C6ef700a3c1C3a727f0c46492492E0A72b5](https://etherscan.io/address/0x706d6C6ef700a3c1C3a727f0c46492492E0A72b5#code)
- V3: N/A, never used in prod.
- V4: [0x47e2df2723238f913741Cc6b1963e76fdfD19B94](https://etherscan.io/address/0x47e2df2723238f913741Cc6b1963e76fdfD19B94#code)

#### MinterDAExpSettlement (Expotential Decay Last Price Dutch Auction)

- V0: N/A, never used in prod.
- V1: [0xfdE58c821D1c226b4a45c22904de20b114EDe7E7](https://etherscan.io/address/0xfdE58c821D1c226b4a45c22904de20b114EDe7E7#code)

#### MinterMerkle (Address Allowlist)

- V0: N/A, never used in prod.
- V1: [0xae5A48D22Cd069c4d72dDe204A7fB4B302e614af](https://etherscan.io/address/0xae5A48D22Cd069c4d72dDe204A7fB4B302e614af)
- V2: [0x6Ff3c104Ca9b4860D27079aFfF18701c4A532A4d](https://etherscan.io/address/0x6Ff3c104Ca9b4860D27079aFfF18701c4A532A4d)
- V3: N/A, never used in prod.
- V4: N/A, never used in prod.
- V5: [0xB8Bd1D2836C466DB149f665F777928bEE267304d](https://etherscan.io/address/0xB8Bd1D2836C466DB149f665F777928bEE267304d#code)

#### Minter Holder (Token Holder)

- V0: N/A, never used in prod.
- V1: [0xa198E22C32879f4214a37eB3051525bD9aff9145](https://etherscan.io/address/0xa198E22C32879f4214a37eB3051525bD9aff9145)
- V2: N/A, never used in prod.
- V3: N/A, never used in prod.
- V4: [0xCCFF562017bdAAa064184b3Eb9bd892d8Acce7d6](https://etherscan.io/address/0xCCFF562017bdAAa064184b3Eb9bd892d8Acce7d6#code)

### Other Minter Contracts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Created By: Art Blocks Inc.

import { ethers } from "hardhat";
import { MinterFilterV0__factory } from "./contracts/factories/MinterFilterV0__factory";
import { MinterSetPriceERC20V0__factory } from "./contracts/factories/MinterSetPriceERC20V0__factory";
import { MinterSetPriceV0__factory } from "./contracts/factories/MinterSetPriceV0__factory";
import { MinterDALinV0__factory } from "./contracts/factories/MinterDALinV0__factory";
import { MinterDAExpV0__factory } from "./contracts/factories/MinterDAExpV0__factory";
import { MinterFilterV0__factory } from "../../scripts/contracts/factories/MinterFilterV0__factory";
import { MinterSetPriceERC20V0__factory } from "../../scripts/contracts/factories/MinterSetPriceERC20V0__factory";
import { MinterSetPriceV0__factory } from "../../scripts/contracts/factories/MinterSetPriceV0__factory";
import { MinterDALinV0__factory } from "../../scripts/contracts/factories/MinterDALinV0__factory";
import { MinterDAExpV0__factory } from "../../scripts/contracts/factories/MinterDAExpV0__factory";

const CORE_CONTRACT_ADDRESS = "0x87c6E93Fc0B149ec59AD595e2E187a4e1d7fDC25";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Created By: Art Blocks Inc.

import { ethers } from "hardhat";
import { MinterFilterV0__factory } from "./contracts/factories/MinterFilterV0__factory";
import { MinterSetPriceERC20V1__factory } from "./contracts/factories/MinterSetPriceERC20V1__factory";
import { MinterSetPriceV1__factory } from "./contracts/factories/MinterSetPriceV1__factory";
import { MinterDALinV1__factory } from "./contracts/factories/MinterDALinV1__factory";
import { MinterDAExpV1__factory } from "./contracts/factories/MinterDAExpV1__factory";
import { MinterFilterV0__factory } from "../../scripts/contracts/factories/MinterFilterV0__factory";
import { MinterSetPriceERC20V1__factory } from "../../scripts/contracts/factories/MinterSetPriceERC20V1__factory";
import { MinterSetPriceV1__factory } from "../../scripts/contracts/factories/MinterSetPriceV1__factory";
import { MinterDALinV1__factory } from "../../scripts/contracts/factories/MinterDALinV1__factory";
import { MinterDAExpV1__factory } from "../../scripts/contracts/factories/MinterDAExpV1__factory";

// ROPSTEN (ARTIST-STAGING) ADDRESSSES
const CORE_CONTRACT_ADDRESS = "0x1cd623a86751d4c4f20c96000fec763941f098a2";
Expand Down
213 changes: 213 additions & 0 deletions scripts/1_reference_minter_suite_minter_deployer.ts
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);
});

0 comments on commit 7bd0f91

Please sign in to comment.