@nomicfoundation/edr 0.6.5 → 0.8.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.
@@ -1,27 +0,0 @@
1
- use std::rc::Rc;
2
-
3
- use edr_solidity::artifacts::{CompilerInput, CompilerOutput};
4
- use napi::{bindgen_prelude::ClassInstance, Env};
5
- use napi_derive::napi;
6
-
7
- use crate::trace::model::BytecodeWrapper;
8
-
9
- #[napi(catch_unwind)]
10
- pub fn create_models_and_decode_bytecodes(
11
- solc_version: String,
12
- compiler_input: serde_json::Value,
13
- compiler_output: serde_json::Value,
14
- env: Env,
15
- ) -> napi::Result<Vec<ClassInstance<BytecodeWrapper>>> {
16
- let compiler_input: CompilerInput = serde_json::from_value(compiler_input)?;
17
- let compiler_output: CompilerOutput = serde_json::from_value(compiler_output)?;
18
-
19
- edr_solidity::compiler::create_models_and_decode_bytecodes(
20
- solc_version,
21
- &compiler_input,
22
- &compiler_output,
23
- )?
24
- .into_iter()
25
- .map(|bytecode| BytecodeWrapper::new(Rc::new(bytecode)).into_instance(env))
26
- .collect()
27
- }