@@ -16,15 +16,14 @@ use std::time::{self, Duration, Instant};
1616use anyhow:: { anyhow, bail, Context , Result } ;
1717use graph:: futures03:: StreamExt ;
1818use graph:: itertools:: Itertools ;
19- use graph:: prelude:: alloy:: primitives:: U256 ;
2019use graph:: prelude:: serde_json:: { json, Value } ;
2120use graph_tests:: contract:: Contract ;
2221use graph_tests:: subgraph:: Subgraph ;
2322use graph_tests:: { error, status, CONFIG } ;
2423use tokio:: process:: Child ;
2524use tokio:: task:: JoinError ;
2625use tokio:: time:: sleep;
27- use web3;
26+ use web3:: types :: U256 ;
2827
2928const SUBGRAPH_LAST_GRAFTING_BLOCK : i32 = 3 ;
3029
@@ -635,10 +634,6 @@ pub async fn subgraph_data_sources(ctx: TestContext) -> anyhow::Result<()> {
635634 Ok ( ( ) )
636635}
637636
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-
642637async fn test_topic_filters ( ctx : TestContext ) -> anyhow:: Result < ( ) > {
643638 let subgraph = ctx. subgraph ;
644639 assert ! ( subgraph. healthy) ;
@@ -653,9 +648,9 @@ async fn test_topic_filters(ctx: TestContext) -> anyhow::Result<()> {
653648 . call (
654649 "emitAnotherTrigger" ,
655650 (
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 ) ,
659654 "abc" . to_string ( ) ,
660655 ) ,
661656 )
@@ -666,9 +661,9 @@ async fn test_topic_filters(ctx: TestContext) -> anyhow::Result<()> {
666661 . call (
667662 "emitAnotherTrigger" ,
668663 (
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 ) ,
672667 "abc" . to_string ( ) ,
673668 ) ,
674669 )
@@ -679,9 +674,9 @@ async fn test_topic_filters(ctx: TestContext) -> anyhow::Result<()> {
679674 . call (
680675 "emitAnotherTrigger" ,
681676 (
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 ) ,
685680 "abc" . to_string ( ) ,
686681 ) ,
687682 )
@@ -692,9 +687,9 @@ async fn test_topic_filters(ctx: TestContext) -> anyhow::Result<()> {
692687 . call (
693688 "emitAnotherTrigger" ,
694689 (
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 ) ,
698693 "abc" . to_string ( ) ,
699694 ) ,
700695 )
0 commit comments