-
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e6b3ca5
add execute_governance_action
cctdaniel eeb36d0
add more governance test payload
cctdaniel da4c8a0
fix comment for ACCUMULATOR_WORMHOLE_MAGIC
cctdaniel 28d2d72
remove other constants
cctdaniel d8406d2
add test for set data sources governance instruction
cctdaniel a69ffed
refactor
cctdaniel 4c1b140
add execute_authorize_governance_data_source_transfer
cctdaniel bebe051
precommit
cctdaniel 32dfaa2
make set_valid_period unsupported
cctdaniel d0ac2a6
add unhappy path for update price feeds with insufficient fee
cctdaniel 4aa6b91
precommit
cctdaniel ccd685c
add more unhappy paths
cctdaniel c2d456b
add more tests
cctdaniel 3d28054
add comment
cctdaniel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| 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 commentThe 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 |
||
Oops, something went wrong.
Oops, something went wrong.
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.
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?
Uh oh!
There was an error while loading. Please reload this page.
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