Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of gas during deploy to conduit chains #2907

Open
qbzzt opened this issue Jun 19, 2024 · 2 comments
Open

Out of gas during deploy to conduit chains #2907

qbzzt opened this issue Jun 19, 2024 · 2 comments

Comments

@qbzzt
Copy link
Contributor

qbzzt commented Jun 19, 2024

When deploying to a conduit blockchain, you might get an error due to the post deploy script being out of gas:

Error: Error:
Transaction Failure: <transaction hash>
Error running "forge script PostDeploy --broadcast --sig run(address) <world address> --rpc-url <conduit URL> -vvv --legacy --no-gas-limit"
    at o (file:/// < directory > /tutorial3/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@latticexyz/common/dist/foundry.js:2:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    (...)

For some reason we are still investigating the default gas estimates coming from the blockchain are too low, so the transaction runs out of gas.

Workaround

Use the --forgeScriptOptions command line parameter to specify the gas estimate multiplier forge script will use.

pnpm mud deploy --rpc $RPC_URL --forgeScriptOptions '\-\-gas-estimate-multiplier 200'
@holic
Copy link
Member

holic commented Jun 19, 2024

This sounds more like a forge/foundry issue than a MUD issue. Can you get this to consistently happen running just the forge script? If so, should we submit an issue there?

To work around this in the meantime, can pass the --forgeScriptOptions flag with mud deploy

@qbzzt
Copy link
Contributor Author

qbzzt commented Jun 20, 2024

This sounds more like a forge/foundry issue than a MUD issue. Can you get this to consistently happen running just the forge script? If so, should we submit an issue there?

To work around this in the meantime, can pass the --forgeScriptOptions flag with mud deploy

Thank you. I updated the workaround above and added this option to the docs (#2908).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants