Data Bridge: Pass arbitrary messages between chains
Overview
Setup
Creating the Midpoint
The sending contract
pragma solidity>=0.8.0;
interface IMidpoint {
function callMidpoint(uint64 midpointId, bytes calldata _data)
external returns(uint256 requestId);
}
contract SendingContract {
// ... all your code goes here, and at some point invokes sendMessage() below
uint64 constant midpointID = 758;
address constant startpointAddress = 0x711D64597FD64bCE7460F555fA928d02862a6f55;
function sendMessage(string memory subject) public {
bytes memory args = abi.encodePacked(subject, bytes1(0x00));
IMidpoint(startpointAddress).callMidpoint(midpointID, args);
}
}The receiving contract
Midpoint
1 . Startpoint Called
2. Transact To EVM Function
3. Define Path
4. Publish Midpoint
PreviousData Feed: Stream a data feed on-chain at regular intervalsNextAutomation: Ensure a function is called at regular intervals
Last updated