* ci: install anvil
* test: use anvil instead of ganache
* ci: fix anvil ver
* ci: re-enable example tests
* test: remove unnecessary assertions
* test: enable anvil launch test
* docs: typo
* test: fix anvil chain id
* ci: install ganache
Ganache is needed for the Ganache tests
* chore: remove legacy feature from some examples
* ci: correctly build examples
* test: use correct account balance for anvil
* chore: remove sub_id == 1 check
this was only possible in ganache because it gives serial
sub ids, but in every other reasonable client the ids are generated
randomly, so we cannot test for its value
* test: ensure txs are different
There is a bug in Ganache's mempool which accepts duplicate transactions (here with the same nonce), whereas here we pre-set all the nonces so that they end up having a different transaction hash.
* test: ignore ganache tests
* fix: terzor api changes
* ci(examples): install Anvil, remove geth/ganache
* test(provider): Anvil instead of Geth
some tests start to fail now
* fix: revert usage of Anvil in ipc tests
Anvil does not support IPC yet
* fix: update examples script
* ci: use anvil for wasm example
* replace last ganache usage
Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
the error was on the alfajores testnet:
'missing trie node c04caafad74d59d8ca27dbbbc49e257d4f4d490bbe40534691dbb101618e2e87'
unclear why this is happening, but tx validation for celo is working otherwise
* fix(ws): propagate error when deserialization fails
* fix(ws): tolerate case-insensitive match on the jsonrpc field
Infura streams notifications with jsonrpc all capitalized. This fails to
deserialize on our end because serde expect a precise match ressembling
the Notification jsonrpc field.
Fixes#684.
* chore(fmt): use nightly rustfmt
* chore: fmt
* chore: fix failing celo test
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* chore(core): remove ethers dep
* chore(providers): remove ethers dep
tests using higher-rank crates are temporarily disabled
* chore(middleware): remove ethers dep and move tests over from providers
* chore(signers): remove ethers dep
* fix(contracts): correctly determine ethers sub-crates & remove ethers
* fix: re-enable tests for all members
* fix: make contract compile without middleware dep
move over the test using middleware to ethers-middleware
* chore: cargo fmt
* chore(contract): add missing import
* WIP
* WIP
* fix(middleware): use rustls as dev dep
* chore: cargo fmt
* fix: use different key for nonce manager to avoid nonce conflicts
* chore: fix celo test ported over to middlewares
the test had the same private key with an existing middleware test,
causing potential nonce reuses
it now also uses a different storage contract, so we had to change
it to use u256 instead of string
* fix(middleware): enable contracts/celo feature
* chore: ignore non-eip2718 txs to rinkeby
* feat: partial wasm32 support
* make compile for wasm32
* feat: att async-trait attr
* make compatible with wasm
* add type alias for archs
* rustfmt
* add wasm ci
* make compile with wasm-pack test
* make compile with wasm-pack test
* make compile with wasm-pack test
* make compile with wasm-pack test
* ci: disable wasmpack
* feat: use wasm timer delay
* feat: add wasm provider
* rustfmt
* misc refactor
* add wasm example
* make example a directory
* untrack error log
* move profile to root
* fix unused imports
* ci: enable wasm-pack test
* style: unify websocket implementations
* fix: typos
* fix: make policy compatible with wasm target
* chore: do not include ethers-wasm example as top level workspace member
* chore: modify wasm32 dependencies
* chore: make note about getrandom
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* feat: fee estimation with custom/default fn
* fix: clippy and percentage calc fix
* calculate priority fee only if base fee above threshold
* chore: some comments
* fix: use legacy tx for ganache
* test: test a few cases for fee estimation using utils
* feat(providers): add eth_feeHistory api
* add access list
* feat: fill transactions with access list / default sender info
* feat: add helpers for operating on the txs enum
* feat: send_transaction takes TypedTransaction now
* fix(contract): temp wrap all contract txs as Legacy txs
* feat(middleware): use TypedTransaction in Transformer
* feat(signers): use TypedTransaction in Wallet/Ledger
* feat(core): add helpers for setting typed tx fields
* feat(signer): use typed transactions
* fix(middleware): adjust nonce/gas/escalators for TypedTxs
The GPO and the Escalators will throw an error if they are provided an EIP1559 transaction
* fix(providers): ensure the correct account's nonce is filled
* fix: add .into() to txs until we make the fn call more generic
* Revert "fix: add .into() to txs until we make the fn call more generic"
This reverts commit 04dc34b26d0e3f418ed3fc69ea35ad538b83dd50.
* feat: generalize send_transaction interface
* fix: only set the nonce manually in the Signer middleware
* fix(transformer): fill the transaction after transformation
* chore: fix compilation errors & lints
* fix(signer): set the correct account's nonce
* feat: make trace_call / call take TypedTransaction
* fix: set sender to transaction in signer
* chore: ethgasstation broke
* chore: cargo fmt / lints
* Fix(signer): pass the chain id
* fix: final tx encoding fixes
1. Normalize v values for eip1559/2730
2. Make access lists mandatory for 1559
3. do not double-rlp on rlp_signed
* fix: set access list only if available
* test: check 1559 / 2930 txs
* fix: do not prepend a 0 for Legacy txs & test
* chore: code review comments
* chore: fix aws signer signature
* feat: add support for `eth_getBlockReceipts`
* Add comment to the `get_block_receipts` function
* Add `client_version()` function
* Refactor `Provider` into a proper struct
* chore: update deps (#352)
* chore(deps): bump elliptic-curve from 0.10.4 to 0.10.5
Bumps [elliptic-curve](https://github.com/RustCrypto/traits) from 0.10.4 to 0.10.5.
- [Release notes](https://github.com/RustCrypto/traits/releases)
- [Commits](https://github.com/RustCrypto/traits/compare/elliptic-curve-v0.10.4...elliptic-curve-v0.10.5)
---
updated-dependencies:
- dependency-name: elliptic-curve
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* chore: bump deps
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(core): make chain id mandatory
* fix(signers): make chain id mandatory
* test: make chain id mandatory
* test: add missing chain id
* fix: add missing chain id
* chore(wallet): set chain_id by default to 1
* ci: run CI on master
* fix(yubi): add missing chain id
* chore: skip ganache test with celo features
* ci: run only on push to master
* fix: add missing chain id
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat(providers): tokio 1.0
BREAKING: This removes async-std as a compatibility option
* feat: tokio 1.0 in rest of crates
* fix: patch Cargo.toml until deps are released
* fix(contract): load ws deps
* feat: bytes 1.0 (#121)
* feat(core): move to bytes::Bytes
* feat: adjust rest of crates to Bytes
* chore: bump deps
CI fails due to:
https://github.com/snapview/tokio-tungstenite/pull/142#discussion_r550445144
* chore: use latest tokio-tungstenite
* ci: split tests into jobs (#129)
* Switch to `hex` (#128)
* fix(core): replace rustc_hex with hex
* fix(providers): replace rustc_hex with hex
* chore: replace rustc-hex with hex
* chore: cargo fmt
* fix(ledger): copy address from string correctly
* chore: fix flaky tests
Fixes#105
* feat(providers): return a PendingTransaction from send_tx calls
* feat(providers): expose the internal provider to all middlewares
* fix(middleware): use the returned PendingTx instead of using a hash
* fix(contract): use the pending tx returned value
Note1: To support that, we need to clone the tx when sending in order to make lifetimes work out
Note2: Multicall does not support that feature
* fix(ethers): adjust examples
* chore: fix provider test
* chore: fix celo test
BREAKING CHANGE
* feat: support for txpool API
* feat: add a geth spawner test helper
* fix(txpool): use TxRequest instead of new data struct
The `raw` field is no longer present in latest geth's response.
* fix(txpool): use proper api response format
ref: https://github.com/ethereum/go-ethereum/pull/21720
Also add a Geth test
* ci: install geth 1.9.23
Co-authored-by: Rohit Narurkar <rohit.narurkar@protonmail.com>
* fix(BREAKING): return Option for txs/receipts/blocks
Otherwise if a user asks for a transaction hash or block that does not exist yet they'll get an Error
* test: ensure that unmined txs return None receipts
* test: fix remaining tests
* chore: re-enable sparkpool gas oracle
* chore: fix celo tests
* fix: run the non-existing data against infura
* fix: fix etherscan gas oracle tests
* (feat) gas oracle support
* (refactor) make a separate module | fix clippy warning
* add gas oracle to client using dynamic dispatch
* fix doc build in multicall module
* gas oracle returns U256
* support gas price fetching from client
* avoid querying for unsupported gas categories
* changes based on PR review
* add support for gasnow API, refactor gwei to wei
* feat(provider): allow specifying a default polling interval param
This parameter is going to be used for all subsequent client calls by default. It can still be overriden with the internal
`interval` calls
* feat(contract): replace reference to Client with Arc
* feat(abigen): adjusts codegen to use Arcs
* fix(ethers): adjust examples to new apis
* fix(provider): return TxHash instead of PendingTransaction on tx submission
Returning a PendingTransaction allowed us to have nice ethers.js-like syntax where you submit
a transaction and then can immediately await it. Unfortunately, now that we use Arcs and not lifetimes
this meant that we would need to bind the function call in a variable, and then await on it, which is pretty
bad UX.
To fix this, we revert back to returning a TxHash and introduce a convenience method on the provider and the
contract which takes a tx_hash and returns a PendingTransaction object. The syntax ends up being slightly
more verbose (although more explicit), but the issue is fixed.
* fix: relax trait bounds on JsonRpcClient
* refactor(provider): move http client to separate dir
* feat(provider): add initial Websocket support over Stream/Sink + Tungstenite
* test(provider): add websocket test
* feat(provider): add convenience method using tokio/async-std behind a feature flag
* test(provider): add websocket ssl test
* feat(provider): add TLS websockets for tokio/async-std
* docs(provider): add websocket docs / examples
* fix(provider): make tokio an optional dep
* fix(provider): do not pass a param to estimate_gas
* fix(provider): pass correct number of args to new_filter
* test(signer): add test to ensure that the Pending block number works
* docs: fix links
* feat(types): add optional Celo support
* feat: add Celo feature flags to all crates
* test(provider): add get_transaction celo test
* test(signer): add send_transaction celo test
* test(contract): add deploy and call contract function celo test
* fix(provider): ensure the Pending transaction calls the waker to get polled again
* feat(core): allow setting the blocktime in ganache
* test(provider): move pending txs test to integration tests + use block time
* fix(signers): make EIP-155 optional and fix sighash generation bug