-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
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
[Bug] alloy_sol_types::decode_revert_reason panics when called #382
Comments
@DaniPopes thanks for fixing it. |
Hardhat is not comparable to Ethers. Hardhat will compile all your contracts and keep their ABI in memory to use to decode errors and such. See the test I added on how to decode custom errors core/crates/sol-types/src/types/error.rs Lines 496 to 516 in 343f799
|
Component
sol-types
What version of Alloy are you on?
├── alloy-sol-types v0.4.2 │ ├── alloy-primitives v0.4.2 │ │ ├── alloy-rlp v0.3.3 │ │ │ ├── alloy-rlp-derive v0.3.3 (proc-macro) │ │ │ ├── alloy-rlp v0.3.3 () │ ├── alloy-sol-macro v0.4.2 (proc-macro) │ ├── alloy-primitives v0.4.2 () │ │ ├── alloy-primitives v0.4.2 () │ │ ├── alloy-rlp v0.3.3 ()
Operating System
Linux
Describe the bug
Given this simple solidity contract:
When the
revertWithSenderAddressError()
function is called, the transaction is correctly reverted. Nevertheless, trying to decode the revert message throughdecode_revert_reason
causes a panic:Here is a small reproducer:
The text was updated successfully, but these errors were encountered: