Add $ proc for DynamicBytes
This commit is contained in:
parent
47a02504dd
commit
2b9e8166d4
|
@ -288,3 +288,5 @@ template bytes*(data: DynamicBytes): seq[byte] =
|
|||
template len*(data: DynamicBytes): int =
|
||||
len(distinctBase data)
|
||||
|
||||
func `$`*[minLen, maxLen](data: DynamicBytes[minLen, maxLen]): string =
|
||||
"0x" & byteutils.toHex(distinctbase(data))
|
||||
|
|
Loading…
Reference in New Issue