diff --git a/Cargo.lock b/Cargo.lock index 58c90cd..ea09dbb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3473,7 +3473,7 @@ dependencies = [ [[package]] name = "starknet" version = "0.10.0" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=35a7843d58ba3c93e1a7691bc7022080b28c9ade#35a7843d58ba3c93e1a7691bc7022080b28c9ade" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=82bac8b196a59c340519249b92db410d0084d74d#82bac8b196a59c340519249b92db410d0084d74d" dependencies = [ "starknet-accounts", "starknet-contract", @@ -3488,7 +3488,7 @@ dependencies = [ [[package]] name = "starknet-accounts" version = "0.9.0" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=35a7843d58ba3c93e1a7691bc7022080b28c9ade#35a7843d58ba3c93e1a7691bc7022080b28c9ade" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=82bac8b196a59c340519249b92db410d0084d74d#82bac8b196a59c340519249b92db410d0084d74d" dependencies = [ "async-trait", "auto_impl", @@ -3502,7 +3502,7 @@ dependencies = [ [[package]] name = "starknet-contract" version = "0.9.0" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=35a7843d58ba3c93e1a7691bc7022080b28c9ade#35a7843d58ba3c93e1a7691bc7022080b28c9ade" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=82bac8b196a59c340519249b92db410d0084d74d#82bac8b196a59c340519249b92db410d0084d74d" dependencies = [ "serde", "serde_json", @@ -3516,7 +3516,7 @@ dependencies = [ [[package]] name = "starknet-core" version = "0.10.0" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=35a7843d58ba3c93e1a7691bc7022080b28c9ade#35a7843d58ba3c93e1a7691bc7022080b28c9ade" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=82bac8b196a59c340519249b92db410d0084d74d#82bac8b196a59c340519249b92db410d0084d74d" dependencies = [ "base64 0.21.2", "flate2", @@ -3553,7 +3553,7 @@ dependencies = [ [[package]] name = "starknet-crypto" version = "0.6.2" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=35a7843d58ba3c93e1a7691bc7022080b28c9ade#35a7843d58ba3c93e1a7691bc7022080b28c9ade" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=82bac8b196a59c340519249b92db410d0084d74d#82bac8b196a59c340519249b92db410d0084d74d" dependencies = [ "crypto-bigint", "hex", @@ -3583,7 +3583,7 @@ dependencies = [ [[package]] name = "starknet-crypto-codegen" version = "0.3.3" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=35a7843d58ba3c93e1a7691bc7022080b28c9ade#35a7843d58ba3c93e1a7691bc7022080b28c9ade" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=82bac8b196a59c340519249b92db410d0084d74d#82bac8b196a59c340519249b92db410d0084d74d" dependencies = [ "starknet-curve 0.4.2", "starknet-ff 0.3.7", @@ -3602,7 +3602,7 @@ dependencies = [ [[package]] name = "starknet-curve" version = "0.4.2" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=35a7843d58ba3c93e1a7691bc7022080b28c9ade#35a7843d58ba3c93e1a7691bc7022080b28c9ade" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=82bac8b196a59c340519249b92db410d0084d74d#82bac8b196a59c340519249b92db410d0084d74d" dependencies = [ "starknet-ff 0.3.7", ] @@ -3622,7 +3622,7 @@ dependencies = [ [[package]] name = "starknet-ff" version = "0.3.7" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=35a7843d58ba3c93e1a7691bc7022080b28c9ade#35a7843d58ba3c93e1a7691bc7022080b28c9ade" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=82bac8b196a59c340519249b92db410d0084d74d#82bac8b196a59c340519249b92db410d0084d74d" dependencies = [ "ark-ff", "bigdecimal 0.3.1", @@ -3636,7 +3636,7 @@ dependencies = [ [[package]] name = "starknet-macros" version = "0.1.7" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=35a7843d58ba3c93e1a7691bc7022080b28c9ade#35a7843d58ba3c93e1a7691bc7022080b28c9ade" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=82bac8b196a59c340519249b92db410d0084d74d#82bac8b196a59c340519249b92db410d0084d74d" dependencies = [ "starknet-core", "syn 2.0.41", @@ -3645,7 +3645,7 @@ dependencies = [ [[package]] name = "starknet-providers" version = "0.10.0" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=35a7843d58ba3c93e1a7691bc7022080b28c9ade#35a7843d58ba3c93e1a7691bc7022080b28c9ade" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=82bac8b196a59c340519249b92db410d0084d74d#82bac8b196a59c340519249b92db410d0084d74d" dependencies = [ "async-trait", "auto_impl", @@ -3664,7 +3664,7 @@ dependencies = [ [[package]] name = "starknet-signers" version = "0.8.0" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=35a7843d58ba3c93e1a7691bc7022080b28c9ade#35a7843d58ba3c93e1a7691bc7022080b28c9ade" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=82bac8b196a59c340519249b92db410d0084d74d#82bac8b196a59c340519249b92db410d0084d74d" dependencies = [ "async-trait", "auto_impl", diff --git a/Cargo.toml b/Cargo.toml index d9c95b2..5da987d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,8 +36,8 @@ serde = { version = "1.0.164", features = ["derive"] } serde_json = { version = "1.0.99", features = ["preserve_order"] } serde_with = "2.3.3" shellexpand = "3.1.0" -starknet = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "35a7843d58ba3c93e1a7691bc7022080b28c9ade" } -starknet-crypto = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "35a7843d58ba3c93e1a7691bc7022080b28c9ade" } +starknet = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "82bac8b196a59c340519249b92db410d0084d74d" } +starknet-crypto = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "82bac8b196a59c340519249b92db410d0084d74d" } tempfile = "3.8.0" thiserror = "1.0.40" tokio = { version = "1.28.2", default-features = false, features = ["macros", "rt-multi-thread"] } diff --git a/src/address_book.rs b/src/address_book.rs index e9816fc..6a24c5d 100644 --- a/src/address_book.rs +++ b/src/address_book.rs @@ -12,7 +12,7 @@ use crate::chain_id::ChainIdSource; const CHAIN_ID_KATANA: FieldElement = felt!("0x4b4154414e41"); -pub const HARDCODED_ADDRESS_BOOK: [AddressBookEntry; 10] = [ +pub const HARDCODED_ADDRESS_BOOK: [AddressBookEntry; 8] = [ AddressBookEntry { chain_id: chain_id::MAINNET, name: "eth", @@ -23,16 +23,6 @@ pub const HARDCODED_ADDRESS_BOOK: [AddressBookEntry; 10] = [ name: "strk", address: felt!("0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), }, - AddressBookEntry { - chain_id: chain_id::TESTNET, - name: "eth", - address: felt!("0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), - }, - AddressBookEntry { - chain_id: chain_id::TESTNET, - name: "strk", - address: felt!("0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), - }, AddressBookEntry { chain_id: short_string!("SN_SEPOLIA"), name: "eth", diff --git a/src/main.rs b/src/main.rs index 49bdb04..7392cf4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,7 +22,7 @@ mod subcommands; mod utils; mod verbosity; -pub(crate) const JSON_RPC_VERSION: &str = "0.6.0"; +pub(crate) const JSON_RPC_VERSION: &str = "0.7.1"; const VERSION_STRING: &str = concat!(env!("CARGO_PKG_VERSION"), " (", env!("VERGEN_GIT_SHA"), ")"); const VERSION_STRING_VERBOSE: &str = concat!( @@ -30,7 +30,7 @@ const VERSION_STRING_VERBOSE: &str = concat!( " (", env!("VERGEN_GIT_SHA"), ")\n", - "JSON-RPC version: 0.6.0" + "JSON-RPC version: 0.7.1" ); #[derive(Debug, Parser)] diff --git a/src/provider.rs b/src/provider.rs index d5e1e8b..974acb0 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -203,18 +203,18 @@ impl ProviderArgs { let url = match vendor { FreeProviderVendor::Blast => { if matched_network.chain_id == CHAIN_ID_MAINNET { - Some("https://starknet-mainnet.public.blastapi.io/rpc/v0_6") + Some("https://starknet-mainnet.public.blastapi.io/rpc/v0_7") } else if matched_network.chain_id == CHAIN_ID_SEPOLIA { - Some("https://starknet-sepolia.public.blastapi.io/rpc/v0_6") + Some("https://starknet-sepolia.public.blastapi.io/rpc/v0_7") } else { None } } FreeProviderVendor::Nethermind => { if matched_network.chain_id == CHAIN_ID_MAINNET { - Some("https://free-rpc.nethermind.io/mainnet-juno/rpc/v0_6") + Some("https://free-rpc.nethermind.io/mainnet-juno/rpc/v0_7") } else if matched_network.chain_id == CHAIN_ID_SEPOLIA { - Some("https://free-rpc.nethermind.io/sepolia-juno/rpc/v0_6") + Some("https://free-rpc.nethermind.io/sepolia-juno/rpc/v0_7") } else { None } @@ -304,6 +304,16 @@ impl Provider for ExtendedProvider { ::get_block_with_txs(&self.provider, block_id).await } + async fn get_block_with_receipts( + &self, + block_id: B, + ) -> Result + where + B: AsRef + Send + Sync, + { + ::get_block_with_receipts(&self.provider, block_id).await + } + async fn get_state_update( &self, block_id: B, @@ -368,7 +378,7 @@ impl Provider for ExtendedProvider { async fn get_transaction_receipt( &self, transaction_hash: H, - ) -> Result + ) -> Result where H: AsRef + Send + Sync, { diff --git a/src/utils.rs b/src/utils.rs index 5f8154e..2bcde80 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -34,7 +34,7 @@ where { loop { match provider.get_transaction_receipt(transaction_hash).await { - Ok(receipt) => match receipt.execution_result() { + Ok(receipt) => match receipt.receipt.execution_result() { ExecutionResult::Succeeded => { eprintln!( "Transaction {} confirmed",