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

Wrong gas estimates for sending ether during contract create #319

Open
matevz opened this issue Jun 3, 2024 · 0 comments
Open

Wrong gas estimates for sending ether during contract create #319

matevz opened this issue Jun 3, 2024 · 0 comments
Labels
rust Pull requests that update Rust code

Comments

@matevz
Copy link
Member

matevz commented Jun 3, 2024

SUMMARY

Passing some ethers along the contract create transaction (e.g. https://github.com/oasisprotocol/demo-quiz/blob/3c6c15038f75fc96bf706a7a0d5ecdbca3b6f46d/backend/test/Quiz.ts#L9-L11) fails with out of gas error on sapphire networks:

Hardcoding the gas limit to 10M worked:

Also, not sending any ethers along estimates fine:

Works fine on emerald and hardhat node.

ISSUE TYPE
  • Bug Report
STEPS TO REPRODUCE

Run sapphire-localnet:

docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-localnet -test-mnemonic

Check out https://github.com/oasisprotocol/demo-quiz/ and do

cd backend
pnpm test -- --network sapphire-localnet
ACTUAL RESULTS

Contract deployment fails.

EXPECTED RESULTS

Contract should be deployed and funded.

@matevz matevz added the rust Pull requests that update Rust code label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Pull requests that update Rust code
Projects
None yet
Development

No branches or pull requests

1 participant