ethers-rs/ethers-providers/Cargo.toml

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

96 lines
2.7 KiB
TOML
Raw Normal View History

2020-05-26 09:37:31 +00:00
[package]
name = "ethers-providers"
2022-09-18 15:45:45 +00:00
authors = ["Georgios Konstantopoulos <me@gakonst.com>"]
readme = "README.md"
description = "Clients for interacting with Ethereum nodes"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
documentation.workspace = true
repository.workspace = true
homepage.workspace = true
categories.workspace = true
keywords.workspace = true
exclude.workspace = true
2020-05-26 09:37:31 +00:00
[package.metadata.docs.rs]
all-features = true
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]
[package.metadata.playground]
all-features = true
2020-05-26 09:37:31 +00:00
[dependencies]
ethers-core.workspace = true
serde.workspace = true
serde_json = { workspace = true, features = ["raw_value"] }
http = "0.2"
reqwest = { workspace = true, features = ["json"] }
url.workspace = true
base64 = "0.21"
2020-05-27 11:32:44 +00:00
async-trait.workspace = true
hex.workspace = true
thiserror.workspace = true
auto_impl.workspace = true
once_cell.workspace = true
bytes.workspace = true
instant.workspace = true
hashers = "1.0"
# required for implementing stream on the filters
futures-core.workspace = true
futures-util.workspace = true
futures-timer.workspace = true
futures-channel = { workspace = true, optional = true }
pin-project.workspace = true
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
# peer-related admin namespace
enr = { version = "0.8.0", default-features = false, features = ["k256", "serde"] }
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
# tracing
tracing = { workspace = true, features = ["attributes"] }
tracing-futures = { workspace = true, features = ["std-future"] }
[target.'cfg(target_family = "windows")'.dependencies]
winapi = { version = "0.3", optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# tokio
tokio = { workspace = true, features = ["time"] }
tokio-tungstenite = { workspace = true, features = ["connect"], optional = true }
2022-06-22 17:09:25 +00:00
[target.'cfg(target_arch = "wasm32")'.dependencies]
ws_stream_wasm = "0.7"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
2022-09-18 15:45:45 +00:00
web-sys = { version = "0.3", features = ["console"] }
2022-06-22 17:09:25 +00:00
# NOTE: this enables wasm compatibility for getrandom indirectly
getrandom.workspace = true
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
2023-03-21 22:19:16 +00:00
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "time"] }
tempfile = "3.4.0"
[features]
default = ["ws", "rustls"]
celo = ["ethers-core/celo"]
ws = ["tokio-tungstenite", "futures-channel"]
legacy-ws = ["ws"]
ipc = ["tokio/io-util", "futures-channel", "winapi"]
openssl = ["tokio-tungstenite/native-tls", "reqwest/native-tls"]
# we use the webpki roots so we can build static binaries w/o any root cert dependencies
# on the host
rustls = ["tokio-tungstenite/rustls-tls-webpki-roots", "reqwest/rustls-tls"]
dev-rpc = []
[dev-dependencies]
tracing-test = { version = "0.2.4", features = ["no-env-filter"] }