@@ -14,12 +14,13 @@ use blockifier::transaction::transaction_execution::Transaction as BlockifierTra
1414use blockifier_test_utils:: calldata:: create_calldata;
1515use blockifier_test_utils:: contracts:: FeatureContract ;
1616use cairo_vm:: types:: builtin_name:: BuiltinName ;
17+ use expect_test:: { expect, Expect } ;
1718use itertools:: Itertools ;
1819use starknet_api:: abi:: abi_utils:: get_fee_token_var_address;
1920use starknet_api:: block:: { BlockHash , BlockInfo , BlockNumber , PreviousBlockNumber } ;
2021use starknet_api:: contract_class:: compiled_class_hash:: { HashVersion , HashableCompiledClass } ;
2122use starknet_api:: contract_class:: ContractClass ;
22- use starknet_api:: core:: { ChainId , ClassHash , ContractAddress , Nonce } ;
23+ use starknet_api:: core:: { ChainId , ClassHash , ContractAddress , Nonce , PatriciaKey } ;
2324use starknet_api:: executable_transaction:: {
2425 AccountTransaction ,
2526 DeclareTransaction ,
@@ -57,7 +58,6 @@ use starknet_types_core::felt::Felt;
5758
5859use crate :: initial_state:: {
5960 create_default_initial_state_data,
60- get_deploy_fee_token_tx_and_address,
6161 get_initial_deploy_account_tx,
6262 InitialState ,
6363 InitialStateData ,
@@ -77,8 +77,20 @@ use crate::utils::{
7777} ;
7878
7979/// The STRK fee token address that was deployed when initializing the default initial state.
80- pub ( crate ) static STRK_FEE_TOKEN_ADDRESS : LazyLock < ContractAddress > =
81- LazyLock :: new ( || get_deploy_fee_token_tx_and_address ( Nonce :: default ( ) ) . 1 ) ;
80+ /// The resulting address depends on the nonce of the deploying account - if extra init transactions
81+ /// are added to the initial state construction before the STRK fee token is deployed, the address
82+ /// must be updated.
83+ pub ( crate ) const EXPECTED_STRK_FEE_TOKEN_ADDRESS : Expect = expect ! [ [ r#"
84+ 0x1a465ff487205d561821685efff4903cb07d69f014b1688a560f8c6380cd025
85+ "# ] ] ;
86+ pub ( crate ) static STRK_FEE_TOKEN_ADDRESS : LazyLock < ContractAddress > = LazyLock :: new ( || {
87+ ContractAddress (
88+ PatriciaKey :: try_from ( Felt :: from_hex_unchecked (
89+ EXPECTED_STRK_FEE_TOKEN_ADDRESS . data . trim ( ) ,
90+ ) )
91+ . unwrap ( ) ,
92+ )
93+ } ) ;
8294
8395/// The address of a funded account that is able to pay fees for transactions.
8496/// This address was initialized when creating the default initial state.
0 commit comments