diff --git a/ethers/errors/encoding.nim b/ethers/errors/encoding.nim index 72372eb..fda37d9 100644 --- a/ethers/errors/encoding.nim +++ b/ethers/errors/encoding.nim @@ -21,12 +21,12 @@ func decode*[E: SolidityError](_: type E, data: seq[byte]): ?!(ref E) = return failure "unable to decode " & $E & ": selector doesn't match" when compiles(E.arguments): without arguments =? E.decodeArguments(data), error: - return failure "unable to decode " & $E & ": " & error.msg + return failure "unable to decode arguments of " & $E & ": " & error.msg let message = "EVM reverted: " & $E & $arguments success (ref E)(msg: message, arguments: arguments) else: if data.len > 4: - return failure "unable to decode " & $E & ": unread trailing bytes found" + return failure "unable to decode: " & $E & ".arguments is not defined" let message = "EVM reverted: " & $E & "()" success (ref E)(msg: message)