Overview
Eco Routes Protocol supports cross-chain intents between different virtual machine architectures, including EVM-to-EVM, EVM-to-Solana, and other combinations. This requires careful handling of address formats across different chain types.Address Formats
EVM Addresses (20 bytes)
Solana Addresses (32 bytes)
Universal Format (bytes32)
The protocol usesbytes32 as a universal address format:
AddressConverter Library
TheAddressConverter library provides safe conversion between EVM addresses and the universal bytes32 format.
Converting Address to Bytes32
Converting Bytes32 to Address
Validation
Usage in IntentSource
TheIntentSource contract uses AddressConverter throughout:
Cross-Chain Address Handling
EVM → EVM
When both source and destination are EVM chains:EVM → Solana
When destination is Solana (or another non-EVM chain):Solana → EVM
When source is Solana and destination is EVM:CREATE2 and Cross-VM
Standard CREATE2 Prefix
On most EVM chains, CREATE2 uses prefix0xff:
TRON Exception
TRON Uses 0x41: TRON is an EVM-compatible chain but uses a different CREATE2 prefix for historical reasons.
Practical Examples
Example 1: EVM Deposit Address
Example 2: Solana Deposit Address
Example 3: Validation in Smart Contracts
Security Considerations
Safe Conversion
Type Safety
The library provides compile-time type safety:Why use bytes32 instead of separate types?
Why use bytes32 instead of separate types?
Using
bytes32 as a universal format provides:- Simplicity: One type for all chains
- Gas efficiency: No complex encoding/decoding
- Forward compatibility: Works with future chain types
- Storage efficiency: Fixed 32-byte slots
Can I use checksummed addresses?
Can I use checksummed addresses?
Yes! Checksumming is a display-level feature (mixed case). The underlying bytes are identical:
What about ENS names?
What about ENS names?
ENS names must be resolved to addresses before being used in intents:
Next Steps
Deposit Addresses
Learn how deposit addresses leverage cross-VM support
Deterministic Addresses
Understand CREATE2 deployment across different chains