Skip to content

Commit

Permalink
Add Contracts as Submodule (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
rauljordan authored Sep 13, 2024
1 parent 9b136ae commit 782f09f
Show file tree
Hide file tree
Showing 277 changed files with 5,331 additions and 53,416 deletions.
116 changes: 6 additions & 110 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ jobs:
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
submodules: true

- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "yarn"
cache-dependency-path: "**/contracts/yarn.lock"

Expand Down Expand Up @@ -113,6 +115,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true

- uses: bazelbuild/setup-bazelisk@v2
- name: Mount bazel cache
uses: actions/cache@v3
Expand All @@ -137,112 +142,3 @@ jobs:
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

sol-test:
name: Solidity tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./contracts
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
cache: "yarn"
cache-dependency-path: "**/yarn.lock"

- name: Install packages
run: yarn

- name: Build
run: yarn build:all

- name: Run foundry tests
run: forge test

- name: Run hardhat tests
run: yarn hardhat compile && yarn hardhat --network hardhat test test/contract/*.spec.ts

sol-test-size:
name: Solidity contract size, storage, 4bytes
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./contracts
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
cache: "yarn"
cache-dependency-path: "**/yarn.lock"

- name: Install packages
run: yarn

- name: Build contracts
run: yarn build

- name: Test size
run: yarn contract:size

- name: Test storage
run: yarn test:storage

- name: Test 4bytes
run: yarn test:signatures

bold-upgrade:
name: BOLD upgrade test
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./contracts
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
cache: "yarn"
cache-dependency-path: "**/yarn.lock"

- name: Install packages
run: yarn

- name: Compile contracts
run: yarn build:all

- name: Copy .env
run: |
cp ./.env-sample ./.env
- name: Test upgrade
run: L1_RPC=${{ secrets.L1_RPC }} yarn test:upgrade
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "contracts/lib/forge-std"]
path = contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "safe-smart-account"]
path = safe-smart-account
url = https://github.com/safe-global/safe-smart-account.git
[submodule "contracts"]
path = contracts
url = https://github.com/OffchainLabs/nitro-contracts
1 change: 1 addition & 0 deletions contracts
Submodule contracts added at 109a8a
4 changes: 0 additions & 4 deletions contracts/.env-sample

This file was deleted.

62 changes: 0 additions & 62 deletions contracts/.eslintrc.js

This file was deleted.

9 changes: 0 additions & 9 deletions contracts/.prettierignore

This file was deleted.

21 changes: 0 additions & 21 deletions contracts/.prettierrc.js

This file was deleted.

18 changes: 0 additions & 18 deletions contracts/.solhint.json

This file was deleted.

116 changes: 0 additions & 116 deletions contracts/LICENSE.md

This file was deleted.

Loading

0 comments on commit 782f09f

Please sign in to comment.