Closed sebastiantf closed 11 months ago
Seemingly related issue: Following assertion works fine:
assert.assertNotNull(erc721Claim.get("erc721Campaign"))
But following fails with error:
assert.assertNotNull(erc721Claim.erc721Campaign) // intellisense says type is `Bytes`
/*
ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/collections/ByteArray | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/collections/ByteArray'.
assertTrue(value != null);
~~~~
in ~lib/matchstick-as/assembly/assert.ts(70,25)
*/
The stacktrace is also confusing with the above error
Among other things, issue seems to be caused by this, fixing of which would require several further changes + refactoring all over: if derived_field_value.is_string()
Derived relations handling has been changed in https://github.com/LimeChain/matchstick/releases/tag/0.6.0-rc.3
Derived fields of entities are
null
if the source entity has anid
of typeBytes
Example:
Before:
After:
only changed the
ERC721Campaign.id
fromID
toBytes
and made corresponding changes to mappings now both the below asserts that used to work are erroring withCannot return null for a required field.
logStore()
doesn't containclaims List
either