Optimism is a Public Benefit Corporation dedicated to scaling Ethereum in a way that enshrines fair access to public goods. Optimism is focused on implementing a production-level Optimistic Rollup implementation that integrates with the Optimistic Virtual Machine (OVM) to scale arbitrary Solidity smart contracts.
To get involved, follow us on Twitter, join our Discord, and try out our OVM tutorial!
@optimism-monorepo
is the Optimism monorepo.
All of the core Optimism projects are hosted inside of the packages folder of this repository.
Package | Version | Description |
---|---|---|
@eth-optimism/ovm |
Optimistic Virtual Machine | |
@eth-optimism/rollup-full-node |
Fullnode RPC server for the OVM | |
@eth-optimism/rollup-dev-tools |
Optimistic Rollup development tooling (includes Transpiler) |
Welcome! If you're looking to contribute to the future of Ethereum, you're in the right place.
Optimism follows a Contributing Guide and Code of Conduct adapted slightly from the Contributor Covenant. All contributors must read through this guide before contributing. We're here to cultivate a welcoming and inclusive contributing environment, and every new contributor needs to do their part to uphold our community standards.
Before you start working on an Optimism project, you'll need to clone our GitHub repository:
git clone git@github.com:ethereum-optimism/optimism-monorepo.git
Now, enter the repository.
cd optimism-monorepo
Most of the projects in optimism-monorepo
are Node.js
projects.
You'll need to install Node.js
for your system before continuing.
All code is only confirmed to work on Node.js v11.6
, and there are known issues on more recent versions. Please set your Node.js version to 11.6.
We're using a package manager called Yarn. You'll need to install Yarn before continuing.
optimism-monorepo
projects make use of several external packages.
Install all required packages with:
yarn install
optimism-monorepo
provides convenient tooling for building a package or set of packages.
Build all packages:
yarn run build
Build a specific package or set of packages:
PKGS=your,packages,here yarn run build
Clean code is the best code, so we've provided tools to automatically lint your projects.
Lint all packages:
yarn run lint
Lint a specific package or set of packages:
PKGS=your,packages,here yarn run lint
We've also provided tools to make it possible to automatically fix any linting issues. It's much easier than trying to fix issues manually.
Fix all packages:
yarn run fix
Fix a specific package or set of packages:
PKGS=your,packages,here yarn run fix
optimism-monorepo
projects usually makes use of a combination of Mocha
(a testing framework) and Chai
(an assertion library) for testing.
Run all tests:
yarn test
Run tests for a specific package or set of packages:
PKGS=your,packages,here yarn test
Running the fullnode in Docker allows us launch our entire stack with a single command.
To run the fullnode in Docker in production run:
docker-compose up
To run it in development run:
rm -rf node_modules
docker-compose -f docker-compose.yml -f docker-compose.dev.yml run rollup-full-node yarn
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
Contributors: remember to run tests and lint before submitting a pull request! Linted code with passing tests makes life easier for everyone and means your contribution can get pulled into this project faster.