Bump web3 to 0.18.0
This commit is contained in:
parent
e4c5440ec2
commit
536c7ecb21
4 changed files with 21 additions and 29 deletions
38
Cargo.lock
generated
38
Cargo.lock
generated
|
@ -289,12 +289,6 @@ dependencies = [
|
||||||
"url 2.2.2",
|
"url 2.2.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "anyhow"
|
|
||||||
version = "1.0.56"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "arrayref"
|
name = "arrayref"
|
||||||
version = "0.3.6"
|
version = "0.3.6"
|
||||||
|
@ -781,11 +775,10 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ethabi"
|
name = "ethabi"
|
||||||
version = "14.1.0"
|
version = "16.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a01317735d563b3bad2d5f90d2e1799f414165408251abb762510f40e790e69a"
|
checksum = "a4c98847055d934070b90e806e12d3936b787d0a115068981c1d8dfd5dfef5a5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
|
||||||
"ethereum-types",
|
"ethereum-types",
|
||||||
"hex",
|
"hex",
|
||||||
"serde",
|
"serde",
|
||||||
|
@ -810,9 +803,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ethereum-types"
|
name = "ethereum-types"
|
||||||
version = "0.11.0"
|
version = "0.12.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f64b5df66a228d85e4b17e5d6c6aa43b0310898ffe8a85988c4c032357aaabfd"
|
checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ethbloom",
|
"ethbloom",
|
||||||
"fixed-hash",
|
"fixed-hash",
|
||||||
|
@ -1374,9 +1367,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "jsonrpc-core"
|
name = "jsonrpc-core"
|
||||||
version = "17.1.0"
|
version = "18.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d4467ab6dfa369b69e52bd0692e480c4d117410538526a57a304a0f2250fd95e"
|
checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"futures-executor",
|
"futures-executor",
|
||||||
|
@ -1605,7 +1598,6 @@ dependencies = [
|
||||||
"dotenv",
|
"dotenv",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
"hex",
|
"hex",
|
||||||
"impl-trait-for-tuples",
|
|
||||||
"log",
|
"log",
|
||||||
"mime-sniffer",
|
"mime-sniffer",
|
||||||
"mime_guess",
|
"mime_guess",
|
||||||
|
@ -2117,9 +2109,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "primitive-types"
|
name = "primitive-types"
|
||||||
version = "0.9.1"
|
version = "0.10.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "06345ee39fbccfb06ab45f3a1a5798d9dafa04cb8921a76d227040003a234b0e"
|
checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fixed-hash",
|
"fixed-hash",
|
||||||
"impl-codec",
|
"impl-codec",
|
||||||
|
@ -2603,9 +2595,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "secp256k1"
|
name = "secp256k1"
|
||||||
version = "0.20.3"
|
version = "0.21.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "97d03ceae636d0fed5bae6a7f4f664354c5f4fcedf6eef053fef17e49f837d0a"
|
checksum = "9c42e6f1735c5f00f51e43e28d6634141f2bcad10931b2609ddd74a86d751260"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rand 0.6.5",
|
"rand 0.6.5",
|
||||||
"secp256k1-sys",
|
"secp256k1-sys",
|
||||||
|
@ -3401,11 +3393,11 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "web3"
|
name = "web3"
|
||||||
version = "0.16.0"
|
version = "0.18.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bc4c18ae15621f764fab919f7e4a83d87163494cbc3460884debef7c6bc1bc6b"
|
checksum = "44f258e254752d210b84fe117b31f1e3cc9cbf04c0d747eb7f8cf7cf5e370f6d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec 0.5.2",
|
"arrayvec 0.7.2",
|
||||||
"base64",
|
"base64",
|
||||||
"bytes",
|
"bytes",
|
||||||
"derive_more",
|
"derive_more",
|
||||||
|
@ -3415,9 +3407,11 @@ dependencies = [
|
||||||
"futures-timer",
|
"futures-timer",
|
||||||
"headers",
|
"headers",
|
||||||
"hex",
|
"hex",
|
||||||
|
"idna 0.2.2",
|
||||||
"jsonrpc-core",
|
"jsonrpc-core",
|
||||||
"log",
|
"log",
|
||||||
"parking_lot 0.11.1",
|
"once_cell",
|
||||||
|
"parking_lot 0.12.0",
|
||||||
"pin-project",
|
"pin-project",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"rlp",
|
"rlp",
|
||||||
|
|
|
@ -54,7 +54,7 @@ pem = "1.0.2"
|
||||||
# Used for hashing passwords
|
# Used for hashing passwords
|
||||||
rust-argon2 = "0.8.3"
|
rust-argon2 = "0.8.3"
|
||||||
# Used for working with ethereum keys
|
# Used for working with ethereum keys
|
||||||
secp256k1 = { version = "0.20.3", features = ["rand", "rand-std"] }
|
secp256k1 = { version = "0.21.3", features = ["rand", "rand-std"] }
|
||||||
# Used for serialization/deserialization
|
# Used for serialization/deserialization
|
||||||
serde = { version = "1.0.136", features = ["derive"] }
|
serde = { version = "1.0.136", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
@ -82,9 +82,7 @@ ulid = { version = "0.4.1", features = ["uuid"] }
|
||||||
# Used to work with UUIDs
|
# Used to work with UUIDs
|
||||||
uuid = { version = "0.8.2", features = ["serde", "v4"] }
|
uuid = { version = "0.8.2", features = ["serde", "v4"] }
|
||||||
# Used to query ethereum node
|
# Used to query ethereum node
|
||||||
web3 = { version = "0.16.0", default-features = false, features = ["http", "http-tls", "signing"] }
|
web3 = { version = "0.18.0", default-features = false, features = ["http", "http-tls", "signing"] }
|
||||||
# Dependency of web3; version 0.2.2 requires edition 2021
|
|
||||||
impl-trait-for-tuples = "=0.2.1"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
serial_test = "0.5.1"
|
serial_test = "0.5.1"
|
||||||
|
|
|
@ -94,7 +94,7 @@ async fn main() {
|
||||||
let address = key_to_ethereum_address(&private_key);
|
let address = key_to_ethereum_address(&private_key);
|
||||||
println!(
|
println!(
|
||||||
"address {:?}; private key {}",
|
"address {:?}; private key {}",
|
||||||
address, private_key,
|
address, private_key.display_secret(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
subcmd => {
|
subcmd => {
|
||||||
|
|
|
@ -132,7 +132,7 @@ mod tests {
|
||||||
let signing_key = generate_ecdsa_key();
|
let signing_key = generate_ecdsa_key();
|
||||||
let message = "test_message";
|
let message = "test_message";
|
||||||
let result = sign_message(
|
let result = sign_message(
|
||||||
&signing_key.to_string(),
|
&signing_key.display_secret().to_string(),
|
||||||
message.as_bytes(),
|
message.as_bytes(),
|
||||||
).unwrap();
|
).unwrap();
|
||||||
assert!(result.v == 27 || result.v == 28);
|
assert!(result.v == 27 || result.v == 28);
|
||||||
|
@ -143,7 +143,7 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_sign_contract_call() {
|
fn test_sign_contract_call() {
|
||||||
let signing_key = generate_ecdsa_key().to_string();
|
let signing_key = generate_ecdsa_key().display_secret().to_string();
|
||||||
let chain_id = 1;
|
let chain_id = 1;
|
||||||
let contract_address = "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0";
|
let contract_address = "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0";
|
||||||
let method_name = "test";
|
let method_name = "test";
|
||||||
|
|
Loading…
Reference in a new issue