Skip to content

Commit

Permalink
feat: adding new deploy script to the ERC7432ImmutableRegistry
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardoMelo00 committed Aug 20, 2024
1 parent 8f6592f commit 172bfbd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
8 changes: 8 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const {
CRONOS_PROVIDER_URL,
CRONOSSCAN_API_KEY,
MOONSCAN_API_KEY,
ARBITRUM_ONE_URL,
ARBITRUM_API_KEY,
} = process.env

const BASE_CONFIG = {
Expand Down Expand Up @@ -71,6 +73,7 @@ const BASE_CONFIG = {
cronosTestnet: CRONOSSCAN_API_KEY,
cronos: CRONOSSCAN_API_KEY,
moonbeam: MOONSCAN_API_KEY,
arbitrumOne: ARBITRUM_API_KEY,
},
customChains: [
{
Expand Down Expand Up @@ -139,6 +142,11 @@ const PROD_CONFIG = {
url: MOONBEAM_PROVIDER_URL,
accounts: [DEV_PRIVATE_KEY],
},
arbitrum: {
chainId: 42161,
url: ARBITRUM_ONE_URL,
accounts: [DEV_PRIVATE_KEY],
},
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const kmsCredentials = {
}

const NETWORK = network.name
const ERC7432_NFTVAULT_NAME = 'NftRolesRegistryVault'
const ERC7432_IMMUTABLE_NAME = 'ERC7432ImmutableRegistry'

const networkConfig: any = network.config
const provider = new ethers.providers.JsonRpcProvider(networkConfig.url || '')
Expand All @@ -23,20 +23,20 @@ async function main() {
/** Deploy ERC7589RolesRegistry **/

await confirmOrDie(
`Deploying ${ERC7432_NFTVAULT_NAME} contract on: ${NETWORK} network with ${deployerAddress}. Continue?`,
`Deploying ${ERC7432_IMMUTABLE_NAME} contract on: ${NETWORK} network with ${deployerAddress}. Continue?`,
)

const ERC7432NftRolesRegistryFactory = await ethers.getContractFactory(ERC7432_NFTVAULT_NAME, { signer: deployer })
const EERC7432NftRolesRegistryVault = await ERC7432NftRolesRegistryFactory.deploy()
await EERC7432NftRolesRegistryVault.deployed()
const ERC7432ImmutableRegistryFactory = await ethers.getContractFactory(ERC7432_IMMUTABLE_NAME, { signer: deployer })
const EERC7432ImmutableRegistry = await ERC7432ImmutableRegistryFactory.deploy()
await EERC7432ImmutableRegistry.deployed()

console.log(`${ERC7432_NFTVAULT_NAME} deployed at: ${EERC7432NftRolesRegistryVault.address}`)
console.log(`${ERC7432_IMMUTABLE_NAME} deployed at: ${EERC7432ImmutableRegistry.address}`)

print(colors.highlight, `Verifying contract ${ERC7432_NFTVAULT_NAME} on ${NETWORK}...`)
print(colors.highlight, `Verifying contract ${ERC7432_IMMUTABLE_NAME} on ${NETWORK}...`)
await hre.run('verify:verify', {
address: EERC7432NftRolesRegistryVault.address
address: EERC7432ImmutableRegistry.address

Check failure on line 37 in scripts/ERC7432/ImmutableRegistry/01-deploy.ts

View workflow job for this annotation

GitHub Actions / build_test_deploy

Insert `,`
})
print(colors.success, `Contract ${ERC7432_NFTVAULT_NAME} verified!`)
print(colors.success, `Contract ${ERC7432_IMMUTABLE_NAME} verified!`)
}

main()
Expand Down

0 comments on commit 172bfbd

Please sign in to comment.