foundry-rs / foundry-rs/foundry

cast send: add `--bump-fee` flag that resends with iteratively increasing gas price

Open
#4,454 11 comments 0 reactions 0 assignees View on GitHub
C-cast first issue T-feature
Dominant language
Rust
Stars
10.6k
Forks
2.6k
Avg merge
16h 38m
Merged PRs (30d)
511

Description

### Component

Cast

### Describe the feature you would like

I'm using `cast send` extensively in some scripts. Sometimes they fail with `replacement transaction underpriced`. I suggest having a flag that allows bumping the gas price automatically so that the script can replace the stuck transaction.

- Option A: `--bump-fee`. If the transaction encounters the above error, we try resending it with iteratively increasing gas price (e.g. +10%) until we succeed.
- Option B: `--bump-fee `. Same as above but provide an upper limit.

I can take a go at implementing this if you think this would be a useful feature.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.