Expand description
Helpers for formatting Ethereum types.
Modules§
- configurable_
account 🔒 - Formatting of Tempo configurable account (T14: TIP-1107) configurations and
0x05signatures. - console 🔒
- dynamic 🔒
- exp 🔒
- ui 🔒
- Helper trait and functions to format Ethereum types.
Structs§
- Config
Json - A configuration as
cast wallet owners --jsonprints it, and asforge scriptsaves it for owners on other machines. - Struct
Definitions
Enums§
- EthValue
- Various numerical ethereum types used for pretty printing
- Format
Spec - A format specifier.
Traits§
- Console
Fmt - Formats a value using a FormatSpec.
- UIfmt
- Helper trait to format Ethereum types.
- UIfmt
Header Ext - UIfmt
Receipt Ext - UIfmt
Signature Ext
Functions§
- add_
configurable_ account_ details - Adds the details of a Tempo configurable account (
0x05) signature to a transaction’s JSON asconfigurableAccountSignature: the account, its configuration, and the owner and weight of each approval. The rawsignaturestays as the RPC returns it, so the JSON still decodes as a transaction. - console_
format - Formats a string using the input values.
- console_
table_ format - format_
int_ exp - Formats a U256 number to string, adding an exponential notation hint.
- format_
token - Pretty-prints the given value into a string suitable for user output.
- format_
token_ raw - Pretty-prints the given value into a string suitable for re-parsing as values later.
- format_
tokens - Pretty-prints a slice of tokens using
format_token. - format_
tokens_ raw - Pretty-prints a slice of tokens using
format_token_raw. - format_
uint_ exp - Formats a U256 number to string, adding an exponential notation hint if it
is larger than
10_000, with a precision of4figures, and trimming the trailing zeros. - get_
pretty_ block_ attr - get_
pretty_ receipt_ attr - get_
pretty_ tx_ attr - Returns the
UiFmt::pretty()formatted attribute of the transactions - parse_
tokens - Parses string input as Token against the expected ParamType
- serialize_
value_ as_ json - Serializes given [DynSolValue] into a serde_json::Value.
- to_
exp_ notation - Returns the number expressed as a string in exponential notation with the given precision (number of significant figures), optionally removing trailing zeros from the mantissa.