Expand description
Helpers for formatting Ethereum types.
Modules§
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.
Functions§
- console_
format - Formats a string using the input values.
- 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 of4
figures, and trimming the trailing zeros. - get_
pretty_ block_ attr - Returns the
UiFmt::pretty()
formatted attribute of the given block - get_
pretty_ tx_ attr - Returns the
UiFmt::pretty()
formatted attribute of the transactions - parse_
tokens - Parses string input as Token against the expected ParamType
- pretty_
eof - 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.