EvmAddr.fromHex constructor

EvmAddr.fromHex(
  1. String hex
)

Implementation

factory EvmAddr.fromHex(String hex) {
  final bytes = hexDecode(hex);
  if (bytes.length != 20) {
    throw ArgumentError('Address must decode to 20 bytes, got ${bytes.length}');
  }
  return EvmAddr(bytes);
}