Running a gateway

Running a gateway

If you would like to run your own gateway, you are more than welcome to do so.

To run a gateway:

Checkout

git clone https://github.com/unruggable-labs/unruggable-gateways.git

Setup

  • Run the following setup commands
foundryup
forge install
bun i

Configuration

  • Copy the .env.example template to .env and define the appropriate environment variables.
ALCHEMY_KEY
INFURA_KEY
ANKR_KEY

Run it

  • bun run serve <chain-identifier> [port]

Chain Identifiers

ape arb1-sepolia arb1 base-sepolia base blast celo-alfajores cyber fraxtal ink-sepolia linea-sepolia lineaV1 linea mantle mode op-sepolia op opbnb polygon redstone reverse-op scroll-sepolia scroll self-eth self-holesky self-sepolia shape soneium-minato taiko-hekla taiko unichain-sepolia zero-sepolia zero zksync-sepolia zksync zora

The latest chain identifiers can be seen in the source code (opens in a new tab) or by running the following command:

bun run test/debug/serve-list.ts

Default port

8000

Configuration options

  • --prefetch Periodically pulls the latest commit to keep the cache fresh.
  • --latest
  • --unfinalized For supported gateways indicates that state roots need not be finalized to be proven against.
  • --dump Dumps gateway configuration and latest commit data before exiting.
  • --debug Prints debug output from the Prover.

You can also pass a private key to sign response data when utilizing a TrustedVerifier. For example:

bun run serve —-latest --debug SIGNING_KEY_HERE trusted:op