19 Commits

Author SHA1 Message Date
Eric
0d0a872ca0
Allow block to be passed with eth_estimageGas 2023-10-25 10:51:57 +11:00
Eric
9edb3d2fa7
cleanup -- combine ensureNonceSequence into populateTransaction 2023-10-25 10:51:56 +11:00
Eric
e03cd484b6
clean up 2023-10-25 10:51:31 +11:00
Eric
d88158c99a
PR feedback: remove auto-cancellation of failed transactions
- remove auto-cancellation of failed transaction (failed during estimate gas) to prevent stuck txs
- replace it with an async lock during nonce sequencing + gas estimation
- simplified cancelTransaction (still exported) such that the new transaction is populated using populateTransaction, so that all gas and fees are reset
- moved reverting contract function into its own testing helpers module, and refactored any tests to use it
- updated the test helper reverts to check EstimateGasErrors
2023-10-25 10:51:31 +11:00
Eric
1862c9eea6
Only cancels transactions if nonce has been incremented since the last estimateGas failure 2023-10-25 10:49:52 +11:00
Eric
9ffc1763e4
cancel transaction after estimateGas failure 2023-10-25 10:46:32 +11:00
Eric
7eac8410af
prevent stuck transactions by async locking nonce sequencing (+ estimate gas) (#55)
- async lock during nonce sequencing + gas estimation
- simplified cancelTransaction (still exported) such that the new transaction is populated using populateTransaction, so that all gas and fees are reset
- moved reverting contract function into its own testing helpers module, and refactored any tests to use it
- updated the test helper reverts to check EstimateGasErrors
- combine ensureNonceSequence into populateTransaction
2023-10-25 10:42:25 +11:00
Eric
f0303473f6
Increment nonce count when populating transaction (#54)
Increment nonce count when populating transaction

Co-authored-by: markspanbroek <mark@spanbroek.net>
2023-09-15 09:54:08 +10:00
Mark Spanbroek
2b6f7b7a0d Fixes for Nim 2.0.0 2023-08-29 12:25:39 +02:00
Jackie
abda8493b0 Change Transaction type to support EIP1559 2022-08-08 12:40:36 +02:00
Eric Mastro
2f97a03fe2 feat: Can wait for transaction confirmations
Allows specified number of transaction confirmations to be awaited before a transaction is considered finalised. Polls for a transaction receipt then listens for new blocks and calculates the number of blocks between the receipt and the new block.

Notes
1. Only works with websockets currently
2. Replaced transaction not supported yet
2022-05-23 11:27:26 +10:00
Mark Spanbroek
1e767b2107 Add Signer.signMessage() 2022-01-26 11:21:28 +01:00
Mark Spanbroek
e4224a1241 Allow calls to non-constant functions 2022-01-25 17:29:01 +01:00
Mark Spanbroek
6bd3e27e38 Add Signer.populateTransaction() 2022-01-25 10:25:09 +01:00
Mark Spanbroek
4acc6ef45c Add Signer.getChainId() 2022-01-24 17:29:25 +01:00
Mark Spanbroek
7e32f5ee51 Add Signer.estimateGas() 2022-01-24 14:40:47 +01:00
Mark Spanbroek
30bea4759c Adds Signer.getTransactionCount() 2022-01-24 12:14:31 +01:00
Mark Spanbroek
54c66db827 Adds Signer.getGasPrice() 2022-01-24 12:12:52 +01:00
Mark Spanbroek
94dcc171af Introduces JsonRpcSigner 2022-01-20 14:39:37 +01:00