Can not deploy contract with proxy on the Optimism

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.

I think you can set gas limit in the config file, the key word is gas, and for more details, please check this documentation

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?

1 Like

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.

Thanks for looking into it. Here’s a repo I created for you to reproduce the issue:

You can run yarn test --network optimism to see the errors, assuming you running the optimism node locally on

1 Like

Hey @martriay , did you get a chance to look into it?