In our codebase, however, there are several cases in which errors are defined in the contracts, and not on the interfaces. This means that users might not be able to decode these custom errors because they will be interacting with the contracts via their interfaces. The opposite doesn't happen, since contracts inherit these definitions from the interfaces. We must, therefore, make interfaces as complete as possible.
✔️ Solution
Move errors definitions from contracts to interfaces.
📚 Context
Interfaces are essential for users to know:
Without interfaces, users have to manually:
In our codebase, however, there are several cases in which errors are defined in the contracts, and not on the interfaces. This means that users might not be able to decode these custom errors because they will be interacting with the contracts via their interfaces. The opposite doesn't happen, since contracts inherit these definitions from the interfaces. We must, therefore, make interfaces as complete as possible.
✔️ Solution
Move errors definitions from contracts to interfaces.