@nomicfoundation/edr 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +6 -0
  2. package/package.json +17 -10
  3. package/.cargo/config.toml +0 -8
  4. package/.mocharc.json +0 -4
  5. package/artifacts/bindings-aarch64-apple-darwin/edr.darwin-arm64.node +0 -0
  6. package/artifacts/bindings-aarch64-pc-windows-msvc/edr.win32-arm64-msvc.node +0 -0
  7. package/artifacts/bindings-aarch64-unknown-linux-gnu/edr.linux-arm64-gnu.node +0 -0
  8. package/artifacts/bindings-aarch64-unknown-linux-musl/edr.linux-arm64-musl.node +0 -0
  9. package/artifacts/bindings-i686-pc-windows-msvc/edr.win32-ia32-msvc.node +0 -0
  10. package/artifacts/bindings-x86_64-apple-darwin/edr.darwin-x64.node +0 -0
  11. package/artifacts/bindings-x86_64-pc-windows-msvc/edr.win32-x64-msvc.node +0 -0
  12. package/artifacts/bindings-x86_64-unknown-linux-gnu/edr.linux-x64-gnu.node +0 -0
  13. package/artifacts/bindings-x86_64-unknown-linux-musl/edr.linux-x64-musl.node +0 -0
  14. package/npm/darwin-arm64/README.md +0 -3
  15. package/npm/darwin-arm64/edr.darwin-arm64.node +0 -0
  16. package/npm/darwin-arm64/package.json +0 -22
  17. package/npm/darwin-x64/README.md +0 -3
  18. package/npm/darwin-x64/edr.darwin-x64.node +0 -0
  19. package/npm/darwin-x64/package.json +0 -22
  20. package/npm/linux-arm64-gnu/README.md +0 -3
  21. package/npm/linux-arm64-gnu/edr.linux-arm64-gnu.node +0 -0
  22. package/npm/linux-arm64-gnu/package.json +0 -25
  23. package/npm/linux-arm64-musl/README.md +0 -3
  24. package/npm/linux-arm64-musl/edr.linux-arm64-musl.node +0 -0
  25. package/npm/linux-arm64-musl/package.json +0 -25
  26. package/npm/linux-x64-gnu/README.md +0 -3
  27. package/npm/linux-x64-gnu/edr.linux-x64-gnu.node +0 -0
  28. package/npm/linux-x64-gnu/package.json +0 -25
  29. package/npm/linux-x64-musl/README.md +0 -3
  30. package/npm/linux-x64-musl/edr.linux-x64-musl.node +0 -0
  31. package/npm/linux-x64-musl/package.json +0 -25
  32. package/npm/win32-arm64-msvc/README.md +0 -3
  33. package/npm/win32-arm64-msvc/edr.win32-arm64-msvc.node +0 -0
  34. package/npm/win32-arm64-msvc/package.json +0 -22
  35. package/npm/win32-ia32-msvc/README.md +0 -3
  36. package/npm/win32-ia32-msvc/edr.win32-ia32-msvc.node +0 -0
  37. package/npm/win32-ia32-msvc/package.json +0 -22
  38. package/npm/win32-x64-msvc/README.md +0 -3
  39. package/npm/win32-x64-msvc/edr.win32-x64-msvc.node +0 -0
  40. package/npm/win32-x64-msvc/package.json +0 -22
  41. package/test/provider.ts +0 -104
  42. package/tsconfig.json +0 -17
package/README.md ADDED
@@ -0,0 +1,6 @@
1
+ # EDR - Ethereum Development Runtime
2
+
3
+ **EDR**, or **Ethereum Development Runtime** in full, is a library for creating developer tooling on top of the Ethereum Virtual Machine (EVM), such as an EVM debugger or state inspector.
4
+ EDR provides a performant API, written in Rust, with bindings for the Node API (TypeScript).
5
+
6
+ At the moment, EDR is only meant to be consumed from [Hardhat](https://hardhat.org/), but we plan to have a stable API that can be used from any other tooling. If you are interested in this, please reach out.
package/package.json CHANGED
@@ -1,8 +1,15 @@
1
1
  {
2
2
  "name": "@nomicfoundation/edr",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
+ "files": [
7
+ "index.js",
8
+ "index.d.ts",
9
+ "Cargo.toml",
10
+ "build.rs",
11
+ "src/"
12
+ ],
6
13
  "repository": {
7
14
  "url": "https://github.com/NomicFoundation/hardhat.git",
8
15
  "type": "git"
@@ -36,15 +43,15 @@
36
43
  "node": ">= 18"
37
44
  },
38
45
  "optionalDependencies": {
39
- "@nomicfoundation/edr-win32-x64-msvc": "0.2.0",
40
- "@nomicfoundation/edr-darwin-x64": "0.2.0",
41
- "@nomicfoundation/edr-linux-x64-gnu": "0.2.0",
42
- "@nomicfoundation/edr-darwin-arm64": "0.2.0",
43
- "@nomicfoundation/edr-win32-arm64-msvc": "0.2.0",
44
- "@nomicfoundation/edr-linux-arm64-gnu": "0.2.0",
45
- "@nomicfoundation/edr-linux-arm64-musl": "0.2.0",
46
- "@nomicfoundation/edr-linux-x64-musl": "0.2.0",
47
- "@nomicfoundation/edr-win32-ia32-msvc": "0.2.0"
46
+ "@nomicfoundation/edr-win32-x64-msvc": "0.2.1",
47
+ "@nomicfoundation/edr-darwin-x64": "0.2.1",
48
+ "@nomicfoundation/edr-linux-x64-gnu": "0.2.1",
49
+ "@nomicfoundation/edr-darwin-arm64": "0.2.1",
50
+ "@nomicfoundation/edr-win32-arm64-msvc": "0.2.1",
51
+ "@nomicfoundation/edr-linux-arm64-gnu": "0.2.1",
52
+ "@nomicfoundation/edr-linux-arm64-musl": "0.2.1",
53
+ "@nomicfoundation/edr-linux-x64-musl": "0.2.1",
54
+ "@nomicfoundation/edr-win32-ia32-msvc": "0.2.1"
48
55
  },
49
56
  "scripts": {
50
57
  "artifacts": "napi artifacts",
@@ -1,8 +0,0 @@
1
- # The monorepo Cargo workspace builds to `$REPO_ROOT/target` by default.
2
- # However, it uses different settings than the one NAPI sets during the build for this crate.
3
- # Let's use a separate target-dir "$THIS_CRATE/target" to avoid invalidating the workspace-level cache.
4
- target-dir = "./target"
5
-
6
- [target.aarch64-unknown-linux-musl]
7
- linker = "aarch64-linux-musl-gcc"
8
- rustflags = ["-C", "target-feature=-crt-static"]
package/.mocharc.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "require": "ts-node/register/transpile-only",
3
- "timeout": 25000
4
- }
@@ -1,3 +0,0 @@
1
- # `@nomicfoundation/edr-darwin-arm64`
2
-
3
- This is the **aarch64-apple-darwin** binary for `@nomicfoundation/edr`
@@ -1,22 +0,0 @@
1
- {
2
- "name": "@nomicfoundation/edr-darwin-arm64",
3
- "repository": {
4
- "url": "https://github.com/NomicFoundation/hardhat.git",
5
- "type": "git"
6
- },
7
- "version": "0.2.0",
8
- "os": [
9
- "darwin"
10
- ],
11
- "cpu": [
12
- "arm64"
13
- ],
14
- "main": "edr.darwin-arm64.node",
15
- "files": [
16
- "edr.darwin-arm64.node"
17
- ],
18
- "license": "MIT",
19
- "engines": {
20
- "node": ">= 18"
21
- }
22
- }
@@ -1,3 +0,0 @@
1
- # `@nomicfoundation/edr-darwin-x64`
2
-
3
- This is the **x86_64-apple-darwin** binary for `@nomicfoundation/edr`
Binary file
@@ -1,22 +0,0 @@
1
- {
2
- "name": "@nomicfoundation/edr-darwin-x64",
3
- "repository": {
4
- "url": "https://github.com/NomicFoundation/hardhat.git",
5
- "type": "git"
6
- },
7
- "version": "0.2.0",
8
- "os": [
9
- "darwin"
10
- ],
11
- "cpu": [
12
- "x64"
13
- ],
14
- "main": "edr.darwin-x64.node",
15
- "files": [
16
- "edr.darwin-x64.node"
17
- ],
18
- "license": "MIT",
19
- "engines": {
20
- "node": ">= 18"
21
- }
22
- }
@@ -1,3 +0,0 @@
1
- # `@nomicfoundation/edr-linux-arm64-gnu`
2
-
3
- This is the **aarch64-unknown-linux-gnu** binary for `@nomicfoundation/edr`
@@ -1,25 +0,0 @@
1
- {
2
- "name": "@nomicfoundation/edr-linux-arm64-gnu",
3
- "repository": {
4
- "url": "https://github.com/NomicFoundation/hardhat.git",
5
- "type": "git"
6
- },
7
- "version": "0.2.0",
8
- "os": [
9
- "linux"
10
- ],
11
- "cpu": [
12
- "arm64"
13
- ],
14
- "main": "edr.linux-arm64-gnu.node",
15
- "files": [
16
- "edr.linux-arm64-gnu.node"
17
- ],
18
- "license": "MIT",
19
- "engines": {
20
- "node": ">= 18"
21
- },
22
- "libc": [
23
- "glibc"
24
- ]
25
- }
@@ -1,3 +0,0 @@
1
- # `@nomicfoundation/edr-linux-arm64-musl`
2
-
3
- This is the **aarch64-unknown-linux-musl** binary for `@nomicfoundation/edr`
@@ -1,25 +0,0 @@
1
- {
2
- "name": "@nomicfoundation/edr-linux-arm64-musl",
3
- "repository": {
4
- "url": "https://github.com/NomicFoundation/hardhat.git",
5
- "type": "git"
6
- },
7
- "version": "0.2.0",
8
- "os": [
9
- "linux"
10
- ],
11
- "cpu": [
12
- "arm64"
13
- ],
14
- "main": "edr.linux-arm64-musl.node",
15
- "files": [
16
- "edr.linux-arm64-musl.node"
17
- ],
18
- "license": "MIT",
19
- "engines": {
20
- "node": ">= 18"
21
- },
22
- "libc": [
23
- "musl"
24
- ]
25
- }
@@ -1,3 +0,0 @@
1
- # `@nomicfoundation/edr-linux-x64-gnu`
2
-
3
- This is the **x86_64-unknown-linux-gnu** binary for `@nomicfoundation/edr`
@@ -1,25 +0,0 @@
1
- {
2
- "name": "@nomicfoundation/edr-linux-x64-gnu",
3
- "repository": {
4
- "url": "https://github.com/NomicFoundation/hardhat.git",
5
- "type": "git"
6
- },
7
- "version": "0.2.0",
8
- "os": [
9
- "linux"
10
- ],
11
- "cpu": [
12
- "x64"
13
- ],
14
- "main": "edr.linux-x64-gnu.node",
15
- "files": [
16
- "edr.linux-x64-gnu.node"
17
- ],
18
- "license": "MIT",
19
- "engines": {
20
- "node": ">= 18"
21
- },
22
- "libc": [
23
- "glibc"
24
- ]
25
- }
@@ -1,3 +0,0 @@
1
- # `@nomicfoundation/edr-linux-x64-musl`
2
-
3
- This is the **x86_64-unknown-linux-musl** binary for `@nomicfoundation/edr`
@@ -1,25 +0,0 @@
1
- {
2
- "name": "@nomicfoundation/edr-linux-x64-musl",
3
- "repository": {
4
- "url": "https://github.com/NomicFoundation/hardhat.git",
5
- "type": "git"
6
- },
7
- "version": "0.2.0",
8
- "os": [
9
- "linux"
10
- ],
11
- "cpu": [
12
- "x64"
13
- ],
14
- "main": "edr.linux-x64-musl.node",
15
- "files": [
16
- "edr.linux-x64-musl.node"
17
- ],
18
- "license": "MIT",
19
- "engines": {
20
- "node": ">= 18"
21
- },
22
- "libc": [
23
- "musl"
24
- ]
25
- }
@@ -1,3 +0,0 @@
1
- # `@nomicfoundation/edr-win32-arm64-msvc`
2
-
3
- This is the **aarch64-pc-windows-msvc** binary for `edr`
@@ -1,22 +0,0 @@
1
- {
2
- "name": "@nomicfoundation/edr-win32-arm64-msvc",
3
- "repository": {
4
- "url": "https://github.com/NomicFoundation/hardhat.git",
5
- "type": "git"
6
- },
7
- "version": "0.2.0",
8
- "os": [
9
- "win32"
10
- ],
11
- "cpu": [
12
- "arm64"
13
- ],
14
- "main": "edr.win32-arm64-msvc.node",
15
- "files": [
16
- "edr.win32-arm64-msvc.node"
17
- ],
18
- "license": "MIT",
19
- "engines": {
20
- "node": ">= 10"
21
- }
22
- }
@@ -1,3 +0,0 @@
1
- # `@nomicfoundation/edr-win32-ia32-msvc`
2
-
3
- This is the **i686-pc-windows-msvc** binary for `@nomicfoundation/edr`
@@ -1,22 +0,0 @@
1
- {
2
- "name": "@nomicfoundation/edr-win32-ia32-msvc",
3
- "repository": {
4
- "url": "https://github.com/NomicFoundation/hardhat.git",
5
- "type": "git"
6
- },
7
- "version": "0.2.0",
8
- "os": [
9
- "win32"
10
- ],
11
- "cpu": [
12
- "ia32"
13
- ],
14
- "main": "edr.win32-ia32-msvc.node",
15
- "files": [
16
- "edr.win32-ia32-msvc.node"
17
- ],
18
- "license": "MIT",
19
- "engines": {
20
- "node": ">= 18"
21
- }
22
- }
@@ -1,3 +0,0 @@
1
- # `@nomicfoundation/edr-win32-x64-msvc`
2
-
3
- This is the **x86_64-pc-windows-msvc** binary for `@nomicfoundation/edr`
@@ -1,22 +0,0 @@
1
- {
2
- "name": "@nomicfoundation/edr-win32-x64-msvc",
3
- "repository": {
4
- "url": "https://github.com/NomicFoundation/hardhat.git",
5
- "type": "git"
6
- },
7
- "version": "0.2.0",
8
- "os": [
9
- "win32"
10
- ],
11
- "cpu": [
12
- "x64"
13
- ],
14
- "main": "edr.win32-x64-msvc.node",
15
- "files": [
16
- "edr.win32-x64-msvc.node"
17
- ],
18
- "license": "MIT",
19
- "engines": {
20
- "node": ">= 18"
21
- }
22
- }
package/test/provider.ts DELETED
@@ -1,104 +0,0 @@
1
- import chai, { assert } from "chai";
2
- import chaiAsPromised from "chai-as-promised";
3
- import {
4
- ContractAndFunctionName,
5
- EdrContext,
6
- MineOrdering,
7
- Provider,
8
- SpecId,
9
- SubscriptionEvent,
10
- } from "..";
11
-
12
- chai.use(chaiAsPromised);
13
-
14
- function getEnv(key: string): string | undefined {
15
- const variable = process.env[key];
16
- if (variable === undefined || variable === "") {
17
- return undefined;
18
- }
19
-
20
- const trimmed = variable.trim();
21
-
22
- return trimmed.length === 0 ? undefined : trimmed;
23
- }
24
-
25
- const ALCHEMY_URL = getEnv("ALCHEMY_URL");
26
-
27
- describe("Provider", () => {
28
- const context = new EdrContext();
29
- const providerConfig = {
30
- allowBlocksWithSameTimestamp: false,
31
- allowUnlimitedContractSize: true,
32
- bailOnCallFailure: false,
33
- bailOnTransactionFailure: false,
34
- blockGasLimit: 300_000_000n,
35
- chainId: 123n,
36
- chains: [],
37
- coinbase: Buffer.from("0000000000000000000000000000000000000000", "hex"),
38
- genesisAccounts: [],
39
- hardfork: SpecId.Latest,
40
- initialBlobGas: {
41
- gasUsed: 0n,
42
- excessGas: 0n,
43
- },
44
- initialParentBeaconBlockRoot: Buffer.from(
45
- "0000000000000000000000000000000000000000000000000000000000000000",
46
- "hex"
47
- ),
48
- minGasPrice: 0n,
49
- mining: {
50
- autoMine: true,
51
- memPool: {
52
- order: MineOrdering.Priority,
53
- },
54
- },
55
- networkId: 123n,
56
- };
57
-
58
- const loggerConfig = {
59
- enable: false,
60
- decodeConsoleLogInputsCallback: (inputs: Buffer[]): string[] => {
61
- return [];
62
- },
63
- getContractAndFunctionNameCallback: (
64
- _code: Buffer,
65
- _calldata?: Buffer
66
- ): ContractAndFunctionName => {
67
- return {
68
- contractName: "",
69
- };
70
- },
71
- printLineCallback: (message: string, replace: boolean) => {},
72
- };
73
-
74
- it("initialize local", async function () {
75
- const provider = Provider.withConfig(
76
- context,
77
- providerConfig,
78
- loggerConfig,
79
- (_event: SubscriptionEvent) => {}
80
- );
81
-
82
- await assert.isFulfilled(provider);
83
- });
84
-
85
- it("initialize remote", async function () {
86
- if (ALCHEMY_URL === undefined) {
87
- this.skip();
88
- }
89
-
90
- const provider = Provider.withConfig(
91
- context,
92
- {
93
- fork: {
94
- jsonRpcUrl: ALCHEMY_URL,
95
- },
96
- ...providerConfig,
97
- },
98
- loggerConfig,
99
- (_event: SubscriptionEvent) => {}
100
- );
101
-
102
- await assert.isFulfilled(provider);
103
- });
104
- });
package/tsconfig.json DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "extends": "../../config/typescript/tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./build-test",
5
- "rootDirs": [
6
- "./test"
7
- ],
8
- "composite": true
9
- },
10
- "include": [
11
- "./*.ts",
12
- "./test/**/*.ts"
13
- ],
14
- "exclude": [
15
- "./node_modules"
16
- ]
17
- }