The big-endian 160-bit hash suitable for keeping an Ethereum address.
More...
#include <evmc.hpp>
|
constexpr | address (evmc_address init={}) noexcept |
| Default and converting constructor.
|
|
constexpr | address (uint64_t v) noexcept |
| Converting constructor from unsigned integer value.
|
|
constexpr | operator bool () const noexcept |
| Explicit operator converting to bool.
|
|
constexpr | operator bytes_view () const noexcept |
| Implicit operator converting to bytes_view.
|
|
|
uint8_t | bytes [20] |
| The 20 bytes of the hash.
|
|
The big-endian 160-bit hash suitable for keeping an Ethereum address.
This type wraps C evmc_address to make sure objects of this type are always initialized.
Definition at line 26 of file evmc.hpp.
◆ address() [1/2]
Default and converting constructor.
Initializes bytes to zeros if not other init
value provided.
Definition at line 31 of file evmc.hpp.
Big-endian 160-bit hash suitable for keeping an Ethereum address.
◆ address() [2/2]
constexpr evmc::address::address |
( |
uint64_t |
v | ) |
|
|
inlineexplicitconstexprnoexcept |
Converting constructor from unsigned integer value.
This constructor assigns the v
value to the last 8 bytes [12:19] in big-endian order.
Definition at line 37 of file evmc.hpp.
39 0,
40 0,
41 0,
42 0,
43 0,
44 0,
45 0,
46 0,
47 0,
48 0,
49 0,
50 static_cast<uint8_t>(v >> 56),
51 static_cast<uint8_t>(v >> 48),
52 static_cast<uint8_t>(v >> 40),
53 static_cast<uint8_t>(v >> 32),
54 static_cast<uint8_t>(v >> 24),
55 static_cast<uint8_t>(v >> 16),
56 static_cast<uint8_t>(v >> 8),
57 static_cast<uint8_t>(v >> 0)}}
58 {}
◆ operator bool()
constexpr evmc::address::operator bool |
( |
| ) |
const |
|
inlineexplicitconstexprnoexcept |
Explicit operator converting to bool.
Definition at line 263 of file evmc.hpp.
264{
266}
constexpr bool is_zero(const address &a) noexcept
Checks if the given address is the zero address.
◆ operator bytes_view()
constexpr evmc::address::operator bytes_view |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Implicit operator converting to bytes_view.
Definition at line 64 of file evmc.hpp.
uint8_t bytes[20]
The 20 bytes of the hash.
The documentation for this struct was generated from the following file: