@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.
- package/README.md +6 -0
- package/package.json +17 -10
- package/.cargo/config.toml +0 -8
- package/.mocharc.json +0 -4
- package/artifacts/bindings-aarch64-apple-darwin/edr.darwin-arm64.node +0 -0
- package/artifacts/bindings-aarch64-pc-windows-msvc/edr.win32-arm64-msvc.node +0 -0
- package/artifacts/bindings-aarch64-unknown-linux-gnu/edr.linux-arm64-gnu.node +0 -0
- package/artifacts/bindings-aarch64-unknown-linux-musl/edr.linux-arm64-musl.node +0 -0
- package/artifacts/bindings-i686-pc-windows-msvc/edr.win32-ia32-msvc.node +0 -0
- package/artifacts/bindings-x86_64-apple-darwin/edr.darwin-x64.node +0 -0
- package/artifacts/bindings-x86_64-pc-windows-msvc/edr.win32-x64-msvc.node +0 -0
- package/artifacts/bindings-x86_64-unknown-linux-gnu/edr.linux-x64-gnu.node +0 -0
- package/artifacts/bindings-x86_64-unknown-linux-musl/edr.linux-x64-musl.node +0 -0
- package/npm/darwin-arm64/README.md +0 -3
- package/npm/darwin-arm64/edr.darwin-arm64.node +0 -0
- package/npm/darwin-arm64/package.json +0 -22
- package/npm/darwin-x64/README.md +0 -3
- package/npm/darwin-x64/edr.darwin-x64.node +0 -0
- package/npm/darwin-x64/package.json +0 -22
- package/npm/linux-arm64-gnu/README.md +0 -3
- package/npm/linux-arm64-gnu/edr.linux-arm64-gnu.node +0 -0
- package/npm/linux-arm64-gnu/package.json +0 -25
- package/npm/linux-arm64-musl/README.md +0 -3
- package/npm/linux-arm64-musl/edr.linux-arm64-musl.node +0 -0
- package/npm/linux-arm64-musl/package.json +0 -25
- package/npm/linux-x64-gnu/README.md +0 -3
- package/npm/linux-x64-gnu/edr.linux-x64-gnu.node +0 -0
- package/npm/linux-x64-gnu/package.json +0 -25
- package/npm/linux-x64-musl/README.md +0 -3
- package/npm/linux-x64-musl/edr.linux-x64-musl.node +0 -0
- package/npm/linux-x64-musl/package.json +0 -25
- package/npm/win32-arm64-msvc/README.md +0 -3
- package/npm/win32-arm64-msvc/edr.win32-arm64-msvc.node +0 -0
- package/npm/win32-arm64-msvc/package.json +0 -22
- package/npm/win32-ia32-msvc/README.md +0 -3
- package/npm/win32-ia32-msvc/edr.win32-ia32-msvc.node +0 -0
- package/npm/win32-ia32-msvc/package.json +0 -22
- package/npm/win32-x64-msvc/README.md +0 -3
- package/npm/win32-x64-msvc/edr.win32-x64-msvc.node +0 -0
- package/npm/win32-x64-msvc/package.json +0 -22
- package/test/provider.ts +0 -104
- 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.
|
|
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.
|
|
40
|
-
"@nomicfoundation/edr-darwin-x64": "0.2.
|
|
41
|
-
"@nomicfoundation/edr-linux-x64-gnu": "0.2.
|
|
42
|
-
"@nomicfoundation/edr-darwin-arm64": "0.2.
|
|
43
|
-
"@nomicfoundation/edr-win32-arm64-msvc": "0.2.
|
|
44
|
-
"@nomicfoundation/edr-linux-arm64-gnu": "0.2.
|
|
45
|
-
"@nomicfoundation/edr-linux-arm64-musl": "0.2.
|
|
46
|
-
"@nomicfoundation/edr-linux-x64-musl": "0.2.
|
|
47
|
-
"@nomicfoundation/edr-win32-ia32-msvc": "0.2.
|
|
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",
|
package/.cargo/config.toml
DELETED
|
@@ -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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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
|
-
}
|
package/npm/darwin-x64/README.md
DELETED
|
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
|
-
}
|
|
Binary file
|
|
@@ -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
|
-
}
|
|
Binary file
|
|
@@ -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
|
-
}
|
|
Binary file
|
|
@@ -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
|
-
}
|
|
Binary file
|
|
@@ -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
|
-
}
|
|
Binary file
|
|
@@ -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
|
-
}
|
|
Binary file
|
|
@@ -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
|
-
}
|
|
Binary file
|
|
@@ -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
|
-
}
|