(fields: StructField[])
| 55 | } |
| 56 | |
| 57 | handleFields(fields: StructField[]) { |
| 58 | const outFields: AbiStructField[] = []; |
| 59 | let size = 0; |
| 60 | for (let field of fields) { |
| 61 | let { name, typeName, coderType, accessors } = field; |
| 62 | const abiType = this.convertFieldType(typeName); |
| 63 | if (!abiType) return null; |
| 64 | const outField: AbiStructField = { name, type: abiType, coderType, accessors } |
| 65 | if ((field as any).isIndexed) { |
| 66 | (outField as any).isIndexed = (field as any).isIndexed |
| 67 | } |
| 68 | outFields.push(outField); |
| 69 | if (abiType.size == null) size = null; |
| 70 | else if (size != null) size += abiType.size; |
| 71 | } |
| 72 | return { |
| 73 | fields: outFields, |
| 74 | dynamic: size == null, |
| 75 | size |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | buildGroup(struct: AbiStruct, group: GroupType): StructGroup { |
| 80 | const members: AbiStructField[] = [] |
no test coverage detected