Commit 0dff03cb authored by Kelvin Fichter's avatar Kelvin Fichter

feat: add a readme to the surgery package

parent 20c8969b
# @eth-optimism/regenesis-surgery # @eth-optimism/regenesis-surgery
## What is this? Scripts used to perform the transition process between OVMv1 and OVMv2.
`regenesis-surgery` contains a series of scripts and tests necessary to perform a regenesis on Optimistic Ethereum. ## Installation
## Getting started ```sh
git clone git@github.com:ethereum-optimism/optimism.git
After cloning and switching to the repository, install dependencies: yarn clean
yarn install
```bash yarn build
$ yarn
``` ```
### Configuration ## Usage
We're using `dotenv` for our configuration. 1. Open `.env` and add values for all environment variables listed below.
To configure the project, clone this repository and copy the `env.example` file to `.env`. 2. Run `yarn start` to start the surgery process.
3. Grab a coffee or something.
### Runnign scripts
## Environment Variables
To run an individual script directly:
| Variable | Description |
```bash | ----------------------------- | ---------------------------------------------------------- |
$ npx ts-node scripts/event-indexer.ts | `REGEN__STATE_DUMP_FILE` | Path to the state dump file |
``` | `REGEN__ETHERSCAN_FILE` | Path to the etherscan dump file |
| `REGEN__GENESIS_FILE` | Path to the initial genesis file |
| `REGEN__OUTPUT_FILE` | Path where the output genesis will be saved |
| `REGEN__L2_NETWORK_NAME` | Name of the L2 network being upgraded (kovan or mainnet) |
| `REGEN__L2_PROVIDER_URL` | RPC provider for the L2 network being upgraded |
| `REGEN__L1_PROVIDER_URL` | RPC provider for the L1 network that corresponds to the L2 |
| `REGEN__ETH_PROVIDER_URL` | RPC provider for Ethereum mainnet |
| `REGEN__ROPSTEN_PROVIDER_URL` | RPC provider for the Ropsten testnet |
| `REGEN__ROPSTEN_PRIVATE_KEY` | Private key of an account that has Ropsten ETH |
| `REGEN__STATE_DUMP_HEIGHT` | Height at which the state dump was taken |
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment