op-rosetta

module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2023 License: Apache-2.0

README

op-rosetta • tests lints

Provides Rosetta API compatibility for Optimism Bedrock, a low-cost and lightning-fast Ethereum L2 blockchain.

Overview

op-rosetta is an executable client extending the rosetta-geth-sdk which itself extends rosetta-sdk-go.

To learn more about the Rosetta API, you can find more online at rosetta-api.org.

Run Rosetta Server

  1. Run make build to build Rosetta Server
  2. Configure the following environment variables
MODE: ONLINE or OFFLINE
PORT: Rosetta Server port
BLOCKCHAIN: Blockchain (e.g. Optimism)
NETWORK: Network (e.g. Goerli)
FILTER: true (Rosetta Validation validates tokens according to the filter) or false (Rosetta Validation validates all tokens)
GENESIS_BLOCK_HASH: Genesis block hash
GETH: Native node URL
CHAIN_CONFIG: '{ "chainId": <Chain ID>, "terminalTotalDifficultyPassed": true }'
  1. Run make run to run Rosetta Server

Layout

├── assets
│   └── rosetta.png
├── cmd
│   └── main.go -> The `op-rosetta` executable entrypoint
└── pkg
    ├── client/ -> Rosetta API client
    ├── common/ -> Standalone common functionality
    ├── config/ -> Configuration options
    ├── handlers/ -> Rosetta API handlers
    ├── logging/ -> Logging utilities
    └── utils/ -> Package utilities

License

All files within this repository, including code adapted from rosetta-geth-sdk, is licensed under the terms of the Apache 2.0 License unless explicitly stated otherwise.

Directories

Path Synopsis
pkg
common
Package common contains constants and types used across op-rosetta.
Package common contains constants and types used across op-rosetta.
handlers
Package handlers handles translating transactions into [RosettaTypes.Operation]s.
Package handlers handles translating transactions into [RosettaTypes.Operation]s.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL