mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-25 23:18:02 +00:00
init node interaction crate
Signed-off-by: xermicus <bigcyrill@hotmail.com>
This commit is contained in:
+12
-12
@@ -1,7 +1,17 @@
|
||||
use alloy_json_abi::Function;
|
||||
use alloy_primitives::U256;
|
||||
use alloy::json_abi::Function;
|
||||
use alloy::primitives::U256;
|
||||
use serde::{Deserialize, de::Deserializer};
|
||||
|
||||
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq)]
|
||||
pub struct Input {
|
||||
instance: String,
|
||||
#[serde(deserialize_with = "deserialize_method")]
|
||||
method: Method,
|
||||
#[serde(deserialize_with = "deserialize_calldata")]
|
||||
calldata: Vec<u8>,
|
||||
expected: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
/// Specify how the contract is called.
|
||||
#[derive(Debug, Default, Clone, Eq, PartialEq)]
|
||||
pub enum Method {
|
||||
@@ -20,16 +30,6 @@ pub enum Method {
|
||||
Function([u8; 4]),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq)]
|
||||
pub struct Input {
|
||||
instance: String,
|
||||
#[serde(deserialize_with = "deserialize_method")]
|
||||
method: Method,
|
||||
#[serde(deserialize_with = "deserialize_calldata")]
|
||||
calldata: Vec<u8>,
|
||||
expected: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
fn deserialize_calldata<'de, D>(deserializer: D) -> Result<Vec<u8>, D::Error>
|
||||
where
|
||||
D: Deserializer<'de>,
|
||||
|
||||
Reference in New Issue
Block a user