@@ -3,12 +3,11 @@ import { CHAIN_IDs, TOKEN_SYMBOLS_MAP } from "@across-protocol/constants";
33import { getDeployedAddress } from "@across-protocol/contracts" ;
44import { asL2Provider } from "@eth-optimism/sdk" ;
55import { providers } from "ethers" ;
6- import { DEFAULT_SIMULATED_RELAYER_ADDRESS } from "../../constants" ;
7- import { chainIsAlephZero , chainIsMatic , chainIsOPStack , isDefined } from "../../utils" ;
6+ import { DEFAULT_SIMULATED_RELAYER_ADDRESS , CUSTOM_GAS_TOKENS } from "../../constants" ;
7+ import { chainIsOPStack , isDefined } from "../../utils" ;
88import { QueryBase } from "./baseQuery" ;
9- import { PolygonQueries } from "./polygon" ;
109import { DEFAULT_LOGGER , Logger } from "../relayFeeCalculator" ;
11- import { AlephZeroQueries } from "./alephZero " ;
10+ import { CustomGasTokenQueries } from "./customGasToken " ;
1211
1312/**
1413 * Some chains have a fixed gas price that is applied to the gas estimates. We should override
@@ -31,30 +30,21 @@ export class QueryBase__factory {
3130 ) : QueryBase {
3231 assert ( isDefined ( spokePoolAddress ) ) ;
3332
34- if ( chainIsMatic ( chainId ) ) {
35- return new PolygonQueries (
36- provider ,
37- symbolMapping ,
38- spokePoolAddress ,
39- simulatedRelayerAddress ,
40- logger ,
41- coingeckoProApiKey ,
42- fixedGasPrice [ chainId ] ,
43- "usd"
44- ) ;
45- }
46-
47- if ( chainIsAlephZero ( chainId ) ) {
48- return new AlephZeroQueries (
49- provider ,
50- symbolMapping ,
51- spokePoolAddress ,
52- simulatedRelayerAddress ,
53- logger ,
54- coingeckoProApiKey ,
55- fixedGasPrice [ chainId ] ,
56- "usd"
57- ) ;
33+ const customGasTokenSymbol = CUSTOM_GAS_TOKENS [ chainId ] ;
34+ if ( customGasTokenSymbol ) {
35+ return new CustomGasTokenQueries ( {
36+ queryBaseArgs : [
37+ provider ,
38+ symbolMapping ,
39+ spokePoolAddress ,
40+ simulatedRelayerAddress ,
41+ logger ,
42+ coingeckoProApiKey ,
43+ fixedGasPrice [ chainId ] ,
44+ "usd" ,
45+ ] ,
46+ customGasTokenSymbol,
47+ } ) ;
5848 }
5949
6050 // For OPStack chains, we need to wrap the provider in an L2Provider
0 commit comments