Skip to content

Examples on how to interact with Neo's MessageBridge using the bridge-sdk-ts library.

License

Notifications You must be signed in to change notification settings

AxLabs/bridge-examples-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript Examples for Bridge Contracts

This directory contains TypeScript scripts demonstrating how to interact with various bridge contracts on both Neo and EVM chains using the @bane-labs/bridge-sdk-ts library.

Prerequisites

  • Node.js v18 or newer
  • npm
  • Access to running nodes (Neo and/or EVM compatible)
  • Valid wallet configurations for target chains
  • Contract addresses/hashes for deployed bridge contracts

Setup

  1. Install dependencies:
    npm install
  2. Copy env-template to .env and fill in the required variables:
    cp env-template .env
    Edit .env and configure values for your target chain(s). See Environment Variables section below.

Usage

Scripts are organized by blockchain platform and bridge component. All scripts can be run using npm scripts with the following naming conventions:

  • Neo: npm run neo:<component>:<operation>
  • EVM: npm run evm:<component>:<operation>

See the platform-specific sections below and individual README files for detailed instructions.

Environment Variables

See env-template for all required and optional variables.

Neo Chain Variables

  • NEO_NODE_URL - RPC URL of the Neo node
  • NEO_WALLET_PATH - Path to your Neo wallet JSON file
  • NEO_WALLET_PASSWORD - Password for the wallet (if encrypted)
  • Contract-specific hashes (e.g., MESSAGE_BRIDGE_CONTRACT_HASH, NATIVE_BRIDGE_CONTRACT_HASH)

EVM Chain Variables

  • EVM_RPC_URL - RPC URL of the EVM node (defaults to http://localhost:8545)
  • EVM_WALLET_PATH - Path to your EVM wallet JSON file
  • EVM_WALLET_PASSWORD - Password for the wallet (if encrypted)
  • Contract-specific addresses (e.g., EVM_MESSAGE_BRIDGE_CONTRACT_ADDRESS, EVM_NATIVE_BRIDGE_CONTRACT_ADDRESS)

Operation-specific Variables

Each operation may require additional variables. See subdirectory READMEs for details.

Neo Bridge Components

EVM Bridge Components

For a comprehensive overview of EVM examples, see src/evm/README.md.

Notes

  • Ensure your .env file does not use quotes or semicolons around values.
  • Wallet file paths should be relative to this directory or absolute.
  • Scripts are modular; you can add or modify npm scripts in package.json as needed.
  • All EVM examples now include complete management, execution, message bridge, native bridge, and token bridge operations.

For more details, see the comments in each script file.

Notes

  • Ensure your .env file does not use quotes or semicolons around values.
  • Wallet file paths should be relative to this directory or absolute.
  • Scripts are modular; you can add or modify npm scripts in package.json as needed.

For more details, see the comments in each script file.

About

Examples on how to interact with Neo's MessageBridge using the bridge-sdk-ts library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors