Open liu-zhipeng opened 1 year ago
networks: {
devnet_mainnet: {
url: '<DEVNET_RPC_URL>',
// This will allow us to use our private key for signing later
accounts: [`<PRIVATE_KEY>`],
// This is the mainnet chain ID
chainId: 1,
},
devnet_optimism: {
url: '<DEVNET_RPC_URL>',
// This will allow us to use our private key for signing later
accounts: [`<PRIVATE_KEY>`],
// This is the optimism chain ID
chainId: 10,
},
devnet_gnosis: {
url: '<DEVNET_RPC_URL>',
// This will allow us to use our private key for signing later
accounts: [`<PRIVATE_KEY>`],
// This is the gnosis chain ID
chainId: 100,
},
You can set it like this and the command is:
`npx hardhat run scripts/deploy.js --network devnet_NETWORK`
networks: { devnet_mainnet: { url: '<DEVNET_RPC_URL>', // This will allow us to use our private key for signing later accounts: [`<PRIVATE_KEY>`], // This is the mainnet chain ID chainId: 1, }, devnet_optimism: { url: '<DEVNET_RPC_URL>', // This will allow us to use our private key for signing later accounts: [`<PRIVATE_KEY>`], // This is the optimism chain ID chainId: 10, }, devnet_gnosis: { url: '<DEVNET_RPC_URL>', // This will allow us to use our private key for signing later accounts: [`<PRIVATE_KEY>`], // This is the gnosis chain ID chainId: 100, },
You can set it like this and the command is: `npx hardhat run scripts/deploy.js --network devnet_NETWORK`
deploying contracts to devnet works properly. But verification is not working.
Sorry for the misunderstanding, you can verify it using this code above through UI. But for automatic verification, this is not possible for multiple devnets, I'll make a ticket for our product team. Thanks for your feedback and sorry for the inconvenience.
Ok, Thank you.
Please consider above hot fix which i wrote. :)
I'll make a ticket for our product team. You can create a script that will inject devnet url into your environment variables and have the hardhat config read the devnet RPC URL from your ENV variables and this should work. The other option is to switch manually your RPC for each network. Automatic verification works for the same network.
I'll make a ticket for our product team. You can create a script that will inject devnet url into your environment variables and have the hardhat config read the devnet RPC URL from your ENV variables and this should work. The other option is to switch manually your RPC for each network. Automatic verification works for the same network.
Yep. maybe that might work, but i believe that will cause many other problems like exporting.
I am using 3 tenderly devnets for testing cross-chain app.
But devnet verification is not working properly for my contracts. so i investigated why.
https://github.com/Tenderly/hardhat-tenderly/blob/03b7c96dd7beb8f109a9f8e22df21d8d4a3d5a1d/packages/tenderly-hardhat/src/utils/util.ts#L429
hardhat-tenderly
checks if the network name equals todevnet
to check if current network is tenderly devnet. but i can't namedevnet
for all 3 my devnets.I think above code would be hot fix for this problem.