Commit Graph

24 Commits

Author SHA1 Message Date
Georgios Konstantopoulos 568d9c8697
Update Cryptography crates (#617)
* fix(core): use new k256 for pubkey calculation

* fix(core): deserialize moonbeam keys with new fn

* chore(signers): update crypto crates

* chore: update cargo lock

* ci: remove libudev req

* chore: cargo fmt

* chore: fix outstanding yubihsm errors
2021-12-21 00:41:57 +02:00
Georgios Konstantopoulos d7c29cc615
fix: configure rustls & openssl via feature flag (#703)
* 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
2021-12-19 16:56:54 +02:00
Matthias Seitz f4c89c6cb1
ci: test on windows targets (#682)
* 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>
2021-12-13 23:25:10 +02:00
Matthias Seitz ba53fd1466
ci: bump solc everywhere (#672) 2021-12-10 11:30:19 -07:00
Matthias Seitz adc3d858d2
ci: bump solc 0.8.10 (#670) 2021-12-10 10:21:07 -07:00
Matthias Seitz ad68337113
fix: make ethers-wasm workspace member (#642)
* fix: make ethers-wasm workspace member

* rustfmt

* chore: allow clippy all

* chore: make ethers-wasm non default member

* ci: only clippy default members
2021-12-03 19:27:55 +02:00
Alexey Shekhirin dd2c589102
feat(etherscan, middleware): implement gas endpoints and use in oracle middleware (#621)
* 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
2021-11-27 09:54:20 +02:00
Georgios Konstantopoulos 906c504f1f ci: remove failing workflow 2021-11-06 19:34:18 +00:00
Georgios Konstantopoulos 03c109fb4d ci: load rinkeby privkey from envvar instead of secrets
loading it from secrets makes it impossible to run CI tests from 3rd parties
2021-11-05 18:07:54 +00:00
Matthias Seitz c08f8ba876
fix: failing test and check --all-targets in ci (#560)
* fix: update failing example

* ci: check all targets
2021-11-05 19:58:03 +02:00
Georgios Konstantopoulos 8a7f42b6fa ci: load rinkeby privkey from secrets 2021-10-30 15:52:38 +02:00
Matthias Seitz dcf20022c6
chore: add rustfmt.toml (#537)
* chore: add rustfmt.toml

* rustfmt

* chore: Update readme with fmt info

* ci: update ci

* chore: rustfmt

* rustfmt

* rustfmt

* ci: install libudev

* chore(clippy): make clippy happy

* chore(clippy): make clippy happy

* revert ci

* ci: install libudev
2021-10-29 14:29:35 +02:00
Georgios Konstantopoulos 64294d1c6a ci: add cache 2021-09-13 23:48:03 +03:00
Georgios Konstantopoulos b5909d05b0
ci: run examples in CI (#421)
* 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
2021-08-30 14:00:30 +03:00
Matthias Seitz ea566663d4
feat: wasm support (#390)
* 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>
2021-08-23 12:56:44 +03:00
Georgios Konstantopoulos 9dca606eaf
fix: make chain_id mandatory (#286)
* 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>
2021-07-29 23:22:25 +03:00
Georgios Konstantopoulos 5c1f8f532a
Upgrade to Tokio 1.0 and remove async-std (#120)
* 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
2020-12-31 19:19:14 +02:00
Georgios Konstantopoulos 09413dca6f
feat: add a mock transport (#99)
* feat: add a mock transport

* ci: fix libusb issue
2020-11-27 14:57:44 +02:00
Georgios Konstantopoulos a22f1f9aa0
Geth TxPool API Support (#86)
* 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>
2020-10-24 11:13:13 +03:00
Georgios Konstantopoulos 2d51c523ba
feature: Middleware Architecture (#65)
* feat: convert Provider to Middleware trait

* feat: move gas oracle to middleware crate

* feat: move signer to middleware crate

* feat: add nonce manager middleware and test stacking

* refactor: convert generic middleware jsonrpc type to associated type

* feat: move ethers-contract to middleware arch

* test(provider): make tests pass

* test(middleware): move middleware tests from signer

* test: fix ethers examples

* fix(contract): make tests compile

* chore: fix clippy

* feat: deduplicate trait delegation

* refactor(signer): deduplicate tx signing logic across signers

* fix doctests

* fix: examples, celo tests and ci
2020-09-25 00:33:09 +03:00
Georgios Konstantopoulos 95fcbe5240
feat: ledger support (#66)
* 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
2020-09-20 18:17:02 +03:00
Rohit Narurkar a9bb98b5a7
Implement Multicall functionality for batched calls (#43)
* 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>
2020-07-03 19:52:09 +03:00
Georgios Konstantopoulos ba5ae5a894
Add Celo support (#8)
* 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
2020-06-17 12:22:01 +03:00
Georgios Konstantopoulos 5629c1f25e
ci: switch to github actions (#18)
Switching to Github actions since Circle would often run out of memory while linking, e.g. https://app.circleci.com/pipelines/github/gakonst/ethers-rs/63/workflows/0eb4236c-ba46-46ab-af9f-21878101434b/jobs/65
2020-06-16 14:36:45 +03:00