From 766260fd88ce4272eb500697a8033c4f1d73fca6 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Wed, 1 Dec 2021 10:56:35 +0100 Subject: [PATCH] Add AbiEncoder.debugEcho to print hex lines --- contractabi/debug.nim | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 contractabi/debug.nim diff --git a/contractabi/debug.nim b/contractabi/debug.nim new file mode 100644 index 0000000..a6d340f --- /dev/null +++ b/contractabi/debug.nim @@ -0,0 +1,7 @@ +import std/sequtils +import pkg/stew/byteutils +import ./encoding + +func debugEcho*(_: type AbiEncoder, encoding: seq[byte]) = + for line in encoding.distribute(encoding.len div 32): + debugEcho "0x", line.toHex