@nomicfoundation/edr 0.12.0-next.27 → 0.12.0-next.29
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/index.d.ts +1 -0
- package/package.json +8 -8
- package/src/gas_report.rs +2 -0
- package/src/solidity_tests/test_results.rs +18 -6
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomicfoundation/edr",
|
|
3
|
-
"version": "0.12.0-next.
|
|
3
|
+
"version": "0.12.0-next.29",
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@napi-rs/cli": "^2.18.4",
|
|
6
6
|
"@nomicfoundation/ethereumjs-util": "^9.0.4",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"repository": "NomicFoundation/edr.git",
|
|
59
59
|
"types": "index.d.ts",
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@nomicfoundation/edr-darwin-arm64": "0.12.0-next.
|
|
62
|
-
"@nomicfoundation/edr-darwin-x64": "0.12.0-next.
|
|
63
|
-
"@nomicfoundation/edr-linux-arm64-gnu": "0.12.0-next.
|
|
64
|
-
"@nomicfoundation/edr-linux-arm64-musl": "0.12.0-next.
|
|
65
|
-
"@nomicfoundation/edr-linux-x64-gnu": "0.12.0-next.
|
|
66
|
-
"@nomicfoundation/edr-linux-x64-musl": "0.12.0-next.
|
|
67
|
-
"@nomicfoundation/edr-win32-x64-msvc": "0.12.0-next.
|
|
61
|
+
"@nomicfoundation/edr-darwin-arm64": "0.12.0-next.29",
|
|
62
|
+
"@nomicfoundation/edr-darwin-x64": "0.12.0-next.29",
|
|
63
|
+
"@nomicfoundation/edr-linux-arm64-gnu": "0.12.0-next.29",
|
|
64
|
+
"@nomicfoundation/edr-linux-arm64-musl": "0.12.0-next.29",
|
|
65
|
+
"@nomicfoundation/edr-linux-x64-gnu": "0.12.0-next.29",
|
|
66
|
+
"@nomicfoundation/edr-linux-x64-musl": "0.12.0-next.29",
|
|
67
|
+
"@nomicfoundation/edr-win32-x64-msvc": "0.12.0-next.29"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"artifacts": "napi artifacts",
|
package/src/gas_report.rs
CHANGED
|
@@ -25,6 +25,7 @@ pub enum GasReportExecutionStatus {
|
|
|
25
25
|
pub struct DeploymentGasReport {
|
|
26
26
|
pub gas: BigInt,
|
|
27
27
|
pub size: BigInt,
|
|
28
|
+
pub runtime_size: BigInt,
|
|
28
29
|
pub status: GasReportExecutionStatus,
|
|
29
30
|
}
|
|
30
31
|
|
|
@@ -82,6 +83,7 @@ impl From<edr_gas_report::DeploymentGasReport> for DeploymentGasReport {
|
|
|
82
83
|
Self {
|
|
83
84
|
gas: BigInt::from(value.gas),
|
|
84
85
|
size: BigInt::from(value.size),
|
|
86
|
+
runtime_size: BigInt::from(value.runtime_size),
|
|
85
87
|
status: value.status.into(),
|
|
86
88
|
}
|
|
87
89
|
}
|
|
@@ -78,7 +78,14 @@ impl SuiteResult {
|
|
|
78
78
|
test_results: suite_result
|
|
79
79
|
.test_results
|
|
80
80
|
.into_iter()
|
|
81
|
-
.map(|(name, test_result)|
|
|
81
|
+
.map(|(name, test_result)| {
|
|
82
|
+
TestResult::new(
|
|
83
|
+
name,
|
|
84
|
+
test_result,
|
|
85
|
+
&suite_result.setup_traces,
|
|
86
|
+
include_traces,
|
|
87
|
+
)
|
|
88
|
+
})
|
|
82
89
|
.collect(),
|
|
83
90
|
warnings: suite_result.warnings,
|
|
84
91
|
}
|
|
@@ -118,7 +125,7 @@ pub struct TestResult {
|
|
|
118
125
|
pub value_snapshot_groups: Option<Vec<ValueSnapshotGroup>>,
|
|
119
126
|
|
|
120
127
|
stack_trace_result: Option<Arc<SolidityTestStackTraceResult<String>>>,
|
|
121
|
-
call_trace_arenas: Vec<
|
|
128
|
+
call_trace_arenas: Vec<SparsedTraceArena>,
|
|
122
129
|
}
|
|
123
130
|
|
|
124
131
|
/// The stack trace result
|
|
@@ -221,8 +228,7 @@ impl TestResult {
|
|
|
221
228
|
pub fn call_traces(&self) -> Vec<CallTrace> {
|
|
222
229
|
self.call_trace_arenas
|
|
223
230
|
.iter()
|
|
224
|
-
.
|
|
225
|
-
.map(|(_, a)| CallTrace::from_arena_node(&a.resolve_arena(), 0))
|
|
231
|
+
.map(|arena| CallTrace::from_arena_node(&arena.resolve_arena(), 0))
|
|
226
232
|
.collect()
|
|
227
233
|
}
|
|
228
234
|
}
|
|
@@ -231,6 +237,7 @@ impl TestResult {
|
|
|
231
237
|
fn new(
|
|
232
238
|
name: String,
|
|
233
239
|
test_result: edr_solidity_tests::result::TestResult<String>,
|
|
240
|
+
setup_traces: &edr_solidity_tests::traces::SetupTraces,
|
|
234
241
|
include_traces: IncludeTraces,
|
|
235
242
|
) -> Self {
|
|
236
243
|
let include_trace = include_traces == IncludeTraces::All
|
|
@@ -319,9 +326,14 @@ impl TestResult {
|
|
|
319
326
|
),
|
|
320
327
|
stack_trace_result: test_result.stack_trace_result.map(Arc::new),
|
|
321
328
|
call_trace_arenas: if include_trace {
|
|
322
|
-
|
|
329
|
+
setup_traces
|
|
330
|
+
.iter()
|
|
331
|
+
.filter(|(k, _)| *k != traces::SetupTraceKind::Deployment)
|
|
332
|
+
.map(|(_, arena)| arena.clone())
|
|
333
|
+
.chain(test_result.execution_traces)
|
|
334
|
+
.collect()
|
|
323
335
|
} else {
|
|
324
|
-
|
|
336
|
+
Vec::new()
|
|
325
337
|
},
|
|
326
338
|
}
|
|
327
339
|
}
|