wormhole-solidity-sdk

0.0.4 • Public • Published

Wormhole Solidity SDK

This version of the Wormhole Solidity SDK, configured by ndujaLabs for Hardhat compatibility, incorporates the original SDK as a submodule. It aligns with commit 6794...43e7.


The purpose of this SDK is to provide helpers to take your existing single-chain solidity application cross-chain using Wormhole's automatic relayers

Installation

Foundry and Forge

forge install wormhole-foundation/wormhole-solidity-sdk

Example Usage + Introduction to Automatic Relayers

HelloWormhole - Simple cross-chain message sending application

HelloToken - Simple cross-chain token sending application

HelloUSDC - Simple cross-chain USDC sending application using CCTP

SDK Summary

  • Includes interfaces to interact with contracts in the Wormhole ecosystem (src/interfaces)

  • Includes the base class ‘Base’ with helpers for common actions that will typically need to be done within ‘receiveWormholeMessages’:

  • Included are also the ‘TokenSender’ and ‘TokenReceiver’ base classes with helpers for smart contracts that wish to send and receive tokens using Wormhole’s TokenBridge. See ‘HelloToken’ for example usage.

  • Included are also the ‘CCTPSender’ and ‘CCTPReceiver’ base classes with helpers for smart contracts that wish to send and receive both tokens using Wormhole’s TokenBridge as well as USDC using CCTP. See ‘HelloUSDC’ for example usage.

  • Included are helpers that help set up a local forge testing environment. See ‘HelloWormhole’ for example usage.

Note: This code is meant to be used as starter / reference code. Feel free to modify for use in your contracts, and also make sure to audit any code used from here as part of your contracts before deploying to mainnet.

Package Sidebar

Install

npm i wormhole-solidity-sdk

Weekly Downloads

30

Version

0.0.4

License

Apache-2.0

Unpacked Size

167 kB

Total Files

21

Last publish

Collaborators

  • sullof