Skip to content

Storage Proofs with Herodotus || Workshop showcasing YAB <> Herodotus integration

Notifications You must be signed in to change notification settings

Jarvis-Nu/yab-herodotus

 
 

Repository files navigation

YAB <> Herodotus

Setup

You need these installed:

First make sure you:

  • Copy the .env.example to .env and fill in the values.

    • Get the Herodotus API key from here.
    • You can get the RPC_URLs from Alchemy, Infura or any other provider.
  • Run:

    bun i

Obtain Slot from Storage Layout

bun storage-layout

If you want to get the storage layout for a deployed contract, just grab the address and check it there, but we will continue with the storage layout we got from the previous step.

Get In-Mapping Slot

The YAB slots we are interested in are a mapping. It requires additional steps to get the full slot.

mapping(bytes32 => struct YABTransfer.TransferInfo)

To test if the slots are correct, run:

bun test get-slots

Prove the Slot/s with Herodotus

Note: This step doesn't have a separate run script, please move to the next step.

Access Proven Slots

Run the whole flow

bun start

About

Storage Proofs with Herodotus || Workshop showcasing YAB <> Herodotus integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%