From 4d42e4db0d19b085920c6bc66e0c44f3366d32b0 Mon Sep 17 00:00:00 2001 From: deniallugo Date: Wed, 30 Mar 2022 14:30:46 +0300 Subject: [PATCH] Update web3 Signed-off-by: deniallugo --- Cargo.lock | 236 ++++++++++++++---- core/bin/block_revert/Cargo.toml | 4 +- core/bin/data_restore/Cargo.toml | 6 +- core/bin/data_restore/src/tests/mod.rs | 8 +- core/bin/prover/Cargo.toml | 2 +- core/bin/remove_proofs/Cargo.toml | 4 +- core/bin/zksync_api/Cargo.toml | 4 +- .../src/api_server/web3/converter.rs | 4 +- .../src/api_server/web3/rpc_impl.rs | 4 + .../zksync_api/src/api_server/web3/types.rs | 1 + core/bin/zksync_core/Cargo.toml | 4 +- core/bin/zksync_eth_sender/Cargo.toml | 4 +- core/bin/zksync_eth_sender/src/lib.rs | 2 + .../zksync_forced_exit_requests/Cargo.toml | 4 +- core/lib/basic_types/Cargo.toml | 2 +- core/lib/contracts/Cargo.toml | 2 +- core/lib/crypto/Cargo.toml | 2 +- core/lib/eth_client/Cargo.toml | 4 +- .../lib/eth_client/src/clients/http_client.rs | 4 +- core/lib/eth_signer/Cargo.toml | 2 +- core/lib/gateway_watcher/Cargo.toml | 2 +- core/lib/state/Cargo.toml | 2 +- core/lib/storage/Cargo.toml | 2 +- core/lib/types/Cargo.toml | 6 +- core/tests/testkit/Cargo.toml | 4 +- core/tests/testkit/src/eth_account.rs | 5 +- sdk/zksync-rs/Cargo.toml | 4 +- 27 files changed, 248 insertions(+), 80 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9996ce2c22..17b3889e2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -634,6 +634,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +[[package]] +name = "base64ct" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dea908e7347a8c64e378c17e30ef880ad73e3b4498346b055c2c00ea342f3179" + [[package]] name = "bellman_ce" version = "0.3.2" @@ -861,12 +867,6 @@ dependencies = [ "iovec", ] -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.1.0" @@ -1469,12 +1469,11 @@ dependencies = [ [[package]] name = "ethabi" -version = "14.1.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01317735d563b3bad2d5f90d2e1799f414165408251abb762510f40e790e69a" +checksum = "a4c98847055d934070b90e806e12d3936b787d0a115068981c1d8dfd5dfef5a5" dependencies = [ - "anyhow", - "ethereum-types", + "ethereum-types 0.12.1", "hex", "serde", "serde_json", @@ -1506,7 +1505,21 @@ dependencies = [ "fixed-hash", "impl-rlp", "impl-serde", - "primitive-types", + "primitive-types 0.9.1", + "uint", +] + +[[package]] +name = "ethereum-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-rlp", + "impl-serde", + "primitive-types 0.10.1", "uint", ] @@ -1722,7 +1735,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e" dependencies = [ "futures-core", - "lock_api 0.4.5", + "lock_api 0.4.6", "parking_lot 0.11.2", ] @@ -2145,9 +2158,9 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" +checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" dependencies = [ "serde", ] @@ -2528,9 +2541,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" dependencies = [ "scopeguard", ] @@ -3030,9 +3043,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" [[package]] name = "oorandom" @@ -3116,14 +3129,38 @@ dependencies = [ "aes-ctr", "block-modes", "digest 0.9.0", - "ethereum-types", + "ethereum-types 0.11.0", "hmac 0.10.1", "lazy_static", - "pbkdf2", + "pbkdf2 0.6.0", "ripemd160", "rustc-hex", "scrypt", - "secp256k1", + "secp256k1 0.20.3", + "sha2 0.9.8", + "subtle 2.4.1", + "tiny-keccak 2.0.2", + "zeroize", +] + +[[package]] +name = "parity-crypto" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b92ea9ddac0d6e1db7c49991e7d397d34a9fd814b4c93cda53788e8eef94e35" +dependencies = [ + "aes", + "aes-ctr", + "block-modes", + "digest 0.9.0", + "ethereum-types 0.12.1", + "hmac 0.10.1", + "lazy_static", + "pbkdf2 0.7.5", + "ripemd160", + "rustc-hex", + "scrypt", + "secp256k1 0.20.3", "sha2 0.9.8", "subtle 2.4.1", "tiny-keccak 2.0.2", @@ -3192,10 +3229,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api 0.4.5", + "lock_api 0.4.6", "parking_lot_core 0.8.5", ] +[[package]] +name = "parking_lot" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +dependencies = [ + "lock_api 0.4.6", + "parking_lot_core 0.9.1", +] + [[package]] name = "parking_lot_core" version = "0.6.2" @@ -3225,6 +3272,19 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "parking_lot_core" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.2.10", + "smallvec 1.7.0", + "windows-sys", +] + [[package]] name = "parse_pub_data" version = "1.0.0" @@ -3233,6 +3293,16 @@ dependencies = [ "zksync_types", ] +[[package]] +name = "password-hash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54986aa4bfc9b98c6a5f40184223658d187159d7b3c6af33f2b2aa25ae1db0fa" +dependencies = [ + "base64ct", + "rand_core 0.6.3", +] + [[package]] name = "paste" version = "1.0.6" @@ -3254,6 +3324,19 @@ dependencies = [ "subtle 2.4.1", ] +[[package]] +name = "pbkdf2" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf916dd32dd26297907890d99dc2740e33f6bd9073965af4ccff2967962f5508" +dependencies = [ + "base64ct", + "crypto-mac 0.10.1", + "hmac 0.10.1", + "password-hash", + "sha2 0.9.8", +] + [[package]] name = "pem" version = "0.8.3" @@ -3424,6 +3507,19 @@ dependencies = [ "uint", ] +[[package]] +name = "primitive-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "uint", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -4087,7 +4183,7 @@ checksum = "8da492dab03f925d977776a0b7233d7b934d6dc2b94faead48928e2e9bacedb9" dependencies = [ "base64 0.13.0", "hmac 0.10.1", - "pbkdf2", + "pbkdf2 0.6.0", "rand 0.7.3", "rand_core 0.5.1", "salsa20", @@ -4105,11 +4201,20 @@ dependencies = [ "secp256k1-sys", ] +[[package]] +name = "secp256k1" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c42e6f1735c5f00f51e43e28d6634141f2bcad10931b2609ddd74a86d751260" +dependencies = [ + "secp256k1-sys", +] + [[package]] name = "secp256k1-sys" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827cb7cce42533829c792fc51b82fbf18b125b45a702ef2c8be77fce65463a7b" +checksum = "957da2573cde917463ece3570eab4a0b3f19de6f1646cde62e6fd3868f566036" dependencies = [ "cc", ] @@ -4481,16 +4586,16 @@ dependencies = [ [[package]] name = "soketto" -version = "0.4.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c71ed3d54db0a699f4948e1bb3e45b450fa31fe602621dee6680361d569c88" +checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" dependencies = [ - "base64 0.12.3", - "bytes 0.5.6", + "base64 0.13.0", + "bytes 1.1.0", "futures 0.3.17", "httparse", "log 0.4.14", - "rand 0.7.3", + "rand 0.8.4", "sha-1 0.9.8", ] @@ -5452,27 +5557,29 @@ dependencies = [ [[package]] name = "web3" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc4c18ae15621f764fab919f7e4a83d87163494cbc3460884debef7c6bc1bc6b" +checksum = "44f258e254752d210b84fe117b31f1e3cc9cbf04c0d747eb7f8cf7cf5e370f6d" dependencies = [ - "arrayvec 0.5.2", + "arrayvec 0.7.2", "base64 0.13.0", "bytes 1.1.0", "derive_more", "ethabi", - "ethereum-types", + "ethereum-types 0.12.1", "futures 0.3.17", "futures-timer", "headers", "hex", - "jsonrpc-core 17.1.0", + "idna 0.2.3", + "jsonrpc-core 18.0.0", "log 0.4.14", - "parking_lot 0.11.2", + "once_cell", + "parking_lot 0.12.0", "pin-project", "reqwest", "rlp", - "secp256k1", + "secp256k1 0.21.3", "serde", "serde_json", "soketto", @@ -5590,6 +5697,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5" + +[[package]] +name = "windows_i686_gnu" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615" + +[[package]] +name = "windows_i686_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" + [[package]] name = "winreg" version = "0.7.0" @@ -5872,7 +6022,7 @@ dependencies = [ "ethabi", "futures 0.3.17", "hex", - "jsonrpc-core 17.1.0", + "jsonrpc-core 18.0.0", "num", "serde", "serde_json", @@ -5898,7 +6048,7 @@ dependencies = [ "ethabi", "hex", "metrics", - "parity-crypto", + "parity-crypto 0.8.0", "serde", "tokio", "vlog", @@ -5949,7 +6099,7 @@ dependencies = [ "futures 0.3.17", "hex", "jsonrpc-core 17.1.0", - "parity-crypto", + "parity-crypto 0.9.0", "reqwest", "rlp", "serde", @@ -6191,7 +6341,7 @@ dependencies = [ "metrics", "num", "once_cell", - "parity-crypto", + "parity-crypto 0.9.0", "serde", "serde_json", "sqlx", @@ -6271,8 +6421,8 @@ dependencies = [ "itertools 0.9.0", "num", "once_cell", - "parity-crypto", - "secp256k1", + "parity-crypto 0.9.0", + "secp256k1 0.20.3", "serde", "serde_json", "serde_with", diff --git a/core/bin/block_revert/Cargo.toml b/core/bin/block_revert/Cargo.toml index 6d887029eb..47224f9b2f 100644 --- a/core/bin/block_revert/Cargo.toml +++ b/core/bin/block_revert/Cargo.toml @@ -19,7 +19,7 @@ zksync_eth_client = { path = "../../lib/eth_client", version = "1.0" } zksync_config = { path = "../../lib/config", version = "1.0" } tokio = { version = "1", features = ["full"] } -ethabi = "14.0.0" +ethabi = "16.0.0" anyhow = "1.0" -web3 = "0.16.0" +web3 = "0.18.0" structopt = "0.3.20" diff --git a/core/bin/data_restore/Cargo.toml b/core/bin/data_restore/Cargo.toml index e61b5bd891..d545615470 100644 --- a/core/bin/data_restore/Cargo.toml +++ b/core/bin/data_restore/Cargo.toml @@ -18,8 +18,8 @@ vlog = { path = "../../lib/vlog", version = "1.0" } num = { version = "0.3.1", features = ["serde"] } tiny-keccak = "1.4.2" -ethabi = "14.0.0" -web3 = "0.16.0" +ethabi = "16.0.0" +web3 = "0.18.0" hex = "0.4" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0.0" @@ -38,6 +38,6 @@ zksync_config = { path = "../../lib/config", version = "1.0" } zksync_contracts = { path = "../../lib/contracts", version = "1.0" } [dev-dependencies] -jsonrpc-core = "17.0.0" +jsonrpc-core = "18.0.0" db_test_macro = { path = "../../lib/storage/db_test_macro" } futures = "0.3.5" diff --git a/core/bin/data_restore/src/tests/mod.rs b/core/bin/data_restore/src/tests/mod.rs index 1c2cc76171..e3c7f6b664 100644 --- a/core/bin/data_restore/src/tests/mod.rs +++ b/core/bin/data_restore/src/tests/mod.rs @@ -137,7 +137,7 @@ fn create_transaction_v4(number: u32, stored_block: Block, blocks: Vec) - from: Some([5u8; 20].into()), to: Some([7u8; 20].into()), value: u32_to_32bytes(10).into(), - gas_price: u32_to_32bytes(1).into(), + gas_price: Some(u32_to_32bytes(1).into()), gas: u32_to_32bytes(1).into(), input: Bytes(input_data), v: None, @@ -146,6 +146,8 @@ fn create_transaction_v4(number: u32, stored_block: Block, blocks: Vec) - raw: None, transaction_type: None, access_list: None, + max_fee_per_gas: None, + max_priority_fee_per_gas: None, } } fn create_transaction(number: u32, block: Block) -> Transaction { @@ -175,7 +177,7 @@ fn create_transaction(number: u32, block: Block) -> Transaction { from: Some([5u8; 20].into()), to: Some([7u8; 20].into()), value: u32_to_32bytes(10).into(), - gas_price: u32_to_32bytes(1).into(), + gas_price: Some(u32_to_32bytes(1).into()), gas: u32_to_32bytes(1).into(), input: Bytes(input_data), v: None, @@ -184,6 +186,8 @@ fn create_transaction(number: u32, block: Block) -> Transaction { raw: None, transaction_type: None, access_list: None, + max_fee_per_gas: None, + max_priority_fee_per_gas: None, } } diff --git a/core/bin/prover/Cargo.toml b/core/bin/prover/Cargo.toml index 4bc48ca1a5..09b6957343 100644 --- a/core/bin/prover/Cargo.toml +++ b/core/bin/prover/Cargo.toml @@ -22,7 +22,7 @@ zksync_prometheus_exporter = { path = "../../lib/prometheus_exporter", version = hex = "0.4" rust-crypto = "0.2" -web3 = "0.16.0" +web3 = "0.18.0" tokio = { version = "1", features = ["full"] } async-trait = "0.1" futures = "0.3" diff --git a/core/bin/remove_proofs/Cargo.toml b/core/bin/remove_proofs/Cargo.toml index 7c6276a724..5b393f68ad 100644 --- a/core/bin/remove_proofs/Cargo.toml +++ b/core/bin/remove_proofs/Cargo.toml @@ -19,7 +19,7 @@ zksync_eth_client = { path = "../../lib/eth_client", version = "1.0" } zksync_config = { path = "../../lib/config", version = "1.0" } tokio = { version = "1", features = ["full"] } -ethabi = "14.0.0" +ethabi = "16.0.0" anyhow = "1.0" -web3 = "0.16.0" +web3 = "0.18.0" structopt = "0.3.20" diff --git a/core/bin/zksync_api/Cargo.toml b/core/bin/zksync_api/Cargo.toml index 714077e826..7cee32b16c 100644 --- a/core/bin/zksync_api/Cargo.toml +++ b/core/bin/zksync_api/Cargo.toml @@ -35,8 +35,8 @@ zksync_gateway_watcher = { path = "../../lib/gateway_watcher", version = "1.0" } vlog = { path = "../../lib/vlog", version = "1.0" } hex = "0.4" -ethabi = "14.0.0" -web3 = "0.16.0" +ethabi = "16.0.0" +web3 = "0.18.0" serde = "1.0.90" serde_json = "1.0.0" serde_repr = "0.1" diff --git a/core/bin/zksync_api/src/api_server/web3/converter.rs b/core/bin/zksync_api/src/api_server/web3/converter.rs index d2e4559305..c83b2ce570 100644 --- a/core/bin/zksync_api/src/api_server/web3/converter.rs +++ b/core/bin/zksync_api/src/api_server/web3/converter.rs @@ -78,7 +78,7 @@ pub fn transaction_from_tx_data(tx: TxData) -> Transaction { from: Some(tx.from), to: tx.to, value: 0.into(), - gas_price: 0.into(), + gas_price: Some(0.into()), gas: 0.into(), input: Vec::new().into(), v: None, @@ -87,6 +87,8 @@ pub fn transaction_from_tx_data(tx: TxData) -> Transaction { raw: None, transaction_type: None, access_list: None, + max_fee_per_gas: None, + max_priority_fee_per_gas: None, } } diff --git a/core/bin/zksync_api/src/api_server/web3/rpc_impl.rs b/core/bin/zksync_api/src/api_server/web3/rpc_impl.rs index 2bfe14a9d8..56b84504e3 100644 --- a/core/bin/zksync_api/src/api_server/web3/rpc_impl.rs +++ b/core/bin/zksync_api/src/api_server/web3/rpc_impl.rs @@ -1,4 +1,5 @@ // Built-in uses +use ethabi::Address; use std::time::Instant; // External uses use jsonrpc_core::{Error, Result}; @@ -355,6 +356,8 @@ impl Web3RpcApp { transaction_index: receipt.block_index.map(Into::into).unwrap_or(U64::MAX), block_hash: Some(root_hash), block_number: Some(receipt.block_number.into()), + from: Address::from_slice(&receipt.from_account), + to: receipt.to_account.map(|acc| Address::from_slice(&acc)), cumulative_gas_used: 0.into(), gas_used: Some(0.into()), contract_address: None, @@ -363,6 +366,7 @@ impl Web3RpcApp { root: Some(root_hash), logs_bloom: H2048::zero(), transaction_type: None, + effective_gas_price: None, }) } diff --git a/core/bin/zksync_api/src/api_server/web3/types.rs b/core/bin/zksync_api/src/api_server/web3/types.rs index 92ff73eee4..2003ba9117 100644 --- a/core/bin/zksync_api/src/api_server/web3/types.rs +++ b/core/bin/zksync_api/src/api_server/web3/types.rs @@ -133,6 +133,7 @@ impl BlockInfo { number: Some(block_number.0.into()), gas_used: 0.into(), gas_limit: 50000.into(), + base_fee_per_gas: None, extra_data: Vec::new().into(), logs_bloom: None, timestamp: timestamp.into(), diff --git a/core/bin/zksync_core/Cargo.toml b/core/bin/zksync_core/Cargo.toml index 55c74dae4a..ffbaeca9c1 100644 --- a/core/bin/zksync_core/Cargo.toml +++ b/core/bin/zksync_core/Cargo.toml @@ -31,8 +31,8 @@ zksync_gateway_watcher = { path = "../../lib/gateway_watcher", version = "1.0" } num = { version = "0.3.1", features = ["serde"] } -ethabi = "14.0.0" -web3 = "0.16.0" +ethabi = "16.0.0" +web3 = "0.18.0" serde = "1.0.90" serde_json = "1.0.0" metrics = "0.17" diff --git a/core/bin/zksync_eth_sender/Cargo.toml b/core/bin/zksync_eth_sender/Cargo.toml index 1d1f97e7af..c45ba4d0b0 100644 --- a/core/bin/zksync_eth_sender/Cargo.toml +++ b/core/bin/zksync_eth_sender/Cargo.toml @@ -23,8 +23,8 @@ zksync_prometheus_exporter = { path = "../../lib/prometheus_exporter", version = zksync_gateway_watcher = { path = "../../lib/gateway_watcher", version = "1.0" } hex = "0.4" -ethabi = "14.0.0" -web3 = "0.16.0" +ethabi = "16.0.0" +web3 = "0.18.0" serde = "1.0.90" serde_json = "1.0.0" metrics = "0.17" diff --git a/core/bin/zksync_eth_sender/src/lib.rs b/core/bin/zksync_eth_sender/src/lib.rs index de0a4c43c9..0f22e9c3fd 100644 --- a/core/bin/zksync_eth_sender/src/lib.rs +++ b/core/bin/zksync_eth_sender/src/lib.rs @@ -660,6 +660,8 @@ impl ETHSender { nonce: Some(op.nonce), gas_price: Some(op.last_used_gas_price), gas: Some(gas_limit), + max_fee_per_gas: None, + max_priority_fee_per_gas: None, ..Default::default() } }; diff --git a/core/bin/zksync_forced_exit_requests/Cargo.toml b/core/bin/zksync_forced_exit_requests/Cargo.toml index 1f4edfcfcb..f672a85058 100644 --- a/core/bin/zksync_forced_exit_requests/Cargo.toml +++ b/core/bin/zksync_forced_exit_requests/Cargo.toml @@ -27,8 +27,8 @@ vlog = { path = "../../lib/vlog", version = "1.0" } zksync_core = { path = "../zksync_core", version = "1.0" } zksync_api = { path = "../zksync_api", version = "1.0" } actix-web = "4.0.0-beta.8" -ethabi = "14.0.0" -web3 = "0.16.0" +ethabi = "16.0.0" +web3 = "0.18.0" log = "0.4" hex = "0.4" metrics = "0.17" diff --git a/core/lib/basic_types/Cargo.toml b/core/lib/basic_types/Cargo.toml index 8706846804..a402ed4ad2 100644 --- a/core/lib/basic_types/Cargo.toml +++ b/core/lib/basic_types/Cargo.toml @@ -10,5 +10,5 @@ keywords = ["blockchain", "zksync"] categories = ["cryptography"] [dependencies] -web3 = "0.16.0" +web3 = "0.18.0" serde = { version = "1.0", features = ["derive"] } diff --git a/core/lib/contracts/Cargo.toml b/core/lib/contracts/Cargo.toml index 101d1ce550..06cb66dc3e 100644 --- a/core/lib/contracts/Cargo.toml +++ b/core/lib/contracts/Cargo.toml @@ -10,5 +10,5 @@ keywords = ["blockchain", "zksync"] categories = ["cryptography"] [dependencies] -ethabi = "14.0.0" +ethabi = "16.0.0" serde_json = "1.0" diff --git a/core/lib/crypto/Cargo.toml b/core/lib/crypto/Cargo.toml index 9f800b4be7..c84e08d405 100644 --- a/core/lib/crypto/Cargo.toml +++ b/core/lib/crypto/Cargo.toml @@ -18,7 +18,7 @@ rescue_poseidon = { package = "rescue_poseidon", version = "0.3.0", git = "https num = { version = "0.3.1", features = ["serde"] } zksync_basic_types = { path = "../basic_types", version = "1.0" } -ethabi = "14.0.0" +ethabi = "16.0.0" serde = "1.0" thiserror = "1.0" diff --git a/core/lib/eth_client/Cargo.toml b/core/lib/eth_client/Cargo.toml index 2aee710151..18f634b61f 100644 --- a/core/lib/eth_client/Cargo.toml +++ b/core/lib/eth_client/Cargo.toml @@ -17,8 +17,8 @@ zksync_contracts = { path = "../contracts", version = "1.0" } vlog = { path = "../../lib/vlog", version = "1.0" } serde = "1.0.90" -ethabi = "14.0.0" -web3 = "0.16.0" +ethabi = "16.0.0" +web3 = "0.18.0" parity-crypto = {version = "0.8", features = ["publickey"] } hex = "0.4" diff --git a/core/lib/eth_client/src/clients/http_client.rs b/core/lib/eth_client/src/clients/http_client.rs index 9009595e12..9add581663 100644 --- a/core/lib/eth_client/src/clients/http_client.rs +++ b/core/lib/eth_client/src/clients/http_client.rs @@ -273,11 +273,13 @@ impl ETHDirectClient { from: transaction.from, to: transaction.to, gas: Some(transaction.gas), - gas_price: Some(transaction.gas_price), + gas_price: transaction.gas_price, value: Some(transaction.value), data: Some(transaction.input), transaction_type: None, access_list: None, + max_fee_per_gas: None, + max_priority_fee_per_gas: None, }; let encoded_revert_reason = self diff --git a/core/lib/eth_signer/Cargo.toml b/core/lib/eth_signer/Cargo.toml index 007d7426f4..c2698d4225 100644 --- a/core/lib/eth_signer/Cargo.toml +++ b/core/lib/eth_signer/Cargo.toml @@ -17,7 +17,7 @@ serde_derive = "1.0.90" serde_json = "1.0.0" hex = "0.4.2" -parity-crypto = {version = "0.8", features = ["publickey"] } +parity-crypto = {version = "0.9", features = ["publickey"] } rlp = "0.5.0" reqwest = { version = "0.11", features = ["json", "blocking"] } diff --git a/core/lib/gateway_watcher/Cargo.toml b/core/lib/gateway_watcher/Cargo.toml index e2dad80ba6..e1c8332ad5 100644 --- a/core/lib/gateway_watcher/Cargo.toml +++ b/core/lib/gateway_watcher/Cargo.toml @@ -17,7 +17,7 @@ zksync_utils = { path = "../../lib/utils", version = "1.0" } thiserror = "1.0" futures = "0.3" vlog = { path = "../../lib/vlog", version = "1.0" } -web3 = "0.16.0" +web3 = "0.18.0" tokio = { version = "1", features = ["time", "rt-multi-thread"] } tokio-stream = "0.1" metrics = "0.17" diff --git a/core/lib/state/Cargo.toml b/core/lib/state/Cargo.toml index 8422017c4f..13a2c2a970 100644 --- a/core/lib/state/Cargo.toml +++ b/core/lib/state/Cargo.toml @@ -23,7 +23,7 @@ serde_json = "1.0" [dev-dependencies] criterion = "0.3.0" -web3 = "0.16.0" +web3 = "0.18.0" [[bench]] name = "criterion" diff --git a/core/lib/storage/Cargo.toml b/core/lib/storage/Cargo.toml index 6f758a4ada..60c3001f6e 100644 --- a/core/lib/storage/Cargo.toml +++ b/core/lib/storage/Cargo.toml @@ -30,7 +30,7 @@ once_cell = "1.4" itertools = "0.9" hex = "0.4" metrics = "0.17" -parity-crypto = { version = "0.8", features = ["publickey"] } +parity-crypto = { version = "0.9", features = ["publickey"] } vlog = { path = "../../lib/vlog", version = "1.0" } diff --git a/core/lib/types/Cargo.toml b/core/lib/types/Cargo.toml index 4073c59866..5d67cb00ef 100644 --- a/core/lib/types/Cargo.toml +++ b/core/lib/types/Cargo.toml @@ -30,12 +30,12 @@ serde_json = "1.0.0" serde_with = "1.8.0" # Crypto stuff -parity-crypto = { version = "0.8", features = ["publickey"] } -ethabi = "14.0.0" +parity-crypto = { version = "0.9", features = ["publickey"] } +ethabi = "16.0.0" [dev-dependencies] criterion = "0.3.0" -web3 = "0.16.0" +web3 = "0.18.0" secp256k1 = { version = "0.20", features = ["std", "recovery"] } [[bench]] diff --git a/core/tests/testkit/Cargo.toml b/core/tests/testkit/Cargo.toml index 435d95d6f8..58bd9329fb 100644 --- a/core/tests/testkit/Cargo.toml +++ b/core/tests/testkit/Cargo.toml @@ -29,8 +29,8 @@ tokio = { version = "1", features = ["full"] } vlog = { path = "../../lib/vlog", version = "1.0" } num = { version = "0.3.1", features = ["serde"] } futures = "0.3" -ethabi = "14.0.0" -web3 = "0.16.0" +ethabi = "16.0.0" +web3 = "0.18.0" anyhow = "1.0" serde = "1.0.90" serde_json = "1.0.0" diff --git a/core/tests/testkit/src/eth_account.rs b/core/tests/testkit/src/eth_account.rs index 3adf00bf8b..d6988892fc 100644 --- a/core/tests/testkit/src/eth_account.rs +++ b/core/tests/testkit/src/eth_account.rs @@ -593,5 +593,8 @@ pub async fn get_executed_tx_fee( .await? .ok_or_else(|| format_err!("Transaction not found: 0x{:x?}", receipt.transaction_hash))?; - Ok((gas_used * tx.gas_price).to_string().parse().unwrap()) + Ok((gas_used * tx.gas_price.unwrap()) + .to_string() + .parse() + .unwrap()) } diff --git a/sdk/zksync-rs/Cargo.toml b/sdk/zksync-rs/Cargo.toml index 283a45c3cc..2fd4fa7741 100644 --- a/sdk/zksync-rs/Cargo.toml +++ b/sdk/zksync-rs/Cargo.toml @@ -13,8 +13,8 @@ zksync_crypto = { path = "../../core/lib/crypto", version = "1.0" } zksync_utils = { path = "../../core/lib/utils", version = "1.0" } sha2 = "0.8" -web3 = "0.16.0" -ethabi = "14.0.0" +web3 = "0.18.0" +ethabi = "16.0.0" tokio = { version = "1", features = ["time"] } serde = { version = "1.0", features = ["derive"] }