@@ -6,7 +6,6 @@ use graph::data::subgraph::API_VERSION_0_0_6;
66use graph:: data:: subgraph:: API_VERSION_0_0_7 ;
77use graph:: data_source:: common:: DeclaredCall ;
88use graph:: prelude:: web3:: types:: Address ;
9- use graph:: prelude:: web3:: types:: Block ;
109use graph:: prelude:: web3:: types:: Log ;
1110use graph:: prelude:: web3:: types:: Transaction ;
1211use graph:: prelude:: web3:: types:: TransactionReceipt ;
@@ -17,6 +16,7 @@ use graph::prelude::web3::types::U256;
1716use graph:: prelude:: web3:: types:: U64 ;
1817use graph:: prelude:: BlockNumber ;
1918use graph:: prelude:: BlockPtr ;
19+ use graph:: prelude:: LightEthereumBlock ;
2020use graph:: prelude:: { CheapClone , EthereumCall } ;
2121use graph:: runtime:: asc_new;
2222use graph:: runtime:: gas:: GasCounter ;
@@ -37,9 +37,6 @@ use crate::runtime::abi::AscEthereumTransaction_0_0_1;
3737use crate :: runtime:: abi:: AscEthereumTransaction_0_0_2 ;
3838use crate :: runtime:: abi:: AscEthereumTransaction_0_0_6 ;
3939
40- // ETHDEP: This should be defined in only one place.
41- type LightEthereumBlock = Block < Transaction > ;
42-
4340static U256_DEFAULT : U256 = U256 :: zero ( ) ;
4441
4542pub enum MappingTrigger {
@@ -412,11 +409,11 @@ impl TriggerData for EthereumTrigger {
412409/// Ethereum block data.
413410#[ derive( Clone , Debug ) ]
414411pub struct EthereumBlockData < ' a > {
415- block : & ' a Block < Transaction > ,
412+ block : & ' a LightEthereumBlock ,
416413}
417414
418- impl < ' a > From < & ' a Block < Transaction > > for EthereumBlockData < ' a > {
419- fn from ( block : & ' a Block < Transaction > ) -> EthereumBlockData < ' a > {
415+ impl < ' a > From < & ' a LightEthereumBlock > for EthereumBlockData < ' a > {
416+ fn from ( block : & ' a LightEthereumBlock ) -> EthereumBlockData < ' a > {
420417 EthereumBlockData { block }
421418 }
422419}
@@ -550,7 +547,7 @@ pub struct EthereumEventData<'a> {
550547
551548impl < ' a > EthereumEventData < ' a > {
552549 pub fn new (
553- block : & ' a Block < Transaction > ,
550+ block : & ' a LightEthereumBlock ,
554551 tx : & ' a Transaction ,
555552 log : & ' a Log ,
556553 params : & ' a [ abi:: DynSolParam ] ,
@@ -598,7 +595,7 @@ pub struct EthereumCallData<'a> {
598595
599596impl < ' a > EthereumCallData < ' a > {
600597 fn new (
601- block : & ' a Block < Transaction > ,
598+ block : & ' a LightEthereumBlock ,
602599 transaction : & ' a Transaction ,
603600 call : & ' a EthereumCall ,
604601 inputs : & ' a [ abi:: DynSolParam ] ,
0 commit comments