API for re-sending transactions
See original GitHub issueWhat was wrong?
There are a few legitimate use cases for wanting to re-submit a transaction that has already been sent with modified parameters.
- Resending the same transaction with a higher gas price during times of network congestion.
- Quickly overriding a transaction sent in error (also by using a higher gas price)
- In a case where you know there is a signed transaction that was sent but never included in a block, ensuring that it will not be applied at some point in the future.
How can it be fixed?
Implement a new API web3.eth.overrideTransaction(txn_hash, txn_overrides)
txn_hash
is the hash of the transaction you wish to override.txn_overrides
is a dictionary of transaction parameters which should be used in place of the existing transaction parameters.
Behavior is as follows.
- if no transaction can be found with the given hash an exception is thrown.
- if the transaction has already been mined an exception is thrown.
- The
txn_overrides
may contain any/all fields that are normally accepted as transaction params exceptnonce
. - If
gasPrice
is included in thetxn_overrides
, it must be greater than the existing transaction gas price (TODO: should we allow a way to bypass this validation) - if
gasPrice
is not included in thetxn_overrides
we should ??? (TODO: how do we choose an appropriate gas price?).
Issue Analytics
- State:
- Created 6 years ago
- Comments:37 (16 by maintainers)
Top Results From Across the Web
How to re-send a transaction with higher gas price using ...
1. Sometimes, you submit a transaction on Ethereum without enough gas due to network congestion or too m... 2. We do a transaction...
Read more >Resend Transaction Email - Notarize
Can be used to provide instructions, thank customers, add additional context to the transaction, or simply to add a personal touch. The message...
Read more >Integration Concepts 3 - Reliable transactions - Flowfinity
Ensuring reliable transactions and data integrity when synchronizing records with Flowfinity. ... Using Transaction ID's in REST APIs and resend loops.
Read more >Transactions API endpoints - Docs - Affirm
You can retrieve and refund individual transactions as well as read all transactions. Transactions are identified by a unique, random ID.
Read more >Resend completion email to customer
Hi, Is there an API for re-sending the signing completion email to ... for a single transaction, not on account level for all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Put in a very beginning of work on this. Apologies that this is going slow. Not had much time and doing more learning than coding here 😄 Should be able to get something reviewable quality after the weekend.
Web3.py actually uses eth-tester now which includes options for disabling auto mining. Therefore there won’t be problems with the tests or development: