Writing your message sending contract
Here’s how you write a contract on Sepolia that dispatches a message using Hashi’s Yaho contract. This message will be relayed to Chiado and trigger the callback.
Explanation:
The contract interacts with the Yaho contract on Sepolia to dispatch a message to Chiado using
dispatchMessageToAdapters
.The
sendMessageToChiado
function takes the target chain ID(10200 for Chiado), target address (ChiadoReceiver contract on Chiado), and the message to be sent.The reporters, adapters, and threshold are passed into the Yaho contract for cross-chain message validation and relaying.
Deployment:
Deploy this contract on Sepolia, passing the reporters, adapters, and threshold into the constructor.
A list of reporters and adapters contract can be found in: Oracles
Threshold
must equal toexpectedThreshold
in Receiver contract.
Last updated