hashi
  • Welcome
  • Introduction
    • What is Hashi?
    • Why Hashi?
    • Key Features
    • The SSN
  • Getting Started
    • How Hashi Works
    • Quick Start
      • Verifying foreign event
        • Setting the scene
        • Getting the Event Proof
        • Validating your statements
      • Reading foreign state
        • Setting the scene
        • Getting the Storage Proof
        • Validating your statements
      • Pushing a message
        • Writing your message sending contract
        • Implementing your callback
        • Waiting for the cross-chain execution
  • Core Concepts
    • Block Header Relaying
    • Message Dispatching
    • Oracles
    • Additive Security Model
  • Deployments
    • Blockchains
    • Oracles
  • Smart Contracts
    • Key Contracts
    • HashiProver API
  • TOOLS
    • SP1 storage proof verifier
    • Solana integration
  • APPS / INTEGRATIONS
    • Safe Crosschain
    • Aragon UCG
    • Openfort Chain Abstraction
  • META
    • Developer resources
    • Audits
    • Explorer
    • Community
Powered by GitBook
On this page
Export as PDF
  1. Getting Started
  2. Quick Start
  3. Pushing a message

Waiting for the cross-chain execution

PreviousImplementing your callbackNextBlock Header Relaying

Last updated 6 months ago

Here’s what happens after you send the message:

  1. Message Dispatch on Sepolia:

    • When sendMessageToChiado is called on the SepoliaSender contract, the message is dispatched through Yaho on Sepolia.

    • The message is sent with the targetChainId, threshold, reporters, and adapters, and the data (in this case, the message string).

  2. Oracles and Relaying:

    • Hashi’s oracles pick up the message and relay it to Chiado.

    • The oracles validate the message and check the block headers for consensus.

  3. Message Receipt and Callback on Chiado:

    • On Chiado, the Yaru contract receives the message and triggers the onMessage function on the ChiadoReceiver contract.

    • The callback validates the message by ensuring that the message is from the expected Yaru contract, the source chain, and the correct sender.

    • After validation, the message is decoded and stored in the contract.


Example Scenario

  • You deploy SepoliaSender on Sepolia and configure it with the appropriate Yaho contract and oracle parameters.

  • You deploy ChiadoReceiver on Chiado to handle the incoming message and validate it against Hashi’s oracle system.

  • When you call sendMessageToChiado from SepoliaSender, the message is dispatched to Chiado, where the callback function processes it and updates the state.