(field: AbiStructField)
| 126 | } |
| 127 | |
| 128 | export const getParameterDefinition = (field: AbiStructField) => { |
| 129 | // If field is not a uint or enum, or `exact` is true, use real type |
| 130 | // otherwise, use uint256 |
| 131 | const typeUsed = field.coderType === 'exact' |
| 132 | ? toTypeName(field.type, true) |
| 133 | : uintAllowed(field.type) |
| 134 | ? 'uint256' |
| 135 | : intAllowed(field.type) |
| 136 | ? 'int256' |
| 137 | : toTypeName(field.type) |
| 138 | |
| 139 | /* ( |
| 140 | (field.coderType === 'exact') || !uintAllowed(field.type) |
| 141 | ) ? toTypeName(field.type, true) : 'uint256'; */ |
| 142 | |
| 143 | return `${typeUsed} ${field.name}` |
| 144 | } |
| 145 | |
| 146 | const getMaxUintForField = (field: AbiStructField) => { |
| 147 | const name = field.type.meta === 'elementary' && field.type.type === 'int' |
no test coverage detected