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.
- 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
- Install dependencies:
npm install
- Copy
env-templateto.envand fill in the required variables:Editcp env-template .env
.envand configure values for your target chain(s). See Environment Variables section below.
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.
See env-template for all required and optional variables.
NEO_NODE_URL- RPC URL of the Neo nodeNEO_WALLET_PATH- Path to your Neo wallet JSON fileNEO_WALLET_PASSWORD- Password for the wallet (if encrypted)- Contract-specific hashes (e.g.,
MESSAGE_BRIDGE_CONTRACT_HASH,NATIVE_BRIDGE_CONTRACT_HASH)
EVM_RPC_URL- RPC URL of the EVM node (defaults to http://localhost:8545)EVM_WALLET_PATH- Path to your EVM wallet JSON fileEVM_WALLET_PASSWORD- Password for the wallet (if encrypted)- Contract-specific addresses (e.g.,
EVM_MESSAGE_BRIDGE_CONTRACT_ADDRESS,EVM_NATIVE_BRIDGE_CONTRACT_ADDRESS)
Each operation may require additional variables. See subdirectory READMEs for details.
- Native Bridge: Handles native token (GAS/NEO) bridging. See src/neo/native-bridge/README.md
- Token Bridge: Handles NEP-17 token bridging. See src/neo/token-bridge/README.md
- Message Bridge: Handles cross-chain message bridging. See src/neo/message-bridge/README.md
- Management: Handles ownership, relayer, governor, security guard, and validator management. See src/neo/management/README.md
- Execution Manager: Handles message execution and bridge management. See src/neo/execution-manager/README.md
- Wallet Operations: Examples for wallet interactions. See src/neo/wallet/README.md
- Message Bridge: Handles cross-chain message bridging operations between EVM and Neo. See src/evm/message-bridge/README.md
- Execution Manager: Handles message execution and management. See src/evm/execution-manager/README.md
- Native Bridge: Handles native token bridging operations. See src/evm/native-bridge/README.md
- Token Bridge: Handles ERC-20 token bridging operations. See src/evm/token-bridge/README.md
- Bridge Management: Handles governance and validator management. See src/evm/bridge-management/README.md
For a comprehensive overview of EVM examples, see src/evm/README.md.
- Ensure your
.envfile 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.jsonas 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.
- Ensure your
.envfile 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.jsonas needed.
For more details, see the comments in each script file.