Integration Requirements
Metalayer Protocol Requirements
Source Chain
- Implement a protocol contract that calls the MetalayerRouter
- Calculate and include appropriate gas payment
- Properly encode message data and read operations
Destination Chain
- Implement the IMetalayerRecipient interface
- Handle incoming messages and read results
- Process cross-chain operations securely
Security Considerations
- The MetalayerRouter must be configured to be trusted on the destination chain. Do not allow the
deliver
function in your protocol to be called by any address other than the local MetalayerRouter. - Consider finality requirements for your use case. If your contract needs to wait for finality on the source chain before processing a message, set the
_useFinalized
flag totrue
in thedispatch
function. This significantly reduces the risk of a reorg in your contract.