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: Value
The complete abi as json value
abi: Abi
The 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 more