Hello all,
I construct a brand new form of cli primarily based solidity debugger you may discover helpful.
In the course of the few days easter break I lastly might end an extended standing challenge I had in thoughts: a cli primarily based solidity debugger and tracer.
I used to make use of truffle-debug loads, however the entire challenge obtained sundown (and was painfully gradual anyhow, however thats a distinct story). Foundry as a successor at all times made sense to me. Its quick, its git primarily based, its a workhorse, by no means let me down to this point.
However I at all times missed a correctly formatted simple to make use of tracer and debugger like we all know it from tenderly, however cli primarily based, with native, textual content primarily based outputs. I needed one thing a human and an LLM can use.
So I constructed soldebug. You give it a transaction hash and it provides you a decoded stack hint:
$ soldebug 0xe1c962… –rpc-url –project-dir ./myproject Transaction 0xe1c962…b53fb6 REVERTED (fuel: 29.8K) Name Stack: TestToken.mint(arg0=0xdEadDEAD…, arg1=9e23) <- REVERT REVERT: MaxSupplyExceeded(9e23, 5e23)
It replays the transaction domestically utilizing revm (similar as Foundry), matches contracts out of your native Foundry challenge, resolves proxy implementations (UUPS, clear proxies), and might fetch exterior contract ABIs from Etherscan/Sourcify. All in Rust, similar type as Foundry itself.
It's a primary model, actually early, however possibly helpful for different Ethereum devs.
If you happen to discover it helpful (or not), let me know, or typically, any suggestions very welcome.
submitted by /u/tomtom1808 [comments]
Source link
