Skip to content

Commit

Permalink
Merge pull request #193 from OffchainLabs/bold-merge
Browse files Browse the repository at this point in the history
feat: bold
  • Loading branch information
gzeoneth authored Dec 11, 2024
2 parents 1bd3840 + 85f625b commit 8653940
Show file tree
Hide file tree
Showing 265 changed files with 22,274 additions and 8,976 deletions.
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
7 changes: 0 additions & 7 deletions .env.sample.goerli

This file was deleted.

5 changes: 5 additions & 0 deletions .env.sample.testnode
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
L1_RPC_URL="http://localhost:8545"
L1_PRIV_KEY="0xdc04c5399f82306ec4b4d654a342f40e2e0620fe39950d967e1e574b32d4dd36"
CONFIG_NETWORK_NAME="local"
DEPLOYED_CONTRACTS_DIR="./scripts/files/"
DISABLE_VERIFICATION=true
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ scripts/config.ts
forge-cache/
out/
.env
.DS_Store
lcov.info
output_directory
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
12 changes: 11 additions & 1 deletion audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@
// Server-Side Request Forgery in axios
"GHSA-8hc4-vh64-cxmj",
// Regular Expression Denial of Service (ReDoS) in micromatch
"GHSA-952p-6rrq-rcjv"
"GHSA-952p-6rrq-rcjv",
// cookie accepts cookie name, path, and domain with out of bounds characters
"GHSA-pxg6-pf52-xh8x",
// Elliptic's verify function omits uniqueness validation
"GHSA-434g-2637-qmqr",
// Valid ECDSA signatures erroneously rejected in Elliptic
"GHSA-fc9h-whq2-v747",
// secp256k1-node allows private key extraction over ECDH
"GHSA-584q-6j8j-r5pm",
// Regular Expression Denial of Service (ReDoS) in cross-spawn
"GHSA-3xgq-45jj-v275"
]
}
40 changes: 22 additions & 18 deletions deploy/ExpressLaneAuction.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,29 @@ module.exports = async hre => {
execute: {
init: {
methodName: 'initialize',
args: [{
_auctioneer: "0xeee584DA928A94950E177235EcB9A99bb655c7A0",
_biddingToken: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", // WETH
_beneficiary: "0xeee584DA928A94950E177235EcB9A99bb655c7A0",
_roundTimingInfo: {
offsetTimestamp: 1727870000,
roundDurationSeconds: 60,
auctionClosingSeconds: 15,
reserveSubmissionSeconds: 15
args: [
{
_auctioneer: '0xeee584DA928A94950E177235EcB9A99bb655c7A0',
_biddingToken: '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', // WETH
_beneficiary: '0xeee584DA928A94950E177235EcB9A99bb655c7A0',
_roundTimingInfo: {
offsetTimestamp: 1727870000,
roundDurationSeconds: 60,
auctionClosingSeconds: 15,
reserveSubmissionSeconds: 15,
},
_minReservePrice: ethers.utils.parseEther('0.00001'),
_auctioneerAdmin: '0xeee584DA928A94950E177235EcB9A99bb655c7A0',
_minReservePriceSetter:
'0xeee584DA928A94950E177235EcB9A99bb655c7A0',
_reservePriceSetter: '0xeee584DA928A94950E177235EcB9A99bb655c7A0',
_reservePriceSetterAdmin:
'0xeee584DA928A94950E177235EcB9A99bb655c7A0',
_beneficiarySetter: '0xeee584DA928A94950E177235EcB9A99bb655c7A0',
_roundTimingSetter: '0xeee584DA928A94950E177235EcB9A99bb655c7A0',
_masterAdmin: '0xeee584DA928A94950E177235EcB9A99bb655c7A0',
},
_minReservePrice: ethers.utils.parseEther("0.00001"),
_auctioneerAdmin: "0xeee584DA928A94950E177235EcB9A99bb655c7A0",
_minReservePriceSetter: "0xeee584DA928A94950E177235EcB9A99bb655c7A0",
_reservePriceSetter: "0xeee584DA928A94950E177235EcB9A99bb655c7A0",
_reservePriceSetterAdmin: "0xeee584DA928A94950E177235EcB9A99bb655c7A0",
_beneficiarySetter: "0xeee584DA928A94950E177235EcB9A99bb655c7A0",
_roundTimingSetter: "0xeee584DA928A94950E177235EcB9A99bb655c7A0",
_masterAdmin: "0xeee584DA928A94950E177235EcB9A99bb655c7A0"
}],
],
},
},
owner: deployer,
Expand Down
Loading

0 comments on commit 8653940

Please sign in to comment.