Skip to content

Conversation

@cctdaniel
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Sep 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 7:21am
staking-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 7:21am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
xc-admin-frontend ⬜️ Ignored (Inspect) Visit Preview Sep 12, 2024 7:21am

Comment on lines +253 to 255
() execute_upgrade_contract(slice payload) impure {
;; TODO: Implement
}
Copy link
Contributor Author

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

Copy link
Collaborator

@ali-behjati ali-behjati left a 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;
Copy link
Contributor Author

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

Copy link
Contributor Author

@cctdaniel cctdaniel Sep 12, 2024

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

@cctdaniel cctdaniel merged commit 030523d into main Sep 12, 2024
6 checks passed
@cctdaniel cctdaniel deleted the ex-gov-action branch September 12, 2024 07: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