I am trying to use the Upgrades Plugin to deploy proxy contract. I tried deploying the contracts on goerli testnet but all the contracts are not getting deployed in one go. The admin and implementation contracts are deployed but not the proxy.
At first, I faced a timed-out
issue:
Error: Timed out waiting for implementation contract deployment to address 0x8A5908020053119b0151bDE43c11a28eb4ed9a7c with transaction 0x5a596d04532ef308adb8d5603477740309ae85de82e56ba439c33603f51f7749
So, I changed the deployProxy
time option to a 150
seconds, so that it doesn't get timed out.
After that, I got this: Error: Contract at 0xE76FeA9668b07DDB086c75F4Fc01030C63069A1B doesn't look like an ERC 1967 proxy with a logic contract address
I checked on the etherscan too, I didn't find any proxy contract deployed. Can somebody help me out with this.
Code to reproduce
here is the code
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts, ethers, upgrades} = hre;
const {deploy} = deployments;
const {sequencer} = await getNamedAccounts();
const Inbox = await ethers.getContractFactory("SequencerInbox");
const inbox = await upgrades.deployProxy(Inbox, [sequencer], {initializer: 'initialize', from : sequencer, timeout: 0});
console.log("inbox Proxy:", inbox.address);
console.log("inbox Implementation Address" ,await upgrades.erc1967.getImplementationAddress(inbox.address));
console.log("inbox Admin Address" ,await upgrades.erc1967.getAdminAddress(inbox.address))
}
Environment
I am using Upgrades Plugin on Hardhat (v2.11.2)