#wormhole #solana #anchor #programs #token #apps #bridge

wormhole-anchor-sdk

SDK using Anchor interfaces to interact with Wormhole Solana Programs

3 unstable releases

0.29.0-alpha.1 Feb 2, 2024
0.1.0-alpha.2 Aug 16, 2023
0.1.0-alpha.1 Aug 4, 2023

#2534 in Magic Beans

Download history 8/week @ 2024-01-27 2/week @ 2024-02-03 30/week @ 2024-02-10 133/week @ 2024-02-17 621/week @ 2024-02-24 452/week @ 2024-03-02 380/week @ 2024-03-09 246/week @ 2024-03-16 270/week @ 2024-03-23 399/week @ 2024-03-30 275/week @ 2024-04-06 34/week @ 2024-04-13 28/week @ 2024-04-20

830 downloads per month

Apache-2.0

39KB
990 lines

Wormhole Scaffolding

This repository warehouses apps that integrate with Wormhole generic messaging and existing apps that use Wormhole message passing. These apps range in complexity and demonstrate how to organize your business logic in your smart contracts. These examples show the basic structure of an xdapp and how the wormhole works with the respective programming environment. Example repos also include tests to debug and deploy the dapps in local environment.

There are 3 example dapps that give a walkthrough on some of the core components of the wormhole messaging and portal token bridge.

  1. Hello World -> Solana | EVM
  2. Hello Token -> Solana | EVM
  3. NFT Burn Bridging -> Solana | EVM

Prerequisites

EVM

If your xChain app will require EVM smart contracts, we recommend using Foundry tools, which include forge, anvil and cast CLI tools.

Solana

If your xChain app will require Solana programs, prepare your development environment by installing Solana and Anchor dependencies, which include solana and anchor CLI tools.

Anchor helps in abstracting solana architecture boilerplate code. However, it has its own challenges so you can still write programs in native rust, download 'rust-analyzer' to debug and write efficient rust.

SUI

Install the Sui CLI. This tool is used to compile the contracts and run the tests.

cargo install --locked --git https://github.com/MystenLabs/sui.git --rev 09b2081498366df936abae26eea4b2d5cafb2788 sui sui-faucet

Worm CLI

First, check out the Wormhole repo, then install the CLI tool by running:

wormhole/clients/js $ make install

worm is the swiss army knife for interacting with wormhole contracts on all supported chains, verifying payloads, and generating VAAs. Head to Cli docs to learn more.

Build and Test

Each directory represents Wormhole integrations for specific blockchain networks. Please navigate to a network subdirectory to see more details on building and testing. If you have questions or doubts join the wormhole discord.

Dependencies

~17–25MB
~424K SLoC