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

Invalid version of DeployAccount transaction #202

Merged
merged 2 commits into from
Oct 12, 2023
Merged

Conversation

marioiordanov
Copy link
Collaborator

Estimating fee of DeployAccount transactions was failing, because blockifier approves only version 1 for DeployAccount transaction. In our implementation the version that is coming from the BroadcastedTransaction is being used. Which for estimate_fee is offset + transaction version. So the fix is to hardcode the version of deploy account transaction to 1, when creating the starknet_api object.

This error is not present in the other types of transaction, because we are not able to assign value to the transaction version.

Checklist:

  • Applied formatting - ./scripts/format.sh
  • No linter errors - ./scripts/clippy_check.sh
  • Performed code self-review
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Documented the changes
  • Linked the issues which this PR resolves
  • Updated the tests
  • All tests are passing - cargo test

…use blockifier returns error when using the version that is for fee estimation
@ivpavici
Copy link
Contributor

@marioiordanov @FabijanC I will merge this to see if the tests will pass.
If there is a different way to solve this, please open another issue for refactor!

@ivpavici ivpavici merged commit 3c7aba8 into main Oct 12, 2023
@ivpavici ivpavici deleted the invalid_version_fix branch October 12, 2023 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants