abi-gen: fix bug w/ 2D arrays of UDT's in Python

Fix bug in handling 2-dimensional arrays of user defined data types in
generated Python code.
This commit is contained in:
F. Eugene Aumson 2020-01-15 12:34:34 -05:00 committed by Jacob Evans
parent 6027d0481e
commit 9cdc62f918
No known key found for this signature in database
GPG Key ID: 2036DA2ADDFB0842
5 changed files with 326 additions and 12 deletions

View File

@ -195,7 +195,7 @@ export const utils = {
return tuple.internalType
.replace('struct ', '')
.replace('.', '')
.replace('[]', '');
.replace(/\[\]/g, '');
} else {
const tupleComponents = tuple.components;
const lengthOfHashSuffix = 8;

File diff suppressed because one or more lines are too long

View File

@ -138,6 +138,8 @@ contract AbiGenDummy
}
function methodReturningArrayOfStructs() public pure returns(Struct[] memory) {}
function methodAcceptingArrayOfStructs(Struct[] memory) public pure {}
function methodAcceptingArrayOfArrayOfStructs(Struct[][] memory) public pure {}
struct NestedStruct {
Struct innerStruct;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long