-
Notifications
You must be signed in to change notification settings - Fork 302
feat(target_chains/ton): add execute_governance_action #1882
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
| () execute_upgrade_contract(slice payload) impure { | ||
| ;; TODO: Implement | ||
| } |
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.
will implement in a following PR
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.
Nice! I'm approving this but we need to add more test cases for failure scenarios and i strongly recommend changing the rust test case generator to generate typescript fixtures instead of using its outputs in cairo. Having a generic test case generator will massively help us in new network integrations.
| int get_compute_fee(int workchain, int gas_used) asm(gas_used workchain) "GETGASFEE"; | ||
|
|
||
| ;; The actual gas used for the transaction is 350166 but we add ~10% (385182.6) and round up (390000) to be on the safe side because the amount of gas used can vary based on the current state of the blockchain | ||
| const int UPDATE_PRICE_FEEDS_GAS = 390000; |
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.
calculated by following the best practice suggested here which is to run tests and get the actual gas_used amount
|
|
||
| const int WORMHOLE_MERKLE_UPDATE_TYPE = 0; | ||
|
|
||
| const int WORKCHAIN = 0; |
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.
What is this?
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.
there are 2 blockchains on TON: https://docs.ton.org/learn/overviews/ton-blockchain#blockchain
and they have different costs depending on the chains: https://docs.ton.org/develop/smart-contracts/fees#gas
will add comment to the file to make it clearer
No description provided.