* tell Geth to expose the admin namespace
* wip: add admin namespace support
* add networking and peer related structs
* add rest of chain config fields
* add datadir to geth
* fix data dir ref
* add dev flag to geth
* set dev only if block_time is not set
* put mutually exclusive options in an enum
* make block_time use the devmode enum
* add p2p port to geth
* add basic impls for admin endpoints
* move from_int_or_hex to ethers-core utils
* fix nodeinfo protocol field
* the type is better represented by a struct which can have either eth
or snap
* add chain id and discovery toggle for Geth
* remove PeerEvent
* should re-add when peer event endpoints are implemented
* simplify serde options for admin responses
* change signature for peer modification apis
* these admin apis accept an enode, which _may_ be an enr, but could
also be a legacy enode "v4" url.
* add note on where `ChainConfig` fields come from
* add note on PeerInfo about the source of fields
* add admin namespace support to CHANGELOG
* update pr number in changelog
* cargo fmt
* move chainconfig to genesis in utils
* accept genesis file in geth
* add genesis writing to geth spawn
* finally get geth nodes to connect
* import io::Read in provider tests
* fix PeerInfo and use enode id for provider test
* make clippy happy
* improve documentation for genesis module
* remove not(wasm) attributes on genesis module
* remove debugging printlns
* remove io::Read from provider tests
* add failing post merge test case
* add full mainnet nodeinfo for testing
* support deserializing json bignums to U256
* the serde_json arbitrary_precision feature is necessary so the
serde_json::Number variant of `IntOrHexOrBigNum` can be converted
into a string and fed into U256::from_dec_string
* fix from_int_or_hex_opt doc string
* remove third variant from IntOrHex
* unnecessary since serde_json::Number handles smaller ints as well
* add comments for ids
* fix enode id type in admin_peers provider test
* fix admin typo in Cargo.toml
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* add method to wait on a gethinstance adding a peer
* fix dial loop and wait_to_add_peer doc comments
* update geth
* the build can be updated by changing the GETH_BUILD env var
* wait for geth to exit on drop
* remove unnecessary wait
* fix mid-handshake PeerInfo deserialization
* remove println
* make tests less flaky
* handle discovery with the rest of the non dev opts
* dump geth stderr to debug failing ci test
* add method which dumps the unread stderr of the geth instance into a
string
* remove call_raw debug println
* bug is due to authrpc endpoint being in use
* use unused port when authrpc port is not specified
* remove dump_stderr from GethInstance
* did not work properly anyways
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* Add call builder and eth_call state overrides
* Fix <Caller as Future>::poll impl
* Move call overrides to ethers_provider::call_raw
* Add example for call_raw overrides
* Add support for contract call overrides
* Documentation and convenience impls for call_raw types
* Test for eth_call state overrides
* ci: install geth
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* 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>
* feat(middleware): fetch chainid from middleware
Require SignerMiddleware to fetch the inner middleware's to set for the
signer. SignerMiddleware now requires an instantiated middleware with
an accessible get_chainid method.
* ci: update ganache
newer ganache version is needed to specify the ganache provider chain id
in tests
* set SignerMiddleware constructor return to result
* create new method for pulling chainid
* add consistent chainid CHANGELOG entry
* remove awaits
* switch test_derive_eip712 to use consistent signer
* remove gas estimation equality assert in deploy_and_call_contract -
updated version of ganache no longer returns the same value for gas
estimation and gas_used
* revert with_signer to non-async non-result
* cargo fmt
* expand SignerMiddleware::new comment
* remove doc indent
* chore(etherscan): allow specifying openssl or rustls
* chore(contract): allow specifying openssl or rustls
* chore(solc): allow specifying openssl or rustls
* chore: expose new rustls/openssl features at top level crate
* chore: bump tokio-tungstenite / remove dup rustls version
* chore: bump svm-rs
* fix: feature gate sha2-asm
* ci: remove --all-features from windows tests
* chore: do not enable sha2-asm by default
* fix: do not pull in svm-rs in wasm builds
* chore: use upstream svm again
* ci: test on windows targets
* make ipc optional
* fix: only activate ipc on unix families
* add cfg
* only check default members
* no parallel limits
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* fix: make ethers-wasm workspace member
* rustfmt
* chore: allow clippy all
* chore: make ethers-wasm non default member
* ci: only clippy default members
* feat(etherscan, middleware): implement gas-related endpoints and use them in gas oracle
* cleanup deps
* better comment
* revertme: add debug print
* Revert "revertme: add debug print"
This reverts commit 63993642c4.
* make etherscan tests serial
* run each etherscan test at least 200ms
* 200ms -> 250ms
* Revert "200ms -> 250ms"
This reverts commit 29c7f6ed9a.
* add separate etherscan key for celo tests
* 200ms -> 250ms
* add Chain::Sepolia to match
* ci: run examples in CI
* fix(ens): set the resolved ens addr for gas estimation
* fix(contract-examples): use legacy sends with ganache
* fix(ens-example): ensure test runs when forking from mainnet
* fix(watch-blocks-example): run our own provider with preset blocktime
* 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>
* 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: 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>
* feat: ledger support
Adds support for Ledger Nano S Eth app (v1.3.7)
- sign message
- sign transaction
- get addresses
- get app version
* fix: fix eth docstring
* fix: take into account EIP155
* feat: convert Signer to async
* feat: implement Signer for Ledger
* ci: run celo-only tests explicitly
This is done to avoid using --all-features
* fix: remove async from with_signer
* chore: fix doctests
* fix: add Send/Sync to SignerError
* ci: update etherscan key
* test: disable etherscan abigen tests temporarily
* Implement Multicall functionality for batched calls
* Documentation, some modifications as suggested in the review
* (Abigen) handle single input arg and set output irrespective of mutability
* implement send functionality and allow clearing calls
* Fix detokenization, dont require pre-processing anymore
* panic when more than supported number of calls are pushed
* add doc for panics in case of add_call
* (multicall) eth_balance support, update bindings
* refactor: move multicall to its own directory
* fix: add infura api key
* ci: ensure CI runs on PRs from forks
* test(multicall): re-use aggregate call
* contract: make multicall docs compile and remove redundant clones
* ci: add public etherscan API key so that forks don't get rate limited
* chore: adjust test contract naming
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* 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