mirror of
https://github.com/logos-storage/nim-nitro.git
synced 2026-01-03 14:13:09 +00:00
They should be encoded as if they were UInt160, which means they should be left-padded with zeroes, instead of right-padded.
14 lines
260 B
Nim
14 lines
260 B
Nim
import std/math
|
|
import pkg/stint
|
|
|
|
export stint
|
|
|
|
type
|
|
UInt48* = range[0'u64..2'u64^48-1]
|
|
EthAddress* = distinct array[20, byte]
|
|
|
|
proc toArray*(address: EthAddress): array[20, byte] =
|
|
array[20, byte](address)
|
|
|
|
proc `==`*(a, b: EthAddress): bool {.borrow.}
|