Skip to content
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

debug transactions with local source code input #1723

Closed
henry-hz opened this issue May 25, 2022 · 3 comments
Closed

debug transactions with local source code input #1723

henry-hz opened this issue May 25, 2022 · 3 comments
Labels
C-cast Command: cast T-feature Type: feature

Comments

@henry-hz
Copy link

Component

Cast

Describe the feature you would like

In dapp tools you can debug transaction even in networks that don't support etherscan, once it's possible to use the deployed code during the debugging session, so it looks like:

seth run-tx --debug 0xc3b63ab002d4a16fe95566a9c0816fab6cf07ac9867bd5ad1319095cef8383a2 --source out/dapp.sol.json

or

seth debug 0x2b9e3363f21f8f9bffc742eba14cfd115e7d1c77ef71ae95deedf5e068fffb36


seth run-tx --help                                                                                                                                                                                               09:59:28
Usage: seth run-tx <tx-hash> [<options>]
or:    seth run-tx <tx-info> [<options>]

Run a transaction with hevm in the environment of the given transaction.

Attempts to fetch contract source from etherscan if `ETHERSCAN_API_KEY` is set.

With `--state dir`, load and save state from `dir`
With `--trace`, print the call trace of the transaction.
With `--debug`, execute with hevm's interactive debugger
With `--no-src`, do not attempt to fetch contract source from etherscan
With `--source`, manually supply a solc compiler output json (implies --no-src)    ----------->>>>>>  HERE IS THE FEATURE

Would be amazing to have it in forge:

cast run 0x11310e29abc8ebb4317857d6b8f447280b22fcfff3722f5d6272b60c73613b0c --debug --source out/Contract.sol/Contract.json

Additional context

No response

@henry-hz henry-hz added the T-feature Type: feature label May 25, 2022
@onbjerg onbjerg added the C-cast Command: cast label May 27, 2022
@onbjerg
Copy link
Member

onbjerg commented Aug 11, 2022

Rolling this into #1723

@onbjerg onbjerg closed this as completed Aug 11, 2022
@bigchiano
Copy link

I'd love to have these features as well. Been looking through the documentation can't seem to find a solution to this. Any help guys?

@fnerdman
Copy link

fnerdman commented Jan 2, 2024

@onbjerg @gakonst Looks like this feature was never implemented and should be reopened for seth feature parity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cast Command: cast T-feature Type: feature
Projects
Archived in project
Development

No branches or pull requests

4 participants