Skip to content

Instantly share code, notes, and snippets.

@eshaben
Last active July 28, 2023 04:32
Show Gist options
  • Save eshaben/48cec6e87d1086b3fc74c37ae36fb82b to your computer and use it in GitHub Desktop.
Save eshaben/48cec6e87d1086b3fc74c37ae36fb82b to your computer and use it in GitHub Desktop.

// You can generate the Hyperlane digaram using the mermaid.live editor with the following code:

%%{ init: { "theme": "dark", "themeVariables": { "mainBkg": "#025AA1", "textColor": "white", "edgeLabelBackground": "transparent", "clusterBkg": "transparent", "clusterBorder": "white", "titleColor": "white" }, "themeCSS": ".edgeLabel { color: white }", "flowchart": {"useMaxWidth": "true" } }}%%

flowchart TB Relayer((Relayer))

subgraph Origin
  Sender
  M_O[(Mailbox)]

  Sender -- "1. dispatch(destination, recipient, body)" --> M_O
end

M_O -. "2. emit Message(origin, sender, destination, recipient, body)" .-> Relayer

subgraph Destination
  Recipient
  M_D[(Mailbox)]
  ISM[InterchainSecurityModule]

  M_D -. "4. interchainSecurityModule()" .-> Recipient
  M_D -- "5. verify(metadata, message)" --> ISM
  M_D -- "6. handle(origin, sender, body)" --> Recipient
end

Relayer -- "3. process(metadata, message)" --> M_D

style Sender fill:#efab17
style Recipient fill:#efab17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment