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

dapptools-style fuzzer counterexample replay #893

Closed
cruzdanilo opened this issue Mar 10, 2022 · 3 comments · Fixed by #918
Closed

dapptools-style fuzzer counterexample replay #893

cruzdanilo opened this issue Mar 10, 2022 · 3 comments · Fixed by #918
Assignees
Labels
C-forge Command: forge Cmd-forge-debug Command: forge run D-average Difficulty: average P-normal Priority: normal T-feature Type: feature

Comments

@cruzdanilo
Copy link
Contributor

cruzdanilo commented Mar 10, 2022

Component

Forge

Describe the feature you would like

some options:

  • forge test --replay <calldata> to rerun a particular test case
  • forge run Contract.t.sol --calldata <calldata>

Additional context

https://github.com/dapphub/dapptools/tree/master/src/dapp#dapp-test

@cruzdanilo cruzdanilo added the T-feature Type: feature label Mar 10, 2022
@onbjerg
Copy link
Member

onbjerg commented Mar 12, 2022

I think the intention was to eventually support arguments/calldata in forge run, so that is probably the route we are going to go

@onbjerg onbjerg added C-forge Command: forge P-normal Priority: normal D-average Difficulty: average Cmd-forge-debug Command: forge run labels Mar 12, 2022
@onbjerg
Copy link
Member

onbjerg commented Mar 14, 2022

I'm adding support for arguments in forge run in #920 (ref #927)

@onbjerg onbjerg self-assigned this Mar 14, 2022
@onbjerg
Copy link
Member

onbjerg commented Mar 17, 2022

When #918 is merged this is now supported. You can either do:

  • forge test --debug <function> which in the case of a fuzz test will open the debugger on the first failed case, or the last successful case
  • forge run <path to contract> --sig "testSomeFuzz(uint256,uint256)" --debug 10 20 to run the fuzz test with your own parameters

@onbjerg onbjerg linked a pull request Mar 17, 2022 that will close this issue
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge Cmd-forge-debug Command: forge run D-average Difficulty: average P-normal Priority: normal T-feature Type: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants