foundry
foundry copied to clipboard
cast send: add `--bump-fee` flag that resends with iteratively increasing gas price
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 <MAX_GAS_PRICE>
. 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