Open karlem opened 1 month ago
We've had this discussion before. The issue is the ethers-rs
somehow does not expose the revert error to ipc-cli
, from the tests we did before.
@cryptoAtwill I can have a look.
The issue is that the Calibration net does not return the revert data in the JSON RPC response. Not in the ethers-rs
library. Though the error is inside the message field in the response and can be parsed. Suggested solution:
Some contract calls revert with specific errors. For instance, trying to join a subnet as a collateral validator in federated mode fails with
revert MethodNotAllowed(ERR_PERMISSIONED_AND_BOOTSTRAPPED)
. The CLI should parse these errors and report the reason back to the user.