Monorepo implementing the Optimistic Ethereum protocol
Extensive documentation is available here
packages
: Contains all the typescript packages and contractscontracts
: Solidity smart contracts implementing the OVMcore-utils
: Low-level utilities and encoding packageshardhat-ovm
: Hardhat plugin which enables the OVM Compilersmock
: Testing utility for mocking smart contract return values and storagedata-transport-layer
: Event indexer, allowing thel2geth
node to access L1 databatch-submitter
: Daemon for submitting L2 transaction and state root batches to L1message-relayer
: Service for relaying L2 messages to L1
l2geth
: Fork of go-ethereum v1.9.10 implementing the OVM.integration-tests
: Integration tests between a L1 testnet,l2geth
,ops
: Contains Dockerfiles for containerizing each service involved in the protocol, as well as a docker-compose file for bringing up local testnets easily
Dependency management is done using yarn
.
git clone [email protected]:ethereum-optimism/optimism.git
cd optimism
yarn
After installing the dependencies, you must also build them so that the typescript is compiled down to javascript:
yarn build
All tests are run in parallel using lerna
:
yarn test
When you want to run tests only for packages that have changed since master
(or any other branch)
you can run yarn lerna run test --parallel --since master
The integration tests first require bringing up the Optimism stack. This is done via a Docker Compose network. For better performance, we also recommend enabling Docker BuildKit
cd ops
export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1
docker-compose build
docker-compose up