@@ -6,7 +6,6 @@ use graph::data::subgraph::API_VERSION_0_0_6;
6
6
use graph:: data:: subgraph:: API_VERSION_0_0_7 ;
7
7
use graph:: data_source:: common:: DeclaredCall ;
8
8
use graph:: prelude:: web3:: types:: Address ;
9
- use graph:: prelude:: web3:: types:: Block ;
10
9
use graph:: prelude:: web3:: types:: Log ;
11
10
use graph:: prelude:: web3:: types:: Transaction ;
12
11
use graph:: prelude:: web3:: types:: TransactionReceipt ;
@@ -17,6 +16,7 @@ use graph::prelude::web3::types::U256;
17
16
use graph:: prelude:: web3:: types:: U64 ;
18
17
use graph:: prelude:: BlockNumber ;
19
18
use graph:: prelude:: BlockPtr ;
19
+ use graph:: prelude:: LightEthereumBlock ;
20
20
use graph:: prelude:: { CheapClone , EthereumCall } ;
21
21
use graph:: runtime:: asc_new;
22
22
use graph:: runtime:: gas:: GasCounter ;
@@ -37,9 +37,6 @@ use crate::runtime::abi::AscEthereumTransaction_0_0_1;
37
37
use crate :: runtime:: abi:: AscEthereumTransaction_0_0_2 ;
38
38
use crate :: runtime:: abi:: AscEthereumTransaction_0_0_6 ;
39
39
40
- // ETHDEP: This should be defined in only one place.
41
- type LightEthereumBlock = Block < Transaction > ;
42
-
43
40
static U256_DEFAULT : U256 = U256 :: zero ( ) ;
44
41
45
42
pub enum MappingTrigger {
@@ -412,11 +409,11 @@ impl TriggerData for EthereumTrigger {
412
409
/// Ethereum block data.
413
410
#[ derive( Clone , Debug ) ]
414
411
pub struct EthereumBlockData < ' a > {
415
- block : & ' a Block < Transaction > ,
412
+ block : & ' a LightEthereumBlock ,
416
413
}
417
414
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 > {
420
417
EthereumBlockData { block }
421
418
}
422
419
}
@@ -550,7 +547,7 @@ pub struct EthereumEventData<'a> {
550
547
551
548
impl < ' a > EthereumEventData < ' a > {
552
549
pub fn new (
553
- block : & ' a Block < Transaction > ,
550
+ block : & ' a LightEthereumBlock ,
554
551
tx : & ' a Transaction ,
555
552
log : & ' a Log ,
556
553
params : & ' a [ abi:: DynSolParam ] ,
@@ -598,7 +595,7 @@ pub struct EthereumCallData<'a> {
598
595
599
596
impl < ' a > EthereumCallData < ' a > {
600
597
fn new (
601
- block : & ' a Block < Transaction > ,
598
+ block : & ' a LightEthereumBlock ,
602
599
transaction : & ' a Transaction ,
603
600
call : & ' a EthereumCall ,
604
601
inputs : & ' a [ abi:: DynSolParam ] ,
0 commit comments