44//! [`TempoStateReader`](crate::l1_state::TempoStateReader) precompile at
55//! [`TEMPO_STATE_READER_ADDRESS`](crate::abi::TEMPO_STATE_READER_ADDRESS).
66
7- use std:: sync:: Arc ;
8-
7+ use crate :: {
8+ abi:: { TEMPO_STATE_READER_ADDRESS , ZONE_TX_CONTEXT_ADDRESS } ,
9+ executor:: ZoneBlockExecutor ,
10+ l1_state:: { L1StateProvider , PolicyProvider , SharedL1StateCache , TempoStateReader } ,
11+ precompiles:: {
12+ AES_GCM_DECRYPT_ADDRESS , AesGcmDecrypt , CHAUM_PEDERSEN_VERIFY_ADDRESS , ChaumPedersenVerify ,
13+ ZONE_TIP20_FACTORY_ADDRESS , ZONE_TIP403_PROXY_ADDRESS , ZoneTip20Token ,
14+ ZoneTip403ProxyRegistry , ZoneTokenFactory ,
15+ } ,
16+ tx_context:: ZoneTxContext ,
17+ } ;
918use alloy_evm:: {
1019 Database , Evm , EvmEnv , EvmFactory ,
1120 block:: { BlockExecutorFactory , BlockExecutorFor } ,
@@ -19,6 +28,7 @@ use reth_evm::{
1928 execute:: { BlockAssembler , BlockAssemblerInput } ,
2029} ;
2130use reth_primitives_traits:: { SealedBlock , SealedHeader } ;
31+ use std:: sync:: Arc ;
2232use tempo_alloy:: TempoNetwork ;
2333use tempo_chainspec:: TempoChainSpec ;
2434use tempo_evm:: {
@@ -27,20 +37,14 @@ use tempo_evm::{
2737 evm:: { TempoEvm , TempoEvmFactory } ,
2838} ;
2939use tempo_payload_types:: TempoExecutionData ;
30- use tempo_primitives:: { Block , TempoHeader , TempoPrimitives , TempoReceipt , TempoTxEnvelope } ;
31-
32- use crate :: executor:: ZoneBlockExecutor ;
33-
34- use crate :: {
35- abi:: { TEMPO_STATE_READER_ADDRESS , ZONE_TX_CONTEXT_ADDRESS } ,
36- l1_state:: { L1StateProvider , PolicyProvider , SharedL1StateCache , TempoStateReader } ,
37- precompiles:: {
38- AES_GCM_DECRYPT_ADDRESS , AesGcmDecrypt , CHAUM_PEDERSEN_VERIFY_ADDRESS , ChaumPedersenVerify ,
39- ZONE_TIP20_FACTORY_ADDRESS , ZONE_TIP403_PROXY_ADDRESS , ZoneTip20Token ,
40- ZoneTip403ProxyRegistry , ZoneTokenFactory ,
41- } ,
42- tx_context:: ZoneTxContext ,
40+ use tempo_precompiles:: {
41+ ACCOUNT_KEYCHAIN_ADDRESS , NONCE_PRECOMPILE_ADDRESS , STABLECOIN_DEX_ADDRESS ,
42+ TIP_FEE_MANAGER_ADDRESS , VALIDATOR_CONFIG_ADDRESS , VALIDATOR_CONFIG_V2_ADDRESS ,
43+ account_keychain:: AccountKeychain , nonce:: NonceManager , tip_fee_manager:: TipFeeManager ,
44+ tip20:: is_tip20_prefix, validator_config:: ValidatorConfig ,
45+ validator_config_v2:: ValidatorConfigV2 ,
4346} ;
47+ use tempo_primitives:: { Block , TempoHeader , TempoPrimitives , TempoReceipt , TempoTxEnvelope } ;
4448
4549type TempoCtx < DB > = <TempoEvmFactory as EvmFactory >:: Context < DB > ;
4650
@@ -109,15 +113,6 @@ impl ZoneEvmFactory {
109113 // static map via `apply_precompile` and take priority over this.
110114 let zone_cfg = cfg. clone ( ) ;
111115 precompiles. set_precompile_lookup ( move |address : & alloy_primitives:: Address | {
112- use tempo_precompiles:: {
113- ACCOUNT_KEYCHAIN_ADDRESS , NONCE_PRECOMPILE_ADDRESS , STABLECOIN_DEX_ADDRESS ,
114- TIP_FEE_MANAGER_ADDRESS , VALIDATOR_CONFIG_ADDRESS , VALIDATOR_CONFIG_V2_ADDRESS ,
115- account_keychain:: AccountKeychain , nonce:: NonceManager ,
116- stablecoin_dex:: StablecoinDEX , tip_fee_manager:: TipFeeManager ,
117- tip20:: is_tip20_prefix, validator_config:: ValidatorConfig ,
118- validator_config_v2:: ValidatorConfigV2 ,
119- } ;
120-
121116 if is_tip20_prefix ( * address) {
122117 Some ( ZoneTip20Token :: create (
123118 * address,
@@ -128,7 +123,9 @@ impl ZoneEvmFactory {
128123 } else if * address == TIP_FEE_MANAGER_ADDRESS {
129124 Some ( TipFeeManager :: create_precompile ( & zone_cfg) )
130125 } else if * address == STABLECOIN_DEX_ADDRESS {
131- Some ( StablecoinDEX :: create_precompile ( & zone_cfg) )
126+ // StablecoinDEX is disabled on zones, calls to this address
127+ // fall through to `None` and revert as an empty account.
128+ None
132129 } else if * address == NONCE_PRECOMPILE_ADDRESS {
133130 Some ( NonceManager :: create_precompile ( & zone_cfg) )
134131 } else if * address == VALIDATOR_CONFIG_ADDRESS {
0 commit comments