#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct InternalTransaction {
#[serde(rename = "from", deserialize_with = "Option::deserialize")]
pub from: Option<String>,
#[serde(rename = "to", deserialize_with = "Option::deserialize")]
pub to: Option<String>,
#[serde(rename = "value", deserialize_with = "Option::deserialize")]
pub value: Option<String>,
#[serde(rename = "transactionHash")]
pub transaction_hash: String,
#[serde(rename = "gas", deserialize_with = "Option::deserialize")]
pub gas: Option<String>,
}
impl InternalTransaction {
pub fn new(from: Option<String>, to: Option<String>, value: Option<String>, transaction_hash: String, gas: Option<String>) -> InternalTransaction {
InternalTransaction {
from,
to,
value,
transaction_hash,
gas,
}
}
}