Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
8.26k
stars
1.74k
forks
source link
bug(`cast`): `cast send` doesn't display custom errors on tx reverts #8606
Open
rplusq opened 2 months ago
Component
Cast
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (0b73b42 2024-08-05T00:19:50.130854000Z)
What command(s) is the bug in?
anvil; forge create SimpleStorage --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; cast send 0x5FbDB2315678afecb367f032d93F642f64180aa3 "setValue(uint256)" 101 --private-key=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
Operating System
macOS (Apple Silicon)
Describe the bug
When running cast send, if your tx reverts with a custom error, cast only displays:
But no custom error (nor error, nor signature), which makes it super hard to debug.
Reproducible with the anvil's default private key with this contract:
forge create SimpleStorage --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
cast send 0x5FbDB2315678afecb367f032d93F642f64180aa3 "setValue(uint256)" 101 --private-key=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80