LimeChain / matchstick

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

Add better error message when called contract function is not mocked #330

Closed dimitrovmaksim closed 2 years ago

dimitrovmaksim commented 2 years ago

The error here is confusing and not very helpful to the users https://github.com/LimeChain/matchstick/blob/main/src/context.rs#L807

We should change it to something more helpful like: Could not find a mocked function for function with address: <address>, name: <name>, signature <signature>, params: <params>

https://github.com/LimeChain/matchstick/blob/main/src/context.rs#L818 https://github.com/LimeChain/matchstick/blob/main/src/context.rs#L769 https://thegraph.com/docs/en/developer/matchstick/#mocking-contract-calls

Estimate: 2-3 hours