Eric Mastro 0adf56c65b Support distinct types for Event fields
Add support for indexed (and non-indexed) Event fields types that are distinct `ValueType` or `SmallByteArray`. For example,
```nim
type
  DistinctAlias = distinct array[32, byte]
  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)
```
2022-09-21 10:27:45 +10:00
..
2022-01-26 17:58:51 +01:00
2022-01-25 10:25:09 +01:00
2022-01-20 12:56:18 +01:00
2022-05-23 11:27:26 +10:00
2022-09-20 13:15:15 +10:00
2022-01-26 11:21:28 +01:00
2022-09-20 13:15:15 +10:00
2022-08-08 15:07:41 +02:00