Closed bayological closed 1 year ago
We can do the following in functions that return a transaction request:
Mapping revert reasons to friendly messages may be excessive. The revert reasons in our contracts are pretty self-explanatory but we also have a lot of messages. Creating a mapping for each of these reasons would be a lot.
@nvtaveras WDYT?
@bayological SGTM! And regarding the mapping, maybe we can some of the the most relevant ones like circuit breaker tripped, trading limit exceeded, amountOut/In not enough?
@nvtaveras I created this issue. On the mapping, we could do that, but how do you see this being implemented? This would be more involved, but we can map something like "L1 Exceeded" to "Trading limit 1 for cUSD has been hit for this exchange". We'll need to have additional logic to determine the token, but we would have all that information available.
Description
We need to look into how we can better handle smart contract reverts and display errors that may be thrown when using the SDK. We should look into the following:
Acceptance Criteria