Struct ethers_solc::artifacts::LosslessAbi
source · pub struct LosslessAbi {
pub abi_value: Value,
pub abi: Abi,
}Expand description
A helper type that ensures lossless (de)serialisation unlike [ethers_core::abi::Abi] which
omits some information of (nested) components in a serde roundtrip. This is a problem for
abienconderv2 structs because [ethers_core::abi::Contract]’s representation of those are
[ethers_core::abi::Param] and the kind field of type [ethers_core::abi::ParamType] does
not support deeply nested components as it’s the case for structs. This is not easily fixable in
ethabi as it would require a redesign of the overall Param and ParamType types. Instead,
this type keeps a copy of the serde_json::Value when deserialized from the solc json
compiler output and uses it to serialize the abi without loss.
Fields§
§abi_value: ValueThe complete abi as json value
abi: AbiThe deserialised version of abi_value
Trait Implementations§
source§impl Clone for LosslessAbi
impl Clone for LosslessAbi
source§fn clone(&self) -> LosslessAbi
fn clone(&self) -> LosslessAbi
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for LosslessAbi
impl Debug for LosslessAbi
source§impl Default for LosslessAbi
impl Default for LosslessAbi
source§impl<'de> Deserialize<'de> for LosslessAbi
impl<'de> Deserialize<'de> for LosslessAbi
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
source§impl From<LosslessAbi> for Abi
impl From<LosslessAbi> for Abi
source§fn from(abi: LosslessAbi) -> Self
fn from(abi: LosslessAbi) -> Self
source§impl PartialEq for LosslessAbi
impl PartialEq for LosslessAbi
source§fn eq(&self, other: &LosslessAbi) -> bool
fn eq(&self, other: &LosslessAbi) -> bool
self and other values to be equal, and is used
by ==.