Ensure that isDynamic also works for booleans

Casts are not supported in the nim vm.
This commit is contained in:
Mark Spanbroek 2021-12-01 11:41:18 +01:00
parent 2aa8685eb5
commit 1070b7251a
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ func encode(encoder: var AbiEncoder, value: SomeUnsignedInt | StUint) =
encoder.padleft(value.toBytesBE)
func encode(encoder: var AbiEncoder, value: bool) =
encoder.encode(cast[uint8](value))
encoder.encode(if value: 1'u8 else: 0'u8)
func encode(encoder: var AbiEncoder, value: enum) =
encoder.encode(uint64(ord(value)))