18 Commits

Author SHA1 Message Date
Eric
ff4dc5dfd7
clean up 2023-10-20 18:05:15 +11:00
Eric
f16ec78a61
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-20 17:14:12 +11:00
Eric
73963e6146
Only cancels transactions if nonce has been incremented since the last estimateGas failure 2023-10-18 11:12:52 +11:00
Eric
d06edb317b
Update revertReason to work with SignerError
Also update the estimateGas error message, and add the revert exception as the parent.
2023-10-18 11:12:52 +11:00
Eric
c22b7d479f
ensure nonce increment is done last 2023-10-18 11:12:52 +11:00
Eric
f7984ef384
cancel transaction after estimateGas failure 2023-10-18 11:12:50 +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