Cross-Chain Calls
Call Types
Simple Contract Call
await di.gateway.callContract({
destinationChainId: 56, // BSC
destinationContract: '0x742d35Cc6634C0532925a3b8D400E4C0C0b8C8e0',
payload: encodedFunctionCall,
gasToken: 'DUSD',
gasLimit: 200000
});Contract Call with Token Transfer
await di.gateway.callContractWithToken({
destinationChainId: 137, // Polygon
destinationContract: '0x742d35Cc6634C0532925a3b8D400E4C0C0b8C8e0',
payload: encodedFunctionCall,
symbol: 'DUSD',
amount: ethers.parseEther('1000'),
gasToken: 'DUSD',
gasLimit: 300000
});Function Encoding
Basic Function Call
Complex Function Call
Execution Flow
Message Creation
Message Execution
Gas Management
Gas Estimation
Gas Token Options
Advanced Features
Batch Calls
Conditional Execution
Error Handling
Common Errors
Retry Mechanism
Monitoring & Tracking
Message Status
Event Monitoring
Best Practices
Security
Efficiency
Reliability
Integration Examples
DeFi Protocol Integration
NFT Cross-Chain Transfer
Governance Cross-Chain Execution
Last updated