Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bold #193

Open
wants to merge 70 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
a17ec6e
feat: bold 6b42a38f
gzeoneth Jun 18, 2024
a7ea070
ci: disable solhint
gzeoneth Jun 18, 2024
0c55a90
chore: test lint fix
gzeoneth Jun 18, 2024
ab43f2c
test: workaround validaotor wallet test
gzeoneth Jun 18, 2024
7c950ae
chore: restore removed files
gzeoneth Jun 18, 2024
4e9c334
test: fix and improve
gzeoneth Jun 18, 2024
c9c1b32
Merge branch 'develop' into bold-merge
gzeoneth Jun 18, 2024
f7bd97c
test: disable delay buffer in 4844 test
gzeoneth Jun 18, 2024
733e5d3
Merge branch 'bold-merge' of github.com:OffchainLabs/nitro-contracts …
gzeoneth Jun 18, 2024
19b4163
test: fix
gzeoneth Jun 18, 2024
e900ee7
chore: update slither db
gzeoneth Jun 18, 2024
9f68098
chore: update 4b and storage
gzeoneth Jun 18, 2024
8269b1a
rename: BridgeContracts
gzeoneth Jun 21, 2024
3095b6b
Revert "rename: BridgeContracts"
gzeoneth Jun 21, 2024
6ba61b6
fix: deployment scripts
gzeoneth Jun 21, 2024
971c621
chore: cleanup hardhat config
gzeoneth Jun 21, 2024
084f36d
chore: rename bold upgrade common
gzeoneth Jun 21, 2024
8eb176c
chore: remove old files
gzeoneth Jun 21, 2024
472ce65
chore: small fix
gzeoneth Jun 21, 2024
7364af8
chore: bold pr663
gzeoneth Jun 21, 2024
146a3ef
fix: env sample name
gzeoneth Jun 21, 2024
b35884e
temp: use a default l1 rpc
gzeoneth Jun 21, 2024
640e545
fix: search a smaller range with getLogs
gzeoneth Jun 21, 2024
8e4ef6a
chore: make testUpgrade executable
gzeoneth Jun 21, 2024
fda3a87
chore: rename l1Timelock to excessStakeReceiver
gzeoneth Jun 21, 2024
ec06528
feat: sepolia config
gzeoneth Jun 21, 2024
762a523
feat: verify bold upgrade deployment
gzeoneth Jun 21, 2024
b5046a2
feat: use v2 as patched old rollup logic
gzeoneth Jun 21, 2024
c60647e
fix: wait for 5 confirmation before verify
gzeoneth Jun 21, 2024
509035d
fix: disable contract verification in ci
gzeoneth Jun 24, 2024
34891e5
fix: env sample
gzeoneth Jun 24, 2024
ba16c22
fix: make testUpgrade script exit on failure
gzeoneth Jun 24, 2024
6fd8c72
fix: bad import
gzeoneth Jun 24, 2024
d6e62df
chore: sepolia bold upgrade deployment
gzeoneth Jun 25, 2024
45453ca
ci: disable e2e test
gzeoneth Jun 27, 2024
63ba9eb
chore: bump npm packages
gzeoneth Jun 27, 2024
06533e6
chore: ignore npm audit issues
gzeoneth Jun 27, 2024
13dad6b
ci: bump node version to 18
gzeoneth Jun 27, 2024
7a656de
ci: remove node 16 support
gzeoneth Jun 27, 2024
c03101f
Merge pull request #196 from OffchainLabs/bold-merge-npm
gzeoneth Jun 28, 2024
e1d9621
fix upgrade test
godzillaba Jul 1, 2024
9f0c8fe
bump forge test gas limit
godzillaba Jul 1, 2024
e9d500d
Merge branch 'develop' into ha/bold-merge-fix-conflicts
godzillaba Jul 2, 2024
1d8263f
cachemanager storage
godzillaba Jul 2, 2024
02fecbf
Merge branch 'ha/forge-test-gaslimit' into ha/bold-merge-fix-conflicts
godzillaba Jul 2, 2024
6b4857f
update slither db
godzillaba Jul 2, 2024
883bfc1
copy over contract-tests.yml
godzillaba Jul 8, 2024
cc63791
Merge branch 'develop' into ha/bold-merge-fix-conflicts
godzillaba Jul 8, 2024
3a71d61
add bold upgrade test back
godzillaba Jul 8, 2024
9f7b7c9
copy over rollup user and admin logics from bold-merge branch
godzillaba Jul 8, 2024
27b86fd
fix unit test CI and bump RollupUserLogic compiler version
godzillaba Jul 8, 2024
3c62387
ci: disable e2e
gzeoneth Jul 9, 2024
1839465
ci: disable solhint
gzeoneth Jul 9, 2024
4ba1445
Merge pull request #199 from OffchainLabs/ha/bold-merge-fix-conflicts
gzeoneth Jul 9, 2024
8022228
fix import in bold configs
godzillaba Jul 15, 2024
ece2d89
Merge remote-tracking branch 'origin/develop' into bold-merge
gzeoneth Jul 18, 2024
1f69f84
chore: update slither db
gzeoneth Jul 18, 2024
67bf109
feat: also migrate anyTrustFastConfirmer if existed (#233)
gzeoneth Aug 15, 2024
165134b
Merge remote-tracking branch 'origin/develop' into bold-merge
gzeoneth Aug 15, 2024
ad23b04
Merge branch 'develop' into bold-merge
gzeoneth Aug 15, 2024
5deee6d
feat: bold configs (#223)
godzillaba Aug 15, 2024
9466f1c
fix: formating and enable checks in ci (#208)
gzeoneth Aug 16, 2024
06a7aeb
Merge remote-tracking branch 'origin/develop' into bold-merge
gzeoneth Aug 16, 2024
6f4b1d4
fix: orbit ts (#235)
gzeoneth Aug 16, 2024
c945d21
Merge branch 'develop' into bold-merge
gzeoneth Sep 3, 2024
70d3670
format: yarn format on c945d216
gzeoneth Sep 3, 2024
e299af5
fix: unused import and visibility (#236)
gzeoneth Sep 3, 2024
f8959b6
Merge branch 'develop' into bold-merge
godzillaba Sep 11, 2024
419a050
Bold merge merkle comments (#244)
yahgwai Sep 12, 2024
109a8a3
v3.0.0-alpha.0
gzeoneth Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env-sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
L1_RPC_URL="http://127.0.0.1:8545"
L1_PRIV_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
CONFIG_NETWORK_NAME="arb1"
DEPLOYED_CONTRACTS_DIR="./scripts/files/"
DISABLE_VERIFICATION=true
1 change: 1 addition & 0 deletions .env.sample.goerli
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ DEVNET_PRIVKEY=""

## optional - address of already deployed ERC20 token which shall be used as rollup's fee token
FEE_TOKEN_ADDRESS=""
STAKE_TOKEN_ADDRESS=""
183 changes: 111 additions & 72 deletions .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: yarn

- name: Build
run: forge test
run: yarn test:foundry
tests:
name: Contract tests
runs-on: ubuntu-8
Expand Down Expand Up @@ -64,6 +64,9 @@ jobs:
with:
version: nightly

- name: Check Contracts Format
run: forge fmt --check

- name: Install dependencies
run: yarn install

Expand Down Expand Up @@ -147,51 +150,114 @@ jobs:

- name: Test 4844
run: yarn test:4844
test-e2e:
name: Test e2e
# test-e2e:
# name: Test e2e
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive

# - uses: OffchainLabs/actions/run-nitro-test-node@main
# with:
# l3-node: true
# no-token-bridge: true
# no-l3-token-bridge: true
# nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'
# nitro-testnode-ref: node-18

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

# - name: Install packages
# run: yarn

# - name: Compile contracts
# run: yarn build

# - name: Run e2e tests
# run: yarn test:e2e
# test-e2e-custom-fee-token:
# name: Test e2e custom fee token
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive

# - uses: OffchainLabs/actions/run-nitro-test-node@main
# with:
# l3-node: true
# args: --l3-fee-token
# no-token-bridge: true
# no-l3-token-bridge: true
# nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'
# nitro-testnode-ref: node-18

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

# - name: Install packages
# run: yarn

# - name: Compile contracts
# run: yarn build

# - name: Run e2e tests
# run: yarn test:e2e
# test-e2e-fee-token-6-decimals:
# name: Test e2e fee token with 6 decimals
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive

# - uses: OffchainLabs/actions/run-nitro-test-node@main
# with:
# l3-node: true
# args: --l3-fee-token --l3-fee-token-decimals 6
# no-token-bridge: true
# no-l3-token-bridge: true
# nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'
# nitro-testnode-ref: 'non18-decimal-token-node-18'

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

# - name: Install packages
# run: yarn

# - name: Compile contracts
# run: yarn build

# - name: Run e2e tests
# run: yarn test:e2e

bold-upgrade:
name: BOLD upgrade test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: OffchainLabs/actions/run-nitro-test-node@main
with:
l3-node: true
no-token-bridge: true
no-l3-token-bridge: true
nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'

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

- name: Install packages
run: yarn

- name: Compile contracts
run: yarn build

- name: Run e2e tests
run: yarn test:e2e
test-e2e-custom-fee-token:
name: Test e2e custom fee token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: OffchainLabs/actions/run-nitro-test-node@main
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
l3-node: true
args: --l3-fee-token
no-token-bridge: true
no-l3-token-bridge: true
nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'
version: nightly

- name: Setup node/yarn
uses: actions/setup-node@v3
Expand All @@ -204,38 +270,11 @@ jobs:
run: yarn

- name: Compile contracts
run: yarn build

- name: Run e2e tests
run: yarn test:e2e
test-e2e-fee-token-6-decimals:
name: Test e2e fee token with 6 decimals
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: OffchainLabs/actions/run-nitro-test-node@main
with:
l3-node: true
args: --l3-fee-token --l3-fee-token-decimals 6
no-token-bridge: true
no-l3-token-bridge: true
nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'

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

- name: Install packages
run: yarn
run: yarn build:all

- name: Compile contracts
run: yarn build
- name: Copy .env
run: |
cp ./.env-sample ./.env

- name: Run e2e tests
run: yarn test:e2e
- name: Test upgrade
run: L1_RPC=${{ secrets.L1_RPC || 'https://rpc.ankr.com/eth' }} yarn test:upgrade
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ deployments/
scripts/config.ts
forge-cache/
out/
.env
.env
.DS_Store
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ src/lib/abi/**
out/**
lib/**
src/mocks/MultiCallTest.sol
slither.db.json
LICENSE.md
12 changes: 0 additions & 12 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,4 @@ module.exports = {
tabWidth: 2,
arrowParens: 'avoid',
bracketSpacing: true,
overrides: [
{
files: '*.sol',
options: {
tabWidth: 4,
printWidth: 100,
singleQuote: false,
bracketSpacing: false,
compiler: '0.8.9',
},
},
],
}
9 changes: 6 additions & 3 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": ["solhint:recommended"],
"rules": {
"prettier/prettier": "error",
"avoid-throw": "off",
"avoid-suicide": "error",
"avoid-sha3": "warn",
Expand All @@ -12,7 +11,11 @@
"reason-string": ["warn", { "maxLength": 128 }],
"not-rely-on-time": "off",
"max-states-count": ["warn", 40],
"no-inline-assembly": "off"
"no-inline-assembly": "off",
"no-global-import": "off",
"custom-errors": "off",
"immutable-vars-naming": "off",
"var-name-mixedcase": "off"
},
"plugins": ["prettier"]
"plugins": []
}
3 changes: 3 additions & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
src/mocks
src/precompiles
src/test-helpers
32 changes: 22 additions & 10 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
[profile.default]
src = 'src/'
src = 'src'
out = 'out'
libs = ['node_modules', 'lib']
test = 'test/foundry'
cache_path = 'forge-cache/sol'
optimizer = true
optimizer_runs = 100
optimizer_runs = 2000
via_ir = false
solc_version = '0.8.9'
remappings = ['ds-test/=lib/forge-std/lib/ds-test/src/',
'forge-std/=lib/forge-std/src/',
'@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/',
'@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/']
solc_version = '0.8.17'
remappings = ['@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/',
'@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/',
'@offchainlabs/upgrade-executor/=node_modules/@offchainlabs/upgrade-executor/']
fs_permissions = [{ access = "read", path = "./"}]

[profile.yul]
src = 'yul'
Expand All @@ -22,6 +21,19 @@ remappings = []
auto_detect_remappings = false

[fmt]
number_underscore = 'thousands'
line_length = 100
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
tab_width = 4
bracket_spacing = false
int_types = "long"
multiline_func_header = "params_first"
quote_style = "double"
number_underscore = "preserve"
hex_underscore = "remove"
single_line_statement_blocks = "preserve"
override_spacing = false
wrap_comments = false
ignore = []
contract_new_lines = false
sort_imports = false

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
Loading
Loading