File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
crates/dojo/world/src/local Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,13 @@ impl DeclareArgs {
5050
5151 let account = get_account_from_env ( account, & starknet) . await ?;
5252
53+ // As of 10th of December 2025, Mainnet network is now using the blake2s class hash.
54+ // But Katana doesn't yet. So we still need to autodetect it.
5355 let use_blake2s = if let Some ( rpc_url) = starknet. rpc_url {
54- if rpc_url. to_string ( ) . contains ( "sepolia" ) || rpc_url. to_string ( ) . contains ( "testnet" ) {
56+ if rpc_url. to_string ( ) . contains ( "sepolia" )
57+ || rpc_url. to_string ( ) . contains ( "testnet" )
58+ || rpc_url. to_string ( ) . contains ( "mainnet" )
59+ {
5560 true
5661 } else {
5762 starknet. use_blake2s_casm_class_hash
Original file line number Diff line number Diff line change @@ -50,14 +50,15 @@ impl WorldLocal {
5050 "Loading world from directory."
5151 ) ;
5252
53- // Currently, we have no way to know the network chain-id from here .
54- // We try to read the rpc_url of the config to infer the chain-id .
53+ // As of 10th of December 2025, Mainnet network is now using the blake2s class hash .
54+ // But Katana doesn't yet. So we still need to autodetect it .
5555 let autodetect_blake2s_class_hash = profile_config
5656 . env
5757 . as_ref ( )
5858 . map ( |env| {
5959 env. rpc_url . as_ref ( ) . unwrap ( ) . contains ( "sepolia" )
6060 || env. rpc_url . as_ref ( ) . unwrap ( ) . contains ( "testnet" )
61+ || env. rpc_url . as_ref ( ) . unwrap ( ) . contains ( "mainnet" )
6162 } )
6263 . unwrap_or ( false ) ;
6364
You can’t perform that action at this time.
0 commit comments