LimeChain / matchstick

🔥 Unit testing framework for Subgraph development on The Graph protocol. ⚙️
MIT License
207 stars 17 forks source link

Mocking An event, with no ID as a parameter in the event. #322

Closed shreyas3336 closed 2 years ago

shreyas3336 commented 2 years ago

I'm trying to mock up an Event with definition as Info(name:string, creator:address, value:uint256)

Entity Definition

type Project @entity { id: ID! creator: Bytes! value: BigInt! name: String! }

The ID for the entity is generated using the function

export function generateID(_name: string, _creator: string): string { return _name.concat("-CREATES-").concat(_creator); }

I'm not able to load this Entity into the matchStick framework using Project.load(generateID(name,creator), nor am I able to use asset.fieldEquals to check the sanity of the logic.

georg-getz commented 2 years ago

Issue resolved in discord