diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a92d400..31dad471 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: - name: Install PocketIC server uses: dfinity/pocketic@main with: - pocket-ic-server-version: "6.0.0" + pocket-ic-server-version: "7.0.0" - uses: Swatinem/rust-cache@v2 diff --git a/Cargo.lock b/Cargo.lock index 72d44523..6c966fc6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -530,9 +530,9 @@ version = "0.1.0" dependencies = [ "candid", "evm_rpc_types", - "ic-cdk 0.16.0", + "ic-cdk", "ic-cdk-bindgen", - "ic-cdk-macros 0.16.0", + "ic-cdk-macros", "ic-certified-map", "serde", "serde_bytes", @@ -721,8 +721,8 @@ dependencies = [ "getrandom", "hex", "ic-canister-log", - "ic-cdk 0.16.0", - "ic-cdk-macros 0.16.0", + "ic-cdk", + "ic-cdk-macros", "ic-certified-map", "ic-crypto-test-utils-reproducible-rng", "ic-ethereum-types", @@ -756,7 +756,7 @@ version = "1.2.0" dependencies = [ "candid", "hex", - "ic-cdk 0.16.0", + "ic-cdk", "num-bigint", "proptest", "serde", @@ -967,6 +967,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + [[package]] name = "hashbrown" version = "0.14.5" @@ -1110,19 +1116,6 @@ dependencies = [ "serde", ] -[[package]] -name = "ic-cdk" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1da6a25b045f9da3c9459c0cb2b0700ac368ee16382975a17185a23b9c18ab" -dependencies = [ - "candid", - "ic-cdk-macros 0.13.2", - "ic0 0.21.1", - "serde", - "serde_bytes", -] - [[package]] name = "ic-cdk" version = "0.16.0" @@ -1130,8 +1123,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8ecacd682fa05a985253592963306cb9799622d7b1cce4b1edb89c6ec85be1" dependencies = [ "candid", - "ic-cdk-macros 0.16.0", - "ic0 0.23.0", + "ic-cdk-macros", + "ic0", "serde", "serde_bytes", ] @@ -1147,30 +1140,28 @@ dependencies = [ [[package]] name = "ic-cdk-macros" -version = "0.13.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a45800053d80a6df839a71aaea5797e723188c0b992618208ca3b941350c7355" +checksum = "0d4d857135deef20cc7ea8f3869a30cd9cfeb1392b3a81043790b2cd82adc3e0" dependencies = [ "candid", "proc-macro2", "quote", "serde", - "serde_tokenstream 0.1.7", - "syn 1.0.109", + "serde_tokenstream", + "syn 2.0.87", ] [[package]] -name = "ic-cdk-macros" -version = "0.16.0" +name = "ic-certification" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4d857135deef20cc7ea8f3869a30cd9cfeb1392b3a81043790b2cd82adc3e0" +checksum = "e64ee3d8b6e81b51f245716d3e0badb63c283c00f3c9fb5d5219afc30b5bf821" dependencies = [ - "candid", - "proc-macro2", - "quote", + "hex", "serde", - "serde_tokenstream 0.2.2", - "syn 2.0.87", + "serde_bytes", + "sha2", ] [[package]] @@ -1240,10 +1231,21 @@ dependencies = [ ] [[package]] -name = "ic0" -version = "0.21.1" +name = "ic-transport-types" +version = "0.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a54b5297861c651551676e8c43df805dad175cc33bc97dbd992edbbb85dcbcdf" +checksum = "875dc4704780383112e8e8b5063a1b98de114321d0c7d3e7f635dcf360a57fba" +dependencies = [ + "candid", + "hex", + "ic-certification", + "leb128", + "serde", + "serde_bytes", + "serde_repr", + "sha2", + "thiserror", +] [[package]] name = "ic0" @@ -1892,25 +1894,31 @@ dependencies = [ [[package]] name = "pocket-ic" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beff607d4dbebff8d003453ced669d2645e905de496ca93713f3d47633357e6c" +checksum = "124a2380ca6f557adf8b02517cbfd2f564113230e14cda6f6aadd3dfe156293c" dependencies = [ "base64 0.13.1", "candid", "hex", - "ic-cdk 0.13.5", + "ic-certification", + "ic-transport-types", "reqwest", "schemars", "serde", "serde_bytes", + "serde_cbor", "serde_json", "sha2", "slog", + "strum", + "strum_macros", + "thiserror", "tokio", "tracing", "tracing-appender", "tracing-subscriber", + "wslpath", ] [[package]] @@ -2518,6 +2526,16 @@ dependencies = [ "serde", ] +[[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.215" @@ -2553,14 +2571,14 @@ dependencies = [ ] [[package]] -name = "serde_tokenstream" -version = "0.1.7" +name = "serde_repr" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797ba1d80299b264f3aac68ab5d12e5825a561749db4df7cd7c8083900c5d4e9" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", - "serde", - "syn 1.0.109", + "quote", + "syn 2.0.87", ] [[package]] @@ -2921,9 +2939,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ "backtrace", "bytes", @@ -3491,6 +3509,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "wslpath" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04a2ecdf2cc4d33a6a93d71bcfbc00bb1f635cdb8029a2cc0709204a045ec7a3" + [[package]] name = "wyz" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index 2732e4ea..ac28323d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,7 @@ ic-crypto-test-utils-reproducible-rng = { git = "https://github.com/dfinity/ic", ic-test-utilities-load-wasm = { git = "https://github.com/dfinity/ic", rev = "release-2024-09-26_01-31-base" } itertools = "0.13" maplit = "1" -pocket-ic = "5.0.0" +pocket-ic = "6.0.0" proptest = { workspace = true } rand = "0.8" diff --git a/tests/tests.rs b/tests/tests.rs index 51e5783f..9d3fcff2 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -22,7 +22,7 @@ use ic_test_utilities_load_wasm::load_wasm; use maplit::hashmap; use mock::{MockOutcall, MockOutcallBuilder}; use pocket_ic::common::rest::{CanisterHttpMethod, MockCanisterHttpResponse, RawMessageId}; -use pocket_ic::{CanisterSettings, PocketIc, WasmResult}; +use pocket_ic::{management_canister::CanisterSettings, PocketIc, WasmResult}; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use serde_json::json; use std::sync::Arc; @@ -42,7 +42,7 @@ const MOCK_REQUEST_RESPONSE: &str = r#"{"id":1,"jsonrpc":"2.0","result":"0x00112 const MOCK_REQUEST_RESPONSE_BYTES: u64 = 1000; const MOCK_API_KEY: &str = "mock-api-key"; -const MOCK_TRANSACTION: &str="0xf86c098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83"; +const MOCK_TRANSACTION: &str = "0xf86c098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83"; const MOCK_TRANSACTION_HASH: &str = "0x33469b22e9f636356c4160a87eb19df52b7412e8eac32a4a55ffe88ea8350788"; @@ -614,20 +614,20 @@ fn eth_get_logs_should_succeed() { for source in RPC_SERVICES { let setup = EvmRpcSetup::new().mock_api_keys(); let response = setup - .eth_get_logs( - source.clone(), - None, - evm_rpc_types::GetLogsArgs { - addresses: vec!["0xdAC17F958D2ee523a2206206994597C13D831ec7".parse().unwrap()], - from_block: None, - to_block: None, - topics: None, - }, - ) - .mock_http(MockOutcallBuilder::new(200, r#"{"id":0,"jsonrpc":"2.0","result":[{"address":"0xdac17f958d2ee523a2206206994597c13d831ec7","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x000000000000000000000000a9d1e08c7793af67e9d92fe308d5697fb81d3e43","0x00000000000000000000000078cccfb3d517cd4ed6d045e263e134712288ace2"],"data":"0x000000000000000000000000000000000000000000000000000000003b9c6433","blockNumber":"0x11dc77e","transactionHash":"0xf3ed91a03ddf964281ac7a24351573efd535b80fc460a5c2ad2b9d23153ec678","transactionIndex":"0x65","blockHash":"0xd5c72ad752b2f0144a878594faf8bd9f570f2f72af8e7f0940d3545a6388f629","logIndex":"0xe8","removed":false}]}"#)) - .wait() - .expect_consistent() - .unwrap(); + .eth_get_logs( + source.clone(), + None, + evm_rpc_types::GetLogsArgs { + addresses: vec!["0xdAC17F958D2ee523a2206206994597C13D831ec7".parse().unwrap()], + from_block: None, + to_block: None, + topics: None, + }, + ) + .mock_http(MockOutcallBuilder::new(200, r#"{"id":0,"jsonrpc":"2.0","result":[{"address":"0xdac17f958d2ee523a2206206994597c13d831ec7","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x000000000000000000000000a9d1e08c7793af67e9d92fe308d5697fb81d3e43","0x00000000000000000000000078cccfb3d517cd4ed6d045e263e134712288ace2"],"data":"0x000000000000000000000000000000000000000000000000000000003b9c6433","blockNumber":"0x11dc77e","transactionHash":"0xf3ed91a03ddf964281ac7a24351573efd535b80fc460a5c2ad2b9d23153ec678","transactionIndex":"0x65","blockHash":"0xd5c72ad752b2f0144a878594faf8bd9f570f2f72af8e7f0940d3545a6388f629","logIndex":"0xe8","removed":false}]}"#)) + .wait() + .expect_consistent() + .unwrap(); assert_eq!( response, vec![evm_rpc_types::LogEntry { @@ -727,7 +727,7 @@ fn eth_get_block_by_number_pre_london_fork_should_succeed() { base_fee_per_gas: None, difficulty: Some(0x400000000_u64.into()), extra_data: "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa".parse().unwrap(), - gas_limit:0x1388_u32.into(), + gas_limit: 0x1388_u32.into(), gas_used: Nat256::ZERO, hash: "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3".parse().unwrap(), logs_bloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000".parse().unwrap(), @@ -775,41 +775,41 @@ fn eth_get_block_by_number_should_be_consistent_when_total_difficulty_inconsiste fn eth_get_transaction_receipt_should_succeed() { let test_cases = [ TestCase { - request: "0xdd5d4b18923d7aae953c7996d791118102e889bea37b48a651157a4890e4746f", - raw_body: r#"{"jsonrpc":"2.0","id":2,"result":{"blockHash":"0x5115c07eb1f20a9d6410db0916ed3df626cfdab161d3904f45c8c8b65c90d0be","blockNumber":"0x11a85ab","contractAddress":null,"cumulativeGasUsed":"0xf02aed","effectiveGasPrice":"0x63c00ee76","from":"0x0aa8ebb6ad5a8e499e550ae2c461197624c6e667","gasUsed":"0x7d89","logs":[],"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","status":"0x1","to":"0x356cfd6e6d0000400000003900b415f80669009e","transactionHash":"0xdd5d4b18923d7aae953c7996d791118102e889bea37b48a651157a4890e4746f","transactionIndex":"0xd9","type":"0x2"}}"#, - expected: evm_rpc_types::TransactionReceipt { - status: Some(0x1_u8.into()), - transaction_hash: "0xdd5d4b18923d7aae953c7996d791118102e889bea37b48a651157a4890e4746f".parse().unwrap(), - contract_address: None, - block_number: 0x11a85ab_u64.into(), - block_hash: "0x5115c07eb1f20a9d6410db0916ed3df626cfdab161d3904f45c8c8b65c90d0be".parse().unwrap(), - effective_gas_price: 0x63c00ee76_u64.into(), - gas_used: 0x7d89_u32.into(), - from: "0x0aa8ebb6ad5a8e499e550ae2c461197624c6e667".parse().unwrap(), - logs: vec![], - logs_bloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000".parse().unwrap(), - to: Some("0x356cfd6e6d0000400000003900b415f80669009e".parse().unwrap()), - transaction_index: 0xd9_u16.into(), - tx_type: "0x2".parse().unwrap(), + request: "0xdd5d4b18923d7aae953c7996d791118102e889bea37b48a651157a4890e4746f", + raw_body: r#"{"jsonrpc":"2.0","id":2,"result":{"blockHash":"0x5115c07eb1f20a9d6410db0916ed3df626cfdab161d3904f45c8c8b65c90d0be","blockNumber":"0x11a85ab","contractAddress":null,"cumulativeGasUsed":"0xf02aed","effectiveGasPrice":"0x63c00ee76","from":"0x0aa8ebb6ad5a8e499e550ae2c461197624c6e667","gasUsed":"0x7d89","logs":[],"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","status":"0x1","to":"0x356cfd6e6d0000400000003900b415f80669009e","transactionHash":"0xdd5d4b18923d7aae953c7996d791118102e889bea37b48a651157a4890e4746f","transactionIndex":"0xd9","type":"0x2"}}"#, + expected: evm_rpc_types::TransactionReceipt { + status: Some(0x1_u8.into()), + transaction_hash: "0xdd5d4b18923d7aae953c7996d791118102e889bea37b48a651157a4890e4746f".parse().unwrap(), + contract_address: None, + block_number: 0x11a85ab_u64.into(), + block_hash: "0x5115c07eb1f20a9d6410db0916ed3df626cfdab161d3904f45c8c8b65c90d0be".parse().unwrap(), + effective_gas_price: 0x63c00ee76_u64.into(), + gas_used: 0x7d89_u32.into(), + from: "0x0aa8ebb6ad5a8e499e550ae2c461197624c6e667".parse().unwrap(), + logs: vec![], + logs_bloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000".parse().unwrap(), + to: Some("0x356cfd6e6d0000400000003900b415f80669009e".parse().unwrap()), + transaction_index: 0xd9_u16.into(), + tx_type: "0x2".parse().unwrap(), }, }, TestCase { //first transaction after genesis - request: "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060", - raw_body: r#"{"jsonrpc":"2.0","id":1,"result":{"transactionHash":"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060","blockHash":"0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd","blockNumber":"0xb443","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gasUsed":"0x5208","root":"0x96a8e009d2b88b1483e6941e6812e32263b05683fac202abc622a3e31aed1957","contractAddress":null,"cumulativeGasUsed":"0x5208","transactionIndex":"0x0","from":"0xa1e4380a3b1f749673e270229993ee55f35663b4","to":"0x5df9b87991262f6ba471f09758cde1c0fc1de734","type":"0x0","effectiveGasPrice":"0x2d79883d2000","logs":[]}}"#, - expected: evm_rpc_types::TransactionReceipt { - status: None, - transaction_hash: "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060".parse().unwrap(), - contract_address: None, - block_number: 0xb443_u64.into(), - block_hash: "0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd".parse().unwrap(), - effective_gas_price: 0x2d79883d2000_u64.into(), - gas_used: 0x5208_u32.into(), - from: "0xa1e4380a3b1f749673e270229993ee55f35663b4".parse().unwrap(), - logs: vec![], - logs_bloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000".parse().unwrap(), - to: Some("0x5df9b87991262f6ba471f09758cde1c0fc1de734".parse().unwrap()), - transaction_index: 0x0_u16.into(), - tx_type: "0x0".parse().unwrap(), + request: "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060", + raw_body: r#"{"jsonrpc":"2.0","id":1,"result":{"transactionHash":"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060","blockHash":"0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd","blockNumber":"0xb443","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gasUsed":"0x5208","root":"0x96a8e009d2b88b1483e6941e6812e32263b05683fac202abc622a3e31aed1957","contractAddress":null,"cumulativeGasUsed":"0x5208","transactionIndex":"0x0","from":"0xa1e4380a3b1f749673e270229993ee55f35663b4","to":"0x5df9b87991262f6ba471f09758cde1c0fc1de734","type":"0x0","effectiveGasPrice":"0x2d79883d2000","logs":[]}}"#, + expected: evm_rpc_types::TransactionReceipt { + status: None, + transaction_hash: "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060".parse().unwrap(), + contract_address: None, + block_number: 0xb443_u64.into(), + block_hash: "0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd".parse().unwrap(), + effective_gas_price: 0x2d79883d2000_u64.into(), + gas_used: 0x5208_u32.into(), + from: "0xa1e4380a3b1f749673e270229993ee55f35663b4".parse().unwrap(), + logs: vec![], + logs_bloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000".parse().unwrap(), + to: Some("0x5df9b87991262f6ba471f09758cde1c0fc1de734".parse().unwrap()), + transaction_index: 0x0_u16.into(), + tx_type: "0x0".parse().unwrap(), }, }, TestCase { //contract creation @@ -879,22 +879,22 @@ fn eth_fee_history_should_succeed() { for source in RPC_SERVICES { let setup = EvmRpcSetup::new().mock_api_keys(); let response = setup - .eth_fee_history( - source.clone(), - None, - evm_rpc_types::FeeHistoryArgs { - block_count: 3_u8.into(), - newest_block: evm_rpc_types::BlockTag::Latest, - reward_percentiles: None, - }, - ) - .mock_http(MockOutcallBuilder::new( - 200, - r#"{"id":0,"jsonrpc":"2.0","result":{"oldestBlock":"0x11e57f5","baseFeePerGas":["0x9cf6c61b9","0x97d853982","0x9ba55a0b0","0x9543bf98d"],"reward":[["0x0123"]]}}"#, - )) - .wait() - .expect_consistent() - .unwrap(); + .eth_fee_history( + source.clone(), + None, + evm_rpc_types::FeeHistoryArgs { + block_count: 3_u8.into(), + newest_block: evm_rpc_types::BlockTag::Latest, + reward_percentiles: None, + }, + ) + .mock_http(MockOutcallBuilder::new( + 200, + r#"{"id":0,"jsonrpc":"2.0","result":{"oldestBlock":"0x11e57f5","baseFeePerGas":["0x9cf6c61b9","0x97d853982","0x9ba55a0b0","0x9543bf98d"],"reward":[["0x0123"]]}}"#, + )) + .wait() + .expect_consistent() + .unwrap(); assert_eq!( response, Some(evm_rpc_types::FeeHistory {