Skip to content

Commit cf67cd0

Browse files
authored
Merge pull request #84 from EspressoSystems/sync-v3.1.0-qol
Sync v3.1.0 qol
2 parents 3b7a18d + bf4c8f4 commit cf67cd0

File tree

107 files changed

+10631
-108352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+10631
-108352
lines changed

.env-sample

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
L1_RPC_URL="http://127.0.0.1:8545"
21
L1_PRIV_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
3-
CONFIG_NETWORK_NAME="arb1"
2+
CONFIG_NETWORK_NAME="custom"
43
DEPLOYED_CONTRACTS_DIR="./scripts/files/"
54
DISABLE_VERIFICATION=true
5+
6+
# to use the 'custom' hardhat network, set the following variables
7+
CUSTOM_RPC_URL="http://127.0.0.1:8545"
8+
CUSTOM_ETHERSCAN_API_KEY=
9+
CUSTOM_CHAINID=1337
10+
CUSTOM_ETHERSCAN_API_URL=
11+
CUSTOM_ETHERSCAN_BROWSER_URL=

.github/workflows/contract-tests.yml

Lines changed: 81 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ jobs:
1414
name: Test unit
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
with:
1919
submodules: recursive
2020

2121
- name: Install Foundry
2222
uses: foundry-rs/foundry-toolchain@v1
2323
with:
24-
version: nightly
24+
version: stable
25+
cache: false
2526

2627
- name: Prepare Environment Variables
2728
run: |
@@ -52,14 +53,15 @@ jobs:
5253
shell: bash
5354
steps:
5455
- name: Checkout
55-
uses: actions/checkout@v2
56+
uses: actions/checkout@v4
5657
with:
5758
submodules: recursive
5859

5960
- name: Install Foundry
6061
uses: foundry-rs/foundry-toolchain@v1
6162
with:
62-
version: nightly
63+
version: stable
64+
cache: false
6365

6466
- name: Prepare Environment Variables
6567
run: |
@@ -85,7 +87,8 @@ jobs:
8587
- name: Install Foundry
8688
uses: foundry-rs/foundry-toolchain@v1
8789
with:
88-
version: nightly
90+
version: stable
91+
cache: false
8992

9093
- name: Check Contracts Format
9194
run: forge fmt --check
@@ -138,14 +141,15 @@ jobs:
138141
name: 4844 tests
139142
runs-on: ubuntu-latest
140143
steps:
141-
- uses: actions/checkout@v3
144+
- uses: actions/checkout@v4
142145
with:
143146
submodules: recursive
144147

145148
- name: Install Foundry
146149
uses: foundry-rs/foundry-toolchain@v1
147150
with:
148-
version: nightly
151+
version: stable
152+
cache: false
149153

150154
- name: Prepare Environment Variables
151155
run: |
@@ -175,119 +179,20 @@ jobs:
175179

176180
- name: Test 4844
177181
run: yarn test:4844
178-
# test-e2e:
179-
# name: Test e2e
180-
# runs-on: ubuntu-latest
181-
# steps:
182-
# - uses: actions/checkout@v3
183-
# with:
184-
# submodules: recursive
185-
186-
# - uses: OffchainLabs/actions/run-nitro-test-node@main
187-
# with:
188-
# l3-node: true
189-
# no-token-bridge: true
190-
# no-l3-token-bridge: true
191-
# nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'
192-
# nitro-testnode-ref: node-18
193-
194-
# - name: Setup node/yarn
195-
# uses: actions/setup-node@v3
196-
# with:
197-
# node-version: 18
198-
# cache: 'yarn'
199-
# cache-dependency-path: '**/yarn.lock'
200-
201-
# - name: Install packages
202-
# run: yarn
203-
204-
# - name: Compile contracts
205-
# run: yarn build
206-
207-
# - name: Run e2e tests
208-
# run: yarn test:e2e
209-
# test-e2e-custom-fee-token:
210-
# name: Test e2e custom fee token
211-
# runs-on: ubuntu-latest
212-
# steps:
213-
# - uses: actions/checkout@v3
214-
# with:
215-
# submodules: recursive
216-
217-
# - uses: OffchainLabs/actions/run-nitro-test-node@main
218-
# with:
219-
# l3-node: true
220-
# args: --l3-fee-token
221-
# no-token-bridge: true
222-
# no-l3-token-bridge: true
223-
# nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'
224-
# nitro-testnode-ref: node-18
225-
226-
# - name: Setup node/yarn
227-
# uses: actions/setup-node@v3
228-
# with:
229-
# node-version: 18
230-
# cache: 'yarn'
231-
# cache-dependency-path: '**/yarn.lock'
232182

233-
# - name: Install packages
234-
# run: yarn
235-
236-
# - name: Compile contracts
237-
# run: yarn build
238-
239-
# - name: Run e2e tests
240-
# run: yarn test:e2e
241-
# test-e2e-fee-token-6-decimals:
242-
# name: Test e2e fee token with 6 decimals
243-
# runs-on: ubuntu-latest
244-
# steps:
245-
# - uses: actions/checkout@v3
246-
# with:
247-
# submodules: recursive
248-
249-
# - uses: OffchainLabs/actions/run-nitro-test-node@main
250-
# with:
251-
# l3-node: true
252-
# args: --l3-fee-token --l3-fee-token-decimals 6
253-
# no-token-bridge: true
254-
# no-l3-token-bridge: true
255-
# nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'
256-
# nitro-testnode-ref: 'non18-decimal-token-node-18'
257-
258-
# - name: Setup node/yarn
259-
# uses: actions/setup-node@v3
260-
# with:
261-
# node-version: 18
262-
# cache: 'yarn'
263-
# cache-dependency-path: '**/yarn.lock'
264-
265-
# - name: Install packages
266-
# run: yarn
267-
268-
# - name: Compile contracts
269-
# run: yarn build
270-
271-
# - name: Run e2e tests
272-
# run: yarn test:e2e
273-
274-
bold-upgrade:
275-
name: BOLD upgrade test
183+
test-e2e:
184+
name: Test e2e
276185
runs-on: ubuntu-latest
277186
steps:
278-
- uses: actions/checkout@v3
187+
- uses: actions/checkout@v4
279188
with:
280189
submodules: recursive
281190

282-
- uses: OffchainLabs/actions/run-nitro-test-node@test-node-args
191+
- uses: OffchainLabs/actions/run-nitro-test-node@main
283192
with:
284-
args: --l3node
193+
l3-node: true
285194
no-token-bridge: true
286-
287-
- name: Install Foundry
288-
uses: foundry-rs/foundry-toolchain@v1
289-
with:
290-
version: nightly
195+
no-l3-token-bridge: true
291196

292197
- name: Setup node/yarn
293198
uses: actions/setup-node@v3
@@ -296,6 +201,12 @@ jobs:
296201
cache: 'yarn'
297202
cache-dependency-path: '**/yarn.lock'
298203

204+
- name: Install Foundry
205+
uses: foundry-rs/foundry-toolchain@v1
206+
with:
207+
version: stable
208+
cache: false
209+
299210
- name: Prepare Environment Variables
300211
run: |
301212
cp .env.sample.goerli .env
@@ -308,35 +219,25 @@ jobs:
308219
run: yarn
309220

310221
- name: Compile contracts
311-
run: yarn build:all
312-
313-
- name: Copy .env
314-
run: |
315-
cp ./.env-sample ./.env
222+
run: yarn build
316223

317-
# TODO: This is broken from Offchain labs side
318-
# - name: Test upgrade
319-
# run: L1_RPC=${{ secrets.L1_RPC || 'https://rpc.ankr.com/eth/10a56026b3c20655c1dab931446156dea4d63d87d1261934c82a1b8045885923' }} yarn test:upgrade
320224
- name: Run e2e tests
321225
run: yarn test:e2e
226+
322227
test-e2e-custom-fee-token:
323-
if: false # broken
324228
name: Test e2e custom fee token
325229
runs-on: ubuntu-latest
326230
steps:
327-
- uses: actions/checkout@v3
231+
- uses: actions/checkout@v4
328232
with:
329233
submodules: recursive
330234

331-
- uses: OffchainLabs/actions/run-nitro-test-node@test-node-args
235+
- uses: OffchainLabs/actions/run-nitro-test-node@main
332236
with:
333-
args: --l3node
237+
l3-node: true
238+
args: --l3-fee-token
334239
no-token-bridge: true
335-
336-
- name: Install Foundry
337-
uses: foundry-rs/foundry-toolchain@v1
338-
with:
339-
version: nightly
240+
no-l3-token-bridge: true
340241

341242
- name: Setup node/yarn
342243
uses: actions/setup-node@v3
@@ -345,13 +246,11 @@ jobs:
345246
cache: 'yarn'
346247
cache-dependency-path: '**/yarn.lock'
347248

348-
- name: Prepare Environment Variables
349-
run: |
350-
cp .env.sample.goerli .env
351-
export $(grep -v '^#' .env | xargs) # Load variables
352-
for var in $(grep -v '^#' .env | cut -d= -f1); do
353-
echo "$var=${!var}" >> $GITHUB_ENV
354-
done
249+
- name: Install Foundry
250+
uses: foundry-rs/foundry-toolchain@v1
251+
with:
252+
version: stable
253+
cache: false
355254

356255
- name: Install packages
357256
run: yarn
@@ -361,24 +260,21 @@ jobs:
361260

362261
- name: Run e2e tests
363262
run: yarn test:e2e
263+
364264
test-e2e-fee-token-6-decimals:
365-
if: false # broken
366-
name: Test e2e fee token with 6 decimals
265+
name: Test e2e fee token with 6 decimals and pricer
367266
runs-on: ubuntu-latest
368267
steps:
369-
- uses: actions/checkout@v3
268+
- uses: actions/checkout@v4
370269
with:
371270
submodules: recursive
372271

373-
- uses: OffchainLabs/actions/run-nitro-test-node@test-node-args
272+
- uses: OffchainLabs/actions/run-nitro-test-node@main
374273
with:
375-
args: --l3node
274+
l3-node: true
275+
args: --l3-fee-token --l3-fee-token-pricer --l3-fee-token-decimals 6
376276
no-token-bridge: true
377-
378-
- name: Install Foundry
379-
uses: foundry-rs/foundry-toolchain@v1
380-
with:
381-
version: nightly
277+
no-l3-token-bridge: true
382278

383279
- name: Setup node/yarn
384280
uses: actions/setup-node@v3
@@ -387,13 +283,11 @@ jobs:
387283
cache: 'yarn'
388284
cache-dependency-path: '**/yarn.lock'
389285

390-
- name: Prepare Environment Variables
391-
run: |
392-
cp .env.sample.goerli .env
393-
export $(grep -v '^#' .env | xargs) # Load variables
394-
for var in $(grep -v '^#' .env | cut -d= -f1); do
395-
echo "$var=${!var}" >> $GITHUB_ENV
396-
done
286+
- name: Install Foundry
287+
uses: foundry-rs/foundry-toolchain@v1
288+
with:
289+
version: stable
290+
cache: false
397291

398292
- name: Install packages
399293
run: yarn
@@ -403,3 +297,37 @@ jobs:
403297

404298
- name: Run e2e tests
405299
run: yarn test:e2e
300+
301+
# bold-upgrade:
302+
# name: BOLD upgrade test
303+
# runs-on: ubuntu-latest
304+
# steps:
305+
# - uses: actions/checkout@v4
306+
# with:
307+
# submodules: recursive
308+
309+
# - name: Install Foundry
310+
# uses: foundry-rs/foundry-toolchain@v1
311+
# with:
312+
# version: stable
313+
# cache: false
314+
315+
# - name: Setup node/yarn
316+
# uses: actions/setup-node@v3
317+
# with:
318+
# node-version: 18
319+
# cache: 'yarn'
320+
# cache-dependency-path: '**/yarn.lock'
321+
322+
# - name: Install packages
323+
# run: yarn
324+
325+
# - name: Compile contracts
326+
# run: yarn build:all
327+
328+
# - name: Copy .env
329+
# run: |
330+
# cp ./.env-sample ./.env
331+
332+
# - name: Test upgrade
333+
# run: L1_RPC=${{ secrets.L1_RPC || 'https://rpc.ankr.com/eth' }} yarn test:upgrade

.gitmodules

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
[submodule "lib/forge-std"]
2+
path = lib/forge-std
3+
url = https://github.com/foundry-rs/forge-std
14
[submodule "lib/espresso-tee-contracts"]
25
path = lib/espresso-tee-contracts
3-
url = https://github.com/EspressoSystems/espresso-tee-contracts
6+
url = https://github.com/EspressoSystems/espresso-tee-contracts
7+
branch = main
8+

0 commit comments

Comments
 (0)