@@ -16,15 +16,14 @@ use std::time::{self, Duration, Instant};
16
16
use anyhow:: { anyhow, bail, Context , Result } ;
17
17
use graph:: futures03:: StreamExt ;
18
18
use graph:: itertools:: Itertools ;
19
- use graph:: prelude:: alloy:: primitives:: U256 ;
20
19
use graph:: prelude:: serde_json:: { json, Value } ;
21
20
use graph_tests:: contract:: Contract ;
22
21
use graph_tests:: subgraph:: Subgraph ;
23
22
use graph_tests:: { error, status, CONFIG } ;
24
23
use tokio:: process:: Child ;
25
24
use tokio:: task:: JoinError ;
26
25
use tokio:: time:: sleep;
27
- use web3;
26
+ use web3:: types :: U256 ;
28
27
29
28
const SUBGRAPH_LAST_GRAFTING_BLOCK : i32 = 3 ;
30
29
@@ -635,10 +634,6 @@ pub async fn subgraph_data_sources(ctx: TestContext) -> anyhow::Result<()> {
635
634
Ok ( ( ) )
636
635
}
637
636
638
- fn alloy_u256_to_web3_u256 ( u : U256 ) -> web3:: types:: U256 {
639
- web3:: types:: U256 :: from_little_endian ( u. as_le_slice ( ) )
640
- }
641
-
642
637
async fn test_topic_filters ( ctx : TestContext ) -> anyhow:: Result < ( ) > {
643
638
let subgraph = ctx. subgraph ;
644
639
assert ! ( subgraph. healthy) ;
@@ -653,9 +648,9 @@ async fn test_topic_filters(ctx: TestContext) -> anyhow::Result<()> {
653
648
. call (
654
649
"emitAnotherTrigger" ,
655
650
(
656
- alloy_u256_to_web3_u256 ( U256 :: from ( 1 ) ) ,
657
- alloy_u256_to_web3_u256 ( U256 :: from ( 2 ) ) ,
658
- alloy_u256_to_web3_u256 ( U256 :: from ( 3 ) ) ,
651
+ U256 :: from ( 1 ) ,
652
+ U256 :: from ( 2 ) ,
653
+ U256 :: from ( 3 ) ,
659
654
"abc" . to_string ( ) ,
660
655
) ,
661
656
)
@@ -666,9 +661,9 @@ async fn test_topic_filters(ctx: TestContext) -> anyhow::Result<()> {
666
661
. call (
667
662
"emitAnotherTrigger" ,
668
663
(
669
- alloy_u256_to_web3_u256 ( U256 :: from ( 1 ) ) ,
670
- alloy_u256_to_web3_u256 ( U256 :: from ( 1 ) ) ,
671
- alloy_u256_to_web3_u256 ( U256 :: from ( 1 ) ) ,
664
+ U256 :: from ( 1 ) ,
665
+ U256 :: from ( 1 ) ,
666
+ U256 :: from ( 1 ) ,
672
667
"abc" . to_string ( ) ,
673
668
) ,
674
669
)
@@ -679,9 +674,9 @@ async fn test_topic_filters(ctx: TestContext) -> anyhow::Result<()> {
679
674
. call (
680
675
"emitAnotherTrigger" ,
681
676
(
682
- alloy_u256_to_web3_u256 ( U256 :: from ( 4 ) ) ,
683
- alloy_u256_to_web3_u256 ( U256 :: from ( 2 ) ) ,
684
- alloy_u256_to_web3_u256 ( U256 :: from ( 3 ) ) ,
677
+ U256 :: from ( 4 ) ,
678
+ U256 :: from ( 2 ) ,
679
+ U256 :: from ( 3 ) ,
685
680
"abc" . to_string ( ) ,
686
681
) ,
687
682
)
@@ -692,9 +687,9 @@ async fn test_topic_filters(ctx: TestContext) -> anyhow::Result<()> {
692
687
. call (
693
688
"emitAnotherTrigger" ,
694
689
(
695
- alloy_u256_to_web3_u256 ( U256 :: from ( 4 ) ) ,
696
- alloy_u256_to_web3_u256 ( U256 :: from ( 4 ) ) ,
697
- alloy_u256_to_web3_u256 ( U256 :: from ( 3 ) ) ,
690
+ U256 :: from ( 4 ) ,
691
+ U256 :: from ( 4 ) ,
692
+ U256 :: from ( 3 ) ,
698
693
"abc" . to_string ( ) ,
699
694
) ,
700
695
)
0 commit comments