Commit 648e405b authored by Will Cory's avatar Will Cory Committed by GitHub

feat: migrate from yarn to pnpm (#6120)

* feat: Upgrade from yarn to pnpm

* fix: update eslint and eslint parser to fix contracts-bedrock linter

fix: update all eslint packages

Revert "fix: update all eslint packages"

This reverts commit ba4febe92eeba6cbd79ddf417eacbb9d06f16a7a.

ok updating all of the eslint was over aggro

upgrade eslint core too

---------
Co-authored-by: default avatarWill Cory <willcory@Wills-MacBook-Pro.local>
parent add32f6f
This diff is collapsed.
...@@ -35,21 +35,10 @@ jobs: ...@@ -35,21 +35,10 @@ jobs:
uses: actions/setup-node@master uses: actions/setup-node@master
with: with:
node-version: 16.x node-version: 16.x
cache: pnpm
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies - name: Install Dependencies
run: yarn --frozen-lockfile run: pnpm --frozen-lockfile
- name: Install Foundry - name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1 uses: foundry-rs/foundry-toolchain@v1
...@@ -57,17 +46,17 @@ jobs: ...@@ -57,17 +46,17 @@ jobs:
version: nightly version: nightly
- name: Build - name: Build
run: yarn build run: pnpm build
- name: Setup Canary Snapshot - name: Setup Canary Snapshot
run: yarn changeset version --snapshot run: pnpm changeset version --snapshot
- name: Publish To NPM - name: Publish To NPM
uses: changesets/action@v1 uses: changesets/action@v1
id: changesets id: changesets
with: with:
createGithubReleases: false createGithubReleases: false
publish: yarn changeset publish --tag canary publish: pnpm changeset publish --tag canary
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
......
...@@ -33,21 +33,10 @@ jobs: ...@@ -33,21 +33,10 @@ jobs:
uses: actions/setup-node@master uses: actions/setup-node@master
with: with:
node-version: 16.x node-version: 16.x
cache: pnpm
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies - name: Install Dependencies
run: yarn --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Install Foundry - name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1 uses: foundry-rs/foundry-toolchain@v1
...@@ -62,7 +51,7 @@ jobs: ...@@ -62,7 +51,7 @@ jobs:
id: changesets id: changesets
with: with:
createGithubReleases: false createGithubReleases: false
publish: yarn release publish: pnpm release
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
......
#!/bin/sh #!/bin/sh
. "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/_/husky.sh"
yarn nx affected --target=pre-commit pnpm nx affected --target=pre-commit
# run prefoo scripts
# npm and yarn support this as a default pnpm defaults to false
enable-pre-post-scripts=true
lockfile=true
prefer-workspace-packages=true
module.exports = { module.exports = {
$schema: 'http://json.schemastore.org/prettierrc', $schema: 'http://json.schemastore.org/prettierrc',
plugins: ['prettier-plugin-solidity'],
trailingComma: 'es5', trailingComma: 'es5',
tabWidth: 2, tabWidth: 2,
semi: false, semi: false,
......
...@@ -43,7 +43,7 @@ You *must* include a `changeset` file in your PR when making a change that would ...@@ -43,7 +43,7 @@ You *must* include a `changeset` file in your PR when making a change that would
Adding a `changeset` file is easy: Adding a `changeset` file is easy:
1. Navigate to the root of the monorepo. 1. Navigate to the root of the monorepo.
2. Run `yarn changeset`. You'll be prompted to select packages to include in the changeset. Use the arrow keys to move the cursor up and down, hit the `spacebar` to select a package, and hit `enter` to confirm your selection. Select *all* packages that require a new release as a result of your PR. 2. Run `pnpm changeset`. You'll be prompted to select packages to include in the changeset. Use the arrow keys to move the cursor up and down, hit the `spacebar` to select a package, and hit `enter` to confirm your selection. Select *all* packages that require a new release as a result of your PR.
3. Once you hit `enter` you'll be prompted to decide whether your selected packages need a `major`, `minor`, or `patch` release. We follow the [Semantic Versioning](https://semver.org/) scheme. Please avoid using `major` releases for any packages that are still in version `0.y.z`. 3. Once you hit `enter` you'll be prompted to decide whether your selected packages need a `major`, `minor`, or `patch` release. We follow the [Semantic Versioning](https://semver.org/) scheme. Please avoid using `major` releases for any packages that are still in version `0.y.z`.
4. Commit your changeset and push it into your PR. The changeset bot will notice your changeset file and leave a little comment to this effect on GitHub. 4. Commit your changeset and push it into your PR. The changeset bot will notice your changeset file and leave a little comment to this effect on GitHub.
5. Voilà, c'est fini! 5. Voilà, c'est fini!
...@@ -63,7 +63,7 @@ You'll need the following: ...@@ -63,7 +63,7 @@ You'll need the following:
* [Git](https://git-scm.com/downloads) * [Git](https://git-scm.com/downloads)
* [NodeJS](https://nodejs.org/en/download/) * [NodeJS](https://nodejs.org/en/download/)
* [Node Version Manager](https://github.com/nvm-sh/nvm) * [Node Version Manager](https://github.com/nvm-sh/nvm)
* [Yarn](https://classic.yarnpkg.com/en/docs/install) * [pnpm](https://pnpm.io/installation)
* [Docker](https://docs.docker.com/get-docker/) * [Docker](https://docs.docker.com/get-docker/)
* [Docker Compose](https://docs.docker.com/compose/install/) * [Docker Compose](https://docs.docker.com/compose/install/)
* [Go](https://go.dev/dl/) * [Go](https://go.dev/dl/)
...@@ -86,10 +86,10 @@ Install node v16.16.0 with [nvm](https://github.com/nvm-sh/nvm) ...@@ -86,10 +86,10 @@ Install node v16.16.0 with [nvm](https://github.com/nvm-sh/nvm)
nvm use nvm use
``` ```
### Install node modules with Yarn ### Install node modules with pnpm
```bash ```bash
yarn install pnpm i
``` ```
### Building the TypeScript packages ### Building the TypeScript packages
...@@ -101,8 +101,8 @@ and compile the smart contracts. Install foundry [here](https://getfoundry.sh/). ...@@ -101,8 +101,8 @@ and compile the smart contracts. Install foundry [here](https://getfoundry.sh/).
To build all of the [TypeScript packages](./packages), run: To build all of the [TypeScript packages](./packages), run:
```bash ```bash
yarn clean pnpm clean
yarn build pnpm build
``` ```
Packages compiled when on one branch may not be compatible with packages on a different branch. Packages compiled when on one branch may not be compatible with packages on a different branch.
...@@ -136,8 +136,8 @@ Finally, **if you're running into weird problems and nothing seems to be working ...@@ -136,8 +136,8 @@ Finally, **if you're running into weird problems and nothing seems to be working
```bash ```bash
cd optimism cd optimism
yarn clean pnpm clean
yarn build pnpm build
cd ops cd ops
docker-compose down -v docker-compose down -v
docker-compose build docker-compose build
...@@ -162,14 +162,14 @@ Before running tests: **follow the above instructions to get everything built.** ...@@ -162,14 +162,14 @@ Before running tests: **follow the above instructions to get everything built.**
Run unit tests for all packages in parallel via: Run unit tests for all packages in parallel via:
```bash ```bash
yarn test pnpm test
``` ```
To run unit tests for a specific package: To run unit tests for a specific package:
```bash ```bash
cd packages/package-to-test cd packages/package-to-test
yarn test pnpm test
``` ```
#### Running contract static analysis #### Running contract static analysis
...@@ -181,5 +181,5 @@ To run `slither` locally, do: ...@@ -181,5 +181,5 @@ To run `slither` locally, do:
```bash ```bash
cd packages/contracts cd packages/contracts
pip3 install slither-analyzer pip3 install slither-analyzer
yarn test:slither pnpm test:slither
``` ```
...@@ -12,8 +12,8 @@ build-ts: submodules ...@@ -12,8 +12,8 @@ build-ts: submodules
if [ -n "$$NVM_DIR" ]; then \ if [ -n "$$NVM_DIR" ]; then \
. $$NVM_DIR/nvm.sh && nvm use; \ . $$NVM_DIR/nvm.sh && nvm use; \
fi fi
yarn install pnpm install
yarn build pnpm build
.PHONY: build-ts .PHONY: build-ts
submodules: submodules:
...@@ -102,7 +102,7 @@ test-unit: ...@@ -102,7 +102,7 @@ test-unit:
make -C ./op-proposer test make -C ./op-proposer test
make -C ./op-batcher test make -C ./op-batcher test
make -C ./op-e2e test make -C ./op-e2e test
yarn test pnpm test
.PHONY: test-unit .PHONY: test-unit
test-integration: test-integration:
......
...@@ -138,7 +138,7 @@ See table in the **Active Branches** section above to find the right branch to t ...@@ -138,7 +138,7 @@ See table in the **Active Branches** section above to find the right branch to t
We use [changesets](https://github.com/changesets/changesets) to mark packages for new releases. We use [changesets](https://github.com/changesets/changesets) to mark packages for new releases.
When merging commits to the `develop` branch you MUST include a changeset file if your change would require that a new version of a package be released. When merging commits to the `develop` branch you MUST include a changeset file if your change would require that a new version of a package be released.
To add a changeset, run the command `yarn changeset` in the root of this monorepo. To add a changeset, run the command `pnpm changeset` in the root of this monorepo.
You will be presented with a small prompt to select the packages to be released, the scope of the release (major, minor, or patch), and the reason for the release. You will be presented with a small prompt to select the packages to be released, the scope of the release (major, minor, or patch), and the reason for the release.
Comments within changeset files will be automatically included in the changelog of the package. Comments within changeset files will be automatically included in the changelog of the package.
......
{ {
"npmClient": "yarn", "npmClient": "pnpm",
"useWorkspaces": true, "useWorkspaces": true,
"version": "independent",
"packages": [ "packages": [
"packages/*" "packages/*"
], ]
"version": "independent"
} }
...@@ -11,7 +11,7 @@ version: ...@@ -11,7 +11,7 @@ version:
compile: compile:
cd $(contracts-dir) && \ cd $(contracts-dir) && \
yarn build pnpm build
bindings: compile bindings-build bindings: compile bindings-build
...@@ -28,7 +28,7 @@ mkdir: ...@@ -28,7 +28,7 @@ mkdir:
clean-contracts: clean-contracts:
cd $(contracts-dir) && \ cd $(contracts-dir) && \
yarn clean pnpm clean
clean: clean:
rm -rf $(pkg) rm -rf $(pkg)
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const FaultDisputeGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"gameStart\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1011\"},{\"astId\":1001,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"status\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_enum(GameStatus)1006\"},{\"astId\":1002,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"bondManager\",\"offset\":9,\"slot\":\"0\",\"type\":\"t_contract(IBondManager)1005\"},{\"astId\":1003,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claimData\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_struct(ClaimData)5796_storage)dyn_storage\"},{\"astId\":1004,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claims\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_userDefinedValueType(ClaimHash)1008,t_bool)\"}],\"types\":{\"t_array(t_struct(ClaimData)5796_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct IFaultDisputeGame.ClaimData[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(ClaimData)5796_storage\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_contract(IBondManager)1005\":{\"encoding\":\"inplace\",\"label\":\"contract IBondManager\",\"numberOfBytes\":\"20\"},\"t_enum(GameStatus)1006\":{\"encoding\":\"inplace\",\"label\":\"enum GameStatus\",\"numberOfBytes\":\"1\"},\"t_mapping(t_userDefinedValueType(ClaimHash)1008,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(ClaimHash =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_userDefinedValueType(ClaimHash)1008\",\"value\":\"t_bool\"},\"t_struct(ClaimData)5796_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IFaultDisputeGame.ClaimData\",\"numberOfBytes\":\"96\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_userDefinedValueType(Claim)1007\":{\"encoding\":\"inplace\",\"label\":\"Claim\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(ClaimHash)1008\":{\"encoding\":\"inplace\",\"label\":\"ClaimHash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Clock)1009\":{\"encoding\":\"inplace\",\"label\":\"Clock\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Position)1010\":{\"encoding\":\"inplace\",\"label\":\"Position\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Timestamp)1011\":{\"encoding\":\"inplace\",\"label\":\"Timestamp\",\"numberOfBytes\":\"8\"}}}" const FaultDisputeGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"gameStart\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1011\"},{\"astId\":1001,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"status\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_enum(GameStatus)1006\"},{\"astId\":1002,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"bondManager\",\"offset\":9,\"slot\":\"0\",\"type\":\"t_contract(IBondManager)1005\"},{\"astId\":1003,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claimData\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_struct(ClaimData)38805_storage)dyn_storage\"},{\"astId\":1004,\"contract\":\"contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claims\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_userDefinedValueType(ClaimHash)1008,t_bool)\"}],\"types\":{\"t_array(t_struct(ClaimData)38805_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct IFaultDisputeGame.ClaimData[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(ClaimData)38805_storage\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_contract(IBondManager)1005\":{\"encoding\":\"inplace\",\"label\":\"contract IBondManager\",\"numberOfBytes\":\"20\"},\"t_enum(GameStatus)1006\":{\"encoding\":\"inplace\",\"label\":\"enum GameStatus\",\"numberOfBytes\":\"1\"},\"t_mapping(t_userDefinedValueType(ClaimHash)1008,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(ClaimHash =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_userDefinedValueType(ClaimHash)1008\",\"value\":\"t_bool\"},\"t_struct(ClaimData)38805_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IFaultDisputeGame.ClaimData\",\"numberOfBytes\":\"96\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_userDefinedValueType(Claim)1007\":{\"encoding\":\"inplace\",\"label\":\"Claim\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(ClaimHash)1008\":{\"encoding\":\"inplace\",\"label\":\"ClaimHash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Clock)1009\":{\"encoding\":\"inplace\",\"label\":\"Clock\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Position)1010\":{\"encoding\":\"inplace\",\"label\":\"Position\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Timestamp)1011\":{\"encoding\":\"inplace\",\"label\":\"Timestamp\",\"numberOfBytes\":\"8\"}}}"
var FaultDisputeGameStorageLayout = new(solc.StorageLayout) var FaultDisputeGameStorageLayout = new(solc.StorageLayout)
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const L2OutputOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"startingBlockNumber\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1003,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"startingTimestamp\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1004,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"l2Outputs\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_array(t_struct(OutputProposal)9692_storage)dyn_storage\"}],\"types\":{\"t_array(t_struct(OutputProposal)9692_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct Types.OutputProposal[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(OutputProposal)9692_storage\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_struct(OutputProposal)9692_storage\":{\"encoding\":\"inplace\",\"label\":\"struct Types.OutputProposal\",\"numberOfBytes\":\"64\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" const L2OutputOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"startingBlockNumber\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1003,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"startingTimestamp\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1004,\"contract\":\"contracts/L1/L2OutputOracle.sol:L2OutputOracle\",\"label\":\"l2Outputs\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_array(t_struct(OutputProposal)42701_storage)dyn_storage\"}],\"types\":{\"t_array(t_struct(OutputProposal)42701_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct Types.OutputProposal[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(OutputProposal)42701_storage\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_struct(OutputProposal)42701_storage\":{\"encoding\":\"inplace\",\"label\":\"struct Types.OutputProposal\",\"numberOfBytes\":\"64\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
var L2OutputOracleStorageLayout = new(solc.StorageLayout) var L2OutputOracleStorageLayout = new(solc.StorageLayout)
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const OptimismPortalStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"params\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_struct(ResourceParams)1932_storage\"},{\"astId\":1003,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_array(t_uint256)48_storage\"},{\"astId\":1004,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"l2Sender\",\"offset\":0,\"slot\":\"50\",\"type\":\"t_address\"},{\"astId\":1005,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"finalizedWithdrawals\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":1006,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"provenWithdrawals\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_mapping(t_bytes32,t_struct(ProvenWithdrawal)1271_storage)\"},{\"astId\":1007,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"paused\",\"offset\":0,\"slot\":\"53\",\"type\":\"t_bool\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)48_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[48]\",\"numberOfBytes\":\"1536\",\"base\":\"t_uint256\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_mapping(t_bytes32,t_struct(ProvenWithdrawal)1271_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e struct OptimismPortal.ProvenWithdrawal)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_struct(ProvenWithdrawal)1271_storage\"},\"t_struct(ProvenWithdrawal)1271_storage\":{\"encoding\":\"inplace\",\"label\":\"struct OptimismPortal.ProvenWithdrawal\",\"numberOfBytes\":\"64\"},\"t_struct(ResourceParams)1932_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ResourceMetering.ResourceParams\",\"numberOfBytes\":\"32\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" const OptimismPortalStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"params\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_struct(ResourceParams)34941_storage\"},{\"astId\":1003,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_array(t_uint256)48_storage\"},{\"astId\":1004,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"l2Sender\",\"offset\":0,\"slot\":\"50\",\"type\":\"t_address\"},{\"astId\":1005,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"finalizedWithdrawals\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":1006,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"provenWithdrawals\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_mapping(t_bytes32,t_struct(ProvenWithdrawal)34280_storage)\"},{\"astId\":1007,\"contract\":\"contracts/L1/OptimismPortal.sol:OptimismPortal\",\"label\":\"paused\",\"offset\":0,\"slot\":\"53\",\"type\":\"t_bool\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)48_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[48]\",\"numberOfBytes\":\"1536\",\"base\":\"t_uint256\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_mapping(t_bytes32,t_struct(ProvenWithdrawal)34280_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e struct OptimismPortal.ProvenWithdrawal)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_struct(ProvenWithdrawal)34280_storage\"},\"t_struct(ProvenWithdrawal)34280_storage\":{\"encoding\":\"inplace\",\"label\":\"struct OptimismPortal.ProvenWithdrawal\",\"numberOfBytes\":\"64\"},\"t_struct(ResourceParams)34941_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ResourceMetering.ResourceParams\",\"numberOfBytes\":\"32\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
var OptimismPortalStorageLayout = new(solc.StorageLayout) var OptimismPortalStorageLayout = new(solc.StorageLayout)
......
...@@ -15,7 +15,7 @@ var PreimageOracleStorageLayout = new(solc.StorageLayout) ...@@ -15,7 +15,7 @@ var PreimageOracleStorageLayout = new(solc.StorageLayout)
var PreimageOracleDeployedBin = "0x608060405234801561001057600080fd5b50600436106100725760003560e01c8063e159261111610050578063e15926111461011b578063fe4ac08e14610130578063fef2b4ed146101a557600080fd5b806361238bde146100775780638542cf50146100b5578063e03110e1146100f3575b600080fd5b6100a26100853660046103b5565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6100e36100c33660046103b5565b600260209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016100ac565b6101066101013660046103b5565b6101c5565b604080519283526020830191909152016100ac565b61012e6101293660046103d7565b6102b6565b005b61012e61013e366004610453565b6000838152600260209081526040808320878452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558684528252808320968352958152858220939093559283529082905291902055565b6100a26101b3366004610485565b60006020819052908152604090205481565b6000828152600260209081526040808320848452909152812054819060ff1661024e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f707265696d616765206d75737420657869737400000000000000000000000000604482015260640160405180910390fd5b506000838152602081815260409091205461026a8160086104cd565b6102758560206104cd565b1061029357836102868260086104cd565b61029091906104e5565b91505b506000938452600160209081526040808620948652939052919092205492909150565b6044356000806008830186106102cb57600080fd5b60c083901b6080526088838682378087017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80151908490207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f02000000000000000000000000000000000000000000000000000000000000001760008181526002602090815260408083208b8452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845282528083209a83529981528982209390935590815290819052959095209190915550505050565b600080604083850312156103c857600080fd5b50508035926020909101359150565b6000806000604084860312156103ec57600080fd5b83359250602084013567ffffffffffffffff8082111561040b57600080fd5b818601915086601f83011261041f57600080fd5b81358181111561042e57600080fd5b87602082850101111561044057600080fd5b6020830194508093505050509250925092565b6000806000806080858703121561046957600080fd5b5050823594602084013594506040840135936060013592509050565b60006020828403121561049757600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156104e0576104e061049e565b500190565b6000828210156104f7576104f761049e565b50039056fea164736f6c634300080f000a" var PreimageOracleDeployedBin = "0x608060405234801561001057600080fd5b50600436106100725760003560e01c8063e159261111610050578063e15926111461011b578063fe4ac08e14610130578063fef2b4ed146101a557600080fd5b806361238bde146100775780638542cf50146100b5578063e03110e1146100f3575b600080fd5b6100a26100853660046103b5565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6100e36100c33660046103b5565b600260209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016100ac565b6101066101013660046103b5565b6101c5565b604080519283526020830191909152016100ac565b61012e6101293660046103d7565b6102b6565b005b61012e61013e366004610453565b6000838152600260209081526040808320878452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558684528252808320968352958152858220939093559283529082905291902055565b6100a26101b3366004610485565b60006020819052908152604090205481565b6000828152600260209081526040808320848452909152812054819060ff1661024e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f707265696d616765206d75737420657869737400000000000000000000000000604482015260640160405180910390fd5b506000838152602081815260409091205461026a8160086104cd565b6102758560206104cd565b1061029357836102868260086104cd565b61029091906104e5565b91505b506000938452600160209081526040808620948652939052919092205492909150565b6044356000806008830186106102cb57600080fd5b60c083901b6080526088838682378087017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80151908490207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f02000000000000000000000000000000000000000000000000000000000000001760008181526002602090815260408083208b8452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845282528083209a83529981528982209390935590815290819052959095209190915550505050565b600080604083850312156103c857600080fd5b50508035926020909101359150565b6000806000604084860312156103ec57600080fd5b83359250602084013567ffffffffffffffff8082111561040b57600080fd5b818601915086601f83011261041f57600080fd5b81358181111561042e57600080fd5b87602082850101111561044057600080fd5b6020830194508093505050509250925092565b6000806000806080858703121561046957600080fd5b5050823594602084013594506040840135936060013592509050565b60006020828403121561049757600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156104e0576104e061049e565b500190565b6000828210156104f7576104f761049e565b50039056fea164736f6c634300080f000a"
var PreimageOracleDeployedSourceMap = "57:2945:19:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;143:68;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;413:25:195;;;401:2;386:18;143:68:19;;;;;;;;217:66;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;614:14:195;;607:22;589:41;;577:2;562:18;217:66:19;449:187:195;290:454:19;;;;;;:::i;:::-;;:::i;:::-;;;;815:25:195;;;871:2;856:18;;849:34;;;;788:18;290:454:19;641:248:195;1537:1463:19;;;;;;:::i;:::-;;:::i;:::-;;1086:262;;;;;;:::i;:::-;1219:19;;;;:14;:19;;;;;;;;:31;;;;;;;;:38;;;;1253:4;1219:38;;;;;;1267:18;;;;;;;;:30;;;;;;;;;:37;;;;1314:20;;;;;;;;;;:27;1086:262;87:50;;;;;;:::i;:::-;;;;;;;;;;;;;;;290:454;388:11;439:19;;;:14;:19;;;;;;;;:27;;;;;;;;;388:11;;439:27;;431:59;;;;;;;2517:2:195;431:59:19;;;2499:21:195;2556:2;2536:18;;;2529:30;2595:21;2575:18;;;2568:49;2634:18;;431:59:19;;;;;;;;-1:-1:-1;521:14:19;538:20;;;509:2;538:20;;;;;;;;631:10;538:20;640:1;631:10;:::i;:::-;616:11;:6;625:2;616:11;:::i;:::-;:25;612:84;;679:6;666:10;:6;675:1;666:10;:::i;:::-;:19;;;;:::i;:::-;657:28;;612:84;-1:-1:-1;711:18:19;;;;:13;:18;;;;;;;;:26;;;;;;;;;;;;290:454;;-1:-1:-1;290:454:19:o;1537:1463::-;1831:4;1818:18;1636:12;;1966:1;1956:12;;1941:28;;1931:84;;1999:1;1996;1989:12;1931:84;2258:3;2254:14;;;2158:4;2242:27;2289:11;2263:4;2408:15;2289:11;2390:40;2620:28;;;2624:11;2620:28;2614:35;2671:20;;;;2818:19;2811:27;2840:11;2808:44;2871:19;;;;2849:1;2871:19;;;;;;;;:31;;;;;;;;:38;;;;2905:4;2871:38;;;;;;2919:18;;;;;;;;:30;;;;;;;;;:37;;;;2966:20;;;;;;;;;;;:27;;;;-1:-1:-1;;;;1537:1463:19:o;14:248:195:-;82:6;90;143:2;131:9;122:7;118:23;114:32;111:52;;;159:1;156;149:12;111:52;-1:-1:-1;;182:23:195;;;252:2;237:18;;;224:32;;-1:-1:-1;14:248:195:o;894:659::-;973:6;981;989;1042:2;1030:9;1021:7;1017:23;1013:32;1010:52;;;1058:1;1055;1048:12;1010:52;1094:9;1081:23;1071:33;;1155:2;1144:9;1140:18;1127:32;1178:18;1219:2;1211:6;1208:14;1205:34;;;1235:1;1232;1225:12;1205:34;1273:6;1262:9;1258:22;1248:32;;1318:7;1311:4;1307:2;1303:13;1299:27;1289:55;;1340:1;1337;1330:12;1289:55;1380:2;1367:16;1406:2;1398:6;1395:14;1392:34;;;1422:1;1419;1412:12;1392:34;1467:7;1462:2;1453:6;1449:2;1445:15;1441:24;1438:37;1435:57;;;1488:1;1485;1478:12;1435:57;1519:2;1515;1511:11;1501:21;;1541:6;1531:16;;;;;894:659;;;;;:::o;1558:385::-;1644:6;1652;1660;1668;1721:3;1709:9;1700:7;1696:23;1692:33;1689:53;;;1738:1;1735;1728:12;1689:53;-1:-1:-1;;1761:23:195;;;1831:2;1816:18;;1803:32;;-1:-1:-1;1882:2:195;1867:18;;1854:32;;1933:2;1918:18;1905:32;;-1:-1:-1;1558:385:195;-1:-1:-1;1558:385:195:o;1948:180::-;2007:6;2060:2;2048:9;2039:7;2035:23;2031:32;2028:52;;;2076:1;2073;2066:12;2028:52;-1:-1:-1;2099:23:195;;1948:180;-1:-1:-1;1948:180:195:o;2663:184::-;2715:77;2712:1;2705:88;2812:4;2809:1;2802:15;2836:4;2833:1;2826:15;2852:128;2892:3;2923:1;2919:6;2916:1;2913:13;2910:39;;;2929:18;;:::i;:::-;-1:-1:-1;2965:9:195;;2852:128::o;2985:125::-;3025:4;3053:1;3050;3047:8;3044:34;;;3058:18;;:::i;:::-;-1:-1:-1;3095:9:195;;2985:125::o" var PreimageOracleDeployedSourceMap = "57:2945:58:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;143:68;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;413:25:234;;;401:2;386:18;143:68:58;;;;;;;;217:66;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;614:14:234;;607:22;589:41;;577:2;562:18;217:66:58;449:187:234;290:454:58;;;;;;:::i;:::-;;:::i;:::-;;;;815:25:234;;;871:2;856:18;;849:34;;;;788:18;290:454:58;641:248:234;1537:1463:58;;;;;;:::i;:::-;;:::i;:::-;;1086:262;;;;;;:::i;:::-;1219:19;;;;:14;:19;;;;;;;;:31;;;;;;;;:38;;;;1253:4;1219:38;;;;;;1267:18;;;;;;;;:30;;;;;;;;;:37;;;;1314:20;;;;;;;;;;:27;1086:262;87:50;;;;;;:::i;:::-;;;;;;;;;;;;;;;290:454;388:11;439:19;;;:14;:19;;;;;;;;:27;;;;;;;;;388:11;;439:27;;431:59;;;;;;;2517:2:234;431:59:58;;;2499:21:234;2556:2;2536:18;;;2529:30;2595:21;2575:18;;;2568:49;2634:18;;431:59:58;;;;;;;;-1:-1:-1;521:14:58;538:20;;;509:2;538:20;;;;;;;;631:10;538:20;640:1;631:10;:::i;:::-;616:11;:6;625:2;616:11;:::i;:::-;:25;612:84;;679:6;666:10;:6;675:1;666:10;:::i;:::-;:19;;;;:::i;:::-;657:28;;612:84;-1:-1:-1;711:18:58;;;;:13;:18;;;;;;;;:26;;;;;;;;;;;;290:454;;-1:-1:-1;290:454:58:o;1537:1463::-;1831:4;1818:18;1636:12;;1966:1;1956:12;;1941:28;;1931:84;;1999:1;1996;1989:12;1931:84;2258:3;2254:14;;;2158:4;2242:27;2289:11;2263:4;2408:15;2289:11;2390:40;2620:28;;;2624:11;2620:28;2614:35;2671:20;;;;2818:19;2811:27;2840:11;2808:44;2871:19;;;;2849:1;2871:19;;;;;;;;:31;;;;;;;;:38;;;;2905:4;2871:38;;;;;;2919:18;;;;;;;;:30;;;;;;;;;:37;;;;2966:20;;;;;;;;;;;:27;;;;-1:-1:-1;;;;1537:1463:58:o;14:248:234:-;82:6;90;143:2;131:9;122:7;118:23;114:32;111:52;;;159:1;156;149:12;111:52;-1:-1:-1;;182:23:234;;;252:2;237:18;;;224:32;;-1:-1:-1;14:248:234:o;894:659::-;973:6;981;989;1042:2;1030:9;1021:7;1017:23;1013:32;1010:52;;;1058:1;1055;1048:12;1010:52;1094:9;1081:23;1071:33;;1155:2;1144:9;1140:18;1127:32;1178:18;1219:2;1211:6;1208:14;1205:34;;;1235:1;1232;1225:12;1205:34;1273:6;1262:9;1258:22;1248:32;;1318:7;1311:4;1307:2;1303:13;1299:27;1289:55;;1340:1;1337;1330:12;1289:55;1380:2;1367:16;1406:2;1398:6;1395:14;1392:34;;;1422:1;1419;1412:12;1392:34;1467:7;1462:2;1453:6;1449:2;1445:15;1441:24;1438:37;1435:57;;;1488:1;1485;1478:12;1435:57;1519:2;1515;1511:11;1501:21;;1541:6;1531:16;;;;;894:659;;;;;:::o;1558:385::-;1644:6;1652;1660;1668;1721:3;1709:9;1700:7;1696:23;1692:33;1689:53;;;1738:1;1735;1728:12;1689:53;-1:-1:-1;;1761:23:234;;;1831:2;1816:18;;1803:32;;-1:-1:-1;1882:2:234;1867:18;;1854:32;;1933:2;1918:18;1905:32;;-1:-1:-1;1558:385:234;-1:-1:-1;1558:385:234:o;1948:180::-;2007:6;2060:2;2048:9;2039:7;2035:23;2031:32;2028:52;;;2076:1;2073;2066:12;2028:52;-1:-1:-1;2099:23:234;;1948:180;-1:-1:-1;1948:180:234:o;2663:184::-;2715:77;2712:1;2705:88;2812:4;2809:1;2802:15;2836:4;2833:1;2826:15;2852:128;2892:3;2923:1;2919:6;2916:1;2913:13;2910:39;;;2929:18;;:::i;:::-;-1:-1:-1;2965:9:234;;2852:128::o;2985:125::-;3025:4;3053:1;3050;3047:8;3044:34;;;3058:18;;:::i;:::-;-1:-1:-1;3095:9:234;;2985:125::o"
func init() { func init() {
if err := json.Unmarshal([]byte(PreimageOracleStorageLayoutJSON), PreimageOracleStorageLayout); err != nil { if err := json.Unmarshal([]byte(PreimageOracleStorageLayoutJSON), PreimageOracleStorageLayout); err != nil {
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const SystemConfigStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)50_storage\"},{\"astId\":1003,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":1005,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_uint256\"},{\"astId\":1006,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_uint256\"},{\"astId\":1007,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"batcherHash\",\"offset\":0,\"slot\":\"103\",\"type\":\"t_bytes32\"},{\"astId\":1008,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"gasLimit\",\"offset\":0,\"slot\":\"104\",\"type\":\"t_uint64\"},{\"astId\":1009,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_resourceConfig\",\"offset\":0,\"slot\":\"105\",\"type\":\"t_struct(ResourceConfig)1945_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)49_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\",\"base\":\"t_uint256\"},\"t_array(t_uint256)50_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\",\"base\":\"t_uint256\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_struct(ResourceConfig)1945_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ResourceMetering.ResourceConfig\",\"numberOfBytes\":\"32\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" const SystemConfigStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)50_storage\"},{\"astId\":1003,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)49_storage\"},{\"astId\":1005,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_uint256\"},{\"astId\":1006,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_uint256\"},{\"astId\":1007,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"batcherHash\",\"offset\":0,\"slot\":\"103\",\"type\":\"t_bytes32\"},{\"astId\":1008,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"gasLimit\",\"offset\":0,\"slot\":\"104\",\"type\":\"t_uint64\"},{\"astId\":1009,\"contract\":\"contracts/L1/SystemConfig.sol:SystemConfig\",\"label\":\"_resourceConfig\",\"offset\":0,\"slot\":\"105\",\"type\":\"t_struct(ResourceConfig)34954_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)49_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\",\"base\":\"t_uint256\"},\"t_array(t_uint256)50_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\",\"base\":\"t_uint256\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_struct(ResourceConfig)34954_storage\":{\"encoding\":\"inplace\",\"label\":\"struct ResourceMetering.ResourceConfig\",\"numberOfBytes\":\"32\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}"
var SystemConfigStorageLayout = new(solc.StorageLayout) var SystemConfigStorageLayout = new(solc.StorageLayout)
......
...@@ -10,10 +10,11 @@ REBUILD_ALL_PATTERNS = [ ...@@ -10,10 +10,11 @@ REBUILD_ALL_PATTERNS = [
r'^\.circleci/\.*', r'^\.circleci/\.*',
r'^\.github/\.*', r'^\.github/\.*',
r'^package\.json', r'^package\.json',
r'^yarn\.lock',
r'ops/check-changed/.*', r'ops/check-changed/.*',
r'^go\.mod', r'^go\.mod',
r'^go\.sum', r'^go\.sum',
r'^pnpm-lock\.yaml',
r'ops/check-changed/.*'
] ]
WHITELISTED_BRANCHES = { WHITELISTED_BRANCHES = {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# Stage 0 (named `manifests`) collects # Stage 0 (named `manifests`) collects
# dependency manifest files (`package.json` and `yarn.lock`) which are then # dependency manifest files (`package.json` and `pnpm-lock.yaml`) which are then
# used by stage 1 to install these dependencies # used by stage 1 to install these dependencies
# development. The only reason we need a separate stage just for collecting the # development. The only reason we need a separate stage just for collecting the
# dependency manifests is that Docker's `COPY` command still does not allow # dependency manifests is that Docker's `COPY` command still does not allow
...@@ -17,41 +17,47 @@ FROM alpine:3.16 as manifests ...@@ -17,41 +17,47 @@ FROM alpine:3.16 as manifests
RUN apk add coreutils RUN apk add coreutils
WORKDIR /tmp WORKDIR /tmp
COPY yarn.lock .nvmrc package.json ./src/ COPY pnpm-lock.yaml pnpm-workspace.yaml .nvmrc package.json ./src/
COPY packages src/packages/ COPY packages src/packages/
RUN mkdir manifests && \ RUN mkdir manifests && \
cd src && \ cd src && \
# copy package.json recursively # copy package.json recursively
find . -name 'package.json' | xargs cp --parents -t ../manifests/ && \ find . -name 'package.json' | xargs cp --parents -t ../manifests/ && \
# yarn.lock # pnpm-lock.yaml
cp yarn.lock ../manifests/ && \ cp pnpm-lock.yaml ../manifests/ && \
# pnpm-workspace.yaml
cp pnpm-workspace.yaml ../manifests/ && \
# .nvmrc # .nvmrc
cp .nvmrc ../manifests/ cp .nvmrc ../manifests/
FROM ethereumoptimism/foundry:latest as foundry FROM ethereumoptimism/foundry:latest as foundry
FROM node:16-alpine3.14 as base # bullseye-slim is debian based
# we use it rather than alpien because it's not much
# bigger and alpine is often missing packages for node applications
# alpine is not officially supported by node.js
FROM node:16.16.0-bullseye-slim as base
# Base: install deps # Base: install deps
RUN apk --no-cache add curl \ RUN apt-get update && apt-get install -y \
curl \
jq \ jq \
python3 \ python3 \
ca-certificates \ ca-certificates \
git \ git \
g++ \
make \ make \
gcc \ gcc \
musl-dev \ musl-dev \
linux-headers \
bash \ bash \
build-base \ # the following 4 deps are needed for node-hid
gcompat # which is a deep sub dependency of ethers to install
# correctly
pkg-config \
libusb-1.0-0-dev \
libudev-dev \
--no-install-recommends
ENV GLIBC_KEY=https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub RUN npm install pnpm --global
ENV GLIBC_KEY_FILE=/etc/apk/keys/sgerrand.rsa.pub
ENV GLIBC_RELEASE=https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk
RUN wget -q -O ${GLIBC_KEY_FILE} ${GLIBC_KEY} \
&& wget -O glibc.apk ${GLIBC_RELEASE} \
&& apk add glibc.apk --force
COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge
COPY --from=foundry /usr/local/bin/cast /usr/local/bin/cast COPY --from=foundry /usr/local/bin/cast /usr/local/bin/cast
...@@ -59,37 +65,38 @@ COPY --from=foundry /usr/local/bin/cast /usr/local/bin/cast ...@@ -59,37 +65,38 @@ COPY --from=foundry /usr/local/bin/cast /usr/local/bin/cast
WORKDIR /opt/optimism WORKDIR /opt/optimism
# Copy manifest files into the image in # Copy manifest files into the image in
# preparation for `yarn install`. # preparation for `pnpm install`.
COPY --from=manifests /tmp/manifests ./ COPY --from=manifests /tmp/manifests ./
COPY *.json ./ COPY *.json ./
RUN yarn install --frozen-lockfile && yarn cache clean RUN pnpm install --frozen-lockfile
COPY ./packages ./packages COPY ./packages ./packages
RUN yarn build RUN pnpm build
FROM base as fault-detector FROM base as fault-detector
WORKDIR /opt/optimism/packages/fault-detector WORKDIR /opt/optimism/packages/fault-detector
COPY ./ops/scripts/detector.sh . COPY ./ops/scripts/detector.sh .
CMD ["npm", "run", "start"] CMD ["pnpm", "run", "start"]
FROM base as replica-healthcheck FROM base as replica-healthcheck
WORKDIR /opt/optimism/packages/replica-healthcheck WORKDIR /opt/optimism/packages/replica-healthcheck
ENTRYPOINT ["npm", "run", "start"] ENTRYPOINT ["pnpm", "run", "start"]
FROM base as balance-mon FROM base as balance-mon
WORKDIR /opt/optimism/packages/chain-mon WORKDIR /opt/optimism/packages/chain-mon
ENTRYPOINT ["npm", "run", "start:balance-mon"] ENTRYPOINT ["pnpm", "run", "start:balance-mon"]
FROM base as drippie-mon FROM base as drippie-mon
WORKDIR /opt/optimism/packages/chain-mon WORKDIR /opt/optimism/packages/chain-mon
ENTRYPOINT ["npm", "run", "start:drippie-mon"] ENTRYPOINT ["pnpm", "run", "start:drippie-mon"]
FROM base as wd-mon FROM base as wd-mon
WORKDIR /opt/optimism/packages/chain-mon WORKDIR /opt/optimism/packages/chain-mon
ENTRYPOINT ["yarn", "run", "start:wd-mon"] ENTRYPOINT ["pnpm", "run", "start:wd-mon"]
FROM base as wallet-mon FROM base as wallet-mon
WORKDIR /opt/optimism/packages/chain-mon WORKDIR /opt/optimism/packages/chain-mon
ENTRYPOINT ["yarn", "run", "start:wallet-mon"] ENTRYPOINT ["pnpm", "run", "start:wallet-mon"]
...@@ -50,13 +50,18 @@ RUN apt-get update && \ ...@@ -50,13 +50,18 @@ RUN apt-get update && \
ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt && \ ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt && \
bash nodesource_setup.sh && \ bash nodesource_setup.sh && \
apt-get install -y nodejs && \ apt-get install -y nodejs && \
npm i -g npm@8.11.0 \
npm i -g yarn && \
npm i -g depcheck && \ npm i -g depcheck && \
pip install slither-analyzer==0.9.3 && \ pip install slither-analyzer==0.9.3 && \
go install gotest.tools/gotestsum@latest && \ go install gotest.tools/gotestsum@latest && \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.48.0 && \ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.48.0 && \
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | bash curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | bash &&
chmox +x /usr/local/bin/check-changed
RUN echo "downloading pnpm" && \
curl -o /pnpm-install.sh -L https://get.pnpm.io/install.sh && \
chmod +x /pnpm-install.sh && \
/pnpm-install.sh && \
rm /pnpm-install.sh
RUN echo "downloading solidity compilers" && \ RUN echo "downloading solidity compilers" && \
curl -o solc-linux-amd64-v0.5.17+commit.d19bba13 -sL https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.5.17+commit.d19bba13 && \ curl -o solc-linux-amd64-v0.5.17+commit.d19bba13 -sL https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.5.17+commit.d19bba13 && \
......
...@@ -16,4 +16,4 @@ curl \ ...@@ -16,4 +16,4 @@ curl \
$FAULT_DETECTOR__L2_RPC_PROVIDER $FAULT_DETECTOR__L2_RPC_PROVIDER
# go # go
exec yarn start exec pnpm start
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"version": "1.0.0", "version": "1.0.0",
"author": "Optimism PBC", "author": "Optimism PBC",
"license": "MIT", "license": "MIT",
"private": true,
"workspaces": { "workspaces": {
"packages": [ "packages": [
"packages/*", "packages/*",
...@@ -22,7 +23,9 @@ ...@@ -22,7 +23,9 @@
"forta-agent" "forta-agent"
] ]
}, },
"private": true, "engines": {
"pnpm": ">=8"
},
"scripts": { "scripts": {
"clean": "npx nx run-many --target=clean", "clean": "npx nx run-many --target=clean",
"build": "npx nx run-many --target=build", "build": "npx nx run-many --target=build",
...@@ -32,15 +35,14 @@ ...@@ -32,15 +35,14 @@
"lint:ts:check": "npx nx run-many --target=lint:ts:check", "lint:ts:check": "npx nx run-many --target=lint:ts:check",
"lint:check": "npx nx run-many --target=lint:check", "lint:check": "npx nx run-many --target=lint:check",
"lint:fix": "npx nx run-many --target=lint:fix", "lint:fix": "npx nx run-many --target=lint:fix",
"lint:specs:fix": "yarn run markdownlint-cli2-fix \"./specs/**/*.md\"", "lint:specs:fix": "npx markdownlint-cli2-fix \"./specs/**/*.md\"",
"lint:specs:check": "yarn run markdownlint-cli2 \"./specs/**/*.md\"", "lint:specs:check": "npx markdownlint-cli2 \"./specs/**/*.md\"",
"lint:specs:toc": "yarn run doctoc '--title=**Table of Contents**' ./specs", "lint:specs:toc": "npx doctoc '--title=**Table of Contents**' ./specs",
"postinstall": "patch-package", "postinstall": "patch-package && (test -d docs/op-stack && cd docs/op-stack && npx yarn@1 install && cd ../.. || exit 0)",
"ready": "yarn lint && yarn test", "ready": "pnpm lint && pnpm test",
"prepare": "husky install", "prepare": "husky install",
"release": "yarn build && yarn changeset publish", "release": "pnpm build && pnpm changeset publish",
"update:yarn": "yarn set version 1.x", "install:foundry": "curl -L https://foundry.paradigm.xyz | bash && pnpm update:foundry",
"install:foundry": "curl -L https://foundry.paradigm.xyz | bash && yarn update:foundry",
"update:foundry": "foundryup -C $(cat .foundryrc)" "update:foundry": "foundryup -C $(cat .foundryrc)"
}, },
"devDependencies": { "devDependencies": {
...@@ -50,13 +52,13 @@ ...@@ -50,13 +52,13 @@
"@types/chai-as-promised": "^7.1.4", "@types/chai-as-promised": "^7.1.4",
"@types/mocha": "^8.2.2", "@types/mocha": "^8.2.2",
"@types/node": "^12.0.0", "@types/node": "^12.0.0",
"@typescript-eslint/eslint-plugin": "^5.45.1", "@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.45.1", "@typescript-eslint/parser": "^5.60.1",
"chai": "^4.2.0", "chai": "^4.2.0",
"copyfiles": "^2.3.0", "copyfiles": "^2.3.0",
"depcheck": "^1.4.3", "depcheck": "^1.4.3",
"doctoc": "^2.2.0", "doctoc": "^2.2.0",
"eslint": "^8.16.0", "eslint": "^8.43.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^16.0.3", "eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.26.0", "eslint-plugin-import": "^2.26.0",
...@@ -68,6 +70,7 @@ ...@@ -68,6 +70,7 @@
"eslint-plugin-react": "^7.24.0", "eslint-plugin-react": "^7.24.0",
"eslint-plugin-unicorn": "^42.0.0", "eslint-plugin-unicorn": "^42.0.0",
"husky": "^6.0.0", "husky": "^6.0.0",
"lerna": "^6.0.0",
"lint-staged": "11.0.0", "lint-staged": "11.0.0",
"markdownlint": "^0.24.0", "markdownlint": "^0.24.0",
"markdownlint-cli2": "0.4.0", "markdownlint-cli2": "0.4.0",
......
...@@ -10,8 +10,8 @@ Clone, install, and build the Optimism monorepo: ...@@ -10,8 +10,8 @@ Clone, install, and build the Optimism monorepo:
``` ```
git clone https://github.com/ethereum-optimism/optimism.git git clone https://github.com/ethereum-optimism/optimism.git
yarn install pnpm install
yarn build pnpm build
``` ```
## Running a service ## Running a service
...@@ -20,11 +20,11 @@ Copy `.env.example` into a new file named `.env`, then set the environment varia ...@@ -20,11 +20,11 @@ Copy `.env.example` into a new file named `.env`, then set the environment varia
Once your environment variables have been set, run via: Once your environment variables have been set, run via:
``` ```
yarn start:<service name> pnpm start:<service name>
``` ```
For example, to run `drippie-mon`, execute: For example, to run `drippie-mon`, execute:
``` ```
yarn start:drippie-mon pnpm start:drippie-mon
``` ```
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
"test:coverage": "echo 'No tests defined.'", "test:coverage": "echo 'No tests defined.'",
"build": "tsc -p ./tsconfig.json", "build": "tsc -p ./tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo", "clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check", "lint": "pnpm lint:fix && pnpm lint:check",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"lint:fix": "yarn lint:check --fix", "lint:fix": "pnpm lint:check --fix",
"lint:check": "eslint . --max-warnings=0" "lint:check": "eslint . --max-warnings=0"
}, },
"keywords": [ "keywords": [
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
"src/*" "src/*"
], ],
"scripts": { "scripts": {
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint", "all": "pnpm clean && pnpm build && pnpm test && pnpm lint:fix && pnpm lint",
"build": "tsc -p tsconfig.json", "build": "tsc -p tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo", "clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint:check": "eslint . --max-warnings=0", "lint:check": "eslint . --max-warnings=0",
"lint:fix": "yarn lint:check --fix", "lint:fix": "pnpm lint:check --fix",
"lint": "yarn lint:fix && yarn lint:check", "lint": "pnpm lint:fix && pnpm lint:check",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"test": "ts-mocha test/*.spec.ts", "test": "ts-mocha test/*.spec.ts",
"test:coverage": "nyc ts-mocha test/*.spec.ts && nyc merge .nyc_output coverage.json" "test:coverage": "nyc ts-mocha test/*.spec.ts && nyc merge .nyc_output coverage.json"
......
...@@ -56,28 +56,28 @@ npm install @eth-optimism/contracts-bedrock ...@@ -56,28 +56,28 @@ npm install @eth-optimism/contracts-bedrock
We work on this repository with a combination of [Hardhat](https://hardhat.org) and [Foundry](https://getfoundry.sh/). We work on this repository with a combination of [Hardhat](https://hardhat.org) and [Foundry](https://getfoundry.sh/).
1. Install node modules with yarn (v1) and Node.js (16+): 1. Install node modules with pnpm (v8) and Node.js (16+):
```shell ```shell
yarn install pnpm install
``` ```
1. Install the correct version of foundry (defined in the .foundryrc file in the root of this repo. 2. Install the correct version of foundry (defined in the .foundryrc file in the root of this repo.
```shell ```shell
yarn install:foundry pnpm install:foundry
``` ```
### Build ### Build
```shell ```shell
yarn build pnpm build
``` ```
### Tests ### Tests
```shell ```shell
yarn test pnpm test
``` ```
#### Running Echidna tests #### Running Echidna tests
...@@ -85,10 +85,10 @@ yarn test ...@@ -85,10 +85,10 @@ yarn test
You must have [Echidna](https://github.com/crytic/echidna) installed. You must have [Echidna](https://github.com/crytic/echidna) installed.
Contracts targetted for Echidna testing are located in `./contracts/echidna` Contracts targetted for Echidna testing are located in `./contracts/echidna`
Each target contract is tested with a separate yarn command, for example: Each target contract is tested with a separate pnpm command, for example:
```shell ```shell
yarn echidna:aliasing pnpm echidna:aliasing
``` ```
### Deployment ### Deployment
......
...@@ -19,6 +19,8 @@ build_info_path = 'artifacts/build-info' ...@@ -19,6 +19,8 @@ build_info_path = 'artifacts/build-info'
ffi = true ffi = true
fuzz_runs = 16 fuzz_runs = 16
no_match_contract = 'EchidnaFuzz' no_match_contract = 'EchidnaFuzz'
# PNPM symlinks all node_modules from the monorepo root
allow_paths = ["../../node_modules", "./**"]
fs_permissions = [ fs_permissions = [
{ 'access'='read-write', 'path'='./.resource-metering.csv' }, { 'access'='read-write', 'path'='./.resource-metering.csv' },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
This directory contains documentation for all defined invariant tests within `contracts-bedrock`. This directory contains documentation for all defined invariant tests within `contracts-bedrock`.
<!-- Do not modify the following section manually. It will be automatically generated on running `yarn autogen:invariant-docs` --> <!-- Do not modify the following section manually. It will be automatically generated on running `pnpm autogen:invariant-docs` -->
<!-- START autoTOC --> <!-- START autoTOC -->
## Table of Contents ## Table of Contents
...@@ -23,7 +23,7 @@ This directory contains documentation for all defined invariant tests within `co ...@@ -23,7 +23,7 @@ This directory contains documentation for all defined invariant tests within `co
## Usage ## Usage
To auto-generate documentation for invariant tests, run `yarn autogen:invariant-docs`. To auto-generate documentation for invariant tests, run `pnpm autogen:invariant-docs`.
## Documentation Standard ## Documentation Standard
......
...@@ -10,18 +10,18 @@ ...@@ -10,18 +10,18 @@
], ],
"scripts": { "scripts": {
"bindings": "cd ../../op-bindings && make", "bindings": "cd ../../op-bindings && make",
"build:with-metadata": "FOUNDRY_PROFILE=echidna yarn build:forge", "build:with-metadata": "FOUNDRY_PROFILE=echidna pnpm build:forge",
"build": "npx nx build:contracts", "build": "npx nx build:contracts",
"prebuild:contracts": "./scripts/verify-foundry-install.sh", "prebuild:contracts": "./scripts/verify-foundry-install.sh",
"build:contracts": "yarn build:forge", "build:contracts": "pnpm build:forge",
"build:forge": "forge build", "build:forge": "forge build",
"build:differential": "go build -o ./scripts/differential-testing/differential-testing ./scripts/differential-testing", "build:differential": "go build -o ./scripts/differential-testing/differential-testing ./scripts/differential-testing",
"build:fuzz": "(cd test-case-generator && go build ./cmd/fuzz.go)", "build:fuzz": "(cd test-case-generator && go build ./cmd/fuzz.go)",
"autogen:invariant-docs": "ts-node scripts/invariant-doc-gen.ts", "autogen:invariant-docs": "ts-node scripts/invariant-doc-gen.ts",
"test": "yarn build:differential && yarn build:fuzz && forge test", "test": "pnpm build:differential && pnpm build:fuzz && forge test",
"coverage": "yarn build:differential && yarn build:fuzz && forge coverage", "coverage": "pnpm build:differential && pnpm build:fuzz && forge coverage",
"coverage:lcov": "yarn build:differential && yarn build:fuzz && forge coverage --report lcov", "coverage:lcov": "pnpm build:differential && pnpm build:fuzz && forge coverage --report lcov",
"gas-snapshot": "yarn build:differential && yarn build:fuzz && forge snapshot --no-match-test 'testDiff|testFuzz|invariant|generateArtifact'", "gas-snapshot": "pnpm build:differential && pnpm build:fuzz && forge snapshot --no-match-test 'testDiff|testFuzz|invariant|generateArtifact'",
"storage-snapshot": "./scripts/storage-snapshot.sh", "storage-snapshot": "./scripts/storage-snapshot.sh",
"validate-deploy-configs": "./scripts/validate-deploy-configs.sh", "validate-deploy-configs": "./scripts/validate-deploy-configs.sh",
"validate-spacers": "forge build && npx ts-node scripts/validate-spacers.ts", "validate-spacers": "forge build && npx ts-node scripts/validate-spacers.ts",
...@@ -30,12 +30,12 @@ ...@@ -30,12 +30,12 @@
"clean": "rm -rf ./dist ./artifacts ./forge-artifacts ./cache ./tsconfig.tsbuildinfo ./tsconfig.build.tsbuildinfo ./src/contract-artifacts.ts ./test-case-generator/fuzz", "clean": "rm -rf ./dist ./artifacts ./forge-artifacts ./cache ./tsconfig.tsbuildinfo ./tsconfig.build.tsbuildinfo ./src/contract-artifacts.ts ./test-case-generator/fuzz",
"lint:ts:check": "eslint . --max-warnings=0", "lint:ts:check": "eslint . --max-warnings=0",
"lint:forge-tests:check": "ts-node scripts/forge-test-names.ts", "lint:forge-tests:check": "ts-node scripts/forge-test-names.ts",
"lint:contracts:check": "yarn solhint -f table 'contracts/**/!(DisputeTypes).sol' && yarn prettier --check 'contracts/**/!(DisputeTypes).sol' && yarn lint:forge-tests:check", "lint:contracts:check": "pnpm solhint -f table 'contracts/**/!(DisputeTypes|RLPReader).sol' && pnpm prettier --check 'contracts/**/!(DisputeTypes|RLPReader).sol' && pnpm lint:forge-tests:check",
"lint:check": "yarn lint:contracts:check && yarn lint:ts:check", "lint:check": "pnpm lint:contracts:check && pnpm lint:ts:check",
"lint:ts:fix": "eslint --fix .", "lint:ts:fix": "eslint --fix .",
"lint:contracts:fix": "yarn solhint --fix 'contracts/**/!(DisputeTypes).sol' && yarn prettier --write 'contracts/**/!(DisputeTypes).sol'", "lint:contracts:fix": "pnpm solhint --fix 'contracts/**/!(DisputeTypes|RLPReader).sol' && pnpm prettier --write 'contracts/**/!(DisputeTypes|RLPReader).sol'",
"lint:fix": "yarn lint:contracts:fix && yarn lint:ts:fix", "lint:fix": "pnpm lint:contracts:fix && pnpm lint:ts:fix",
"lint": "yarn lint:fix && yarn lint:check", "lint": "pnpm lint:fix && pnpm lint:check",
"echidna:aliasing": "echidna-test --contract EchidnaFuzzAddressAliasing --config ./echidna.yaml .", "echidna:aliasing": "echidna-test --contract EchidnaFuzzAddressAliasing --config ./echidna.yaml .",
"echidna:burn:gas": "echidna-test --contract EchidnaFuzzBurnGas --config ./echidna.yaml .", "echidna:burn:gas": "echidna-test --contract EchidnaFuzzBurnGas --config ./echidna.yaml .",
"echidna:burn:eth": "echidna-test --contract EchidnaFuzzBurnEth --config ./echidna.yaml .", "echidna:burn:eth": "echidna-test --contract EchidnaFuzzBurnEth --config ./echidna.yaml .",
...@@ -48,17 +48,17 @@ ...@@ -48,17 +48,17 @@
"@eth-optimism/core-utils": "^0.12.1", "@eth-optimism/core-utils": "^0.12.1",
"@openzeppelin/contracts": "4.7.3", "@openzeppelin/contracts": "4.7.3",
"@openzeppelin/contracts-upgradeable": "4.7.3", "@openzeppelin/contracts-upgradeable": "4.7.3",
"@rari-capital/solmate": "https://github.com/rari-capital/solmate.git#8f9b23f8838670afda0fd8983f2c41e8037ae6bc", "@rari-capital/solmate": "github:transmissions11/solmate#8f9b23f8838670afda0fd8983f2c41e8037ae6bc",
"clones-with-immutable-args": "https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args.git#105efee1b9127ed7f6fedf139e1fc796ce8791f2", "clones-with-immutable-args": "github:Saw-mon-and-Natalie/clones-with-immutable-args#105efee1b9127ed7f6fedf139e1fc796ce8791f2",
"ethers": "^5.7.0" "ethers": "^5.7.0"
}, },
"devDependencies": { "devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.45.1", "@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.45.1", "@typescript-eslint/parser": "^5.60.1",
"ds-test": "https://github.com/dapphub/ds-test.git#9310e879db8ba3ea6d5c6489a579118fd264a3f5", "ds-test": "github:dapphub/ds-test#c9ce3f25bde29fc5eb9901842bf02850dfd2d084",
"forge-std": "https://github.com/foundry-rs/forge-std.git#e8a047e3f40f13fa37af6fe14e6e06283d9a060e", "forge-std": "github:foundry-rs/forge-std#e8a047e3f40f13fa37af6fe14e6e06283d9a060e",
"glob": "^7.1.6", "glob": "^7.1.6",
"solhint": "^3.3.7", "solhint": "^3.4.1",
"solhint-plugin-prettier": "^0.0.5", "solhint-plugin-prettier": "^0.0.5",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^4.9.3" "typescript": "^4.9.3"
......
...@@ -10,7 +10,7 @@ A lightweight input fuzzing utility used for testing various Bedrock contracts. ...@@ -10,7 +10,7 @@ A lightweight input fuzzing utility used for testing various Bedrock contracts.
## Usage ## Usage
To build, run `yarn build:fuzz` from this directory or the `contract-bedrock` package. To build, run `pnpm build:fuzz` from this directory or the `contract-bedrock` package.
To generate an abi-encoded fuzz case, pass in a mode via the `-m` flag as well as an optional variant via the `-v` flag. To generate an abi-encoded fuzz case, pass in a mode via the `-m` flag as well as an optional variant via the `-v` flag.
......
"*.{ts,js}": "*.{ts,js}":
- eslint - eslint
"*.sol": "*.sol":
- yarn solhint -f table - pnpm solhint -f table
...@@ -19,8 +19,9 @@ remappings = [ ...@@ -19,8 +19,9 @@ remappings = [
'multicall/=lib/multicall', 'multicall/=lib/multicall',
'@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/', '@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/',
'@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/', '@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/',
'@eth-optimism/contracts-bedrock/=../../node_modules/@eth-optimism/contracts-bedrock', '@eth-optimism/contracts-bedrock/=node_modules/@eth-optimism/contracts-bedrock',
] ]
allow_paths = ["../../node_modules", "./**"]
# The metadata hash can be removed from the bytecode by setting "none" # The metadata hash can be removed from the bytecode by setting "none"
bytecode_hash = "none" bytecode_hash = "none"
libs = ["node_modules", "lib"] libs = ["node_modules", "lib"]
......
...@@ -13,29 +13,29 @@ ...@@ -13,29 +13,29 @@
"contracts" "contracts"
], ],
"scripts": { "scripts": {
"build": "yarn build:hh", "build": "pnpm build:hh",
"build:hh": "hardhat compile --show-stack-traces", "build:hh": "hardhat compile --show-stack-traces",
"build:forge": "forge build", "build:forge": "forge build",
"test": "yarn test:forge", "test": "pnpm test:forge",
"test:forge": "forge test", "test:forge": "forge test",
"test:coverage": "yarn test:coverage:forge", "test:coverage": "pnpm test:coverage:forge",
"test:coverage:forge": "forge coverage", "test:coverage:forge": "forge coverage",
"test:slither": "slither .", "test:slither": "slither .",
"gas-snapshot": "forge snapshot", "gas-snapshot": "forge snapshot",
"pretest:slither": "rm -f @openzeppelin && rm -f hardhat && ln -s node_modules/@openzeppelin @openzeppelin && ln -s ../../node_modules/hardhat hardhat", "pretest:slither": "rm -f @openzeppelin && rm -f hardhat && ln -s node_modules/@openzeppelin @openzeppelin && ln -s ../../node_modules/hardhat hardhat",
"posttest:slither": "rm -f @openzeppelin && rm -f hardhat", "posttest:slither": "rm -f @openzeppelin && rm -f hardhat",
"lint:ts:check": "eslint . --max-warnings=0", "lint:ts:check": "eslint . --max-warnings=0",
"lint:contracts:check": "yarn solhint -f table 'contracts/**/*.sol'", "lint:contracts:check": "pnpm solhint -f table 'contracts/**/*.sol'",
"lint:check": "yarn lint:contracts:check && yarn lint:ts:check", "lint:check": "pnpm lint:contracts:check && pnpm lint:ts:check",
"lint:ts:fix": "eslint --fix .", "lint:ts:fix": "eslint --fix .",
"lint:contracts:fix": "yarn prettier --write 'contracts/**/*.sol'", "lint:contracts:fix": "pnpm prettier --write 'contracts/**/*.sol'",
"lint:fix": "yarn lint:contracts:fix && yarn lint:ts:fix", "lint:fix": "pnpm lint:contracts:fix && pnpm lint:ts:fix",
"lint": "yarn lint:fix && yarn lint:check", "lint": "pnpm lint:fix && pnpm lint:check",
"clean": "rm -rf ./dist ./artifacts ./forge-artifacts ./cache ./coverage ./tsconfig.tsbuildinfo", "clean": "rm -rf ./dist ./artifacts ./forge-artifacts ./cache ./coverage ./tsconfig.tsbuildinfo",
"prepublishOnly": "yarn copyfiles -u 1 -e \"**/test-*/**/*\" \"contracts/**/*\" ./", "prepublishOnly": "pnpm copyfiles -u 1 -e \"**/test-*/**/*\" \"contracts/**/*\" ./",
"postpublish": "rimraf chugsplash L1 L2 libraries standards", "postpublish": "rimraf chugsplash L1 L2 libraries standards",
"prepack": "yarn prepublishOnly", "prepack": "pnpm prepublishOnly",
"postpack": "yarn postpublish", "postpack": "pnpm postpublish",
"pre-commit": "lint-staged" "pre-commit": "lint-staged"
}, },
"keywords": [ "keywords": [
...@@ -60,20 +60,18 @@ ...@@ -60,20 +60,18 @@
"@nomiclabs/hardhat-ethers": "^2.0.2", "@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-etherscan": "^3.0.3", "@nomiclabs/hardhat-etherscan": "^3.0.3",
"@nomiclabs/hardhat-waffle": "^2.0.3", "@nomiclabs/hardhat-waffle": "^2.0.3",
"@rari-capital/solmate": "7.0.0-alpha.3",
"@openzeppelin/contracts": "4.7.3", "@openzeppelin/contracts": "4.7.3",
"@openzeppelin/contracts-upgradeable": "4.7.3", "@openzeppelin/contracts-upgradeable": "4.7.3",
"@types/node": "^17.0.21", "@rari-capital/solmate": "7.0.0-alpha.3",
"@typechain/ethers-v5": "^10.1.0", "@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2", "@typechain/hardhat": "^6.1.2",
"@types/node": "^17.0.21",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"chai": "^4.3.4", "chai": "^4.3.4",
"copyfiles": "^2.3.0", "copyfiles": "^2.3.0",
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"ds-test": "https://github.com/dapphub/ds-test.git#9310e879db8ba3ea6d5c6489a579118fd264a3f5",
"ethereum-waffle": "^3.4.4", "ethereum-waffle": "^3.4.4",
"ethers": "^5.7.0", "ethers": "^5.7.0",
"forge-std": "https://github.com/foundry-rs/forge-std.git#e8a047e3f40f13fa37af6fe14e6e06283d9a060e",
"hardhat": "^2.9.6", "hardhat": "^2.9.6",
"hardhat-deploy": "^0.11.10", "hardhat-deploy": "^0.11.10",
"hardhat-gas-reporter": "^1.0.8", "hardhat-gas-reporter": "^1.0.8",
...@@ -87,5 +85,9 @@ ...@@ -87,5 +85,9 @@
"solidity-coverage": "^0.7.17", "solidity-coverage": "^0.7.17",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typechain": "^8.1.0" "typechain": "^8.1.0"
},
"dependencies": {
"ds-test": "github:dapphub/ds-test#c9ce3f25bde29fc5eb9901842bf02850dfd2d084",
"forge-std": "github:foundry-rs/forge-std#e8a047e3f40f13fa37af6fe14e6e06283d9a060e"
} }
} }
...@@ -13,14 +13,14 @@ ...@@ -13,14 +13,14 @@
After cloning and switching to the repository, install dependencies: After cloning and switching to the repository, install dependencies:
```bash ```bash
$ yarn $ pnpm i
``` ```
Use the following commands to build, use, test, and lint: Use the following commands to build, use, test, and lint:
```bash ```bash
$ yarn build $ pnpm build
$ yarn start $ pnpm start
$ yarn test $ pnpm test
$ yarn lint $ pnpm lint
``` ```
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
"dist/*" "dist/*"
], ],
"scripts": { "scripts": {
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint", "all": "pnpm clean && pnpm build && pnpm test && pnpm lint:fix && pnpm lint",
"build": "tsc -p tsconfig.json", "build": "tsc -p tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo", "clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check", "lint": "pnpm lint:fix && pnpm lint:check",
"lint:check": "eslint . --max-warnings=0", "lint:check": "eslint . --max-warnings=0",
"lint:fix": "yarn lint:check --fix", "lint:fix": "pnpm lint:check --fix",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"test": "ts-mocha test/**/*.spec.ts", "test": "ts-mocha test/**/*.spec.ts",
"test:coverage": "nyc ts-mocha test/**/*.spec.ts && nyc merge .nyc_output coverage.json" "test:coverage": "nyc ts-mocha test/**/*.spec.ts && nyc merge .nyc_output coverage.json"
......
...@@ -10,8 +10,8 @@ Clone, install, and build the Optimism monorepo: ...@@ -10,8 +10,8 @@ Clone, install, and build the Optimism monorepo:
``` ```
git clone https://github.com/ethereum-optimism/optimism.git git clone https://github.com/ethereum-optimism/optimism.git
yarn install pnpm install
yarn build pnpm build
``` ```
## Running the service ## Running the service
...@@ -22,7 +22,7 @@ a custom op chain, the `OptimismPortal` contract addresses must also be set asso ...@@ -22,7 +22,7 @@ a custom op chain, the `OptimismPortal` contract addresses must also be set asso
Once your environment variables or flags have been set, run the service via: Once your environment variables or flags have been set, run the service via:
``` ```
yarn start pnpm start
``` ```
## Ports ## Ports
...@@ -44,11 +44,10 @@ The state root of the block is published to the [`L2OutputOracle`](https://githu ...@@ -44,11 +44,10 @@ The state root of the block is published to the [`L2OutputOracle`](https://githu
We can therefore detect differences by, for each block, checking the state root of the given block as reported by an Optimism node and the state root as published to Ethereum. We can therefore detect differences by, for each block, checking the state root of the given block as reported by an Optimism node and the state root as published to Ethereum.
We export a series of Prometheus metrics that you can use to trigger alerting when issues are detected. We export a series of Prometheus metrics that you can use to trigger alerting when issues are detected.
Check the list of available metrics via `yarn start --help`: Check the list of available metrics via `pnpm start --help`:
```sh ```sh
> yarn start --help > pnpm start --help
yarn run v1.22.19
$ ts-node ./src/service.ts --help $ ts-node ./src/service.ts --help
Usage: service [options] Usage: service [options]
...@@ -71,6 +70,4 @@ Metrics: ...@@ -71,6 +70,4 @@ Metrics:
l2_node_connection_failures Number of times L2 node connection has failed (type: Gauge) l2_node_connection_failures Number of times L2 node connection has failed (type: Gauge)
metadata Service metadata (type: Gauge) metadata Service metadata (type: Gauge)
unhandled_errors Unhandled errors (type: Counter) unhandled_errors Unhandled errors (type: Counter)
Done in 2.19s.
``` ```
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
"test": "hardhat test", "test": "hardhat test",
"test:coverage": "nyc hardhat test && nyc merge .nyc_output coverage.json", "test:coverage": "nyc hardhat test && nyc merge .nyc_output coverage.json",
"build": "tsc -p tsconfig.json", "build": "tsc -p tsconfig.json",
"preview": "yarn build && yarn start", "preview": "pnpm build && pnpm start",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo", "clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check", "lint": "pnpm lint:fix && pnpm lint:check",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"lint:fix": "yarn lint:check --fix", "lint:fix": "pnpm lint:check --fix",
"lint:check": "eslint . --max-warnings=0" "lint:check": "eslint . --max-warnings=0"
}, },
"keywords": [ "keywords": [
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
## Installation ## Installation
``` ```
yarn add @eth-optimism/hardhat-deploy-config pnpm i @eth-optimism/hardhat-deploy-config
``` ```
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
"test:coverage": "echo 'No tests defined.'", "test:coverage": "echo 'No tests defined.'",
"build": "tsc -p tsconfig.json", "build": "tsc -p tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo", "clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check", "lint": "pnpm lint:fix && pnpm lint:check",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"lint:fix": "yarn lint:check --fix", "lint:fix": "pnpm lint:check --fix",
"lint:check": "eslint . --max-warnings=0" "lint:check": "eslint . --max-warnings=0"
}, },
"keywords": [ "keywords": [
......
...@@ -13,8 +13,8 @@ Clone, install, and build the Optimism monorepo: ...@@ -13,8 +13,8 @@ Clone, install, and build the Optimism monorepo:
``` ```
git clone https://github.com/ethereum-optimism/optimism.git git clone https://github.com/ethereum-optimism/optimism.git
yarn install pnpm install
yarn build pnpm build
``` ```
## Running the service (manual) ## Running the service (manual)
...@@ -23,11 +23,11 @@ Copy `.env.example` into a new file named `.env`, then set the environment varia ...@@ -23,11 +23,11 @@ Copy `.env.example` into a new file named `.env`, then set the environment varia
You can view a list of all environment variables and descriptions for each via: You can view a list of all environment variables and descriptions for each via:
``` ```
yarn start --help pnpm start --help
``` ```
Once your environment variables have been set, run the relayer via: Once your environment variables have been set, run the relayer via:
``` ```
yarn start pnpm start
``` ```
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
"test:coverage": "echo 'No tests defined.'", "test:coverage": "echo 'No tests defined.'",
"build": "tsc -p tsconfig.json", "build": "tsc -p tsconfig.json",
"clean": "rimraf ./dist ./tsconfig.tsbuildinfo", "clean": "rimraf ./dist ./tsconfig.tsbuildinfo",
"lint": "yarn run lint:fix && yarn run lint:check", "lint": "pnpm run lint:fix && pnpm run lint:check",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"lint:fix": "yarn lint:check --fix", "lint:fix": "pnpm lint:check --fix",
"lint:check": "eslint . --max-warnings=0" "lint:check": "eslint . --max-warnings=0"
}, },
"keywords": [ "keywords": [
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
"src/*" "src/*"
], ],
"scripts": { "scripts": {
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint", "all": "pnpm clean && pnpm build && pnpm test && pnpm lint:fix && pnpm lint",
"build": "tsc -p tsconfig.json", "build": "tsc -p tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo", "clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check", "lint": "pnpm lint:fix && pnpm lint:check",
"lint:check": "eslint . --max-warnings=0", "lint:check": "eslint . --max-warnings=0",
"lint:fix": "yarn lint:check --fix", "lint:fix": "pnpm lint:check --fix",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"test": "hardhat test", "test": "hardhat test",
"test:next": "vitest", "test:next": "vitest",
......
This diff is collapsed.
packages:
- 'packages/*'
- 'endpoint-monitor'
- 'op-exporter'
...@@ -308,7 +308,7 @@ A reference implementation of the L1 Attributes predeploy contract can be found ...@@ -308,7 +308,7 @@ A reference implementation of the L1 Attributes predeploy contract can be found
[L1Block.sol]: ../packages/contracts-bedrock/contracts/L2/L1Block.sol [L1Block.sol]: ../packages/contracts-bedrock/contracts/L2/L1Block.sol
After running `yarn build` in the `packages/contracts` directory, the bytecode to add to the genesis After running `pnpm build` in the `packages/contracts` directory, the bytecode to add to the genesis
file will be located in the `deployedBytecode` field of the build artifacts file at file will be located in the `deployedBytecode` field of the build artifacts file at
`/packages/contracts/artifacts/contracts/L2/L1Block.sol/L1Block.json`. `/packages/contracts/artifacts/contracts/L2/L1Block.sol/L1Block.json`.
......
...@@ -13,7 +13,7 @@ You can spin up a local devnet via `docker-compose`. ...@@ -13,7 +13,7 @@ You can spin up a local devnet via `docker-compose`.
For convenience, we have defined `make` targets to start and stop the devnet with a single command. For convenience, we have defined `make` targets to start and stop the devnet with a single command.
To run the devnet, you will need `docker` and `docker-compose` installed. To run the devnet, you will need `docker` and `docker-compose` installed.
Then, as a precondition, make sure that you have compiled the contracts by `cd`ing into `packages/contracts` Then, as a precondition, make sure that you have compiled the contracts by `cd`ing into `packages/contracts`
and running `yarn` followed by `yarn build`. You'll only need to do this if you change the contracts in the future. and running `pnpm i` followed by `pnpm build`. You'll only need to do this if you change the contracts in the future.
Then, run the following: Then, run the following:
......
...@@ -24,10 +24,10 @@ Justification for linting rules in [.markdownlint.json](/.markdownlint.json): ...@@ -24,10 +24,10 @@ Justification for linting rules in [.markdownlint.json](/.markdownlint.json):
- *no-emphasis-as-heading*: enable emphasized paragraphs - *no-emphasis-as-heading*: enable emphasized paragraphs
```shell ```shell
yarn # Install dependencies pnpm i # Install dependencies
yarn lint:specs:check # Run linter pnpm lint:specs:check # Run linter
yarn lint:specs:fix # Fix lint issues pnpm lint:specs:fix # Fix lint issues
yarn lint:specs:toc # Update TOC docs pnpm lint:specs:toc # Update TOC docs
# Check links # Check links
docker run --init -it -v `pwd`:/input lycheeverse/lychee --verbose --no-progress --exclude-loopback --exclude twitter.com --exclude-mail /input/README.md "/input/specs/**/*.md" docker run --init -it -v `pwd`:/input lycheeverse/lychee --verbose --no-progress --exclude-loopback --exclude twitter.com --exclude-mail /input/README.md "/input/specs/**/*.md"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
## Linting ## Linting
Respect the [linting rules] (you can run the linter with `yarn lint`). Respect the [linting rules] (you can run the linter with `pnpm lint`).
Notably: Notably:
......
This diff is collapsed.
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