Skip to content

Commit 1be6718

Browse files
XanewokagostbiroWodanngalarghgithub-actions[bot]
authored
Merge main into the stack trace port feature branch (#618)
* fix: use remote chain id for pre-fork simulation (#567) * fix: use remote chain id for pre-fork simulation * Fix error message * chore: Bump hardhat to 2.22.7 (#571) * chore: Bump hardhat to 2.22.7 * fixup: Don't enable RIP-7212 in our tests * Adapt for NomicFoundation/hardhat#5411 * fix: prevent crash when returning large JSON responses (#569) * ci: update collaborator check in the benchmarks workflow (#574) * edr-0.5.1 (#559) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: add json alias property in provider response (#582) * fix: add json alias property in provider response * Create empty-bobcats-refuse.md * edr-0.5.2 (#583) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * breaking change: rename response.json to response.data (#584) * breaking change: rename response.json to response.data * Create sour-donkeys-draw.md * Update sour-donkeys-draw.md * fix: improve error message and option to skip unsupported transaction type in debug trace (#606) * fix: improve error message and option to skip unsupported tx type in debug trace * Address code review feedback * Handle unsupported transaction type requested * Fix test setup * ci: remove review-related slack notifications (#612) * chore: js tooling improvements (#609) * Fix pnpm warning * Add syncpakc * Add syncpack * Run syncpack format * Run syncpack on CI * Add setup-node action * Fixes related to upgrading prettier * Run prettier * Add setup-rust action * Run prettier in edr_napi * Add lint scripts to packages * Run prettier in crates/tools/js/benchmark * Port benchmark code to typescript * Add eslint to all packages * Upgrade @types/node to v20 * Fix broken build:edr script * Resolve benchmark output path * chore: upgrade hardhat and add patch (#613) * Upgrade Hardhat to v2.22.9 * Add patch for hardhat#5664 * chore: Bump to vanilla Hardhat 2.22.9 * chore: Regenerate the Hardhat patch to use the new EDR internals * chore: Bump @napi-rs/cli to fix duplicated napi typedefs See <napi-rs/napi-rs#2088> * fixup: Prettify test.ts * Fixes after testing in OZ (#625) * fix: add bounds checks * fix: check that steps is not empty before traversing it * fixup: formatting [skip ci] --------- Co-authored-by: Igor Matuszewski <[email protected]> --------- Co-authored-by: Agost Biro <[email protected]> Co-authored-by: Wodann <[email protected]> Co-authored-by: Piotr Galar <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Franco Victorio <[email protected]>
1 parent 88dd5a1 commit 1be6718

Some content is hidden

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

52 files changed

+1815
-864
lines changed

.changeset/empty-cars-join.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@nomicfoundation/edr": patch
3+
---
4+
5+
Improved error message and added option to skip unsupported transaction type in `debug_traceTransaction`. Set `__EDR_UNSAFE_SKIP_UNSUPPORTED_TRANSACTION_TYPES=true` as an environment variable to enable this.

.changeset/sour-donkeys-draw.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@nomicfoundation/edr": minor
3+
---
4+
5+
Renamed `json` field in response to `data` and changed its type to `string | object` (specified as `string | any` due to an napi-rs limitation).

.changeset/thick-impalas-sparkle.md

-5
This file was deleted.

.github/actions/setup-node/action.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Setup node
2+
description: Sets up node and pnpm
3+
4+
inputs:
5+
pnpm-version:
6+
description: Version of pnpm to install
7+
required: false
8+
default: "9"
9+
node-version:
10+
description: Version of node to install
11+
required: false
12+
default: "20"
13+
14+
runs:
15+
using: composite
16+
steps:
17+
- uses: pnpm/action-setup@v4
18+
with:
19+
version: ${{ inputs.pnpm-version }}
20+
- uses: actions/setup-node@v4
21+
id: setup-node
22+
with:
23+
node-version: ${{ inputs.node-version }}
24+
cache: pnpm

.github/actions/setup-rust/action.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Setup rust
2+
description: Sets up rust
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Install Rust (stable)
8+
uses: actions-rs/toolchain@v1
9+
with:
10+
profile: minimal
11+
override: true
12+
13+
- uses: Swatinem/rust-cache@v2

.github/workflows/edr-benchmark.yml

+3-16
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,11 @@ jobs:
2424
environment: github-action-benchmark
2525
runs-on: self-hosted
2626
# Only run for trusted collaborators since third-parties could run malicious code on the self-hosted benchmark runner.
27-
if: github.ref == 'refs/heads/main' || (github.event.pull_request.author_association == 'OWNER' || github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'COLLABORATOR')
27+
if: github.ref == 'refs/heads/main' || github.repository == github.event.pull_request.head.repo.full_name
2828
steps:
2929
- uses: actions/checkout@v3
30-
31-
- uses: pnpm/action-setup@v4
32-
with:
33-
version: 9
34-
- name: Install Node
35-
uses: actions/setup-node@v2
36-
with:
37-
node-version: 20
38-
cache: pnpm
39-
40-
- name: Install Rust (stable)
41-
uses: actions-rs/toolchain@v1
42-
with:
43-
profile: minimal
44-
override: true
30+
- uses: ./.github/actions/setup-node
31+
- uses: ./.github/actions/setup-rust
4532

4633
- name: Install package
4734
run: pnpm install --frozen-lockfile --prefer-offline

.github/workflows/edr-ci.yml

+8-45
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,11 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v3
26-
27-
- name: Install Rust (stable)
28-
uses: actions-rs/toolchain@v1
29-
with:
30-
profile: minimal
31-
override: true
26+
- uses: ./.github/actions/setup-rust
3227

3328
# Install pre-built binaries for cargo hack
3429
- uses: taiki-e/install-action@cargo-hack
3530

36-
- uses: Swatinem/rust-cache@v2
37-
3831
- name: Cargo hack
3932
uses: actions-rs/cargo@v1
4033
with:
@@ -51,14 +44,7 @@ jobs:
5144
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
5245
steps:
5346
- uses: actions/checkout@v3
54-
55-
- name: Install Rust (stable)
56-
uses: actions-rs/toolchain@v1
57-
with:
58-
profile: minimal
59-
override: true
60-
61-
- uses: Swatinem/rust-cache@v2
47+
- uses: ./.github/actions/setup-rust
6248

6349
- name: Cache EDR RPC cache
6450
uses: actions/cache@v2
@@ -145,55 +131,32 @@ jobs:
145131
needs: check-edr
146132
steps:
147133
- uses: actions/checkout@v3
148-
149-
- name: Install stable toolchain
150-
uses: actions-rs/toolchain@v1
151-
with:
152-
profile: minimal
153-
override: true
154-
155-
- uses: Swatinem/rust-cache@v2
134+
- uses: ./.github/actions/setup-rust
156135

157136
- name: Cargo doc
158137
uses: actions-rs/cargo@v1
159138
with:
160139
command: doc
161140
args: --workspace --no-deps --all-features
162141

163-
prettier:
142+
lint:
164143
name: Run Prettier
165144
runs-on: ubuntu-latest
166145
steps:
167146
- uses: actions/checkout@v3
168-
169-
- uses: pnpm/action-setup@v4
170-
with:
171-
version: 9
172-
- name: Install Node
173-
uses: actions/setup-node@v2
174-
with:
175-
node-version: ${{ matrix.node }}
176-
cache: pnpm
147+
- uses: ./.github/actions/setup-node
177148

178149
- name: Install package
179150
run: pnpm install --frozen-lockfile --prefer-offline
180-
181-
- name: Run prettier
182-
run: pnpm run prettier
151+
- name: Run lint script
152+
run: pnpm run lint
183153

184154
edr-napi-typings-file:
185155
name: Check that edr_napi typings file is up to date
186156
runs-on: ubuntu-latest
187157
steps:
188158
- uses: actions/checkout@v3
189-
- uses: pnpm/action-setup@v4
190-
with:
191-
version: 9
192-
- name: Install Node
193-
uses: actions/setup-node@v2
194-
with:
195-
node-version: ${{ matrix.node }}
196-
cache: pnpm
159+
- uses: ./.github/actions/setup-node
197160

198161
- name: Install package
199162
run: pnpm install --frozen-lockfile --prefer-offline

.github/workflows/edr-npm-release.yml

+5-35
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
uses: actions/setup-node@v3
102102
if: ${{ !matrix.settings.docker }}
103103
with:
104-
node-version: 18
104+
node-version: 20
105105
check-latest: true
106106
cache: pnpm
107107
- name: Install Rust toolchain
@@ -174,15 +174,7 @@ jobs:
174174
working-directory: ./crates/edr_napi
175175
steps:
176176
- uses: actions/checkout@v4
177-
- uses: pnpm/action-setup@v4
178-
with:
179-
version: 9
180-
- name: Setup node
181-
uses: actions/setup-node@v3
182-
with:
183-
node-version: ${{ matrix.node }}
184-
check-latest: true
185-
cache: pnpm
177+
- uses: ./.github/actions/setup-node
186178
- name: Install dependencies
187179
run: pnpm install --frozen-lockfile --prefer-offline
188180
- name: Download artifacts
@@ -208,15 +200,7 @@ jobs:
208200
runs-on: ubuntu-22.04
209201
steps:
210202
- uses: actions/checkout@v4
211-
- uses: pnpm/action-setup@v4
212-
with:
213-
version: 9
214-
- name: Setup node
215-
uses: actions/setup-node@v3
216-
with:
217-
node-version: ${{ matrix.node }}
218-
check-latest: true
219-
cache: pnpm
203+
- uses: ./.github/actions/setup-node
220204
- name: Install dependencies
221205
run: pnpm install --frozen-lockfile --prefer-offline
222206
- name: Download artifacts
@@ -244,15 +228,9 @@ jobs:
244228
runs-on: ubuntu-22.04
245229
steps:
246230
- uses: actions/checkout@v4
247-
- uses: pnpm/action-setup@v4
248-
with:
249-
version: 9
250-
- name: Setup node
251-
uses: actions/setup-node@v3
231+
- uses: ./.github/actions/setup-node
252232
with:
253233
node-version: ${{ matrix.node }}
254-
check-latest: true
255-
cache: pnpm
256234
- name: Install dependencies
257235
run: |
258236
pnpm config set supportedArchitectures.libc "musl"
@@ -395,15 +373,7 @@ jobs:
395373
working-directory: ./crates/edr_napi
396374
steps:
397375
- uses: actions/checkout@v4
398-
- uses: pnpm/action-setup@v4
399-
with:
400-
version: 9
401-
- name: Setup node
402-
uses: actions/setup-node@v3
403-
with:
404-
node-version: 18
405-
check-latest: true
406-
cache: pnpm
376+
- uses: ./.github/actions/setup-node
407377
- name: Install dependencies
408378
run: pnpm install --frozen-lockfile --prefer-offline
409379
- name: Download all artifacts

.github/workflows/hardhat-tests.yml

+4-28
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,14 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
node: [18.15]
19+
node: [20]
2020
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
2121
steps:
2222
- uses: actions/checkout@v3
23-
24-
- uses: pnpm/action-setup@v4
25-
with:
26-
version: 9
27-
- name: Install Node
28-
uses: actions/setup-node@v2
23+
- uses: ./.github/actions/setup-node
2924
with:
3025
node-version: ${{ matrix.node }}
31-
cache: pnpm
32-
33-
- name: Install Rust (stable)
34-
uses: actions-rs/toolchain@v1
35-
with:
36-
profile: minimal
37-
override: true
38-
39-
- uses: Swatinem/rust-cache@v2
26+
- uses: ./.github/actions/setup-rust
4027

4128
- name: Install package
4229
run: pnpm install --frozen-lockfile --prefer-offline
@@ -55,9 +42,6 @@ jobs:
5542
hardhat-tests/test/internal/hardhat-network/stack-traces/test-files/artifacts
5643
key: hardhat-network-stack-traces-tests-${{ hashFiles('hardhat-tests/test/internal/hardhat-network/stack-traces/test-files/**/*.sol') }}-${{ hashFiles('hardhat-tests/test/internal/hardhat-network/stack-traces/test-files/**/test.json') }}-${{ hashFiles('hardhat-tests/test/internal/hardhat-network/stack-traces/**/*.ts') }}
5744

58-
- name: Build
59-
run: cd hardhat-tests && pnpm build
60-
6145
- name: Run tests
6246
env:
6347
INFURA_URL: ${{ secrets.INFURA_URL }}
@@ -72,15 +56,7 @@ jobs:
7256
runs-on: ubuntu-latest
7357
steps:
7458
- uses: actions/checkout@v3
75-
76-
- uses: pnpm/action-setup@v4
77-
with:
78-
version: 9
79-
- name: Install Node
80-
uses: actions/setup-node@v2
81-
with:
82-
node-version: 18.15
83-
cache: pnpm
59+
- uses: ./.github/actions/setup-node
8460

8561
- name: Install package
8662
run: pnpm install --frozen-lockfile --prefer-offline

.github/workflows/release.yml

+1-10
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,7 @@ jobs:
1919
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
2020
fetch-depth: 0
2121

22-
- name: Setup pnpm
23-
uses: pnpm/action-setup@v4
24-
with:
25-
version: 9
26-
27-
- name: Setup Node.js 18.x
28-
uses: actions/setup-node@v2
29-
with:
30-
node-version: 18.x
31-
cache: "pnpm"
22+
- uses: ./.github/actions/setup-node
3223

3324
- name: Install Dependencies
3425
run: pnpm install --frozen-lockfile --prefer-offline

.github/workflows/review-requested-slack-notification.yml

-10
This file was deleted.

.github/workflows/review-submitted-slack-notification.yml

-10
This file was deleted.

.github/workflows/test-recent-mainnet-block.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
19-
- name: Install Rust (stable)
20-
uses: actions-rs/toolchain@v1
21-
with:
22-
profile: minimal
23-
override: true
24-
25-
- uses: Swatinem/rust-cache@v2
18+
- uses: ./.github/actions/setup-rust
2619

2720
- name: Cache EDR RPC cache
2821
uses: actions/cache@v2

.prettierrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"proseWrap": "never"
2+
"proseWrap": "never",
3+
"trailingComma": "es5"
34
}

0 commit comments

Comments
 (0)