Crate ethprim

Source
Expand description

A meta-crate that aggregates various Ethereum primitive types.

Currently, this crate re-exports:

Modules§

keccak
A const fn Keccak-256 implementation.
meta
Re-export of all included crates.
num
256-bit integer re-exports.
prelude
Convenience re-export of core types and traits.

Macros§

address
Macro to create Ethereum public address values from string literals that get verified at compile time. A compiler error will be generated if an invalid address is specified.
digest
Macro to create Ethereum digest values from string literals that get parsed at compile time. A compiler error will be generated if an invalid digest is specified.
int
Macro for 256-bit signed integer literal.
keccak
Macro to create Ethereum digest values for compile-time hashed input.
uint
Macro for 256-bit unsigned integer literal.

Structs§

Address
An Ethereum public address.
Digest
A 32-byte digest.
Hasher
A Keccak-256 hasher.
I256
A 256-bit signed integer type.
U256
A 256-bit unsigned integer type.

Enums§

ParseAddressError
Represents an error parsing an address from a string.
ParseDigestError
Represents an error parsing a digest from a string.

Traits§

AsI256
This trait defines as conversions (casting) from primitive types to I256.
AsU256
This trait defines as conversions (casting) from primitive types to U256.