MCPcopy Create free account
hub / github.com/codingwithdidem/boredape-minting-dapp / main

Function main

scripts/deployContract.js:15–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13const proxyRegistryAddressMainnet = '0xa5409ec958c83c3f309868babaca7c86dcb077c1'
14
15async function main() {
16 // Calculate merkle root from the whitelist array
17 const leafNodes = whitelist.map((addr) => keccak256(addr))
18 const merkleTree = new MerkleTree(leafNodes, keccak256, { sortPairs: true })
19 const root = merkleTree.getRoot()
20
21 // Deploy the contract
22 const BoredApes = await hre.ethers.getContractFactory('BoredApe')
23 const boredApes = await BoredApes.deploy(
24 BASE_URI,
25 root,
26 proxyRegistryAddressRinkeby
27 )
28
29 await boredApes.deployed()
30
31 console.log('BoredApes deployed to:', boredApes.address)
32}
33
34// We recommend this pattern to be able to use async/await everywhere
35// and properly handle errors.

Callers 1

deployContract.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected