-
Notifications
You must be signed in to change notification settings - Fork 76
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
gas estimation error while deploying smart accounts using default node #347
Comments
@MexicanAce thoughts on making a call to zks_getFeeParams upon start to get the most accurate gas params? Couple of my own thoughts:
Let me know your thoughts here! |
That should be fine, so long as we handle the scenario of no internet connection or bad response from the server, and have a backup/default value to use in its place. That being said, not all the values we need are returned in |
Unit tests will mock the response of |
So after like 20 failed attempts to update the gas parameters in hopes of fixing this, I'm now thinking this is the same symptom I saw here: https://github.com/matter-labs/zksync-account-sdk/issues/47. Which means this has nothing to do with gas estimation and everything to do with the order of operations for code deployment. Deploying the account contract before attempting to deploy the factory fixes the issue (for me at least locally). I was never even able to get the deployment to work by forking Sepolia, so it's possible I just have an entirely different setup and issue.
So to me this says we need to fix our factory deps to actually deploy the contract or at least explain that the bytecode needs to exist before attempting to deploy it within a transaction. |
🐛 Bug Report for zkSync Era In-Memory Node
📝 Description
Trying to deploy a smart account to a local node with
era_test_node
only works by forking the sepolia testnet first when using the latest hardhat plugin. Running the standard node results in an error estimating gas:🔄 Reproduction Steps
era_test_node run
.env
file and add the private key of a pre-configured rich wallet.inMemoryNode
in the hardhat config.deploy/deploy-multisig.ts
to point to the local node (http://127.0.0.1:8011
).bun run compile
bun hardhat deploy-zksync --script deploy-factory.ts
deploy/deploy-multisig.ts
bun hardhat deploy-zksync --script deploy-multisig.ts
🤔 Expected Behavior
The script should succeed and deploy a new instance of a smart account using the factory.
😯 Current Behavior
The last script will fail with the error above.
The text was updated successfully, but these errors were encountered: