With Array of address field graph-cli generate field as [Bytes] which fails while codegen.
On fixing [Bytes] to [Bytes!] in conversion file we are getting error below error as array of bytes cannot be directly assigned to array of address.
ERROR TS2322: Type '~lib/array/Array<~lib/@graphprotocol/graph-ts/common/numbers/Address>' is not assignable to type '~lib/array/Array<~lib/@graphprotocol/graph-ts/common/collections/Bytes>'.
Suggestion:
As we don't have support directly from thegraph for address type attributes (We get validation error), we need to generate code which will loop-over the array fields.
With Array of address field
graph-cligenerate field as[Bytes]which fails whilecodegen.On fixing
[Bytes]to[Bytes!]in conversion file we are getting error below error as array of bytes cannot be directly assigned to array of address.Suggestion:
As we don't have support directly from
thegraphfor address type attributes (We get validation error), we need to generate code which will loop-over the array fields.