(struct: AbiStruct)
| 42 | } |
| 43 | |
| 44 | export const generateIsNullFunction = (struct: AbiStruct): CodeGenFunction => { |
| 45 | const defaultName = `Default${struct.name}`; |
| 46 | const body = [ |
| 47 | `_isNull = equals(a, ${defaultName});` |
| 48 | ] |
| 49 | return { |
| 50 | internalType: 'comparison', |
| 51 | name: 'isNull', |
| 52 | location: 'internal', |
| 53 | visibility: 'pure', |
| 54 | inputFields: [], |
| 55 | outputFields: [], |
| 56 | inputs: [ |
| 57 | { type: struct, name: 'a', definition: `${struct.name} a`, }, |
| 58 | ], |
| 59 | outputs: [{ |
| 60 | type: elementaryToTypeDef('bool'), |
| 61 | name: '_isNull', |
| 62 | definition: `bool _isNull`, |
| 63 | }], |
| 64 | body |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | export const generateEqualityFunction = (struct: AbiStruct): CodeGenFunction => { |
| 69 | const body = buildAssemblyBlock([ |
no test coverage detected