Examples

Examples

The pages contained within this section of the documentation outline conceptually (with code snippets) how to write a virtual machine request (GatewayRequest) to read and verify data from another rollup.

For example, there are pages outlining how to:

Typescript examples

Gateway Examples

We maintain a repository of gateway examples (opens in a new tab) that utilize the Typescript implementation (opens in a new tab) of our virtual machine to provide simple, documented examples that can be run with a single line of code. For example:

bun tsx examples/6-keccak-of-concat-as-key-with-debug.ts

These examples utilise our npm package @unruggable/gateways (opens in a new tab) which offers a quick and easy way to get started with our codebase.

Solidity examples

Resolution Demo

We also maintain a repository that demonstrates full end to end ENS name resolution (opens in a new tab) using the solution.