You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Converts a slice of JSON values into dynamic Solidity values according to ABI parameter definitions.
220
+
///
221
+
/// Validates parameter count, recursively parses complex types (such as tuples), and coerces each JSON value into a `DynSolValue` matching the expected Solidity type. Returns an error if parameter counts do not match, if a value cannot be coerced, or if a type mismatch is detected.
222
+
///
223
+
/// # Arguments
224
+
///
225
+
/// * `json_values` - The JSON values representing function arguments.
226
+
/// * `json_abi_params` - The ABI parameter definitions describing expected Solidity types.
227
+
///
228
+
/// # Returns
229
+
///
230
+
/// A vector of `DynSolValue` instances corresponding to the parsed and validated parameters, or an error message if parsing fails.
231
+
///
232
+
/// # Examples
233
+
///
234
+
/// ```
235
+
/// use serde_json::json;
236
+
/// use alloy_sol_types::{DynSolValue, Param};
237
+
///
238
+
/// let json_values = vec![json!("0x1234..."), json!(42)];
0 commit comments