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

feat(target_chains/ton): wormhole contract #1814

Merged
merged 25 commits into from
Aug 23, 2024
Merged

feat(target_chains/ton): wormhole contract #1814

merged 25 commits into from
Aug 23, 2024

Conversation

cctdaniel
Copy link
Contributor

@cctdaniel cctdaniel commented Aug 6, 2024

  • added parse_encoded_upgrade main code and test
  • added parse_and_verify_wormhole_vm main code and test

Copy link

vercel bot commented Aug 6, 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 Aug 23, 2024 8:07am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
xc-admin-frontend ⬜️ Ignored (Inspect) Visit Preview Aug 23, 2024 8:07am

@@ -290,7 +290,7 @@ slice begin_parse(cell c) asm "CTOS";
;;; Preloads the first reference from the slice.
cell preload_ref(slice s) asm "PLDREF";

{- Functions below are commented because are implemented on compilator level for optimisation -}
{- Functions below are commented because are implemented on compilator level for optimisation -}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

probably pre-commit

Copy link
Collaborator

@ali-bahjati ali-bahjati left a comment

Choose a reason for hiding this comment

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

The code looks good but because the language is very low-level I like you to add much more documentations to the methods and logics so a less familiar reader can navigate through it easily.

Most of my comments are minor but I like to take another look after you've replied to/addressed them.

target_chains/ton/contracts/contracts/Pyth.fc Show resolved Hide resolved
target_chains/ton/contracts/contracts/Wormhole.fc Outdated Show resolved Hide resolved
target_chains/ton/contracts/contracts/Wormhole.fc Outdated Show resolved Hide resolved
target_chains/ton/contracts/contracts/Wormhole.fc Outdated Show resolved Hide resolved
target_chains/ton/contracts/tests/utils.ts Outdated Show resolved Hide resolved
target_chains/ton/contracts/wrappers/WormholeTest.ts Outdated Show resolved Hide resolved
target_chains/ton/contracts/wrappers/WormholeTest.ts Outdated Show resolved Hide resolved
"0x6FBEBC898F403E4773E95FEB15E80C9A99C8348D",
];

export function createGuardianSetUpgradeBytes(
Copy link
Collaborator

Choose a reason for hiding this comment

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

isn't there any function in wormhole sdk to do it? we might have some ourselves too.

Copy link
Collaborator

@ali-bahjati ali-bahjati left a comment

Choose a reason for hiding this comment

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

Nice!

As a todo for future we should test that the code fails with incorrect VAAs.

@cctdaniel cctdaniel merged commit e82158d into main Aug 23, 2024
5 checks passed
@cctdaniel cctdaniel deleted the ton-wormhole branch August 23, 2024 08:15
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