cartesi / rollups-contracts

Smart Contracts for Cartesi Rollups
https://cartesi.github.io/rollups-contracts/
Apache License 2.0
17 stars 37 forks source link

Move custom errors from contracts to interfaces #206

Closed guidanoli closed 6 months ago

guidanoli commented 6 months ago

📚 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.