@@ -15,9 +15,9 @@ use web3::types::{Log, Transaction, H256};
1515use graph:: {
1616 blockchain:: { self , Blockchain } ,
1717 prelude:: {
18- async_trait, info, lazy_static , serde_json, BlockNumber , CheapClone ,
19- DataSourceTemplateInfo , Deserialize , EthereumCall , LightEthereumBlock ,
20- LightEthereumBlockExt , LinkResolver , Logger , TryStreamExt ,
18+ async_trait, info, serde_json, BlockNumber , CheapClone , DataSourceTemplateInfo ,
19+ Deserialize , EthereumCall , LightEthereumBlock , LightEthereumBlockExt , LinkResolver , Logger ,
20+ TryStreamExt ,
2121 } ,
2222} ;
2323
@@ -26,13 +26,6 @@ use graph::data::subgraph::{calls_host_fn, DataSourceContext, Source};
2626use crate :: chain:: Chain ;
2727use crate :: trigger:: { EthereumBlockTriggerType , EthereumTrigger , MappingTrigger } ;
2828
29- lazy_static ! {
30- static ref MAX_API_VERSION : semver:: Version = std:: env:: var( "GRAPH_MAX_API_VERSION" )
31- . ok( )
32- . and_then( |api_version_str| semver:: Version :: parse( & api_version_str) . ok( ) )
33- . unwrap_or( semver:: Version :: new( 0 , 0 , 5 ) ) ;
34- }
35-
3629/// Runtime representation of a data source.
3730// Note: Not great for memory usage that this needs to be `Clone`, considering how there may be tens
3831// of thousands of data sources in memory at once.
@@ -867,19 +860,10 @@ impl UnresolvedMapping {
867860 file : link,
868861 } = self ;
869862
870- let api_version = semver:: Version :: parse ( & api_version) ?;
871-
872- ensure ! (
873- semver:: VersionReq :: parse( & format!( "<= {}" , * MAX_API_VERSION ) )
874- . unwrap( )
875- . matches( & api_version) ,
876- "The maximum supported mapping API version of this indexer is {}, but `{}` was found" ,
877- * MAX_API_VERSION ,
878- api_version
879- ) ;
880-
881863 info ! ( logger, "Resolve mapping" ; "link" => & link. link) ;
882864
865+ let api_version = semver:: Version :: parse ( & api_version) ?;
866+
883867 let ( abis, runtime) = try_join (
884868 // resolve each abi
885869 abis. into_iter ( )
0 commit comments