@@ -521,16 +521,14 @@ mod tests {
521521 use super :: * ;
522522 use crate :: {
523523 models:: {
524- EVMMonitorMatch , EVMTransaction , EVMTransactionReceipt , MatchConditions , Monitor ,
525- MonitorMatch , ScriptLanguage , StellarBlock , StellarMonitorMatch , StellarTransaction ,
526- StellarTransactionInfo , TriggerConditions ,
524+ EVMMonitorMatch , EVMReceiptLog , EVMTransaction , EVMTransactionReceipt , MatchConditions ,
525+ Monitor , MonitorMatch , ScriptLanguage , StellarBlock , StellarMonitorMatch ,
526+ StellarTransaction , StellarTransactionInfo , TriggerConditions ,
527527 } ,
528- utils:: tests:: builders:: evm:: monitor:: MonitorBuilder ,
528+ utils:: tests:: { builders:: evm:: monitor:: MonitorBuilder , evm :: receipt :: ReceiptBuilder } ,
529529 } ;
530530 use alloy:: {
531- consensus:: {
532- transaction:: Recovered , Receipt , ReceiptEnvelope , ReceiptWithBloom , Signed , TxEnvelope ,
533- } ,
531+ consensus:: { transaction:: Recovered , Signed , TxEnvelope } ,
534532 primitives:: { Address , Bytes , TxKind , B256 , U256 } ,
535533 } ;
536534 use std:: io:: Write ;
@@ -561,23 +559,11 @@ mod tests {
561559 }
562560
563561 fn create_test_evm_transaction_receipt ( ) -> EVMTransactionReceipt {
564- EVMTransactionReceipt :: from ( alloy:: rpc:: types:: TransactionReceipt {
565- inner : ReceiptEnvelope :: Legacy ( ReceiptWithBloom {
566- receipt : Receipt :: default ( ) ,
567- logs_bloom : Default :: default ( ) ,
568- } ) ,
569- transaction_hash : B256 :: ZERO ,
570- transaction_index : Some ( 0 ) ,
571- block_hash : Some ( B256 :: ZERO ) ,
572- block_number : Some ( 0 ) ,
573- gas_used : 0 ,
574- effective_gas_price : 0 ,
575- blob_gas_used : None ,
576- blob_gas_price : None ,
577- from : Address :: ZERO ,
578- to : Some ( Address :: ZERO ) ,
579- contract_address : None ,
580- } )
562+ ReceiptBuilder :: new ( ) . build ( )
563+ }
564+
565+ fn create_test_evm_logs ( ) -> Vec < EVMReceiptLog > {
566+ ReceiptBuilder :: new ( ) . build ( ) . logs . clone ( )
581567 }
582568
583569 fn create_test_evm_transaction ( ) -> EVMTransaction {
@@ -628,7 +614,8 @@ mod tests {
628614 BlockChainType :: EVM => MonitorMatch :: EVM ( Box :: new ( EVMMonitorMatch {
629615 monitor : create_test_monitor ( "test" , vec ! [ ] , false , script_path) ,
630616 transaction : create_test_evm_transaction ( ) ,
631- receipt : create_test_evm_transaction_receipt ( ) ,
617+ receipt : Some ( create_test_evm_transaction_receipt ( ) ) ,
618+ logs : Some ( create_test_evm_logs ( ) ) ,
632619 network_slug : "ethereum_mainnet" . to_string ( ) ,
633620 matched_on : MatchConditions {
634621 functions : vec ! [ ] ,
@@ -662,7 +649,8 @@ mod tests {
662649 BlockChainType :: EVM => MonitorMatch :: EVM ( Box :: new ( EVMMonitorMatch {
663650 monitor,
664651 transaction : create_test_evm_transaction ( ) ,
665- receipt : create_test_evm_transaction_receipt ( ) ,
652+ receipt : Some ( create_test_evm_transaction_receipt ( ) ) ,
653+ logs : Some ( create_test_evm_logs ( ) ) ,
666654 network_slug : "ethereum_mainnet" . to_string ( ) ,
667655 matched_on : MatchConditions {
668656 functions : vec ! [ ] ,
0 commit comments