11 Commits

Author SHA1 Message Date
Eric
fc2ffff279
address PR feedback
- add comments to hashes shim
- remove .catch from callback condition
- derive SignerError from EthersError instead of ProviderError. This allows Providers and Signers to be separate, as Ledger does it, to isolate functionality. Some signer functions now raise both ProviderError and SignerError
- Update reverts to check for SignerError
- Update ERC-20 method comment
2024-02-12 13:15:05 +11:00
Eric
f5b26f69c1
Move hash* shim to its own module 2024-02-08 14:54:32 +11:00
Eric
2428b756d6
On transaction failure, fetch revert reason with replayed transaction (#57)
When transaction fails (receipt.status is Failed), fetch revert reason by replaying transaction.
2023-10-25 11:36:00 +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
Mark Spanbroek
a27c2de41c Close provider by unsubscribing and closing client 2023-07-03 13:09:09 +02:00
Mark Spanbroek
a62ea4fb8f Ensure that reverts works with functions with a return type 2022-09-21 10:29:31 +02:00
Mark Spanbroek
c5a40e5f9d Remove dependency on json-rpc provider for reverts 2022-09-21 10:29:31 +02:00
Mark Spanbroek
f545169331 Remove JSON wrapper from error in JSON RPC provider 2022-09-21 10:29:31 +02:00
Mark Spanbroek
cac6026b34 Change reverts API
- Enables postfix syntax: `call().reverts(reason)`
- Removes doesNotRevert etc; uses `check not` instead
- Removes waitFor(); return Future instead
2022-09-21 10:29:31 +02:00
Eric Mastro
e1a1a3805b remove extra spaces 2022-09-20 13:15:15 +10:00
Eric Mastro
5fe41a76ab PR comments
1. rename helpers to testing and expose externally via `import pkg/ethers/testing`
2. Change detection of revert from `EthersError` to `JsonRpcProviderError`
3, Remove catch of `CatchableError` from revert detection as this would swallow errors. Update tests accordingly.
2022-09-20 13:15:15 +10:00