-
Notifications
You must be signed in to change notification settings - Fork 136
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
fix: wrong gas parameters while broadcasting tx in script #473
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n requestEip712tx. WIP debugging signature and encoding
HermanObst
changed the title
fix: gas in broadcast
fix: wrong gas parameters while broadcasting tx in script
Jul 12, 2024
nbaztec
reviewed
Jul 12, 2024
Co-authored-by: Nisheeth Barthwal <[email protected]>
Karrq
approved these changes
Jul 16, 2024
@@ -652,33 +651,38 @@ impl ScriptArgs { | |||
|
|||
let signed_tx = if let Some(zk) = zk { | |||
let custom_data = Eip712Meta::new().factory_deps(zk.factory_deps); | |||
let gas_price = provider.get_gas_price().await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps get gas_price
from tx or from provider if absent. In the end we use the one from the zks_estimateFee
Jrigada
approved these changes
Jul 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix incorrect gas parameters while broadcasting txs in Script
Solution
We were using incorrect gas price for the fee estimations RPC call and also ignoring the gas_per_pubdata field for the EIP712 tx, defaulting to its max value, potentially leading to "not enough balance" issues