Expand description
ABI encoder — the inverse of the ABI decoder.
Converts NormalizedValue inputs into EVM ABI-encoded calldata.
Supports function calls (with 4-byte selector prefix) and raw tuple encoding.
§Usage
ⓘ
let encoder = EvmEncoder::from_abi_json(ABI_JSON)?;
let calldata = encoder.encode_call("transfer", &[
NormalizedValue::Address("0xd8dA...".into()),
NormalizedValue::Uint(1_000_000),
])?;Structs§
- EvmEncoder
- ABI encoder for EVM function calls.
Functions§
- normalized_
to_ dyn_ value - Convert a
NormalizedValueto the alloyDynSolValuefor the given expected type.