diff --git a/Cargo.lock b/Cargo.lock index 9d65170a..28dce8ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,6 +49,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + [[package]] name = "anyhow" version = "1.0.53" @@ -312,6 +321,18 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bstr" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +dependencies = [ + "lazy_static", + "memchr", + "regex-automata", + "serde", +] + [[package]] name = "build_const" version = "0.2.2" @@ -403,6 +424,21 @@ dependencies = [ "serde_json", ] +[[package]] +name = "cast" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c24dab4283a142afa2fdca129b80ad2c6284e073930f964c3a1293c225ee39a" +dependencies = [ + "rustc_version", +] + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + [[package]] name = "cc" version = "1.0.72" @@ -458,6 +494,17 @@ dependencies = [ "generic-array 0.14.5", ] +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "bitflags", + "textwrap 0.11.0", + "unicode-width", +] + [[package]] name = "clap" version = "3.0.13" @@ -472,7 +519,7 @@ dependencies = [ "os_str_bytes", "strsim", "termcolor", - "textwrap", + "textwrap 0.14.2", ] [[package]] @@ -680,6 +727,44 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "criterion" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" +dependencies = [ + "atty", + "cast 0.3.0", + "clap 2.34.0", + "criterion-plot", + "csv", + "futures", + "itertools", + "lazy_static", + "num-traits", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_cbor", + "serde_derive", + "serde_json", + "tinytemplate", + "tokio", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d00996de9f2f7559f7f4dc286073197f83e92256a59ed395f9aac01fe717da57" +dependencies = [ + "cast 0.2.7", + "itertools", +] + [[package]] name = "crossbeam-channel" version = "0.5.2" @@ -763,6 +848,38 @@ dependencies = [ "subtle", ] +[[package]] +name = "csv" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" +dependencies = [ + "bstr", + "csv-core", + "itoa 0.4.8", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +dependencies = [ + "memchr", +] + +[[package]] +name = "ctor" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" +dependencies = [ + "quote", + "syn", +] + [[package]] name = "ctr" version = "0.8.0" @@ -963,6 +1080,19 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "env_logger" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + [[package]] name = "eth-keystore" version = "0.4.1" @@ -1068,7 +1198,10 @@ dependencies = [ "ethers-contract-derive", "ethers-core", "ethers-derive-eip712", + "ethers-middleware", "ethers-providers", + "ethers-signers", + "ethers-solc", "futures-util", "hex", "once_cell", @@ -1087,6 +1220,7 @@ dependencies = [ "cfg-if 1.0.0", "dunce", "ethers-core", + "ethers-solc", "eyre", "getrandom 0.2.7", "hex", @@ -1096,6 +1230,7 @@ dependencies = [ "serde", "serde_json", "syn", + "tempfile", "url", "walkdir", ] @@ -1118,6 +1253,7 @@ name = "ethers-core" version = "0.17.0" dependencies = [ "arrayvec 0.7.2", + "bincode", "bytes", "cargo_metadata", "chrono", @@ -1127,6 +1263,7 @@ dependencies = [ "fastrlp", "generic-array 0.14.5", "hex", + "hex-literal", "k256", "once_cell", "proc-macro2", @@ -1147,7 +1284,10 @@ dependencies = [ name = "ethers-derive-eip712" version = "0.17.0" dependencies = [ + "ethers-contract", + "ethers-contract-derive", "ethers-core", + "ethers-signers", "hex", "quote", "serde_json", @@ -1159,14 +1299,19 @@ name = "ethers-etherscan" version = "0.17.0" dependencies = [ "ethers-core", + "ethers-solc", "getrandom 0.2.7", "reqwest", "semver", "serde", "serde-aux", "serde_json", + "serial_test", + "tempfile", "thiserror", + "tokio", "tracing", + "tracing-subscriber", ] [[package]] @@ -1179,12 +1324,17 @@ dependencies = [ "ethers-etherscan", "ethers-providers", "ethers-signers", + "ethers-solc", "futures-locks", "futures-util", + "hex", "instant", + "once_cell", + "rand 0.8.5", "reqwest", "serde", "serde_json", + "serial_test", "thiserror", "tokio", "tracing", @@ -1239,7 +1389,9 @@ dependencies = [ "coins-ledger", "elliptic-curve", "eth-keystore", + "ethers-contract", "ethers-core", + "ethers-derive-eip712", "futures-executor", "futures-util", "hex", @@ -1248,12 +1400,14 @@ dependencies = [ "rusoto_core", "rusoto_kms", "semver", + "serde_json", "sha2 0.10.2", "spki", "tempfile", "thiserror", "tokio", "tracing", + "tracing-subscriber", "trezor-client", "yubihsm", ] @@ -1264,7 +1418,9 @@ version = "0.17.0" dependencies = [ "cfg-if 1.0.0", "colored", + "criterion", "dunce", + "env_logger", "ethers-core", "fs_extra", "futures-util", @@ -1276,6 +1432,7 @@ dependencies = [ "num_cpus", "once_cell", "path-slash", + "pretty_assertions", "rand 0.8.5", "rayon", "regex", @@ -1291,6 +1448,7 @@ dependencies = [ "tiny-keccak", "tokio", "tracing", + "tracing-subscriber", "walkdir", ] @@ -1306,6 +1464,7 @@ dependencies = [ "serde_json", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-bindgen-test", "web-sys", "wee_alloc", ] @@ -1645,6 +1804,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + [[package]] name = "hashbrown" version = "0.11.2" @@ -1681,6 +1846,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + [[package]] name = "hidapi-rusb" version = "1.3.2" @@ -1729,7 +1900,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa", + "itoa 1.0.1", ] [[package]] @@ -1755,6 +1926,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "hyper" version = "0.14.19" @@ -1770,7 +1947,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", + "itoa 1.0.1", "pin-project-lite", "socket2", "tokio", @@ -1909,6 +2086,12 @@ dependencies = [ "either", ] +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + [[package]] name = "itoa" version = "1.0.1" @@ -2026,6 +2209,15 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata", +] + [[package]] name = "matches" version = "0.1.9" @@ -2187,6 +2379,12 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + [[package]] name = "opaque-debug" version = "0.2.3" @@ -2241,6 +2439,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "output_vt100" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" +dependencies = [ + "winapi", +] + [[package]] name = "p256" version = "0.11.1" @@ -2522,6 +2729,34 @@ version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" +[[package]] +name = "plotters" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a3fd9ec30b9749ce28cd91f255d569591cdf937fe280c312143e3c4bad6f2a" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d88417318da0eaf0fdcdb51a0ee6c3bed624333bff8f946733049380be67ac1c" + +[[package]] +name = "plotters-svg" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521fa9638fa597e1dc53e9412a4f9cefb01187ee1f7413076f9e6749e2885ba9" +dependencies = [ + "plotters-backend", +] + [[package]] name = "ppv-lite86" version = "0.2.16" @@ -2534,6 +2769,18 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "pretty_assertions" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89f989ac94207d048d92db058e4f6ec7342b0971fc58d1271ca148b799b3563" +dependencies = [ + "ansi_term", + "ctor", + "diff", + "output_vt100", +] + [[package]] name = "primitive-types" version = "0.11.1" @@ -2748,6 +2995,15 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax", +] + [[package]] name = "regex-syntax" version = "0.6.27" @@ -3041,6 +3297,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "scoped-tls" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" + [[package]] name = "scopeguard" version = "1.1.0" @@ -3141,6 +3403,16 @@ dependencies = [ "serde_json", ] +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + [[package]] name = "serde_derive" version = "1.0.137" @@ -3158,7 +3430,7 @@ version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ - "itoa", + "itoa 1.0.1", "ryu", "serde", ] @@ -3170,11 +3442,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.1", "ryu", "serde", ] +[[package]] +name = "serial_test" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eec42e7232e5ca56aa59d63af3c7f991fe71ee6a3ddd2d3480834cf3902b007" +dependencies = [ + "futures", + "lazy_static", + "log", + "parking_lot 0.12.0", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1b95bb2f4f624565e8fe8140c789af7e2082c0e0561b5a82a1b678baa9703dc" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "rustversion", + "syn", +] + [[package]] name = "sha-1" version = "0.10.0" @@ -3254,6 +3552,15 @@ dependencies = [ "keccak", ] +[[package]] +name = "sharded-slab" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +dependencies = [ + "lazy_static", +] + [[package]] name = "shlex" version = "1.1.0" @@ -3410,7 +3717,7 @@ checksum = "a55e00b6f95abd889ce398bd7eab2a9c62cd27281cf1bfba70847340557434cf" dependencies = [ "anyhow", "cfg-if 1.0.0", - "clap", + "clap 3.0.13", "console 0.14.1", "dialoguer", "fs2", @@ -3519,6 +3826,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + [[package]] name = "textwrap" version = "0.14.2" @@ -3545,13 +3861,22 @@ dependencies = [ "syn", ] +[[package]] +name = "thread_local" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +dependencies = [ + "once_cell", +] + [[package]] name = "time" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d" dependencies = [ - "itoa", + "itoa 1.0.1", "libc", "num_threads", "serde", @@ -3573,6 +3898,16 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "tinyvec" version = "1.5.1" @@ -3717,6 +4052,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" dependencies = [ "once_cell", + "valuable", ] [[package]] @@ -3729,6 +4065,35 @@ dependencies = [ "tracing", ] +[[package]] +name = "tracing-log" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" +dependencies = [ + "lazy_static", + "log", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60db860322da191b40952ad9affe65ea23e7dd6a5c442c2c42865810c6ab8e6b" +dependencies = [ + "ansi_term", + "matchers", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + [[package]] name = "trezor-client" version = "0.0.6" @@ -3866,6 +4231,12 @@ dependencies = [ "serde", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "vcpkg" version = "0.2.15" @@ -3985,6 +4356,30 @@ version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" +[[package]] +name = "wasm-bindgen-test" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513df541345bb9fcc07417775f3d51bbb677daf307d8035c0afafd87dc2e6599" +dependencies = [ + "console_error_panic_hook", + "js-sys", + "scoped-tls", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test-macro", +] + +[[package]] +name = "wasm-bindgen-test-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6150d36a03e90a3cf6c12650be10626a9902d70c5270fd47d7a47e5389a10d56" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "wasm-timer" version = "0.2.5" diff --git a/Cargo.toml b/Cargo.toml index 3e5472c3..23d51479 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,13 +12,6 @@ description = """ Complete Ethereum library and wallet implementation in Rust. """ -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - -[package.metadata.playground] -features = ["full"] - [workspace] members = [ "ethers-addressbook", @@ -43,6 +36,13 @@ default-members = [ "ethers-solc", ] +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[package.metadata.playground] +features = ["full"] + [features] celo = [ "ethers-core/celo", @@ -90,6 +90,10 @@ ethers-middleware = { version = "^0.17.0", default-features = false, path = "./e ethers-solc = { version = "^0.17.0", default-features = false, path = "./ethers-solc", optional = true } ethers-etherscan = { version = "^0.17.0", default-features = false, path = "./ethers-etherscan" } +[dev-dependencies] +ethers-contract = { version = "^0.17.0", default-features = false, path = "./ethers-contract", features = ["abigen", "eip712"] } +ethers-providers = { version = "^0.17.0", default-features = false, path = "./ethers-providers", features = ["ws"] } + [target.'cfg(target_family = "unix")'.dev-dependencies] ethers-providers = { version = "^0.17.0", default-features = false, path = "./ethers-providers", features = ["ws", "ipc"] } eyre = "0.6" diff --git a/ethers-contract/Cargo.toml b/ethers-contract/Cargo.toml index 0896b47d..f5c23640 100644 --- a/ethers-contract/Cargo.toml +++ b/ethers-contract/Cargo.toml @@ -9,10 +9,6 @@ homepage = "https://docs.rs/ethers" repository = "https://github.com/gakonst/ethers-rs" keywords = ["ethereum", "web3", "celo", "ethers"] -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - [dependencies] ethers-providers = { version = "^0.17.0", path = "../ethers-providers", default-features = false } ethers-core = { version = "^0.17.0", path = "../ethers-core", default-features = false } @@ -28,6 +24,16 @@ pin-project = {version = "1.0.11", default-features = false } futures-util = { version = "^0.3" } hex = { version = "0.4.3", default-features = false, features = ["std"] } +[dev-dependencies] +ethers-middleware = { version = "^0.17.0", path = "../ethers-middleware" } +ethers-providers = { version = "^0.17.0", path = "../ethers-providers", default-features = false, features = ["ws"] } +ethers-signers = { version = "^0.17.0", path = "../ethers-signers" } +ethers-contract-abigen = { version = "^0.17.0", path = "ethers-contract-abigen" } +ethers-contract-derive = { version = "^0.17.0", path = "ethers-contract-derive" } +ethers-core = { version = "^0.17.0", path = "../ethers-core", default-features = false, features = ["eip712"]} +ethers-derive-eip712 = { version = "^0.17.0", path = "../ethers-core/ethers-derive-eip712"} +ethers-solc = { version = "^0.17.0", path = "../ethers-solc", default-features = false } + [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] tokio = { version = "1.18", default-features = false, features = ["macros"] } @@ -40,3 +46,7 @@ legacy = [] rustls = ["ethers-contract-abigen/rustls"] openssl = ["ethers-contract-abigen/openssl"] + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/ethers-contract/ethers-contract-abigen/Cargo.toml b/ethers-contract/ethers-contract-abigen/Cargo.toml index ed75e704..88eca922 100644 --- a/ethers-contract/ethers-contract-abigen/Cargo.toml +++ b/ethers-contract/ethers-contract-abigen/Cargo.toml @@ -9,10 +9,6 @@ homepage = "https://docs.rs/ethers" repository = "https://github.com/gakonst/ethers-rs" keywords = ["ethereum", "web3", "celo", "ethers"] -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - [dependencies] ethers-core = { version = "^0.17.0", path = "../../ethers-core", features = ["macros"] } @@ -34,7 +30,15 @@ eyre = "0.6" # NOTE: this enables wasm compatibility for getrandom indirectly getrandom = { version = "0.2", features = ["js"] } +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + [features] default = ["reqwest", "rustls"] openssl = ["reqwest/native-tls"] rustls = ["reqwest/rustls-tls"] + +[dev-dependencies] +tempfile = "3.2.0" +ethers-solc = { version = "^0.17.0", path = "../../ethers-solc", default-features = false, features = ["project-util", "svm-solc"] } diff --git a/ethers-contract/ethers-contract-derive/Cargo.toml b/ethers-contract/ethers-contract-derive/Cargo.toml index 449adcd3..98fa5153 100644 --- a/ethers-contract/ethers-contract-derive/Cargo.toml +++ b/ethers-contract/ethers-contract-derive/Cargo.toml @@ -9,10 +9,6 @@ homepage = "https://docs.rs/ethers" repository = "https://github.com/gakonst/ethers-rs" keywords = ["ethereum", "web3", "celo", "ethers"] -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - [lib] proc-macro = true @@ -25,3 +21,7 @@ hex = { version = "0.4.3", default-features = false, features = ["std"] } proc-macro2 = "1.0" quote = "1.0" syn = "1.0.12" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/ethers-core/Cargo.toml b/ethers-core/Cargo.toml index 1b7cab48..b4824314 100644 --- a/ethers-core/Cargo.toml +++ b/ethers-core/Cargo.toml @@ -9,10 +9,6 @@ homepage = "https://docs.rs/ethers" repository = "https://github.com/gakonst/ethers-rs" keywords = ["ethereum", "web3", "celo", "ethers"] -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - [dependencies] fastrlp = { version = "0.1.3", features = ["std", "derive", "ethereum-types"] } rlp = { version = "0.5.0", default-features = false, features = ["std"] } @@ -47,8 +43,19 @@ syn = { version = "1.0.98", optional = true } proc-macro2 = { version = "1.0.42", optional = true } rust_decimal = "1.25.0" +[dev-dependencies] +serde_json = { version = "1.0.64", default-features = false } +bincode = { version = "1.3.3", default-features = false } +once_cell = { version = "1.13.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"] diff --git a/ethers-core/ethers-derive-eip712/Cargo.toml b/ethers-core/ethers-derive-eip712/Cargo.toml index 078d9fba..0dd170f6 100644 --- a/ethers-core/ethers-derive-eip712/Cargo.toml +++ b/ethers-core/ethers-derive-eip712/Cargo.toml @@ -14,3 +14,8 @@ syn = "1.0.77" ethers-core = { version = "^0.17.0", path = "../", default-features = false, features = ["eip712", "macros"] } hex = "0.4.3" serde_json = "1.0.68" + +[dev-dependencies] +ethers-contract = { version = "^0.17.0", path = "../../ethers-contract", features = ["abigen"]} +ethers-contract-derive = { version = "^0.17.0", path = "../../ethers-contract/ethers-contract-derive" } +ethers-signers = { version = "^0.17.0", path = "../../ethers-signers" } diff --git a/ethers-etherscan/Cargo.toml b/ethers-etherscan/Cargo.toml index 2349f665..9803b976 100644 --- a/ethers-etherscan/Cargo.toml +++ b/ethers-etherscan/Cargo.toml @@ -13,10 +13,6 @@ Rust API bindings for the etherscan.io web API """ keywords = ["ethereum", "web3", "etherscan", "ethers"] -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - [dependencies] ethers-core = { version = "^0.17.0", path = "../ethers-core", default-features = false } reqwest = { version = "0.11.11", default-features = false, features = ["json"] } @@ -31,6 +27,17 @@ semver = "1.0.12" # NOTE: this enables wasm compatibility for getrandom indirectly getrandom = { version = "0.2", features = ["js"] } +[dev-dependencies] +tempfile = "3.3.0" +tokio = { version = "1.18", features = ["macros", "rt-multi-thread", "time"] } +serial_test = "0.8.0" +tracing-subscriber = { version = "0.3", default-features = false, features = ["env-filter", "fmt"] } +ethers-solc = { version = "^0.17.0", path = "../ethers-solc", default-features = false } + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + [features] default = ["rustls"] openssl = ["reqwest/native-tls"] diff --git a/ethers-middleware/Cargo.toml b/ethers-middleware/Cargo.toml index 15c5e809..b34d4b2d 100644 --- a/ethers-middleware/Cargo.toml +++ b/ethers-middleware/Cargo.toml @@ -38,6 +38,14 @@ instant = {version = "0.1.12", features = ["now"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] tokio = { version = "1.18" } +[dev-dependencies] +hex = { version = "0.4.3", default-features = false, features = ["std"] } +rand = { version = "0.8.5", default-features = false } +ethers-providers = { version = "^0.17.0", path = "../ethers-providers", default-features = false, features = ["ws", "rustls"] } +once_cell = "1.13.0" +ethers-solc = { version = "^0.17.0", path = "../ethers-solc" } +serial_test = "0.8.0" + [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] tokio = { version = "1.18", default-features = false, features = ["rt", "macros", "time"] } diff --git a/ethers-providers/Cargo.toml b/ethers-providers/Cargo.toml index 4e72d392..a4413597 100644 --- a/ethers-providers/Cargo.toml +++ b/ethers-providers/Cargo.toml @@ -47,10 +47,6 @@ hashers = "1.0.1" tokio = { version = "1.18", features = ["time"] } tokio-tungstenite = { version = "0.17.2", default-features = false, features = ["connect"], optional = true } -[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] -tokio = { version = "1.18", default-features = false, features = ["rt", "macros", "time"] } -tempfile = "3.3.0" - [target.'cfg(target_arch = "wasm32")'.dependencies] ws_stream_wasm = "0.7" @@ -63,6 +59,10 @@ parking_lot = { version = "0.11", features = ["wasm-bindgen"] } # NOTE: this enables wasm compatibility for getrandom indirectly getrandom = { version = "0.2", features = ["js"] } +[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] +tokio = { version = "1.18", default-features = false, features = ["rt", "macros", "time"] } +tempfile = "3.3.0" + [features] default = ["ws", "rustls"] celo = ["ethers-core/celo"] diff --git a/ethers-signers/Cargo.toml b/ethers-signers/Cargo.toml index d279a964..6bdcb424 100644 --- a/ethers-signers/Cargo.toml +++ b/ethers-signers/Cargo.toml @@ -40,6 +40,13 @@ spki = { version = "0.6.0", optional = true } eth-keystore = { version = "0.4.1" } home = { version = "0.5.3", optional = true } +[dev-dependencies] +ethers-contract = { version = "^0.17.0", path = "../ethers-contract", features = ["eip712", "abigen"]} +ethers-derive-eip712 = { version = "^0.17.0", path = "../ethers-core/ethers-derive-eip712" } +serde_json = { version = "1.0.64" } +tracing-subscriber = "0.3.15" +yubihsm = { version = "0.41.0-pre", features = ["secp256k1", "usb", "mockhsm"] } + [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] yubihsm = { version = "0.41.0-pre", features = ["secp256k1", "usb", "mockhsm"] } tokio = { version = "1.18", default-features = false, features = ["macros", "rt"] } diff --git a/ethers-solc/Cargo.toml b/ethers-solc/Cargo.toml index ae83bd50..48128a6a 100644 --- a/ethers-solc/Cargo.toml +++ b/ethers-solc/Cargo.toml @@ -50,6 +50,15 @@ svm-builds = { package = "svm-rs-builds", version = "0.1.5", optional = true} # NOTE: this enables wasm compatibility for getrandom indirectly getrandom = { version = "0.2", features = ["js"] } +[dev-dependencies] +criterion = { version = "0.3", features = ["async_tokio"] } +env_logger = "*" +tracing-subscriber = {version = "0.3", default-features = false, features = ["env-filter", "fmt"]} +rand = "0.8.5" +pretty_assertions = "1.2.1" +tempfile = "3.3.0" +tokio = { version = "1.18", features = ["full"] } + [[bench]] name = "compile_many" harness = false diff --git a/examples/ethers-wasm/Cargo.toml b/examples/ethers-wasm/Cargo.toml index fb2956a6..fbc6c023 100644 --- a/examples/ethers-wasm/Cargo.toml +++ b/examples/ethers-wasm/Cargo.toml @@ -41,3 +41,6 @@ wee_alloc = { version = "0.4.5", optional = true } serde = { version = "1.0.126", features = ["derive"] } hex = "0.4.3" web-sys = "0.3.59" + +[dev-dependencies] +wasm-bindgen-test = "0.3.32"