I've deployed an upgradeable contract on Sepolia using Foundry and the Defender library. The deployment went well, and although I had a few issues with verification, I was able to resolve them.
However, now I'm trying to update the implementation following the documentation, but the transaction proposal keeps reverting.
This is really annoying, and it would be great if someone could help me.
This is the initializer in my upgradeable contract:
function initialize(address resolver, address owner) public initializer {
Storage storage s = Storage();
__Ownable_init(owner);
__EIP712_init("...", "1");
s._resolver = resolver;
}
And this is the script I'm using to deploy:
Options memory opts;
opts.defender.useDefenderDeploy = true;
address proxy = Upgrades.deployUUPSProxy(
"SuperChainModuleUpgradeable.sol",
abi.encodeCall(
SuperChainModuleUpgradeable.initialize,
(resolver, address(upgradeApprovalProcess.via))
),
opts
);
This is the upgrade script:
Options memory opts;
ProposeUpgradeResponse memory response = Defender.proposeUpgrade(
proxy,
"SuperChainModuleUpgradeable.sol",
opts
);