Add $ proc for DynamicBytes

This commit is contained in:
Mark Spanbroek 2021-12-07 12:48:49 +01:00 committed by markspanbroek
parent 47a02504dd
commit 2b9e8166d4
1 changed files with 2 additions and 0 deletions

View File

@ -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))