While deploying the contract I am getting following error frequently
Timed out waiting for proxy admin contract deployment to address 0xfBb4cD5E832c24AC78E8e209243124a8f579690E with transaction 0xd1b3506df616f3e89c2722dec7b6684553a65f1a25c0bc331910c6ad7a3ad430
Run the function again to continue waiting for the transaction confirmation. If the problem persists, adjust the polling parameters with the timeout and pollingInterval options.
I have tried rerunning script as recommended above. But it doesn't help. I have also mentioned the code I am using for deploying contracts. It was working fine but started giving above mentioned error since last few days.
Any help is appreciated!
Code to reproduce
const {
DefenderRelaySigner,
DefenderRelayProvider,
} = require("defender-relay-client/lib/ethers");
const { Signer } = require("ethers");
const { ethers, upgrades } = require("hardhat");
async function deploy() {
gasPrice = await ethers.provider.getGasPrice()
console.log(gasPrice)
feeData = await ethers.provider.getFeeData()
console.log(feeData)
const FEE_DATA = {
maxFeePerGas: ethers.utils.formatUnits(feeData.maxFeePerGas, "gwei"),
maxPriorityFeePerGas: ethers.utils.formatUnits(feeData.maxPriorityFeePerGas,'gwei'),
};
const provider = new ethers.providers.FallbackProvider([ethers.provider], 1);
provider.getFeeData = async () => FEE_DATA;
const Base = await ethers.getContractFactory(
process.env.CONTRACT_NAME,
);
console.log("Deploying Base contract...");
const base = await upgrades.deployProxy(
Base,
[
process.env.COLLECTION_NAME,
process.env.COLLECTION_SYMBOL,
process.env.CONTRACT_URI,
process.env.TOTAL_COUNT,
process.env.REVEAL_URI,
process.env.COLLECTOR,
process.env.MANAGER,
process.env.OWNER,
],
{
initializer: "initialize",
gasPrice: (await ethers.provider.getGasPrice()).mul(500).div(100),
timeout: 600000,
// kind: 'uups'
}
);
await base.deployed();
console.log("Base contract deployed to:", base.address);
}
deploy()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
Environment
Hardhat, Solidity, Polygon, Javascript