Provides Rosetta API compatibility for Optimism Bedrock, a low-cost and lightning-fast Ethereum L2 blockchain.
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
make build
to build Rosetta Server - 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 }'
- Run
make run
to run Rosetta Server
├── 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
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.