Skip to content

Commit e04b0cb

Browse files
authored
Merge pull request #4883 from NomicFoundation/edr/main
Merge edr/main into main
2 parents 2a280a7 + 93c1476 commit e04b0cb

File tree

442 files changed

+49407
-22608
lines changed

Some content is hidden

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

442 files changed

+49407
-22608
lines changed

.cargo-husky/hooks/pre-commit

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
#
3+
# Intended to be in sync with .github/workflows/hardhat-core-ci.yml's
4+
# test-edr-rs
5+
6+
if [ -z "${ALCHEMY_URL}" ] || [ -z "${INFURA_URL}" ]; then
7+
echo WARNING: skipping remote tests because the ALCHEMY_URL and INFURA_URL environment variables are not defined. Local test results may differ from those in CI.
8+
ALL_FEATURES="--features tracing,bench-once,serde,std"
9+
else
10+
ALL_FEATURES=--all-features
11+
fi
12+
13+
# Set -x here to avoid printing secrets
14+
set -xe
15+
16+
# Setting RUSTFLAGS env for clippy makes it not include custom rules
17+
RUSTFLAGS=-Dwarnings cargo check --workspace --all-targets --profile bench ${ALL_FEATURES}
18+
cargo clippy --all --all-targets ${ALL_FEATURES} -- -D warnings
19+
cargo +nightly fmt --all -- --check
20+
cargo test --doc --workspace ${ALL_FEATURES}
21+
cargo test --workspace --all-targets ${ALL_FEATURES}

.cargo/config

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
[alias]
2+
gen-execution-api = "run --bin tools -- gen-execution-api"
3+
4+
[target.'cfg(all())']
5+
rustflags = [
6+
"-Wclippy::all",
7+
"-Wclippy::await_holding_lock",
8+
"-Wclippy::bool-to-int-with-if",
9+
"-Wclippy::cast_lossless",
10+
"-Wclippy::char_lit_as_u8",
11+
"-Wclippy::checked_conversions",
12+
"-Wclippy::dbg_macro",
13+
"-Wclippy::debug_assert_with_mut_call",
14+
"-Wclippy::default_trait_access",
15+
"-Wclippy::doc_markdown",
16+
"-Wclippy::empty_enum",
17+
"-Wclippy::enum_glob_use",
18+
"-Wclippy::exit",
19+
"-Wclippy::expl_impl_clone_on_copy",
20+
"-Wclippy::explicit_deref_methods",
21+
"-Wclippy::explicit_into_iter_loop",
22+
"-Wclippy::fallible_impl_from",
23+
"-Wclippy::filter_map_next",
24+
"-Wclippy::flat_map_option",
25+
"-Wclippy::float_cmp_const",
26+
"-Wclippy::fn_params_excessive_bools",
27+
"-Wclippy::from_iter_instead_of_collect",
28+
"-Wclippy::if-not-else",
29+
"-Wclippy::implicit_clone",
30+
"-Wclippy::imprecise_flops",
31+
"-Wclippy::inconsistent_struct_constructor",
32+
"-Wclippy::inefficient_to_string",
33+
"-Wclippy::invalid_upcast_comparisons",
34+
"-Wclippy::items-after-statements",
35+
"-Wclippy::large_digit_groups",
36+
"-Wclippy::large_stack_arrays",
37+
"-Wclippy::large_types_passed_by_value",
38+
"-Wclippy::let_unit_value",
39+
"-Wclippy::linkedlist",
40+
"-Wclippy::lossy_float_literal",
41+
"-Wclippy::macro_use_imports",
42+
"-Wclippy::manual-assert",
43+
"-Wclippy::manual_ok_or",
44+
"-Wclippy::map_err_ignore",
45+
"-Wclippy::map_flatten",
46+
"-Wclippy::map_unwrap_or",
47+
"-Wclippy::match_on_vec_items",
48+
"-Wclippy::match_same_arms",
49+
"-Wclippy::match_wild_err_arm",
50+
"-Wclippy::match_wildcard_for_single_variants",
51+
"-Wclippy::mem_forget",
52+
"-Wclippy::missing_enforced_import_renames",
53+
"-Wclippy::mut_mut",
54+
"-Wclippy::mutex_integer",
55+
"-Wclippy::needless_borrow",
56+
"-Wclippy::needless_continue",
57+
"-Wclippy::needless_for_each",
58+
"-Wclippy::option_option",
59+
"-Wclippy::path_buf_push_overwrite",
60+
"-Wclippy::ptr_as_ptr",
61+
"-Wclippy::rc_mutex",
62+
"-Wclippy::redundant_closure_for_method_calls",
63+
"-Wclippy::ref_option_ref",
64+
"-Wclippy::rest_pat_in_fully_bound_structs",
65+
"-Wclippy::same_functions_in_if_condition",
66+
"-Wclippy::semicolon_if_nothing_returned",
67+
"-Wclippy::single_match_else",
68+
"-Wclippy::string_add_assign",
69+
"-Wclippy::string_add",
70+
"-Wclippy::string_lit_as_bytes",
71+
"-Wclippy::string_to_string",
72+
"-Wclippy::todo",
73+
"-Wclippy::trait_duplication_in_bounds",
74+
"-Wclippy::unimplemented",
75+
"-Wclippy::uninlined_format_args",
76+
"-Wclippy::unnested_or_patterns",
77+
"-Wclippy::unused_self",
78+
"-Wclippy::useless_transmute",
79+
"-Wclippy::verbose_file_reads",
80+
"-Wclippy::wildcard-imports",
81+
"-Wclippy::zero_sized_map_values",
82+
"-Wfuture_incompatible",
83+
"-Wnonstandard_style",
84+
"-Wrust_2018_idioms",
85+
]

.changeset/cold-cobras-carry.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hardhat": minor
3+
---
4+
5+
Refactored Hardhat Network to use EDR instead of ethereumjs

.devcontainer/devcontainer.json

+30-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,36 @@
33
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
44
"features": {
55
"ghcr.io/devcontainers/features/node:1": {
6-
"version": "16" /* Keep in sync with the oldest version of Node.js that Hardhat supports */
7-
},
8-
"ghcr.io/devcontainers/features/rust:1": {
9-
"version": "1.70" /* Keep in sync with rust-toolchain */,
10-
"profile": "default"
6+
"version": "18"
117
}
128
},
13-
/* libudev-dev is required by hardhat-ledger. pkg-config is required by EDR to use OpenSSL */
14-
"postCreateCommand": "sudo apt update && sudo apt install -y libudev-dev pkg-config"
9+
"postAttachCommand": "scripts/setup.sh",
10+
"portsAttributes": {
11+
// The default port of mdbook
12+
"3000": {
13+
"label": "mdbook",
14+
"onAutoForward": "openPreview"
15+
}
16+
},
17+
"containerEnv": {
18+
"ALCHEMY_URL": "${localEnv:ALCHEMY_URL}",
19+
"INFURA_URL": "${localEnv:INFURA_URL}"
20+
},
21+
"customizations": {
22+
"vscode": {
23+
"extensions": [
24+
"esbenp.prettier-vscode",
25+
"NomicFoundation.hardhat-solidity",
26+
"rust-lang.rust-analyzer",
27+
"tamasfe.even-better-toml",
28+
"vadimcn.vscode-lldb"
29+
],
30+
"settings": {
31+
"rust-analyzer.cargo.features": "all",
32+
"rust-analyzer.rustfmt.extraArgs": [
33+
"+nightly"
34+
]
35+
}
36+
}
37+
}
1538
}

.gitattributes

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
*.sol linguist-language=Solidity
22
# prevent github actions to checkout files with crlf line endings
3-
* -text
3+
* text=auto
4+
5+
*.sol text eol=lf
6+
*.d.ts text eol=lf

.github/dependabot.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33

44
version: 2
55
updates:
6-
- package-ecosystem: "npm"
6+
- package-ecosystem: "cargo"
7+
directory: "/"
8+
schedule:
9+
interval: "daily"
10+
commit-message:
11+
prefix: "bump"
12+
- package-ecosystem: "pnpm"
713
directory: "/"
814
schedule:
915
interval: "daily"

.github/workflows/LATEST_DEPENDENCY_VERSIONS.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
version: 8
2020
- uses: actions/setup-node@v2
2121
with:
22-
node-version: 16
22+
node-version: 18
2323
cache: "pnpm"
2424
- name: Delete pnpm-lock.yaml
2525
run: "rm pnpm-lock.yaml"

.github/workflows/check-docs-site.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
version: 8
2222
- uses: actions/setup-node@v2
2323
with:
24-
node-version: 16
24+
node-version: 18
2525
cache: "pnpm"
2626
- name: Install
2727
run: pnpm install --frozen-lockfile --prefer-offline

.github/workflows/comment-on-linter-error.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
version: 8
2626
- uses: actions/setup-node@v2
2727
with:
28-
node-version: 16
28+
node-version: 18
2929
cache: "pnpm"
3030
- name: Install
3131
run: pnpm install --frozen-lockfile --prefer-offline

.github/workflows/compile-with-typescript-v4.yml

-32
This file was deleted.

.github/workflows/e2e-tests.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ name: E2E tests
33
on:
44
push:
55
branches:
6-
- "**"
6+
- "main"
7+
pull_request:
8+
branches:
9+
- "main"
710

811
jobs:
912
run-e2e:

0 commit comments

Comments
 (0)