- Organized 252 files across project - Root directory: 187 → 2 files (98.9% reduction) - Moved configuration guides to docs/04-configuration/ - Moved troubleshooting guides to docs/09-troubleshooting/ - Moved quick start guides to docs/01-getting-started/ - Moved reports to reports/ directory - Archived temporary files - Generated comprehensive reports and documentation - Created maintenance scripts and guides All files organized according to established standards.
2.6 KiB
2.6 KiB
Bridge API Documentation
Purpose: API documentation for bridge operations
🔌 RPC Endpoints
ChainID 138
HTTP: http://192.168.11.250:8545
HTTPS: https://rpc-core.d-bis.org
WebSocket: ws://192.168.11.250:8546
📝 Contract Addresses
WETH9 Bridge
0x89dd12025bfCD38A168455A44B400e913ED33BE2
WETH10 Bridge
0xe0E93247376aa097dB308B92e6Ba36bA015535D0
WETH9 Token
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
WETH10 Token
0xf4BB2e28688e89fCcE3c0580D37d36A7672E8A9f
LINK Token
0x326C977E6efc84E512bB9C30f76E30c160eD06FB
🔧 Available Functions
Bridge Functions
sendCrossChain
Send tokens cross-chain via CCIP
Parameters:
uint64 destinationChainSelector: Destination chain selectoraddress receiver: Receiver address on destination chainuint256 amount: Amount to send
Example:
cast send <BRIDGE_ADDRESS> "sendCrossChain(uint64,address,uint256)" \
<CHAIN_SELECTOR> <RECEIVER> <AMOUNT> \
--rpc-url $RPC_URL --private-key $PRIVATE_KEY
calculateFee
Calculate CCIP fee for transfer
Parameters:
uint64 destinationChainSelector: Destination chain selectoruint256 amount: Amount to send
Returns: Fee in wei
Example:
cast call <BRIDGE_ADDRESS> "calculateFee(uint64,uint256)" \
<CHAIN_SELECTOR> <AMOUNT> --rpc-url $RPC_URL
destinations
Get destination bridge address for chain
Parameters:
uint64 chainSelector: Chain selector
Returns: Bridge address on destination chain
Example:
cast call <BRIDGE_ADDRESS> "destinations(uint64)" \
<CHAIN_SELECTOR> --rpc-url $RPC_URL
🌐 Chain Selectors
| Chain | Selector |
|---|---|
| BSC | 11344663589394136015 |
| Polygon | 4051577828743386545 |
| Avalanche | 6433500567565415381 |
| Base | 15971525489660198786 |
| Arbitrum | 4949039107694359620 |
| Optimism | 3734403246176062136 |
| Ethereum | 5009297550715157269 |
📊 Events
CrossChainTransferInitiated
Emitted when cross-chain transfer is initiated
Parameters:
uint64 destinationChainSelectoraddress receiveruint256 amount
Example:
cast logs --address <BRIDGE_ADDRESS> \
"CrossChainTransferInitiated(uint64,address,uint256)" \
--rpc-url $RPC_URL
🧪 Testing
Test Connectivity
cast block-number --rpc-url $RPC_URL
Test Contract
cast code <CONTRACT_ADDRESS> --rpc-url $RPC_URL
Test Function
cast call <CONTRACT_ADDRESS> "<function>" <args> --rpc-url $RPC_URL
Last Updated: $(date)