ethers-rs/ethers-core/Cargo.toml

62 lines
2.4 KiB
TOML
Raw Normal View History

2020-05-26 09:37:31 +00:00
[package]
2020-05-31 16:01:34 +00:00
name = "ethers-core"
license = "MIT OR Apache-2.0"
2022-11-27 20:27:55 +00:00
version = "1.0.2"
rust-version = "1.64"
2020-05-26 09:37:31 +00:00
authors = ["Georgios Konstantopoulos <me@gakonst.com>"]
edition = "2018"
description = "Core structures for the ethers-rs crate"
homepage = "https://docs.rs/ethers"
repository = "https://github.com/gakonst/ethers-rs"
keywords = ["ethereum", "web3", "celo", "ethers"]
2020-05-26 09:37:31 +00:00
[dependencies]
2022-11-18 20:00:55 +00:00
open-fastrlp = { version = "0.1.4", features = ["std", "derive", "ethereum-types"] }
rlp = { version = "0.5.2", default-features = false, features = ["std"] }
ethabi = { version = "18.0.0", default-features = false, features = ["full-serde", "rlp"] }
arrayvec = { version = "0.7.2", default-features = false }
rlp-derive = { version = "0.1.0", default-features = false }
2020-05-26 09:37:31 +00:00
# crypto
elliptic-curve = { version = "0.12.3", default-features = false }
generic-array = { version = "0.14.6", default-features = false }
2022-07-06 21:11:23 +00:00
k256 = { version = "0.11", default-features = false, features = ["keccak256", "ecdsa", "std"] }
rand = { version = "0.8.5", default-features = false }
tiny-keccak = { version = "2.0.2", default-features = false }
2020-05-26 10:24:19 +00:00
# misc
chrono = { version = "0.4", default-features = false }
serde = { version = "1.0.124", default-features = false, features = ["derive"] }
feat(providers): add a subset of admin namespace (#1880) * 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>
2022-11-30 21:22:44 +00:00
serde_json = { version = "1.0.64", default-features = false, features = ["arbitrary_precision"] }
thiserror = { version = "1.0", default-features = false }
bytes = { version = "1.3.0", features = ["serde"] }
hex = { version = "0.4.3", default-features = false, features = ["std"] }
once_cell = { version = "1.16.0", optional = true }
unicode-xid = "0.2.4"
strum = { version = "0.24", features = ["derive"] }
# macros feature enabled dependencies
cargo_metadata = { version = "0.15.2", optional = true }
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
# eip712 feature enabled dependencies
convert_case = { version = "0.6.0", optional = true }
syn = { version = "1.0.105", optional = true }
proc-macro2 = { version = "1.0.47", optional = true }
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
[dev-dependencies]
serde_json = { version = "1.0.64", default-features = false }
bincode = { version = "1.3.3", default-features = false }
once_cell = { version = "1.16.0" }
hex-literal = "0.3.4"
rand = "0.8.5"
[features]
celo = ["legacy"] # celo support extends the transaction format with extra fields
legacy = []
eip712 = ["convert_case", "syn", "proc-macro2"]
macros = ["syn", "cargo_metadata", "once_cell"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]