[General] Gas price estimation on ZKsync chains #832
-
Team or ProjectHyperlane EnvironmentMainnet L2 block numberNo response Provide a brief description of the functionality you're trying to implement and the issue you are running into.Transaction submission Repo Link (Optional)No response Additional DetailsSome questions:
We have a Rust PR that attempts to follow the same gas estimation approach from the JS zkSync sdk, and it seems to work ok without a |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Gas Price Estimation on ZKsync Chains
For further details and discussions, you might find it helpful to visit the ZKsync developers discussions on Github. Your feedback helps us serve you better. If this fully addresses your question, please give it a thumbs up. If it doesn't, please give it a thumbs down. This will inform the community and team so we can improve our support. |
Beta Was this translation helpful? Give feedback.
-
Hey! Here’s some clarification:
Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hey! Here’s some clarification:
Gas Price Estimation:
Yes, it’s recommended to use
zks_estimateFee
. This works seamlessly with thezksync-ethers
andviem
SDKs.EIP-1559 Parameters:
In fact
maxFeePerGas
is utilized and includes the base fee, so it’s sufficient to use that in transactions.maxPriorityFeePerGas
is not utilized, as ZKsync doesn’t have a concept of priority fees. The server likely returns0
for this parameter. We're currently fixing the documentation to make this clearer and fix that error.gasPerPubdata
Parameter:This is only required for
eip-712
transactions. You can continue using theeip-1559
format, which ZKsync supports well. Transaction inclusion shouldn’t differ…