@@ -188,27 +188,28 @@ const VALUE_TO_ASSEMBLYSCRIPT = [
188
188
const ASSEMBLYSCRIPT_TO_VALUE = [
189
189
// Arrays
190
190
191
- [ 'Array<Address>' , '[Bytes]' , code => `Value.fromBytesArray(${ code } )` ] ,
192
- [ 'Array<Bytes>' , '[Bytes]' , code => `Value.fromBytesArray(${ code } )` ] ,
193
- [ 'Array<boolean>' , '[Boolean]' , code => `Value.fromBooleanArray(${ code } )` ] ,
194
- [ 'Array<i32>' , '[Int]' , code => `Value.fromI32Array(${ code } )` ] ,
195
- [ 'Array<BigInt>' , '[BigInt]' , code => `Value.fromBigIntArray(${ code } )` ] ,
196
- [ 'Array<string>' , '[String]' , code => `Value.fromStringArray(${ code } )` ] ,
197
- [ 'Array<string>' , '[ID]' , code => `Value.fromStringArray(${ code } )` ] ,
198
- [ 'Array<BigDecimal>' , '[BigDecimal]' , code => `Value.fromBigDecimalArray(${ code } )` ] ,
199
- [ 'Array<string>' , / \[ .* \] / , code => `Value.fromStringArray(${ code } )` ] ,
191
+ [ 'Array<Address>' , '[Bytes]' , code => `Value.fromBytesArray(${ code } )` , 'new Array(0)' ] ,
192
+ [ 'Array<Bytes>' , '[Bytes]' , code => `Value.fromBytesArray(${ code } )` , 'new Array(0)' ] ,
193
+ [ 'Array<boolean>' , '[Boolean]' , code => `Value.fromBooleanArray(${ code } )` , 'new Array(0)' ] ,
194
+ [ 'Array<i32>' , '[Int]' , code => `Value.fromI32Array(${ code } )` , 'new Array(0)' ] ,
195
+ [ 'Array<BigInt>' , '[BigInt]' , code => `Value.fromBigIntArray(${ code } )` , 'new Array(0)' ] ,
196
+ [ 'Array<string>' , '[String]' , code => `Value.fromStringArray(${ code } )` , 'new Array(0)' ] ,
197
+ [ 'Array<string>' , '[ID]' , code => `Value.fromStringArray(${ code } )` , 'new Array(0)' ] ,
198
+ [ 'Array<BigDecimal>' , '[BigDecimal]' , code => `Value.fromBigDecimalArray(${ code } )` , 'new Array(0)' ] ,
199
+ [ 'Array<string>' , / \[ .* \] / , code => `Value.fromStringArray(${ code } )` , 'new Array(0)' ] ,
200
+ [ 'Array<string | null>' , null , code => `Value.fromStringArray(${ code } )` , 'new Array(0)' ] ,
200
201
201
202
// Scalar values
202
203
203
- [ 'Address' , 'Bytes' , code => `Value.fromBytes(${ code } )` ] ,
204
- [ 'Bytes' , 'Bytes' , code => `Value.fromBytes(${ code } )` ] ,
205
- [ 'boolean' , 'Boolean' , code => `Value.fromBoolean(${ code } )` ] ,
206
- [ 'i32' , 'Int' , code => `Value.fromI32(${ code } )` ] ,
207
- [ 'BigInt' , 'BigInt' , code => `Value.fromBigInt(${ code } )` ] ,
208
- [ 'string' , 'String' , code => `Value.fromString(${ code } )` ] ,
209
- [ 'string' , 'ID' , code => `Value.fromString(${ code } )` ] ,
210
- [ 'BigDecimal' , 'BigDecimal' , code => `Value.fromBigDecimal(${ code } )` ] ,
211
- [ 'string' , / .* / , code => `Value.fromString(${ code } )` ] ,
204
+ [ 'Address' , 'Bytes' , code => `Value.fromBytes(${ code } )` , 'Address.zero()' ] ,
205
+ [ 'Bytes' , 'Bytes' , code => `Value.fromBytes(${ code } )` , 'Bytes.empty()' ] ,
206
+ [ 'boolean' , 'Boolean' , code => `Value.fromBoolean(${ code } )` , 'false' ] ,
207
+ [ 'i32' , 'Int' , code => `Value.fromI32(${ code } )` , '0' ] ,
208
+ [ 'BigInt' , 'BigInt' , code => `Value.fromBigInt(${ code } )` , 'BigInt.zero()' ] ,
209
+ [ 'string' , 'String' , code => `Value.fromString(${ code } )` , "''" ] ,
210
+ [ 'string' , 'ID' , code => `Value.fromString(${ code } )` , "''" ] ,
211
+ [ 'BigDecimal' , 'BigDecimal' , code => `Value.fromBigDecimal(${ code } )` , 'BigDecimal.zero()' ] ,
212
+ [ 'string' , / .* / , code => `Value.fromString(${ code } )` , "''" ] ,
212
213
]
213
214
214
215
/**
0 commit comments