Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
scarb 2.9.4
starknet-devnet 0.4.3
starknet-devnet 0.5.0-rc.4
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Max steps in tests (configured via the `--max-n-steps` argument) now defaults to `usize::MAX` when not specified (previously 10 million).

### Cast

#### Changed

- The supported RPC version is now 0.9.0

## [0.47.0] - 2025-07-28

### Forge
Expand All @@ -39,6 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
#### Changed

- Braavos accounts with all class hashes are now supported
- The supported RPC version is now 0.9.0

#### Deprecated

Expand Down
46 changes: 27 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ rayon = "1.10"
regex = "1.11.1"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
starknet = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "a70f4ce" }
starknet = "0.17.0-rc.2"
starknet-crypto = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "a70f4ce" }
tempfile = "3.20.0"
thiserror = "2.0.12"
Expand Down
8 changes: 4 additions & 4 deletions crates/cheatnet/src/forking/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use flate2::read::GzDecoder;
use num_bigint::BigUint;
use runtime::starknet::context::SerializableGasPrices;
use starknet::core::types::{
ContractClass as ContractClassStarknet, MaybePendingBlockWithTxHashes, StarknetError,
ContractClass as ContractClassStarknet, MaybePreConfirmedBlockWithTxHashes, StarknetError,
};
use starknet::core::utils::parse_cairo_short_string;
use starknet::providers::ProviderError;
Expand Down Expand Up @@ -81,7 +81,7 @@ impl BlockInfoReader for ForkStateReader {
}

match self.client.get_block_with_tx_hashes() {
Ok(MaybePendingBlockWithTxHashes::Block(block)) => {
Ok(MaybePreConfirmedBlockWithTxHashes::Block(block)) => {
let block_info = BlockInfo {
block_number: BlockNumber(block.block_number),
sequencer_address: block.sequencer_address.into_(),
Expand All @@ -96,8 +96,8 @@ impl BlockInfoReader for ForkStateReader {

Ok(block_info)
}
Ok(MaybePendingBlockWithTxHashes::PendingBlock(_)) => {
unreachable!("Pending block is not be allowed at the configuration level")
Ok(MaybePreConfirmedBlockWithTxHashes::PreConfirmedBlock(_)) => {
unreachable!("Preconfirmed block is not be allowed at the configuration level")
}
Err(ProviderError::Other(boxed)) => other_provider_error(boxed),
Err(err) => Err(StateReadError(format!(
Expand Down
6 changes: 4 additions & 2 deletions crates/cheatnet/src/sync_client.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use starknet::core::types::{BlockId, ContractClass, MaybePendingBlockWithTxHashes};
use starknet::core::types::{BlockId, ContractClass, MaybePreConfirmedBlockWithTxHashes};
use starknet::providers::jsonrpc::HttpTransport;
use starknet::providers::{JsonRpcClient, Provider, ProviderError};
use starknet_api::block::BlockNumber;
Expand Down Expand Up @@ -27,7 +27,9 @@ impl SyncClient {
self.sync(self.client.chain_id())
}

pub fn get_block_with_tx_hashes(&self) -> Result<MaybePendingBlockWithTxHashes, ProviderError> {
pub fn get_block_with_tx_hashes(
&self,
) -> Result<MaybePreConfirmedBlockWithTxHashes, ProviderError> {
self.sync(self.client.get_block_with_tx_hashes(self.block_id))
}

Expand Down
2 changes: 1 addition & 1 deletion crates/data-transformer/tests/integration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static CLASS: OnceCell<ContractClass> = OnceCell::const_new();

async fn init_class(class_hash: Felt) -> ContractClass {
let client = JsonRpcClient::new(HttpTransport::new(
Url::parse("http://188.34.188.184:7070/rpc/v0_8").unwrap(),
Url::parse("http://188.34.188.184:7070/rpc/v0_9").unwrap(),
));

client
Expand Down
4 changes: 2 additions & 2 deletions crates/forge/src/block_number_map.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::{Result, anyhow};
use conversions::{IntoConv, string::IntoHexStr};
use starknet::{
core::types::{BlockId, MaybePendingBlockWithTxHashes},
core::types::{BlockId, MaybePreConfirmedBlockWithTxHashes},
providers::{JsonRpcClient, Provider, jsonrpc::HttpTransport},
};
use starknet_api::block::BlockNumber;
Expand Down Expand Up @@ -73,7 +73,7 @@ async fn fetch_block_number_for_hash(url: Url, block_hash: Felt) -> Result<Block
.spawn(async move { client.get_block_with_tx_hashes(hash).await })
.await?
{
Ok(MaybePendingBlockWithTxHashes::Block(block)) => Ok(BlockNumber(block.block_number)),
Ok(MaybePreConfirmedBlockWithTxHashes::Block(block)) => Ok(BlockNumber(block.block_number)),
_ => Err(anyhow!(
"Could not get the block number for block with hash 0x{}",
block_hash.into_hex_string()
Expand Down
2 changes: 1 addition & 1 deletion crates/forge/src/scarb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ mod tests {
[[tool.snforge.fork]]
name = "SAME_NAME"
url = "http://some.rpc.url"
block_id.tag = "Pending"
block_id.tag = "Preconfirmed"
"#
);
temp.child("Scarb.toml").write_str(content).unwrap();
Expand Down
4 changes: 2 additions & 2 deletions crates/shared/src/consts.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub const EXPECTED_RPC_VERSION: &str = "0.8.1";
pub const RPC_URL_VERSION: &str = "v0_8";
pub const EXPECTED_RPC_VERSION: &str = "0.9.0-rc.1";
pub const RPC_URL_VERSION: &str = "v0_9";
pub const SNFORGE_TEST_FILTER: &str = "SNFORGE_TEST_FILTER";
pub const FREE_RPC_PROVIDER_URL: &str = "https://starknet-sepolia.public.blastapi.io/rpc/v0_8";
2 changes: 1 addition & 1 deletion crates/shared/src/test_utils/node_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use url::Url;
/// - `node_url()` -> <https://example.com/>
#[must_use]
pub fn node_rpc_url() -> Url {
Url::parse("http://188.34.188.184:7070/rpc/v0_8").expect("Failed to parse the sepolia RPC URL")
Url::parse("http://188.34.188.184:7070/rpc/v0_9").expect("Failed to parse the sepolia RPC URL")
}

/// returning URL with no slug (`rpc/v0_7` suffix).
Expand Down
3 changes: 1 addition & 2 deletions crates/sncast/src/helpers/fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ fn parse_non_zero_felt(s: &str) -> Result<NonZeroFelt, String> {
#[cfg(test)]
mod tests {
use super::FeeSettings;
use starknet::core::types::{FeeEstimate, PriceUnit};
use starknet::core::types::FeeEstimate;
use std::convert::TryFrom;

#[tokio::test]
Expand All @@ -155,7 +155,6 @@ mod tests {
l2_gas_price: 4,
l1_data_gas_consumed: 5,
l1_data_gas_price: 6,
unit: PriceUnit::Fri,
overall_fee: 44,
};
let settings = FeeSettings::try_from(mock_fee_estimate).unwrap();
Expand Down
Loading
Loading