We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text was updated successfully, but these errors were encountered:
The current contract error message got from forcerelay:
0: Contract call reverted with data: 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001c74657374206661696c656420746f2063726561746520636c69656e7400000000
The original test error in solidity:
require(false, "test failed to create client");
We should convert the above into the below.
This is the doc describing above bytes infos https://docs.soliditylang.org/en/latest/control-structures.html#revert
Now it can be converted into this form:
"test failed to create client"
Sorry, something went wrong.
In hardhat, error messages are handled by getMessageFromLastStackTraceEntry manually. Looks like no existing library is available.
https://docs.rs/ethers/latest/ethers/middleware/contract/enum.ContractError.html#method.decode_revert https://docs.rs/ethers/latest/ethers/middleware/contract/trait.EthError.html#method.decode_with_selector only works for Revert, not for panic. although it will make the parse of revert errors more concise, but will make the overall code a little bit more complicated. So I used the old method to parse hex-encoded error.
wenyuanhust
Successfully merging a pull request may close this issue.
PR for referennce
The text was updated successfully, but these errors were encountered: