2023-03-16 19:28:35 +00:00
|
|
|
[workspace.package]
|
2023-03-05 23:07:30 +00:00
|
|
|
version = "2.0.0"
|
2022-09-18 15:45:45 +00:00
|
|
|
edition = "2021"
|
2023-03-16 19:28:35 +00:00
|
|
|
rust-version = "1.64"
|
2021-08-21 12:34:21 +00:00
|
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
documentation = "https://docs.rs/ethers"
|
|
|
|
repository = "https://github.com/gakonst/ethers-rs"
|
2023-03-16 19:28:35 +00:00
|
|
|
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
|
|
|
|
2021-08-21 12:34:21 +00:00
|
|
|
[workspace]
|
2020-05-26 09:37:31 +00:00
|
|
|
members = [
|
2023-03-16 19:28:35 +00:00
|
|
|
"ethers",
|
2022-01-07 10:12:21 +00:00
|
|
|
"ethers-addressbook",
|
2021-08-21 12:34:21 +00:00
|
|
|
"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",
|
2023-03-16 19:28:35 +00:00
|
|
|
"ethers-middleware",
|
|
|
|
"ethers-providers",
|
|
|
|
"ethers-signers",
|
2021-12-03 17:27:55 +00:00
|
|
|
"ethers-solc",
|
2023-03-16 19:28:35 +00:00
|
|
|
|
2022-12-29 12:53:11 +00:00
|
|
|
# Example crates
|
|
|
|
"examples/*",
|
2021-08-21 12:34:21 +00:00
|
|
|
]
|
|
|
|
|
2023-03-16 19:28:35 +00:00
|
|
|
# Do not include example crates in default members
|
2021-08-28 00:54:46 +00:00
|
|
|
default-members = [
|
2023-03-16 19:28:35 +00:00
|
|
|
"ethers",
|
2022-01-07 10:12:21 +00:00
|
|
|
"ethers-addressbook",
|
2021-08-28 00:54:46 +00:00
|
|
|
"ethers-contract",
|
|
|
|
"ethers-core",
|
2021-10-26 11:28:10 +00:00
|
|
|
"ethers-etherscan",
|
2023-03-16 19:28:35 +00:00
|
|
|
"ethers-middleware",
|
|
|
|
"ethers-providers",
|
|
|
|
"ethers-signers",
|
2022-09-18 15:45:45 +00:00
|
|
|
"ethers-solc",
|
2021-08-23 09:56:44 +00:00
|
|
|
]
|
2021-08-21 12:34:21 +00:00
|
|
|
|
2023-03-16 19:28:35 +00:00
|
|
|
[workspace.dependencies]
|
|
|
|
# workspace crates
|
|
|
|
ethers = { version = "2.0.0", path = "ethers", default-features = false }
|
|
|
|
ethers-addressbook = { version = "2.0.0", path = "ethers-addressbook", default-features = false }
|
|
|
|
ethers-contract = { version = "2.0.0", path = "ethers-contract", default-features = false }
|
|
|
|
ethers-core = { version = "2.0.0", path = "ethers-core", default-features = false }
|
|
|
|
ethers-etherscan = { version = "2.0.0", path = "ethers-etherscan", default-features = false }
|
|
|
|
ethers-middleware = { version = "2.0.0", path = "ethers-middleware", default-features = false }
|
|
|
|
ethers-providers = { version = "2.0.0", path = "ethers-providers", default-features = false }
|
|
|
|
ethers-signers = { version = "2.0.0", path = "ethers-signers", default-features = false }
|
|
|
|
ethers-solc = { version = "2.0.0", path = "ethers-solc", default-features = false }
|
2022-10-25 18:12:50 +00:00
|
|
|
|
2023-03-16 19:28:35 +00:00
|
|
|
ethers-contract-abigen = { version = "2.0.0", path = "ethers-contract/ethers-contract-abigen", default-features = false }
|
|
|
|
ethers-contract-derive = { version = "2.0.0", path = "ethers-contract/ethers-contract-derive", default-features = false }
|
|
|
|
ethers-derive-eip712 = { version = "2.0.0", path = "ethers-core/ethers-derive-eip712", default-features = false }
|
2022-09-09 23:19:29 +00:00
|
|
|
|
2023-03-16 19:28:35 +00:00
|
|
|
# async / async utils
|
|
|
|
tokio = "1.26"
|
|
|
|
tokio-tungstenite = { version = "0.18.0", default-features = false }
|
|
|
|
futures = { version = "0.3.27", default-features = false }
|
|
|
|
futures-core = { version = "0.3.27", default-features = false }
|
|
|
|
futures-util = { version = "0.3.27", default-features = false }
|
|
|
|
futures-executor = { version = "0.3.27", default-features = false }
|
|
|
|
futures-channel = { version = "0.3.27", default-features = false }
|
|
|
|
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 }
|
2021-08-21 12:34:21 +00:00
|
|
|
|
2023-03-16 19:28:35 +00:00
|
|
|
# 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 }
|
2021-08-21 12:34:21 +00:00
|
|
|
|
2023-03-16 19:28:35 +00:00
|
|
|
# serde
|
|
|
|
serde = "1.0"
|
|
|
|
serde_json = "1.0"
|
2021-08-21 12:34:21 +00:00
|
|
|
|
2023-03-16 19:28:35 +00:00
|
|
|
# macros
|
|
|
|
proc-macro2 = "1.0"
|
|
|
|
quote = "1.0"
|
|
|
|
syn = "1.0"
|
|
|
|
async-trait = "0.1.66"
|
|
|
|
auto_impl = "1.0"
|
2023-03-01 00:26:27 +00:00
|
|
|
|
2023-03-16 19:28:35 +00:00
|
|
|
# misc
|
|
|
|
thiserror = "1.0"
|
|
|
|
once_cell = "1.17"
|
|
|
|
hex = "0.4"
|
2022-03-17 12:10:15 +00:00
|
|
|
eyre = "0.6"
|
2023-03-16 19:28:35 +00:00
|
|
|
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"
|
2021-12-03 17:27:55 +00:00
|
|
|
|
2023-03-16 19:28:35 +00:00
|
|
|
# wasm
|
|
|
|
getrandom = { version = "0.2", features = ["js"] }
|
|
|
|
instant = "0.1.12"
|