From 8a484299e6ff6a07168ca9564ba98415849d30d7 Mon Sep 17 00:00:00 2001 From: Eric Mastro Date: Wed, 14 Sep 2022 16:55:47 +1000 Subject: [PATCH] Remove en/decoding advice from readme --- Readme.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Readme.md b/Readme.md index b80823e..1026565 100644 --- a/Readme.md +++ b/Readme.md @@ -119,20 +119,6 @@ type MyEvent = object of Event a {.indexed.}: DistinctAlias b: DistinctAlias # also allowed for non-indexed fields - -## The below funcs generally need to be included for ABI -## encoding/decoding purposes when implementing distinct types. - -func toArray(value: DistinctAlias): array[32, byte] = - array[32, byte](value) - -func encode*(encoder: var AbiEncoder, value: DistinctAlias) = - encoder.write(value.toArray) - -func decode*(decoder: var AbiDecoder, - T: type DistinctAlias): ?!T = - let d = ?decoder.read(type array[32, byte]) - success DistinctAlias(d) ``` You can now subscribe to Transfer events by calling `subscribe` on the contract