Global Address is a cross-chain token bridging solution that allows users to send tokens to a single address and automatically bridge them to destination chain.
# Install dependencies
bun install # or `npm install`
# Run vanilla example (user pays fees)
npx ts-node src/index.ts
# Run sponsored example (developer pays fees)
npx ts-node src/sponsor.ts
This project contains:
src/index.ts
- Vanilla global address where users pay bridging feessrc/sponsor.ts
- Developer-sponsored fees (requiresZERODEV_PROJECT_ID
in.env
)
Create a .env
file:
ZERODEV_PROJECT_ID=your_project_id_here
- Run either example to get your global address
- Send tokens to the global address from supported chains (Arbitrum, Mainnet, Optimism)
- Check the destination chain (Base) to see tokens received
For comprehensive documentation, configuration options, and advanced usage, visit the official ZeroDev Global Address documentation: