rubic-sdk 4.26.0-alpha-symb-sdk-upd.1 → 4.27.0-alpha-fusionx.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/rubic-sdk.min.js +645 -0
- package/dist/rubic-sdk.min.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/changenow-provider/changenow-cross-chain-trade.d.ts +1 -1
- package/lib/features/on-chain/calculation-manager/constants/trade-providers/uniswap-v3-trade-providers.d.ts +2 -1
- package/lib/features/on-chain/calculation-manager/constants/trade-providers/uniswap-v3-trade-providers.js +2 -0
- package/lib/features/on-chain/calculation-manager/constants/trade-providers/uniswap-v3-trade-providers.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/providers/common/models/on-chain-trade-type.d.ts +1 -0
- package/lib/features/on-chain/calculation-manager/providers/common/models/on-chain-trade-type.js +1 -0
- package/lib/features/on-chain/calculation-manager/providers/common/models/on-chain-trade-type.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/providers/dexes/common/uniswap-v3-abstract/utils/quoter-controller/fusionx-uniswap-v3-quoter-controller.d.ts +41 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/common/uniswap-v3-abstract/utils/quoter-controller/fusionx-uniswap-v3-quoter-controller.js +139 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/common/uniswap-v3-abstract/utils/quoter-controller/fusionx-uniswap-v3-quoter-controller.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/common/uniswap-v3-abstract/utils/quoter-controller/models/liquidity-pool.d.ts +1 -1
- package/lib/features/on-chain/calculation-manager/providers/dexes/common/uniswap-v3-algebra-abstract/models/unwrapWethMethodName.d.ts +1 -1
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/constants/provider-configuration.d.ts +2 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/constants/provider-configuration.js +10 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/constants/provider-configuration.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/constants/router-configuration.d.ts +12 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/constants/router-configuration.js +301 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/constants/router-configuration.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/fusionx-provider.d.ts +10 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/fusionx-provider.js +21 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/fusionx-provider.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/fusionx-trade.d.ts +7 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/fusionx-trade.js +18 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/fusionx-trade.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/utils/quoter-controller/constants/quoter-contract-data.d.ts +3 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/utils/quoter-controller/constants/quoter-contract-data.js +87 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/utils/quoter-controller/constants/quoter-contract-data.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
@@ -28,7 +28,7 @@ export declare class ChangenowCrossChainTrade extends EvmCrossChainTrade {
|
|
28
28
|
readonly gasData: GasData;
|
29
29
|
readonly feeInfo: FeeInfo;
|
30
30
|
readonly onChainSubtype: {
|
31
|
-
from: "BRIDGERS" | "ACRYPTOS" | "ALDRIN_EXCHANGE" | "ALGEBRA" | "ALGEBRA_INTEGRAL" | "ANNEX" | "APE_SWAP" | "ARTH_SWAP" | "ASTRO_SWAP" | "AURORA_SWAP" | "BABY_SWAP" | "BALANCER" | "BASE_SWAP" | "BEAM_SWAP" | "BI_SWAP" | "CLAIM_SWAP" | "CREMA_FINANCE" | "CRO_SWAP" | "CRONA_SWAP" | "CROPPER_FINANCE" | "CROW_FI" | "CRO_DEX" | "CURVE" | "DEFI_PLAZA" | "DEFI_SWAP" | "DFYN" | "DODO" | "DYSTOPIA" | "ELK" | "HONEY_SWAP" | "HORIZONDEX" | "JET_SWAP" | "JOE" | "JUPITER" | "JUPITER_SWAP" | "J_SWAP" | "KYBER_SWAP" | "LUA_SWAP" | "MAVERICK" | "MDEX" | "MESH_SWAP" | "MM_FINANCE" | "MOJITO_SWAP" | "MUTE_SWAP" | "NET_SWAP" | "ONE_INCH" | "ONE_MOON" | "ONE_SOL" | "OMNIDEX" | "OOLONG_SWAP" | "OPEN_OCEAN" | "ORCA_SWAP" | "OSMOSIS_SWAP" | "PANCAKE_SWAP" | "PANGOLIN" | "PEGASYS" | "PHOTON_SWAP" | "POLYDEX" | "QUICK_SWAP" | "QUICK_SWAP_V3" | "PULSEX_V1" | "PULSEX_V2" | "RAYDIUM" | "REF_FINANCE" | "REN_BTC" | "SABER_STABLE_SWAP" | "SAROS_SWAP" | "SERUM" | "SHIBA_SWAP" | "SMOOTHY" | "SOLAR_BEAM" | "SPIRIT_SWAP" | "SPL_TOKEN_SWAP" | "SPOOKY_SWAP" | "SOUL_SWAP" | "STELLA_SWAP" | "SURFDEX" | "SUSHI_SWAP" | "SYNC_SWAP" | "SYMBIOSIS_SWAP" | "TRADER" | "TRISOLARIS" | "IZUMI" | "UBE_SWAP" | "UNISWAP_V2" | "UNI_SWAP_V3" | "VERSE" | "VIPER_SWAP" | "VOLTAGE_SWAP" | "VOOI" | "VVS_FINANCE" | "WAGYU_SWAP" | "WANNA_SWAP" | "WAULT_SWAP" | "WOO_FI" | "WRAPPED" | "YUZU_SWAP" | "XY_DEX" | "ZAPPY" | "ZIP_SWAP" | "ZRX";
|
31
|
+
from: "BRIDGERS" | "ACRYPTOS" | "ALDRIN_EXCHANGE" | "ALGEBRA" | "ALGEBRA_INTEGRAL" | "ANNEX" | "APE_SWAP" | "ARTH_SWAP" | "ASTRO_SWAP" | "AURORA_SWAP" | "BABY_SWAP" | "BALANCER" | "BASE_SWAP" | "BEAM_SWAP" | "BI_SWAP" | "CLAIM_SWAP" | "CREMA_FINANCE" | "CRO_SWAP" | "CRONA_SWAP" | "CROPPER_FINANCE" | "CROW_FI" | "CRO_DEX" | "CURVE" | "DEFI_PLAZA" | "DEFI_SWAP" | "DFYN" | "DODO" | "DYSTOPIA" | "ELK" | "FUSIONX" | "HONEY_SWAP" | "HORIZONDEX" | "JET_SWAP" | "JOE" | "JUPITER" | "JUPITER_SWAP" | "J_SWAP" | "KYBER_SWAP" | "LUA_SWAP" | "MAVERICK" | "MDEX" | "MESH_SWAP" | "MM_FINANCE" | "MOJITO_SWAP" | "MUTE_SWAP" | "NET_SWAP" | "ONE_INCH" | "ONE_MOON" | "ONE_SOL" | "OMNIDEX" | "OOLONG_SWAP" | "OPEN_OCEAN" | "ORCA_SWAP" | "OSMOSIS_SWAP" | "PANCAKE_SWAP" | "PANGOLIN" | "PEGASYS" | "PHOTON_SWAP" | "POLYDEX" | "QUICK_SWAP" | "QUICK_SWAP_V3" | "PULSEX_V1" | "PULSEX_V2" | "RAYDIUM" | "REF_FINANCE" | "REN_BTC" | "SABER_STABLE_SWAP" | "SAROS_SWAP" | "SERUM" | "SHIBA_SWAP" | "SMOOTHY" | "SOLAR_BEAM" | "SPIRIT_SWAP" | "SPL_TOKEN_SWAP" | "SPOOKY_SWAP" | "SOUL_SWAP" | "STELLA_SWAP" | "SURFDEX" | "SUSHI_SWAP" | "SYNC_SWAP" | "SYMBIOSIS_SWAP" | "TRADER" | "TRISOLARIS" | "IZUMI" | "UBE_SWAP" | "UNISWAP_V2" | "UNI_SWAP_V3" | "VERSE" | "VIPER_SWAP" | "VOLTAGE_SWAP" | "VOOI" | "VVS_FINANCE" | "WAGYU_SWAP" | "WANNA_SWAP" | "WAULT_SWAP" | "WOO_FI" | "WRAPPED" | "YUZU_SWAP" | "XY_DEX" | "ZAPPY" | "ZIP_SWAP" | "ZRX";
|
32
32
|
to: undefined;
|
33
33
|
} | {
|
34
34
|
from: undefined;
|
@@ -2,7 +2,8 @@ import { UniSwapV3ArbitrumProvider } from '../../providers/dexes/arbitrum/uni-sw
|
|
2
2
|
import { UniSwapV3EthereumProvider } from '../../providers/dexes/ethereum/uni-swap-v3-ethereum/uni-swap-v3-ethereum-provider';
|
3
3
|
import { UniSwapV3EthereumPowProvider } from '../../providers/dexes/ethereum-pow/uni-swap-v3-ethereum-pow/uni-swap-v3-ethereum-pow-provider';
|
4
4
|
import { HorizondexProvider } from '../../providers/dexes/linea/horizondex/horizondex-provider';
|
5
|
+
import { FusionXProvider } from '../../providers/dexes/mantle/fusionx/fusionx-provider';
|
5
6
|
import { UniSwapV3PolygonProvider } from '../../providers/dexes/polygon/uni-swap-v3-polygon/uni-swap-v3-polygon-provider';
|
6
7
|
import { UniSwapV3PulsechainProvider } from '../../providers/dexes/pulsechain/uni-swap-v3-pulsechain/uni-swap-v3-ethereum-provider';
|
7
8
|
import { UniSwapV3ScrollSepoliaProvider } from '../../providers/dexes/scroll-sepolia/uni-swap-v3-scroll-sepolia/uni-swap-v3-scroll-sepolia-provider';
|
8
|
-
export declare const UniswapV3TradeProviders: readonly [typeof UniSwapV3EthereumProvider, typeof UniSwapV3PolygonProvider, typeof UniSwapV3ArbitrumProvider, typeof UniSwapV3EthereumPowProvider, typeof UniSwapV3PulsechainProvider, typeof HorizondexProvider, typeof UniSwapV3ScrollSepoliaProvider];
|
9
|
+
export declare const UniswapV3TradeProviders: readonly [typeof UniSwapV3EthereumProvider, typeof UniSwapV3PolygonProvider, typeof UniSwapV3ArbitrumProvider, typeof UniSwapV3EthereumPowProvider, typeof UniSwapV3PulsechainProvider, typeof HorizondexProvider, typeof FusionXProvider, typeof UniSwapV3ScrollSepoliaProvider];
|
@@ -5,6 +5,7 @@ const uni_swap_v3_arbitrum_provider_1 = require("../../providers/dexes/arbitrum/
|
|
5
5
|
const uni_swap_v3_ethereum_provider_1 = require("../../providers/dexes/ethereum/uni-swap-v3-ethereum/uni-swap-v3-ethereum-provider");
|
6
6
|
const uni_swap_v3_ethereum_pow_provider_1 = require("../../providers/dexes/ethereum-pow/uni-swap-v3-ethereum-pow/uni-swap-v3-ethereum-pow-provider");
|
7
7
|
const horizondex_provider_1 = require("../../providers/dexes/linea/horizondex/horizondex-provider");
|
8
|
+
const fusionx_provider_1 = require("../../providers/dexes/mantle/fusionx/fusionx-provider");
|
8
9
|
const uni_swap_v3_polygon_provider_1 = require("../../providers/dexes/polygon/uni-swap-v3-polygon/uni-swap-v3-polygon-provider");
|
9
10
|
const uni_swap_v3_ethereum_provider_2 = require("../../providers/dexes/pulsechain/uni-swap-v3-pulsechain/uni-swap-v3-ethereum-provider");
|
10
11
|
const uni_swap_v3_scroll_sepolia_provider_1 = require("../../providers/dexes/scroll-sepolia/uni-swap-v3-scroll-sepolia/uni-swap-v3-scroll-sepolia-provider");
|
@@ -15,6 +16,7 @@ exports.UniswapV3TradeProviders = [
|
|
15
16
|
uni_swap_v3_ethereum_pow_provider_1.UniSwapV3EthereumPowProvider,
|
16
17
|
uni_swap_v3_ethereum_provider_2.UniSwapV3PulsechainProvider,
|
17
18
|
horizondex_provider_1.HorizondexProvider,
|
19
|
+
fusionx_provider_1.FusionXProvider,
|
18
20
|
uni_swap_v3_scroll_sepolia_provider_1.UniSwapV3ScrollSepoliaProvider
|
19
21
|
];
|
20
22
|
//# sourceMappingURL=uniswap-v3-trade-providers.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"uniswap-v3-trade-providers.js","sourceRoot":"","sources":["../../../../../../src/features/on-chain/calculation-manager/constants/trade-providers/uniswap-v3-trade-providers.ts"],"names":[],"mappings":";;;AAAA,yKAAkK;AAClK,yKAAkK;AAClK,yLAAiL;AACjL,wIAAoI;AACpI,qKAA8J;AAC9J,6KAAwK;AACxK,iMAAyL;AAE5K,QAAA,uBAAuB,GAAG;IACnC,yDAAyB;IACzB,uDAAwB;IACxB,yDAAyB;IACzB,gEAA4B;IAC5B,2DAA2B;IAC3B,wCAAkB;IAClB,oEAA8B;CACxB,CAAC"}
|
1
|
+
{"version":3,"file":"uniswap-v3-trade-providers.js","sourceRoot":"","sources":["../../../../../../src/features/on-chain/calculation-manager/constants/trade-providers/uniswap-v3-trade-providers.ts"],"names":[],"mappings":";;;AAAA,yKAAkK;AAClK,yKAAkK;AAClK,yLAAiL;AACjL,wIAAoI;AACpI,gIAA4H;AAC5H,qKAA8J;AAC9J,6KAAwK;AACxK,iMAAyL;AAE5K,QAAA,uBAAuB,GAAG;IACnC,yDAAyB;IACzB,uDAAwB;IACxB,yDAAyB;IACzB,gEAA4B;IAC5B,2DAA2B;IAC3B,wCAAkB;IAClB,kCAAe;IACf,oEAA8B;CACxB,CAAC"}
|
package/lib/features/on-chain/calculation-manager/providers/common/models/on-chain-trade-type.d.ts
CHANGED
@@ -31,6 +31,7 @@ export declare const ON_CHAIN_TRADE_TYPE: {
|
|
31
31
|
readonly DODO: "DODO";
|
32
32
|
readonly DYSTOPIA: "DYSTOPIA";
|
33
33
|
readonly ELK: "ELK";
|
34
|
+
readonly FUSIONX: "FUSIONX";
|
34
35
|
readonly HONEY_SWAP: "HONEY_SWAP";
|
35
36
|
readonly HORIZONDEX: "HORIZONDEX";
|
36
37
|
readonly JET_SWAP: "JET_SWAP";
|
package/lib/features/on-chain/calculation-manager/providers/common/models/on-chain-trade-type.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"on-chain-trade-type.js","sourceRoot":"","sources":["../../../../../../../src/features/on-chain/calculation-manager/providers/common/models/on-chain-trade-type.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,mBAAmB,GAAG;IAC/B,QAAQ,EAAE,UAAU;IACpB,eAAe,EAAE,iBAAiB;IAClC,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,kBAAkB;IACpC,KAAK,EAAE,OAAO;IACd,QAA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OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;IAElB,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,eAAe;IAE9B,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IAEtB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;IAElB,iBAAiB,EAAE,mBAAmB;IACtC,UAAU,EAAE,YAAY;IACxB,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,YAAY;IACxB,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;IAC1B,cAAc,EAAE,gBAAgB;IAChC,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE,WAAW;IAEtB,cAAc,EAAE,gBAAgB;IAEhC,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IAExB,KAAK,EAAE,OAAO;IAEd,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;IAE1B,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,cAAc;IAC5B,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,aAAa;IAE1B,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAElB,SAAS,EAAE,WAAW;IAEtB,MAAM,EAAE,QAAQ;IAEhB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,KAAK;CACJ,CAAC"}
|
1
|
+
{"version":3,"file":"on-chain-trade-type.js","sourceRoot":"","sources":["../../../../../../../src/features/on-chain/calculation-manager/providers/common/models/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,SAAS;IAElB,SAAS,EAAE,WAAW;IAEtB,MAAM,EAAE,QAAQ;IAEhB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,KAAK;CACJ,CAAC"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { Token } from '../../../../../../../../../common/tokens';
|
2
|
+
import { EvmBlockchainName } from '../../../../../../../../../core/blockchain/models/blockchain-name';
|
3
|
+
import { MethodData } from '../../../../../../../../../core/blockchain/web3-public-service/web3-public/models/method-data';
|
4
|
+
import { Exact } from '../../../../../common/on-chain-trade/evm-on-chain-trade/models/exact';
|
5
|
+
import { UniswapV3Route } from '../../models/uniswap-v3-route';
|
6
|
+
import { UniswapV3RouterConfiguration } from '../../models/uniswap-v3-router-configuration';
|
7
|
+
import { FeeAmount, LiquidityPool } from './models/liquidity-pool';
|
8
|
+
import { UniswapV3QuoterController } from './uniswap-v3-quoter-controller';
|
9
|
+
interface GetQuoterMethodsDataOptions {
|
10
|
+
routesLiquidityPools: LiquidityPool[];
|
11
|
+
from: Token;
|
12
|
+
to: Token;
|
13
|
+
exact: Exact;
|
14
|
+
weiAmount: string;
|
15
|
+
maxTransitTokens: number;
|
16
|
+
}
|
17
|
+
export declare class FusionXUniswapV3QuoterController extends UniswapV3QuoterController {
|
18
|
+
protected readonly feeAmounts: FeeAmount[];
|
19
|
+
constructor(blockchain: EvmBlockchainName, routerConfiguration: UniswapV3RouterConfiguration<string>);
|
20
|
+
/**
|
21
|
+
* Returns swap method's name and arguments to pass it to Quoter contract.
|
22
|
+
* @param poolsPath Pools, included in the route.
|
23
|
+
* @param from From token.
|
24
|
+
* @param to To token.
|
25
|
+
* @param exact Is exact input or output trade.
|
26
|
+
* @param weiAmount Amount of tokens to trade.
|
27
|
+
*/
|
28
|
+
protected static getQuoterMethodData(poolsPath: LiquidityPool[], from: Token, to: Token, exact: Exact, weiAmount: string): {
|
29
|
+
poolsPath: LiquidityPool[];
|
30
|
+
methodData: MethodData;
|
31
|
+
};
|
32
|
+
getAllRoutes(from: Token, to: Token, exact: Exact, weiAmount: string, routeMaxTransitTokens: number): Promise<UniswapV3Route[]>;
|
33
|
+
/**
|
34
|
+
* Returns swap methods' names and arguments, built with passed pools' addresses, to use it in Quoter contract.
|
35
|
+
*/
|
36
|
+
protected getQuoterMethodsData(options: GetQuoterMethodsDataOptions, path: LiquidityPool[], lastTokenAddress: string): {
|
37
|
+
poolsPath: LiquidityPool[];
|
38
|
+
methodData: MethodData;
|
39
|
+
}[];
|
40
|
+
}
|
41
|
+
export {};
|
@@ -0,0 +1,139 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.FusionXUniswapV3QuoterController = void 0;
|
13
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
14
|
+
const errors_1 = require("../../../../../../../../../common/errors");
|
15
|
+
const blockchain_1 = require("../../../../../../../../../common/utils/blockchain");
|
16
|
+
const decorators_1 = require("../../../../../../../../../common/utils/decorators");
|
17
|
+
const object_1 = require("../../../../../../../../../common/utils/object");
|
18
|
+
const uniswap_v3_quoter_controller_1 = require("./uniswap-v3-quoter-controller");
|
19
|
+
const router_configuration_1 = require("../../../../mantle/fusionx/constants/router-configuration");
|
20
|
+
const quoter_contract_data_1 = require("../../../../mantle/fusionx/utils/quoter-controller/constants/quoter-contract-data");
|
21
|
+
class FusionXUniswapV3QuoterController extends uniswap_v3_quoter_controller_1.UniswapV3QuoterController {
|
22
|
+
constructor(blockchain, routerConfiguration) {
|
23
|
+
super(blockchain, routerConfiguration, quoter_contract_data_1.FUSIONX_QUOTER_CONTRACT_ADDRESS, quoter_contract_data_1.FUSIONX_QUOTER_CONTRACT_ABI, router_configuration_1.FUSIONX_UNISWAP_V3_FACTORY_CONTRACT_ADDRESS);
|
24
|
+
this.feeAmounts = [100, 500, 10000];
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* Returns swap method's name and arguments to pass it to Quoter contract.
|
28
|
+
* @param poolsPath Pools, included in the route.
|
29
|
+
* @param from From token.
|
30
|
+
* @param to To token.
|
31
|
+
* @param exact Is exact input or output trade.
|
32
|
+
* @param weiAmount Amount of tokens to trade.
|
33
|
+
*/
|
34
|
+
static getQuoterMethodData(poolsPath, from, to, exact, weiAmount) {
|
35
|
+
if (poolsPath.length === 1 && poolsPath?.[0]) {
|
36
|
+
const methodName = exact === 'input' ? 'quoteExactInputSingle' : 'quoteExactOutputSingle';
|
37
|
+
const sqrtPriceLimitX96 = 0;
|
38
|
+
return {
|
39
|
+
poolsPath,
|
40
|
+
methodData: {
|
41
|
+
methodName,
|
42
|
+
methodArguments: [
|
43
|
+
from.address,
|
44
|
+
to.address,
|
45
|
+
weiAmount,
|
46
|
+
poolsPath[0].fee,
|
47
|
+
sqrtPriceLimitX96
|
48
|
+
]
|
49
|
+
}
|
50
|
+
};
|
51
|
+
}
|
52
|
+
const methodName = exact === 'input' ? 'quoteExactInput' : 'quoteExactOutput';
|
53
|
+
const tokensPath = exact === 'input' ? poolsPath : poolsPath.reverse();
|
54
|
+
const initialTokenAddress = exact === 'input' ? from.address : to.address;
|
55
|
+
return {
|
56
|
+
poolsPath,
|
57
|
+
methodData: {
|
58
|
+
methodName,
|
59
|
+
methodArguments: [
|
60
|
+
uniswap_v3_quoter_controller_1.UniswapV3QuoterController.getEncodedPoolsPath(tokensPath, initialTokenAddress),
|
61
|
+
weiAmount
|
62
|
+
]
|
63
|
+
}
|
64
|
+
};
|
65
|
+
}
|
66
|
+
async getAllRoutes(from, to, exact, weiAmount, routeMaxTransitTokens) {
|
67
|
+
const routesLiquidityPools = await this.getAllLiquidityPools(from, to);
|
68
|
+
const options = {
|
69
|
+
routesLiquidityPools,
|
70
|
+
from,
|
71
|
+
to,
|
72
|
+
exact,
|
73
|
+
weiAmount
|
74
|
+
};
|
75
|
+
const quoterMethodsData = [...Array(routeMaxTransitTokens + 1)]
|
76
|
+
.map((_, maxTransitTokens) => this.getQuoterMethodsData({
|
77
|
+
...options,
|
78
|
+
maxTransitTokens
|
79
|
+
}, [], from.address))
|
80
|
+
.flat();
|
81
|
+
const results = await this.web3Public.multicallContractMethods(this.quoterContractAddress, this.quoterContractABI, quoterMethodsData.map(quoterMethodData => {
|
82
|
+
if (quoterMethodData.methodData.methodName.toLowerCase().includes('single')) {
|
83
|
+
return {
|
84
|
+
methodName: quoterMethodData.methodData.methodName,
|
85
|
+
methodArguments: [quoterMethodData.methodData.methodArguments]
|
86
|
+
};
|
87
|
+
}
|
88
|
+
return quoterMethodData.methodData;
|
89
|
+
}));
|
90
|
+
return results
|
91
|
+
.map((result, index) => {
|
92
|
+
const pool = quoterMethodsData?.[index];
|
93
|
+
if (!pool) {
|
94
|
+
throw new errors_1.RubicSdkError('Pool has to be defined');
|
95
|
+
}
|
96
|
+
if (result.success) {
|
97
|
+
return {
|
98
|
+
outputAbsoluteAmount: new bignumber_js_1.default(result?.output instanceof Object
|
99
|
+
? result?.output?.returnedAmount
|
100
|
+
: result.output),
|
101
|
+
poolsPath: pool.poolsPath,
|
102
|
+
initialTokenAddress: from.address
|
103
|
+
};
|
104
|
+
}
|
105
|
+
return null;
|
106
|
+
})
|
107
|
+
.filter(object_1.notNull);
|
108
|
+
}
|
109
|
+
/**
|
110
|
+
* Returns swap methods' names and arguments, built with passed pools' addresses, to use it in Quoter contract.
|
111
|
+
*/
|
112
|
+
getQuoterMethodsData(options, path, lastTokenAddress) {
|
113
|
+
const { routesLiquidityPools, from, to, exact, weiAmount, maxTransitTokens } = options;
|
114
|
+
if (path.length === maxTransitTokens) {
|
115
|
+
const pools = routesLiquidityPools.filter(pool => pool.isPoolWithTokens(lastTokenAddress, to.address));
|
116
|
+
return pools.map(pool => FusionXUniswapV3QuoterController.getQuoterMethodData(path.concat(pool), from, to, exact, weiAmount));
|
117
|
+
}
|
118
|
+
return routesLiquidityPools
|
119
|
+
.filter(pool => !path.includes(pool))
|
120
|
+
.map(pool => {
|
121
|
+
const methodsData = [];
|
122
|
+
if ((0, blockchain_1.compareAddresses)(pool.token0.address, lastTokenAddress)) {
|
123
|
+
const extendedPath = path.concat(pool);
|
124
|
+
methodsData.push(...this.getQuoterMethodsData(options, extendedPath, pool.token1.address));
|
125
|
+
}
|
126
|
+
if ((0, blockchain_1.compareAddresses)(pool.token1.address, lastTokenAddress)) {
|
127
|
+
const extendedPath = path.concat(pool);
|
128
|
+
methodsData.push(...this.getQuoterMethodsData(options, extendedPath, pool.token0.address));
|
129
|
+
}
|
130
|
+
return methodsData;
|
131
|
+
})
|
132
|
+
.flat();
|
133
|
+
}
|
134
|
+
}
|
135
|
+
exports.FusionXUniswapV3QuoterController = FusionXUniswapV3QuoterController;
|
136
|
+
__decorate([
|
137
|
+
decorators_1.Cache
|
138
|
+
], FusionXUniswapV3QuoterController, "getQuoterMethodData", null);
|
139
|
+
//# sourceMappingURL=fusionx-uniswap-v3-quoter-controller.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fusionx-uniswap-v3-quoter-controller.js","sourceRoot":"","sources":["../../../../../../../../../../src/features/on-chain/calculation-manager/providers/dexes/common/uniswap-v3-abstract/utils/quoter-controller/fusionx-uniswap-v3-quoter-controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAAqC;AACrC,8C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AI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;aACpC,GAAG,CAAC,IAAI,CAAC,EAAE;YACR,MAAM,WAAW,GAA6D,EAAE,CAAC;YACjF,IAAI,IAAA,6BAAgB,EAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAE;gBACzD,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBACvC,WAAW,CAAC,IAAI,CACZ,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAC3E,CAAC;aACL;YACD,IAAI,IAAA,6BAAgB,EAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAE;gBACzD,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBACvC,WAAW,CAAC,IAAI,CACZ,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAC3E,CAAC;aACL;YACD,OAAO,WAAW,CAAC;QACvB,CAAC,CAAC;aACD,IAAI,EAAE,CAAC;IAChB,CAAC;CACJ;AArLD,4EAqLC;AA5JoB;IADhB,kBAAK;iEA2CL"}
|
@@ -1 +1 @@
|
|
1
|
-
export type UnwrapWethMethodName = 'unwrapWETH9' | 'unwrapWNativeToken' | 'unwrapWeth';
|
1
|
+
export type UnwrapWethMethodName = 'unwrapWETH9' | 'unwrapWNativeToken' | 'unwrapWeth' | 'WETH9';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FUSIONX_PROVIDER_CONFIGURATION = void 0;
|
4
|
+
const tokens_1 = require("../../../../../../../../common/tokens");
|
5
|
+
const blockchain_name_1 = require("../../../../../../../../core/blockchain/models/blockchain-name");
|
6
|
+
exports.FUSIONX_PROVIDER_CONFIGURATION = {
|
7
|
+
wethAddress: tokens_1.wrappedNativeTokensList[blockchain_name_1.BLOCKCHAIN_NAME.MANTLE].address,
|
8
|
+
maxTransitTokens: 1
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=provider-configuration.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"provider-configuration.js","sourceRoot":"","sources":["../../../../../../../../../src/features/on-chain/calculation-manager/providers/dexes/mantle/fusionx/constants/provider-configuration.ts"],"names":[],"mappings":";;;AAAA,8CAA4D;AAC5D,gFAA6E;AAGhE,QAAA,8BAA8B,GAA0C;IACjF,WAAW,EAAE,gCAAuB,CAAC,iCAAe,CAAC,MAAM,CAAE,CAAC,OAAO;IACrE,gBAAgB,EAAE,CAAC;CACtB,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { UniswapV3RouterConfiguration } from '../../../common/uniswap-v3-abstract/models/uniswap-v3-router-configuration';
|
2
|
+
import { AbiItem } from 'web3-utils';
|
3
|
+
/**
|
4
|
+
* Most popular tokens in uni v3 to use in a route.
|
5
|
+
*/
|
6
|
+
declare const tokensSymbols: readonly ["WETH", "WMNT", "USDT", "USDC", "WBTC", "MINU"];
|
7
|
+
type TokenSymbol = (typeof tokensSymbols)[number];
|
8
|
+
export declare const FUSIONX_ROUTER_CONFIGURATION: UniswapV3RouterConfiguration<TokenSymbol>;
|
9
|
+
export declare const FUSIONX_UNISWAP_V3_SWAP_ROUTER_CONTRACT_ADDRESS = "0x5989FB161568b9F133eDf5Cf6787f5597762797F";
|
10
|
+
export declare const FUSIONX_UNISWAP_V3_FACTORY_CONTRACT_ADDRESS = "0x530d2766D1988CC1c000C8b7d00334c14B69AD71";
|
11
|
+
export declare const FUSIONX_UNISWAP_V3_SWAP_ROUTER_CONTRACT_ABI: AbiItem[];
|
12
|
+
export {};
|
@@ -0,0 +1,301 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FUSIONX_UNISWAP_V3_SWAP_ROUTER_CONTRACT_ABI = exports.FUSIONX_UNISWAP_V3_FACTORY_CONTRACT_ADDRESS = exports.FUSIONX_UNISWAP_V3_SWAP_ROUTER_CONTRACT_ADDRESS = exports.FUSIONX_ROUTER_CONFIGURATION = void 0;
|
4
|
+
const tokens_1 = require("../../../../../../../../common/tokens");
|
5
|
+
const blockchain_name_1 = require("../../../../../../../../core/blockchain/models/blockchain-name");
|
6
|
+
/**
|
7
|
+
* Most popular tokens in uni v3 to use in a route.
|
8
|
+
*/
|
9
|
+
const tokensSymbols = ['WETH', 'WMNT', 'USDT', 'USDC', 'WBTC', 'MINU'];
|
10
|
+
const routerTokens = {
|
11
|
+
WMNT: tokens_1.wrappedNativeTokensList[blockchain_name_1.BLOCKCHAIN_NAME.MANTLE].address,
|
12
|
+
WETH: '0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111',
|
13
|
+
USDT: '0x201EBa5CC46D216Ce6DC03F6a759e8E766e956aE',
|
14
|
+
USDC: '0x09bc4e0d864854c6afb6eb9a9cdf58ac190d0df9',
|
15
|
+
WBTC: '0xcabae6f6ea1ecab08ad02fe02ce9a44f09aebfa2',
|
16
|
+
MINU: '0x51cfe5b1e764dc253f4c8c1f19a081ff4c3517ed'
|
17
|
+
};
|
18
|
+
const routerLiquidityPools = [
|
19
|
+
{
|
20
|
+
poolAddress: '0xa125af1a4704044501fe12ca9567ef1550e430e8',
|
21
|
+
tokenSymbolA: 'USDT',
|
22
|
+
tokenSymbolB: 'WETH',
|
23
|
+
fee: 500
|
24
|
+
},
|
25
|
+
{
|
26
|
+
poolAddress: '0x262255f4770aebe2d0c8b97a46287dcecc2a0aff',
|
27
|
+
tokenSymbolA: 'USDT',
|
28
|
+
tokenSymbolB: 'WMNT',
|
29
|
+
fee: 500
|
30
|
+
},
|
31
|
+
{
|
32
|
+
poolAddress: '0x16867d00d45347a2ded25b8cdb7022b3171d4ae0',
|
33
|
+
tokenSymbolA: 'USDC',
|
34
|
+
tokenSymbolB: 'USDT',
|
35
|
+
fee: 100
|
36
|
+
},
|
37
|
+
{
|
38
|
+
poolAddress: '0xb11d56e78076df5b4fea0f3f9f1febdb043fabf3',
|
39
|
+
tokenSymbolA: 'USDT',
|
40
|
+
tokenSymbolB: 'WBTC',
|
41
|
+
fee: 500
|
42
|
+
},
|
43
|
+
{
|
44
|
+
poolAddress: '0x3bfb98c0af1aca0e66d96624c7e545eb131f285e',
|
45
|
+
tokenSymbolA: 'MINU',
|
46
|
+
tokenSymbolB: 'WMNT',
|
47
|
+
fee: 10000
|
48
|
+
},
|
49
|
+
{
|
50
|
+
poolAddress: '0xb1d9358e08391e93593c6a1899dc77931912bb16',
|
51
|
+
tokenSymbolA: 'USDT',
|
52
|
+
tokenSymbolB: 'MINU',
|
53
|
+
fee: 10000
|
54
|
+
}
|
55
|
+
];
|
56
|
+
exports.FUSIONX_ROUTER_CONFIGURATION = {
|
57
|
+
tokens: routerTokens,
|
58
|
+
liquidityPools: routerLiquidityPools
|
59
|
+
};
|
60
|
+
exports.FUSIONX_UNISWAP_V3_SWAP_ROUTER_CONTRACT_ADDRESS = '0x5989FB161568b9F133eDf5Cf6787f5597762797F';
|
61
|
+
exports.FUSIONX_UNISWAP_V3_FACTORY_CONTRACT_ADDRESS = '0x530d2766D1988CC1c000C8b7d00334c14B69AD71';
|
62
|
+
exports.FUSIONX_UNISWAP_V3_SWAP_ROUTER_CONTRACT_ABI = [
|
63
|
+
{
|
64
|
+
type: 'constructor',
|
65
|
+
inputs: [
|
66
|
+
{ type: 'address', name: '_deployer', internalType: 'address' },
|
67
|
+
{ type: 'address', name: '_factory', internalType: 'address' },
|
68
|
+
{ type: 'address', name: '_WETH9', internalType: 'address' }
|
69
|
+
]
|
70
|
+
},
|
71
|
+
{
|
72
|
+
type: 'function',
|
73
|
+
stateMutability: 'view',
|
74
|
+
outputs: [{ type: 'address', name: '', internalType: 'address' }],
|
75
|
+
name: 'WETH9',
|
76
|
+
inputs: []
|
77
|
+
},
|
78
|
+
{
|
79
|
+
type: 'function',
|
80
|
+
stateMutability: 'view',
|
81
|
+
outputs: [{ type: 'address', name: '', internalType: 'address' }],
|
82
|
+
name: 'deployer',
|
83
|
+
inputs: []
|
84
|
+
},
|
85
|
+
{
|
86
|
+
type: 'function',
|
87
|
+
stateMutability: 'payable',
|
88
|
+
outputs: [{ type: 'uint256', name: 'amountOut', internalType: 'uint256' }],
|
89
|
+
name: 'exactInput',
|
90
|
+
inputs: [
|
91
|
+
{
|
92
|
+
type: 'tuple',
|
93
|
+
name: 'params',
|
94
|
+
internalType: 'struct ISwapRouter.ExactInputParams',
|
95
|
+
components: [
|
96
|
+
{ type: 'bytes' },
|
97
|
+
{ type: 'address' },
|
98
|
+
{ type: 'uint256' },
|
99
|
+
{ type: 'uint256' },
|
100
|
+
{ type: 'uint256' }
|
101
|
+
]
|
102
|
+
}
|
103
|
+
]
|
104
|
+
},
|
105
|
+
{
|
106
|
+
type: 'function',
|
107
|
+
stateMutability: 'payable',
|
108
|
+
outputs: [{ type: 'uint256', name: 'amountOut', internalType: 'uint256' }],
|
109
|
+
name: 'exactInputSingle',
|
110
|
+
inputs: [
|
111
|
+
{
|
112
|
+
type: 'tuple',
|
113
|
+
name: 'params',
|
114
|
+
internalType: 'struct ISwapRouter.ExactInputSingleParams',
|
115
|
+
components: [
|
116
|
+
{ type: 'address' },
|
117
|
+
{ type: 'address' },
|
118
|
+
{ type: 'uint24' },
|
119
|
+
{ type: 'address' },
|
120
|
+
{ type: 'uint256' },
|
121
|
+
{ type: 'uint256' },
|
122
|
+
{ type: 'uint256' },
|
123
|
+
{ type: 'uint160' }
|
124
|
+
]
|
125
|
+
}
|
126
|
+
]
|
127
|
+
},
|
128
|
+
{
|
129
|
+
type: 'function',
|
130
|
+
stateMutability: 'payable',
|
131
|
+
outputs: [{ type: 'uint256', name: 'amountIn', internalType: 'uint256' }],
|
132
|
+
name: 'exactOutput',
|
133
|
+
inputs: [
|
134
|
+
{
|
135
|
+
type: 'tuple',
|
136
|
+
name: 'params',
|
137
|
+
internalType: 'struct ISwapRouter.ExactOutputParams',
|
138
|
+
components: [
|
139
|
+
{ type: 'bytes' },
|
140
|
+
{ type: 'address' },
|
141
|
+
{ type: 'uint256' },
|
142
|
+
{ type: 'uint256' },
|
143
|
+
{ type: 'uint256' }
|
144
|
+
]
|
145
|
+
}
|
146
|
+
]
|
147
|
+
},
|
148
|
+
{
|
149
|
+
type: 'function',
|
150
|
+
stateMutability: 'payable',
|
151
|
+
outputs: [{ type: 'uint256', name: 'amountIn', internalType: 'uint256' }],
|
152
|
+
name: 'exactOutputSingle',
|
153
|
+
inputs: [
|
154
|
+
{
|
155
|
+
type: 'tuple',
|
156
|
+
name: 'params',
|
157
|
+
internalType: 'struct ISwapRouter.ExactOutputSingleParams',
|
158
|
+
components: [
|
159
|
+
{ type: 'address' },
|
160
|
+
{ type: 'address' },
|
161
|
+
{ type: 'uint24' },
|
162
|
+
{ type: 'address' },
|
163
|
+
{ type: 'uint256' },
|
164
|
+
{ type: 'uint256' },
|
165
|
+
{ type: 'uint256' },
|
166
|
+
{ type: 'uint160' }
|
167
|
+
]
|
168
|
+
}
|
169
|
+
]
|
170
|
+
},
|
171
|
+
{
|
172
|
+
type: 'function',
|
173
|
+
stateMutability: 'view',
|
174
|
+
outputs: [{ type: 'address', name: '', internalType: 'address' }],
|
175
|
+
name: 'factory',
|
176
|
+
inputs: []
|
177
|
+
},
|
178
|
+
{
|
179
|
+
type: 'function',
|
180
|
+
stateMutability: 'nonpayable',
|
181
|
+
outputs: [],
|
182
|
+
name: 'fusionXV3SwapCallback',
|
183
|
+
inputs: [
|
184
|
+
{ type: 'int256', name: 'amount0Delta', internalType: 'int256' },
|
185
|
+
{ type: 'int256', name: 'amount1Delta', internalType: 'int256' },
|
186
|
+
{ type: 'bytes', name: '_data', internalType: 'bytes' }
|
187
|
+
]
|
188
|
+
},
|
189
|
+
{
|
190
|
+
type: 'function',
|
191
|
+
stateMutability: 'payable',
|
192
|
+
outputs: [{ type: 'bytes[]', name: 'results', internalType: 'bytes[]' }],
|
193
|
+
name: 'multicall',
|
194
|
+
inputs: [{ type: 'bytes[]', name: 'data', internalType: 'bytes[]' }]
|
195
|
+
},
|
196
|
+
{ type: 'function', stateMutability: 'payable', outputs: [], name: 'refundETH', inputs: [] },
|
197
|
+
{
|
198
|
+
type: 'function',
|
199
|
+
stateMutability: 'payable',
|
200
|
+
outputs: [],
|
201
|
+
name: 'selfPermit',
|
202
|
+
inputs: [
|
203
|
+
{ type: 'address', name: 'token', internalType: 'address' },
|
204
|
+
{ type: 'uint256', name: 'value', internalType: 'uint256' },
|
205
|
+
{ type: 'uint256', name: 'deadline', internalType: 'uint256' },
|
206
|
+
{ type: 'uint8', name: 'v', internalType: 'uint8' },
|
207
|
+
{ type: 'bytes32', name: 'r', internalType: 'bytes32' },
|
208
|
+
{ type: 'bytes32', name: 's', internalType: 'bytes32' }
|
209
|
+
]
|
210
|
+
},
|
211
|
+
{
|
212
|
+
type: 'function',
|
213
|
+
stateMutability: 'payable',
|
214
|
+
outputs: [],
|
215
|
+
name: 'selfPermitAllowed',
|
216
|
+
inputs: [
|
217
|
+
{ type: 'address', name: 'token', internalType: 'address' },
|
218
|
+
{ type: 'uint256', name: 'nonce', internalType: 'uint256' },
|
219
|
+
{ type: 'uint256', name: 'expiry', internalType: 'uint256' },
|
220
|
+
{ type: 'uint8', name: 'v', internalType: 'uint8' },
|
221
|
+
{ type: 'bytes32', name: 'r', internalType: 'bytes32' },
|
222
|
+
{ type: 'bytes32', name: 's', internalType: 'bytes32' }
|
223
|
+
]
|
224
|
+
},
|
225
|
+
{
|
226
|
+
type: 'function',
|
227
|
+
stateMutability: 'payable',
|
228
|
+
outputs: [],
|
229
|
+
name: 'selfPermitAllowedIfNecessary',
|
230
|
+
inputs: [
|
231
|
+
{ type: 'address', name: 'token', internalType: 'address' },
|
232
|
+
{ type: 'uint256', name: 'nonce', internalType: 'uint256' },
|
233
|
+
{ type: 'uint256', name: 'expiry', internalType: 'uint256' },
|
234
|
+
{ type: 'uint8', name: 'v', internalType: 'uint8' },
|
235
|
+
{ type: 'bytes32', name: 'r', internalType: 'bytes32' },
|
236
|
+
{ type: 'bytes32', name: 's', internalType: 'bytes32' }
|
237
|
+
]
|
238
|
+
},
|
239
|
+
{
|
240
|
+
type: 'function',
|
241
|
+
stateMutability: 'payable',
|
242
|
+
outputs: [],
|
243
|
+
name: 'selfPermitIfNecessary',
|
244
|
+
inputs: [
|
245
|
+
{ type: 'address', name: 'token', internalType: 'address' },
|
246
|
+
{ type: 'uint256', name: 'value', internalType: 'uint256' },
|
247
|
+
{ type: 'uint256', name: 'deadline', internalType: 'uint256' },
|
248
|
+
{ type: 'uint8', name: 'v', internalType: 'uint8' },
|
249
|
+
{ type: 'bytes32', name: 'r', internalType: 'bytes32' },
|
250
|
+
{ type: 'bytes32', name: 's', internalType: 'bytes32' }
|
251
|
+
]
|
252
|
+
},
|
253
|
+
{
|
254
|
+
type: 'function',
|
255
|
+
stateMutability: 'payable',
|
256
|
+
outputs: [],
|
257
|
+
name: 'sweepToken',
|
258
|
+
inputs: [
|
259
|
+
{ type: 'address', name: 'token', internalType: 'address' },
|
260
|
+
{ type: 'uint256', name: 'amountMinimum', internalType: 'uint256' },
|
261
|
+
{ type: 'address', name: 'recipient', internalType: 'address' }
|
262
|
+
]
|
263
|
+
},
|
264
|
+
{
|
265
|
+
type: 'function',
|
266
|
+
stateMutability: 'payable',
|
267
|
+
outputs: [],
|
268
|
+
name: 'sweepTokenWithFee',
|
269
|
+
inputs: [
|
270
|
+
{ type: 'address', name: 'token', internalType: 'address' },
|
271
|
+
{ type: 'uint256', name: 'amountMinimum', internalType: 'uint256' },
|
272
|
+
{ type: 'address', name: 'recipient', internalType: 'address' },
|
273
|
+
{ type: 'uint256', name: 'feeBips', internalType: 'uint256' },
|
274
|
+
{ type: 'address', name: 'feeRecipient', internalType: 'address' }
|
275
|
+
]
|
276
|
+
},
|
277
|
+
{
|
278
|
+
type: 'function',
|
279
|
+
stateMutability: 'payable',
|
280
|
+
outputs: [],
|
281
|
+
name: 'unwrapWETH9',
|
282
|
+
inputs: [
|
283
|
+
{ type: 'uint256', name: 'amountMinimum', internalType: 'uint256' },
|
284
|
+
{ type: 'address', name: 'recipient', internalType: 'address' }
|
285
|
+
]
|
286
|
+
},
|
287
|
+
{
|
288
|
+
type: 'function',
|
289
|
+
stateMutability: 'payable',
|
290
|
+
outputs: [],
|
291
|
+
name: 'unwrapWETH9WithFee',
|
292
|
+
inputs: [
|
293
|
+
{ type: 'uint256', name: 'amountMinimum', internalType: 'uint256' },
|
294
|
+
{ type: 'address', name: 'recipient', internalType: 'address' },
|
295
|
+
{ type: 'uint256', name: 'feeBips', internalType: 'uint256' },
|
296
|
+
{ type: 'address', name: 'feeRecipient', internalType: 'address' }
|
297
|
+
]
|
298
|
+
},
|
299
|
+
{ type: 'receive' }
|
300
|
+
];
|
301
|
+
//# sourceMappingURL=router-configuration.js.map
|