Supported Types
Below are the Go types available to use in struct fields when utilizing using EVM supported messages and queries.- []byte (resolves to
bytes
in ABI encoding) - string
- bool
- int8 - int64
- uint8 - uint64
- github.com/ethereum/go-ethereum/common.Address (resolves to
address
in ABI encoding) - *math/big.Int (resolves to a specified int or uint above 64 bits i.e. uint128)
When using
*big.Int
, you MUST use a special “evm” struct tag to indicate which underlying evm integer type you want to resolve to. This is due to go-ethereum using *big.Int
for any uint or int greater than 64 bits.