[go: up one dir, main page]

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

Better errors on transact cheatcodes #5985

Closed
mattsse opened this issue Oct 4, 2023 · 4 comments
Closed

Better errors on transact cheatcodes #5985

mattsse opened this issue Oct 4, 2023 · 4 comments
Labels
A-cheatcodes Area: cheatcodes good first issue Good for newcomers T-feature Type: feature
Milestone

Comments

@mattsse
Copy link
Member
mattsse commented Oct 4, 2023

Component

Forge

Describe the feature you would like

current example of the transact cheatcode is no longer working and fails with:

Reason: backend: failed committing transaction: Transaction(NonceTooLow { tx: 1, state: 2 })]

this is because the example forks off at the block the transaction was mined in.

ref https://github.com/foundry-rs/book/blob/82b99014a448e3bb1d2d2cc5a6e95da5fd401051/src/cheatcodes/transact.md?plain=1#L1

TODO

map common errors like NonceTooLow and GasPriceLessThanBasefee with additional context and hints for example hint to setNonce or basefee to modify the currently enforced basefee on the fork

tx is executed here:

commit_transaction(tx, env, journaled_state, fork, &fork_id, cheatcodes_inspector)?;

Additional context

Related: foundry-rs/book#1023

@azurwastaken
Copy link

I can try this one if possible

@germankuber
Copy link

I encounter a consistent error when attempting to execute a transaction on my local fork.

@mattsse
Copy link
Member Author
mattsse commented Nov 28, 2023

@germankuber do you have an example, would love to debug

@zerosnacks zerosnacks added the A-cheatcodes Area: cheatcodes label Jul 4, 2024
@zerosnacks zerosnacks changed the title Better errors on transact cheatcodes Better errors on transact cheatcodes Jul 4, 2024
@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 26, 2024
@grandizzy
Copy link
Collaborator

addressed in #9141 now showing

image

@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cheatcodes Area: cheatcodes good first issue Good for newcomers T-feature Type: feature
Projects
Status: Done
Development

No branches or pull requests

5 participants