IXFI Gateway
Contract Interface
interface IIXFIGateway {
// Cross-chain messaging
function callContract(
string memory destinationChain,
string memory contractAddress,
bytes memory payload
) external;
function callContractWithToken(
string memory destinationChain,
string memory contractAddress,
bytes memory payload,
string memory symbol,
uint256 amount
) external;
// Token operations
function sendToken(
string memory destinationChain,
string memory destinationAddress,
string memory symbol,
uint256 amount
) external;
// Command execution
function execute(bytes memory data) external;
// Relayer management
function isValidRelayer(address relayer) external view returns (bool);
// Chain management
function isValidChain(string memory chainName) external view returns (bool);
// Status queries
function isCommandExecuted(bytes32 commandId) external view returns (bool);
}Core Functions
callContract
callContractWithToken
sendToken
execute
View Functions
isValidRelayer
isValidChain
isCommandExecuted
Events
ContractCall
ContractCallWithToken
TokenSent
Executed
Error Codes
Gas Costs
Function
Estimated Gas
Factors
Integration Examples
Basic Integration
Token Transfer Integration
DeFi Integration
Security Considerations
Input Validation
Access Control
Reentrancy Protection
Upgradeability
Monitoring and Analytics
Event Monitoring
Transaction Tracking
Best Practices
1. Always Check Chain Support
2. Validate Contract Addresses
3. Handle Token Approvals
4. Implement Proper Error Handling
5. Use Events for Tracking
Resources
Last updated