ethereum-abi-types-generator
ethereum-abi-types-generator copied to clipboard
Incorrect web3 typings for `bytes[]`
When generating web3 typings for bytes[]
and alike, the resulting typings are incorrect.
While bytes
is correctly represented as string | number[]
(string or array of numbers), bytes[]
is represented as follows:
Actual: string | number[][]
- this means string OR two-dimensional array of numbers.
Expected: (string | number[])[]
- array of (string or array of numbers)
This behaviour is actually tested here :
expect(
TypeScriptHelpers.getSolidityInputTsTypeByTypeName(
'bytes[][][]',
Provider.web3
)
).toEqual('string | number[][][][]');
I believe it should result in (string | number[])[][][]
not string | number[][][][]
.
yes you are right web3 is not as well submitted as ethos will fix this though thanks for raising