Hi team
Project postponed due to technical issues.
I was trying to deploy upgradable contracts to Ethereum mainnet network, but getting this error.
rinkeby is success
but, mainnet is Failed
I think giving up on 'upgradable' is the answer.
// scripts/deploy.js
const { ethers, upgrades } = require('hardhat');
async function main () {
let network = "mainnet";
console.log("network:", network);
const CanYourPet = await ethers.getContractFactory('CanYourPet');
let proxyRegistryAddress = "0xa5409ec958c83c3f309868babaca7c86dcb077c1";
console.log("proxyRegistryAddress:", proxyRegistryAddress);
console.log('Deploying CanYourPet...');
const cyp = await upgrades.deployProxy(CanYourPet, [proxyRegistryAddress], { initializer: 'initialize' });
await cyp.deployed();
console.log('CanYourPet deployed to:', cyp.address);
}
main();
//hardhat.config.js
networks: {
mainnet: {
url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY_MAINNET}`,
accounts: { mnemonic: process.env.MNEMONIC_MAINNET },
gas: 2100000,
gasPrice: 110 * 1000000000, //110 Gwei
saveDeployments: true,
}
}
I can't find a way anymore.
can you help me ?
thank you.