Hello,
I deployed two contracts with the same results and I need some help if it's possible to recover at least one of these contracts as it appears it's not completed initialized.
The steps I did were to deploy the upgradeable contract to mainnet with a low gas fee, send a second transaction with higher fees then cancel the first transaction so the second one with higher fees could be completed.
The result is that the mainnet.json file will point to the first transaction proxy, which is dead since it was canceled.
The question is, are there any chances to fix one on the deployed contracts so we don't have to pay the high gas fees for the third time?
Code to reproduce
Mainnet.json with a snippet of proxy and two contracts (proxy points to the canceled transaction):
` "manifestVersion": "3.2",
"proxies": [],
"impls": {
"eda3a9598019f3a192085d1091e742dae6c9ff276e8508bed84cc3004c3ac847": {
"address": "0x36382f97A998CEA8194ffADED3d7E51C257E745b",
"txHash": "0x7cfbb4590122b1fabbd3b4f507496bc3f715d793972797d9e9fc6bd510602479",
"layout": {
"storage": [
{
"contract": "Initializable",
"label": "_initialized",
.
.
.
},
"3ead3124807e426e513a7b0d80dfb5eb96995d8f824f253b1ba825ba3bedc3a7": {
"address": "0xa47FdD697cbc04428dd3583A5CD16cc88b19B7b5",
"txHash": "0xb7803b423f1affa426179cc326590d2cede4be8eae8d99e0b11b4305b6abd64b",
"layout": {
"storage": [
{
"contract": "Initializable",
"label": "_initialized",
.
.
.
},
"45bed5eb153651e422858def5e5bc7a418113a9d3e89565b57791b0f16a89a21": {
"address": "0x2026644f276BC1D2BDD08af91228194C52957151",
"txHash": "0xc8691db33e6a3e1a0b2ebab228c0995627fb8ed469e126197ab6735d7fca5d0e",
"layout": {
"storage": [
{
"contract": "Initializable",
"label": "_initialized",
Deployment script:
const { ethers, upgrades } = require("hardhat");
async function main() {
const [deployer] = await ethers.getSigners();
console.log("Deploying contracts with the account:", deployer.address);
console.log("Account balance:", (await deployer.getBalance()).toString());
const Metaframe = await ethers.getContractFactory("Metaframe");
console.log("Starting deployment...");
const metaframe = await upgrades.deployProxy(Metaframe,{ initializer: 'initialize' });
console.log("Started waiting for confirmation...");
await metaframe.deployed();
console.log("Metaframe deployed to:", metaframe.address);
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
Environment
Hardhat version 2.6.8
"@openzeppelin/contracts-upgradeable": "^4.3.2",