Thanks for the detailed example. It works no problem on the testnets, but I got an error about cannot estimate gas when I tried to deploy contracts on Optimism.
Wondering if there’s a way to manually setup the gas limit when deploying contracts using upgrades.deployProxy(), or is there anything else that can fix the issue.
Tried to setup the gas in the config but that doesn’t seem to work, and got the same cannot estimate gas error. Is there any way to set the gas limit when sending the transaction?
Hello @maxweng, welcome to the forum! I’m not familiar with Optimism, but happy to give it a look if you could provide a repo reproducing it, if that’s something you can do.
I added gasPrice : 0 parameter to the deployProxy() function, for example: await deployProxy(Common, , { deployer, gasPrice: 0 }); The next error that pops up after this is that the ProxyAdmin deployment fails as below. Might be gasPrice not propagating but looks different - issue with OZ and Optimism? TransparentUpgradableProxy.sol constructor assert line 34: assert(_ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin))- 1)? :