ethers-rs/Cargo.toml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

139 lines
4.3 KiB
TOML
Raw Normal View History

[workspace.package]
2023-03-21 18:45:12 +00:00
version = "2.0.1"
2022-09-18 15:45:45 +00:00
edition = "2021"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
documentation = "https://docs.rs/ethers"
repository = "https://github.com/gakonst/ethers-rs"
homepage = "https://github.com/gakonst/ethers-rs"
categories = ["cryptography::cryptocurrencies"]
keywords = ["crypto", "ethers", "ethereum", "web3", "celo"]
exclude = [
".github/",
"bin/",
"book/",
"**/tests/",
"**/test-data/",
"**/testdata/",
"examples",
"scripts/",
]
# https://docs.rs/about/metadata
[workspace.metadata.docs.rs]
all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]
# https://github.com/integer32llc/rust-playground/blob/c6165a36923db5d99313e6056b5b610a2ede5bb0/top-crates/src/lib.rs#L175-L184
[workspace.metadata.playground]
all-features = true
2020-05-22 18:37:21 +00:00
[workspace]
2020-05-26 09:37:31 +00:00
members = [
"ethers",
"ethers-addressbook",
"ethers-contract",
"ethers-core",
derive-eip712: initial implementation of eip712 derive macro (#481) * derive-eip712: initial implementation of eip712 derive macro This commit provides an initial implementation for a derive macro to encode typed data according to EIP-712, https://eips.ethereum.org/EIPS/eip-712 Additionally, this commit introduces a new signer trait method: async fn sign_typed_data<T: Eip712 + Send + Sync>( &self, payload: &T, ) -> Result<Signature, Self::Error>; And implements the new method for each of the signers (wallet, ledger, aws). Additionally, these changes include using `WalletError` for the Wallet signer error type At the moment, derive does not recurse the primary type to find nested Eip712 structs. This is something that is noted in the source and currently responds with an error regarding custom types. A subsequent PR should be opened once this issue becomes needed. For the moment, the current implementation should satisfy non-nested, basic struct types. * rename to ethers-derive-eip712; move to ethers-core * refactor of derive-eip712 macro; use ParamType and EthAbiToken * macro updates; add byte array checker for paramtype; use literal constant for domain type hash * replace std::convert::Infallible with WalletError as Wallet signer error type * update workspace members and dev dependencies for examples folder * add example for eip712 and test against contract * remove extraneous backward slash in '\x19\x01' prefix; example tests pass * update unreleased change log * remove print statements * use parse_macro_input macro; remove dead code; handle nest struct not implemented error * move eip712 example to solidity-contract tests folder; update cargo workspace dependencies * allow optional EIP712Domain parameter when encoding eip712 struct and signing typed data * add documentation for eip712 feature * Update ethers-signers/src/ledger/mod.rs Co-authored-by: Sebastian Martinez <me@sebastinez.dev> * add error enum for Eip712Error; use sign_payload for ledger signer * add EIP712WithDomain type for providing a wrapper around custom setting of the domain * make LedgerWallet sign_payload public * use optional feature gated dependencies for eip712; add default method for encode_eip712 * add default domain_separator method, pre-compute separator hash * move derive-eip712 deps to dev deps * remove invalid sign payload parameter, add await on async method * remove deprecated comment * debugging 'bad key handle' error for ledger signer try using 'sign_message' * await sign digest for aws signer * remove extra space, fix fmt warning * fix test, fmt errors * use gt 0.6.0 pragma compiler version * enable ABIEncoderV2 for solidity test contract * chore: make test constructor public Co-authored-by: Sebastian Martinez <me@sebastinez.dev> Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2021-10-08 15:22:51 +00:00
"ethers-etherscan",
"ethers-middleware",
"ethers-providers",
"ethers-signers",
"ethers-solc",
refactor: examples (#1940) * ToC * Big numbers section * Middleware examples: builder * Middleware examples: gas_escalator * Middleware examples: gas_oracle * Middleware examples: signer * Middleware examples: missing stubs * review: applied DaniPopes suggestions to big numbers * typo * Middleware examples: nonce_manager * cargo +nightly fmt * update roadmap * Middleware examples: policy * Middleware examples: added docs * Contracts examples: created folder; included abigen example * Contracts examples: refactor abigen docs. Fixed cargo example reference * Contracts examples: contract_events; minor docs changes * Moved each example under its own crate. Cargo builds locally TODO: Fix broken examples CI * Big numbers examples: used regular operators for math * Single examples run correctly (missing overall CI execution) Example crates dependencies Removed duplicates * review: Applied gakonst note to remove commented items in workspace manifest * review: Applied gakonst note to restore visibility on contract constructor * ci: - Run/Build examples in a single step to avoid duplicated scripts - Removed ci.yaml step "Build all examples" * cargo +nightly fmt * ci: fix WASM step error * Removed deprecated EthGasStation example * WASM example uses local copy of `contract_abi.json`. In this way we keep the WASM example auto-consistent, at the cost of a small duplication * Cargo.lock aligned to master branch * Removed useless comments in examples * review: Applied gakonst note to add panic!() on the policy middleware example * review: Applied gakonst suggestion to add a custom middleware example * typos in docs * Update examples/big-numbers/examples/bn_math_operations.rs review: Accepted commit suggested by DaniPopes Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> * review: Applied DaniPopes suggestion on assert_eq! * Update examples/big-numbers/README.md review: Accepted DaniPopes suggestion on big-numbers docs Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> * review: All imports now reference the "ethers" crate * ci: added features ["ws", "rustls"] where needed cargo +nigthly fmt * Examples with special features (e.g. ipc, trezor etc.) are built alongside them. This is expressed as a "default" requirement in their respective Cargo.toml * cargo +nightly fmt * Examples: Gas oracle API keys from env Added missing features in middleware Cargo.toml * typo: use expect() instead of unwrap() * Updated ToC Moved 2 examples under more relevant folders * Gas oracle examples raise panic on middleware errors * review: removed useless [[example]] in Cargo.toml * review: removed #[allow(unused_must_use)] from gas_escalator example * review: Removed prefixes from file names * review: removed useless [[example]] in Cargo.toml * docs: Updated description to run examples in the workspace README.md Co-authored-by: Andrea Simeoni <> Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
2022-12-29 12:53:11 +00:00
# Example crates
"examples/*",
]
# Do not include example crates in default members
default-members = [
"ethers",
"ethers-addressbook",
"ethers-contract",
"ethers-core",
"ethers-etherscan",
"ethers-middleware",
"ethers-providers",
"ethers-signers",
2022-09-18 15:45:45 +00:00
"ethers-solc",
]
# Explicitly set the resolver to version 2, which is the default for packages with edition >= 2021
# https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html
resolver = "2"
[workspace.dependencies]
# workspace crates
2023-03-21 18:45:12 +00:00
ethers = { version = "2.0.1", path = "ethers", default-features = false }
ethers-addressbook = { version = "2.0.1", path = "ethers-addressbook", default-features = false }
ethers-contract = { version = "2.0.1", path = "ethers-contract", default-features = false }
ethers-core = { version = "2.0.1", path = "ethers-core", default-features = false }
ethers-etherscan = { version = "2.0.1", path = "ethers-etherscan", default-features = false }
ethers-middleware = { version = "2.0.1", path = "ethers-middleware", default-features = false }
ethers-providers = { version = "2.0.1", path = "ethers-providers", default-features = false }
ethers-signers = { version = "2.0.1", path = "ethers-signers", default-features = false }
ethers-solc = { version = "2.0.1", path = "ethers-solc", default-features = false }
2023-03-21 18:45:12 +00:00
ethers-contract-abigen = { version = "2.0.1", path = "ethers-contract/ethers-contract-abigen", default-features = false }
ethers-contract-derive = { version = "2.0.1", path = "ethers-contract/ethers-contract-derive", default-features = false }
ethers-derive-eip712 = { version = "2.0.1", path = "ethers-core/ethers-derive-eip712", default-features = false }
# async / async utils
tokio = "1.26"
tokio-tungstenite = { version = "0.18.0", default-features = false }
futures = { version = "0.3.27", default-features = false, features = ["std"] }
futures-core = "0.3.27"
futures-util = "0.3.27"
futures-executor = "0.3.27"
futures-channel = "0.3.27"
futures-locks = { version = "0.7.1", default-features = false }
futures-timer = { version = "3.0.2", default-features = false, features = ["wasm-bindgen"] }
pin-project = "1.0"
reqwest = { version = "0.11.14", default-features = false }
url = { version = "2.3", default-features = false }
# crypto
elliptic-curve = { version = "0.13.2", default-features = false }
generic-array = { version = "0.14.6", default-features = false }
k256 = { version = "0.13.0", default-features = false, features = ["ecdsa", "std"] }
sha2 = { version = "0.10.6", default-features = false }
tiny-keccak = { version = "2.0.2", default-features = false }
spki = { version = "0.7.0", default-features = false }
# serde
serde = "1.0"
serde_json = "1.0"
# macros
proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0", features = ["extra-traits"] }
async-trait = "0.1.66"
auto_impl = "1.0"
ci/test: improve CI jobs and tests (#2189) * ci: move to scripts directory * nits * ci: improve main CI jobs * fix: install script * fix * fix: use curl for windows installation * fix: wasm typo * tests: move to single binary * chore: clippy * chore: clippy * chore: clippy * fix: test command * fix: quote tests * update script * fix: action exclude * fix: dev deps * fix: only run wasm in own job * ci: add aarch64 targets * test: rm useless test * ci: update security audit * ci: add deny CI * chore: rm unused audit.toml * chore: update geth.rs * ci: remove unusable targets * fix: install script path * fix: wasm * improve script * fix: failing ci * fix: contract tests * ci: improve install script * update middleware tests * move integration etherscan tests to tests/ dir * fix: eip2930 access_list field name * add pendingtransaction must_use * add random anvil comment * ci: add miri job * ci: simplify * fixci * Revert "add pendingtransaction must_use" This reverts commit 770b21b4a3c6ef8900a6aa1cd46aa9638317a60d. * fix: macos script * fix: use curl in script * unused ci * update script * fix wasm * rm_miri * fix: signer test * fix: wasm ci * fix: ipc test * fix: live celo tests * fix: abi online source test * fix: windows paths in test * chore: update serial_test * ci: run live tests separately * fix: provider tests * fix: unused var * fix: feature * fix merge * fix: etherscan key tests * ci: rm duplicate audit * fix: split etherscan test ci * fix: etherscan test * fix: generate multiple unused ports * fix: source test * fix: udeps * rm unused
2023-03-01 00:26:27 +00:00
# misc
thiserror = "1.0"
once_cell = "1.17"
hex = "0.4"
2022-03-17 12:10:15 +00:00
eyre = "0.6"
tempfile = "3.4"
dunce = "1.0"
walkdir = "2.3"
regex = "1.7"
toml = "0.7"
hex-literal = "0.3"
rand = "0.8"
bytes = "1.4"
semver = "1.0"
criterion = "0.4"
rayon = "1.7"
# tracing
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.16", default-features = false }
tracing-futures = "0.2.5"
# wasm
getrandom = { version = "0.2", features = ["js"] }
instant = "0.1.12"