@@ -62,8 +62,8 @@ This enables frontends to provide a verifiable display of what they are asking u
62
62
## Constraints
63
63
- Actions require an ID, other structs / types do not require one
64
64
- Multiple structs with the same name from different packages are not supported
65
- - Maps are not supported; use slices ( arrays) instead
66
- - Built-in types include the special case type aliases: ` codec.Address ` and ` codec.Bytes `
65
+ - Maps are not supported; use slices or arrays instead
66
+ - Built-in type ` codec.Address ` included as a special case
67
67
68
68
## Generating Golang Bindings
69
69
Use cmd/abigen to automatically generate Go bindings from an ABI's JSON.
@@ -78,19 +78,21 @@ This should generate the same code that is present in `./abi/mockabi_test.go`.
78
78
79
79
## Supported Primitive Types
80
80
81
- | Type | Range/Description | JSON Serialization | Binary Serialization |
82
- | ----------| ----------------------------------------------------------| --------------------| ---------------------------------------|
83
- | ` bool ` | true or false | boolean | 1 byte |
84
- | ` uint8 ` | numbers from 0 to 255 | number | 1 byte |
85
- | ` uint16 ` | numbers from 0 to 65535 | number | 2 bytes |
86
- | ` uint32 ` | numbers from 0 to 4294967295 | number | 4 bytes |
87
- | ` uint64 ` | numbers from 0 to 18446744073709551615 | number | 8 bytes |
88
- | ` int8 ` | numbers from -128 to 127 | number | 1 byte |
89
- | ` int16 ` | numbers from -32768 to 32767 | number | 2 bytes |
90
- | ` int32 ` | numbers from -2147483648 to 2147483647 | number | 4 bytes |
91
- | ` int64 ` | numbers from -9223372036854775808 to 9223372036854775807 | number | 8 bytes |
92
- | ` Address ` | 33 byte array | base64 | 33 bytes |
93
- | ` Bytes ` | byte array | base64 | uint32 length + bytes |
94
- | ` string ` | string | string | uint16 length + bytes |
95
- | ` []T ` | for any ` T ` in the above list, serialized as an array | array | uint32 length + elements |
81
+ | Type | Range/Description | JSON Serialization | Binary Serialization |
82
+ | -----------| ----------------------------------------------------------| --------------------| ---------------------------------------|
83
+ | ` bool ` | true or false | boolean | 1 byte |
84
+ | ` uint8 ` | numbers from 0 to 255 | number | 1 byte |
85
+ | ` uint16 ` | numbers from 0 to 65535 | number | 2 bytes |
86
+ | ` uint32 ` | numbers from 0 to 4294967295 | number | 4 bytes |
87
+ | ` uint64 ` | numbers from 0 to 18446744073709551615 | number | 8 bytes |
88
+ | ` int8 ` | numbers from -128 to 127 | number | 1 byte |
89
+ | ` int16 ` | numbers from -32768 to 32767 | number | 2 bytes |
90
+ | ` int32 ` | numbers from -2147483648 to 2147483647 | number | 4 bytes |
91
+ | ` int64 ` | numbers from -9223372036854775808 to 9223372036854775807 | number | 8 bytes |
92
+ | ` Address ` | 33 byte array | base64 | 33 bytes |
93
+ | ` string ` | string | string | uint16 length + bytes |
94
+ | ` []T ` | for any ` T ` in the above list, serialized as an array | array | uint32 length + elements |
95
+ | ` [x]T ` | for any ` T ` in the above list, serialized as an array | array | uint32 length + elements |
96
+ | ` []uint8 ` | byte slice | base64 | uint32 length + bytes |
97
+ | ` [x]uint8 ` | byte array | array of numbers | x bytes |
96
98
0 commit comments