EthereumAddress constructor
EthereumAddress(
- Uint8List bytes
Creates an EthereumAddress from raw bytes.
Throws InvalidAddressException if bytes length is not 20.
Implementation
EthereumAddress(this.bytes) {
if (bytes.length != 20) {
throw InvalidAddressException(
HexUtils.encode(bytes),
'Address must be exactly 20 bytes, got ${bytes.length}',
);
}
}