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

Token Bridge CPI + Wormhole Gateway testing scaffold #679

Merged
merged 4 commits into from
Aug 2, 2023

Conversation

a5-pickle
Copy link
Contributor

@a5-pickle a5-pickle commented Aug 2, 2023

Adding to #650.

TBTC:

  • Slight reorganization for mint instruction submodule.

Wormhole Gateway:

  • Add two instructions for sending tBTC: send_tbtc_gateway and send_tbtc_wrapped. If sending to a chain that has a gateway, send_tbtc_gateway is used. Otherwise use send_tbtc_wrapped. The distinction can be determined in the UI (like how Solana Token Bridge transfers manage native vs wrapped).
  • Add custodian account, warehousing relevant pubkeys and bumps.
  • Each send_tbtc_* instruction performs Token Bridge CPI (gateway performs transfer with payload, wrapped performs ordinary transfer).

Miscellaneous:

  • Remove yarn.lock in favor for package-lock.json (node packages will be managed by npm now because yarn was causing issues with installing the wormhole SDK).
  • Add Makefile.
    • Run make test to perform the anchor test. Can now build for both Solana devnet and Mainnet by doing NETWORK=solana-devnet make build or NETWORK=mainnet make build respectively.
  • Add Wormhole core bridge, token bridge and relevant accounts to test validator setup (forked from mainnet).

TODO:

  • Add Wormhole Gateway tests
  • Add creating metadata in TBTC program
  • Add guardian and minter indexing in TBTC program

@a5-pickle a5-pickle requested review from eth-r and pdyraga August 2, 2023 03:49
@eth-r eth-r merged commit 290a22a into solana-anchor Aug 2, 2023
23 checks passed
@eth-r eth-r deleted the solana-gateway-program branch August 2, 2023 12:59
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