@nomicfoundation/edr 0.10.0 → 0.12.0-alpha.0
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/Cargo.toml +26 -23
- package/index.d.ts +145 -76
- package/index.js +31 -3
- package/package.json +16 -14
- package/src/account.rs +41 -11
- package/src/block.rs +1 -1
- package/src/call_override.rs +1 -1
- package/src/cast.rs +54 -2
- package/src/chains/generic.rs +51 -0
- package/src/chains/l1.rs +260 -0
- package/src/chains/op.rs +368 -0
- package/src/chains.rs +7 -0
- package/src/config.rs +393 -67
- package/src/context.rs +135 -17
- package/src/lib.rs +28 -14
- package/src/log.rs +2 -2
- package/src/logger.rs +54 -1152
- package/src/provider/factory.rs +22 -0
- package/src/provider/response.rs +70 -0
- package/src/provider.rs +55 -322
- package/src/result.rs +44 -44
- package/src/scenarios.rs +12 -18
- package/src/subscription.rs +32 -0
- package/src/trace/exit.rs +8 -9
- package/src/trace/return_data.rs +1 -1
- package/src/trace/solidity_stack_trace.rs +5 -4
- package/src/trace.rs +9 -7
- package/src/withdrawal.rs +1 -1
- package/src/provider/config.rs +0 -291
- package/src/subscribe.rs +0 -63
package/src/lib.rs
CHANGED
|
@@ -1,23 +1,37 @@
|
|
|
1
|
-
#![warn(missing_docs)]
|
|
1
|
+
// #![warn(missing_docs)]
|
|
2
2
|
|
|
3
|
-
//! NAPI bindings for
|
|
3
|
+
//! NAPI bindings for EDR's core types.
|
|
4
4
|
|
|
5
5
|
#[global_allocator]
|
|
6
6
|
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
|
7
7
|
|
|
8
8
|
mod account;
|
|
9
9
|
mod block;
|
|
10
|
-
|
|
11
|
-
mod
|
|
12
|
-
|
|
13
|
-
mod
|
|
10
|
+
/// Types for overriding a call.
|
|
11
|
+
pub mod call_override;
|
|
12
|
+
/// Types for casting N-API types to Rust types.
|
|
13
|
+
pub mod cast;
|
|
14
|
+
/// Supported chain types.
|
|
15
|
+
pub mod chains;
|
|
16
|
+
/// Types for configuration.
|
|
17
|
+
pub mod config;
|
|
18
|
+
/// Types related to an EDR N-API context.
|
|
19
|
+
pub mod context;
|
|
14
20
|
mod debug_trace;
|
|
15
|
-
|
|
16
|
-
mod
|
|
17
|
-
|
|
18
|
-
mod
|
|
21
|
+
/// Types for EVM execution logs.
|
|
22
|
+
pub mod log;
|
|
23
|
+
/// Types for an RPC request logger.
|
|
24
|
+
pub mod logger;
|
|
25
|
+
/// Types for Ethereum RPC providers.
|
|
26
|
+
pub mod provider;
|
|
27
|
+
/// Types for EVM execution results.
|
|
28
|
+
pub mod result;
|
|
29
|
+
/// Types relating to benchmark scenarios.
|
|
19
30
|
#[cfg(feature = "scenarios")]
|
|
20
|
-
mod scenarios;
|
|
21
|
-
|
|
22
|
-
mod
|
|
23
|
-
|
|
31
|
+
pub mod scenarios;
|
|
32
|
+
/// Types for subscribing to events.
|
|
33
|
+
pub mod subscription;
|
|
34
|
+
/// Types for EVM traces.
|
|
35
|
+
pub mod trace;
|
|
36
|
+
/// Types related to Ethereum withdrawals.
|
|
37
|
+
pub mod withdrawal;
|
package/src/log.rs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
use napi::{
|
|
1
|
+
use napi::{Env, JsBuffer, JsBufferValue, bindgen_prelude::Buffer};
|
|
2
2
|
use napi_derive::napi;
|
|
3
3
|
|
|
4
4
|
/// Ethereum execution log.
|
|
@@ -10,7 +10,7 @@ pub struct ExecutionLog {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
impl ExecutionLog {
|
|
13
|
-
pub fn new(env: &Env, log: &
|
|
13
|
+
pub fn new(env: &Env, log: &edr_eth::log::ExecutionLog) -> napi::Result<Self> {
|
|
14
14
|
let topics = log
|
|
15
15
|
.topics()
|
|
16
16
|
.iter()
|