When I run
npx hardhat run script/deploy.js --network rinkeby
I get this error in terminal:
Deploying Promethium...
Error: Timed out waiting for implementation contract deployment to address 0x1AC89108c6F906A8A3a2ad69207866f9A77E511E with transaction 0x2ce92d0d392ae408dbc83b628564e5c1ef9ddd104561cc723a54f35b9ce72b0c
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.
This is my deploy.js
// scripts/deploy.js
//last deploy address:
async function main() {
const Promethium = await ethers.getContractFactory("Promethium");
console.log("Deploying Promethium...");
const promethium = await upgrades.deployProxy(Promethium, ["0xeac9852225Aa941Fa8EA2E949e733e2329f42195"], { initializer: 'initialize' });
console.log(promethium);
}
main()
.then(() => process.exit(0))
.catch(error => {
console.error(error);
process.exit(1);
});
This is my hardhat.configuration
/**
* @type import('hardhat/config').HardhatUserConfig
*/
require("@nomiclabs/hardhat-ethers");
require('@openzeppelin/hardhat-upgrades');
require("@nomiclabs/hardhat-etherscan");
module.exports = {
solidity: "0.8.2",
networks: {
rinkeby: {
url: `https://eth-rinkeby.alchemyapi.io/v2/${process.env.ALCHEMY_KEY}`,
accounts: {mnemonic: process.env.MNEMONIC_WALLET},
gas: 2100000,
gasPrice: 80000000000
},
matic: {
url: "https://rpc-mumbai.maticvigil.com",
accounts: [process.env.PRIVATE_KEY_WALLET_RINKEBY],
gas: 2100000,
gasPrice: 80000000000
}
},
etherscan: {
apiKey: process.env.POLYGON_API_KEY,
}
};
I'm facing a lot of problems with rinkeby today...
When I try to update a contract using:
npx hardhat run script/update.js --network rinkeby
where this is my update.js file:
// scripts/prepare_upgrade.js
async function main(deployer) {
const proxyAddress = '0x44a1ba61618d9218e6afe75ad1a14729e9325e5a';
const promethium_v2 = await ethers.getContractFactory("MonstersOnTheWayCardsV2");
console.log("Preparing upgrade...");
const boxV2Address = await upgrades.upgradeProxy(proxyAddress, promethium_v2, { deployer });
console.log("Updated contract at:", boxV2Address);
}
main()
.then(() => process.exit(0))
.catch(error => {
console.error(error);
process.exit(1);
});
I get the following message in console:
Preparing upgrade...
Error: Deployment at address 0x8aF23F0bF25f428f9023eC9918923F2C9D621f47 is not registered
To register a previously deployed proxy for upgrading, use the forceImport function.
Even though I don't know what that address is...
What's going on? How can I solve these problems?