Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uniswap/sdk-core

Package Overview
Dependencies
Maintainers
16
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uniswap/sdk-core - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1-beta.1

2

dist/chains.d.ts

@@ -27,3 +27,3 @@ export declare enum ChainId {

export declare const SUPPORTED_CHAINS: readonly [ChainId.MAINNET, ChainId.OPTIMISM, ChainId.OPTIMISM_GOERLI, ChainId.OPTIMISM_SEPOLIA, ChainId.ARBITRUM_ONE, ChainId.ARBITRUM_GOERLI, ChainId.ARBITRUM_SEPOLIA, ChainId.POLYGON, ChainId.POLYGON_MUMBAI, ChainId.GOERLI, ChainId.SEPOLIA, ChainId.CELO_ALFAJORES, ChainId.CELO, ChainId.BNB, ChainId.AVALANCHE, ChainId.BASE, ChainId.BASE_GOERLI, ChainId.ZORA, ChainId.ZORA_SEPOLIA, ChainId.ROOTSTOCK, ChainId.BLAST];
export declare type SupportedChainsType = typeof SUPPORTED_CHAINS[number];
export declare type SupportedChainsType = (typeof SUPPORTED_CHAINS)[number];
export declare enum NativeCurrencyName {

@@ -30,0 +30,0 @@ ETHER = "ETH",

@@ -15,2 +15,16 @@ 'use strict';

function _toPrimitive(t, r) {
if ("object" != typeof t || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != typeof i) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
function _toPropertyKey(t) {
var i = _toPrimitive(t, "string");
return "symbol" == typeof i ? i : String(i);
}
function _defineProperties(target, props) {

@@ -22,17 +36,17 @@ for (var i = 0; i < props.length; i++) {

if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {

@@ -44,14 +58,18 @@ if (Object.prototype.hasOwnProperty.call(source, key)) {

}
return target;
};
return _extends.apply(this, arguments);
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
subClass.__proto__ = superClass;
_setPrototypeOf(subClass, superClass);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}

@@ -83,5 +101,3 @@ (function (ChainId) {

})(exports.ChainId || (exports.ChainId = {}));
var SUPPORTED_CHAINS = [exports.ChainId.MAINNET, exports.ChainId.OPTIMISM, exports.ChainId.OPTIMISM_GOERLI, exports.ChainId.OPTIMISM_SEPOLIA, exports.ChainId.ARBITRUM_ONE, exports.ChainId.ARBITRUM_GOERLI, exports.ChainId.ARBITRUM_SEPOLIA, exports.ChainId.POLYGON, exports.ChainId.POLYGON_MUMBAI, exports.ChainId.GOERLI, exports.ChainId.SEPOLIA, exports.ChainId.CELO_ALFAJORES, exports.ChainId.CELO, exports.ChainId.BNB, exports.ChainId.AVALANCHE, exports.ChainId.BASE, exports.ChainId.BASE_GOERLI, exports.ChainId.ZORA, exports.ChainId.ZORA_SEPOLIA, exports.ChainId.ROOTSTOCK, exports.ChainId.BLAST];
(function (NativeCurrencyName) {

@@ -101,3 +117,2 @@ // Strings match input for CLI

var DEFAULT_NETWORKS = [exports.ChainId.MAINNET, exports.ChainId.GOERLI, exports.ChainId.SEPOLIA];
function constructSameAddressMap(address, additionalNetworks) {

@@ -107,3 +122,2 @@ if (additionalNetworks === void 0) {

}
return DEFAULT_NETWORKS.concat(additionalNetworks).reduce(function (memo, chainId) {

@@ -114,3 +128,2 @@ memo[chainId] = address;

}
var UNI_ADDRESSES = /*#__PURE__*/constructSameAddressMap('0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', [exports.ChainId.OPTIMISM, exports.ChainId.ARBITRUM_ONE, exports.ChainId.POLYGON, exports.ChainId.POLYGON_MUMBAI, exports.ChainId.SEPOLIA]);

@@ -121,3 +134,2 @@ var UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS = '0x8B799381ac40b838BBA4131ffB26197C432AFe78';

*/
var V2_FACTORY_ADDRESS = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f';

@@ -128,6 +140,5 @@ var V2_FACTORY_ADDRESSES = (_V2_FACTORY_ADDRESSES = {}, _V2_FACTORY_ADDRESSES[exports.ChainId.MAINNET] = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f', _V2_FACTORY_ADDRESSES[exports.ChainId.GOERLI] = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f', _V2_FACTORY_ADDRESSES[exports.ChainId.SEPOLIA] = '0xB7f907f7A9eBC822a80BD25E224be42Ce0A698A0', _V2_FACTORY_ADDRESSES[exports.ChainId.OPTIMISM] = '0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf', _V2_FACTORY_ADDRESSES[exports.ChainId.ARBITRUM_ONE] = '0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9', _V2_FACTORY_ADDRESSES[exports.ChainId.AVALANCHE] = '0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C', _V2_FACTORY_ADDRESSES[exports.ChainId.BASE] = '0x8909dc15e40173ff4699343b6eb8132c65e18ec6', _V2_FACTORY_ADDRESSES[exports.ChainId.BNB] = '0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6', _V2_FACTORY_ADDRESSES[exports.ChainId.POLYGON] = '0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C', _V2_FACTORY_ADDRESSES[exports.ChainId.CELO] = '0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f', _V2_FACTORY_ADDRESSES[exports.ChainId.BLAST] = '0x5C346464d33F90bABaf70dB6388507CC889C1070', _V2_FACTORY_ADDRESSES);

*/
var V2_ROUTER_ADDRESS = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D';
var V2_ROUTER_ADDRESSES = (_V2_ROUTER_ADDRESSES = {}, _V2_ROUTER_ADDRESSES[exports.ChainId.MAINNET] = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', _V2_ROUTER_ADDRESSES[exports.ChainId.GOERLI] = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', _V2_ROUTER_ADDRESSES[exports.ChainId.ARBITRUM_ONE] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[exports.ChainId.OPTIMISM] = '0x4a7b5da61326a6379179b40d00f57e5bbdc962c2', _V2_ROUTER_ADDRESSES[exports.ChainId.BASE] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[exports.ChainId.AVALANCHE] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[exports.ChainId.BNB] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[exports.ChainId.POLYGON] = '0xedf6066a2b290c185783862c7f4776a2c8077ad1', _V2_ROUTER_ADDRESSES[exports.ChainId.BLAST] = '0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035', _V2_ROUTER_ADDRESSES); // Networks that share most of the same addresses i.e. Mainnet, Goerli, Optimism, Arbitrum, Polygon
var V2_ROUTER_ADDRESSES = (_V2_ROUTER_ADDRESSES = {}, _V2_ROUTER_ADDRESSES[exports.ChainId.MAINNET] = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', _V2_ROUTER_ADDRESSES[exports.ChainId.GOERLI] = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', _V2_ROUTER_ADDRESSES[exports.ChainId.ARBITRUM_ONE] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[exports.ChainId.OPTIMISM] = '0x4a7b5da61326a6379179b40d00f57e5bbdc962c2', _V2_ROUTER_ADDRESSES[exports.ChainId.BASE] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[exports.ChainId.AVALANCHE] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[exports.ChainId.BNB] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[exports.ChainId.POLYGON] = '0xedf6066a2b290c185783862c7f4776a2c8077ad1', _V2_ROUTER_ADDRESSES[exports.ChainId.BLAST] = '0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035', _V2_ROUTER_ADDRESSES);
// Networks that share most of the same addresses i.e. Mainnet, Goerli, Optimism, Arbitrum, Polygon
var DEFAULT_ADDRESSES = {

@@ -140,13 +151,9 @@ v3CoreFactoryAddress: '0x1F98431c8aD98523631AE4a59f267346ea31F984',

};
var MAINNET_ADDRESSES = /*#__PURE__*/_extends({}, DEFAULT_ADDRESSES, {
v1MixedRouteQuoterAddress: '0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E'
});
var GOERLI_ADDRESSES = /*#__PURE__*/_extends({}, DEFAULT_ADDRESSES, {
v1MixedRouteQuoterAddress: '0xBa60b6e6fF25488308789E6e0A65D838be34194e'
});
var OPTIMISM_ADDRESSES = DEFAULT_ADDRESSES;
var ARBITRUM_ONE_ADDRESSES = /*#__PURE__*/_extends({}, DEFAULT_ADDRESSES, {

@@ -156,5 +163,4 @@ multicallAddress: '0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB',

});
var POLYGON_ADDRESSES = DEFAULT_ADDRESSES; // celo v3 addresses
var POLYGON_ADDRESSES = DEFAULT_ADDRESSES;
// celo v3 addresses
var CELO_ADDRESSES = {

@@ -167,4 +173,4 @@ v3CoreFactoryAddress: '0xAfE208a311B21f13EF87E33A90049fC17A7acDEc',

tickLensAddress: '0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D'
}; // BNB v3 addresses
};
// BNB v3 addresses
var BNB_ADDRESSES = {

@@ -178,4 +184,4 @@ v3CoreFactoryAddress: '0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7',

swapRouter02Address: '0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2'
}; // optimism goerli addresses
};
// optimism goerli addresses
var OPTIMISM_GOERLI_ADDRESSES = {

@@ -188,4 +194,4 @@ v3CoreFactoryAddress: '0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10',

tickLensAddress: '0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e'
}; // optimism sepolia addresses
};
// optimism sepolia addresses
var OPTIMISM_SEPOLIA_ADDRESSES = {

@@ -199,4 +205,4 @@ v3CoreFactoryAddress: '0x8CE191193D15ea94e11d327b4c7ad8bbE520f6aF',

swapRouter02Address: '0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4'
}; // arbitrum goerli v3 addresses
};
// arbitrum goerli v3 addresses
var ARBITRUM_GOERLI_ADDRESSES = {

@@ -209,4 +215,4 @@ v3CoreFactoryAddress: '0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6',

tickLensAddress: '0xb52429333da969a0C79a60930a4Bf0020E5D1DE8'
}; // arbitrum sepolia v3 addresses
};
// arbitrum sepolia v3 addresses
var ARBITRUM_SEPOLIA_ADDRESSES = {

@@ -220,4 +226,4 @@ v3CoreFactoryAddress: '0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e',

swapRouter02Address: '0x101F443B4d1b059569D643917553c771E1b9663E'
}; // sepolia v3 addresses
};
// sepolia v3 addresses
var SEPOLIA_ADDRESSES = {

@@ -231,4 +237,4 @@ v3CoreFactoryAddress: '0x0227628f3F023bb0B980b67D528571c95c6DaC1c',

swapRouter02Address: '0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E'
}; // Avalanche v3 addresses
};
// Avalanche v3 addresses
var AVALANCHE_ADDRESSES = {

@@ -251,4 +257,4 @@ v3CoreFactoryAddress: '0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD',

swapRouter02Address: '0x2626664c2603336E57B271c5C0b26F421741e481'
}; // Base Goerli v3 addresses
};
// Base Goerli v3 addresses
var BASE_GOERLI_ADDRESSES = {

@@ -300,3 +306,2 @@ v3CoreFactoryAddress: '0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2',

/* V3 Contract Addresses */
var V3_CORE_FACTORY_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {

@@ -308,7 +313,5 @@ memo[chainId] = CHAIN_TO_ADDRESSES_MAP[chainId].v3CoreFactoryAddress;

var v3MigratorAddress = CHAIN_TO_ADDRESSES_MAP[chainId].v3MigratorAddress;
if (v3MigratorAddress) {
memo[chainId] = v3MigratorAddress;
}
return memo;

@@ -323,3 +326,2 @@ }, {}));

*/
var GOVERNANCE_ALPHA_V0_ADDRESSES = /*#__PURE__*/constructSameAddressMap('0x5e4be8Bc9637f0EAA1A755019e06A68ce081D58F');

@@ -329,3 +331,2 @@ /**

*/
var GOVERNANCE_ALPHA_V1_ADDRESSES = (_GOVERNANCE_ALPHA_V1_ = {}, _GOVERNANCE_ALPHA_V1_[exports.ChainId.MAINNET] = '0xC4e172459f1E7939D522503B81AFAaC1014CE6F6', _GOVERNANCE_ALPHA_V1_);

@@ -335,3 +336,2 @@ /**

*/
var GOVERNANCE_BRAVO_ADDRESSES = (_GOVERNANCE_BRAVO_ADD = {}, _GOVERNANCE_BRAVO_ADD[exports.ChainId.MAINNET] = '0x408ED6354d4973f66138C91495F2f2FCbd8724C3', _GOVERNANCE_BRAVO_ADD);

@@ -347,7 +347,5 @@ var TIMELOCK_ADDRESSES = /*#__PURE__*/constructSameAddressMap('0x1a9C8182C09F50C8318d769245beA52c32BE35BC');

var nonfungiblePositionManagerAddress = CHAIN_TO_ADDRESSES_MAP[chainId].nonfungiblePositionManagerAddress;
if (nonfungiblePositionManagerAddress) {
memo[chainId] = nonfungiblePositionManagerAddress;
}
return memo;

@@ -359,7 +357,5 @@ }, {}));

var tickLensAddress = CHAIN_TO_ADDRESSES_MAP[chainId].tickLensAddress;
if (tickLensAddress) {
memo[chainId] = tickLensAddress;
}
return memo;

@@ -369,7 +365,5 @@ }, {}));

var v1MixedRouteQuoterAddress = CHAIN_TO_ADDRESSES_MAP[chainId].v1MixedRouteQuoterAddress;
if (v1MixedRouteQuoterAddress) {
memo[chainId] = v1MixedRouteQuoterAddress;
}
return memo;

@@ -380,7 +374,5 @@ }, {});

var _CHAIN_TO_ADDRESSES_M2;
var id = chainId;
return (_CHAIN_TO_ADDRESSES_M2 = CHAIN_TO_ADDRESSES_MAP[id].swapRouter02Address) != null ? _CHAIN_TO_ADDRESSES_M2 : '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45';
}
return '';

@@ -393,3 +385,2 @@ };

})(exports.TradeType || (exports.TradeType = {}));
(function (Rounding) {

@@ -400,3 +391,2 @@ Rounding[Rounding["ROUND_DOWN"] = 0] = "ROUND_DOWN";

})(exports.Rounding || (exports.Rounding = {}));
var MaxUint256 = /*#__PURE__*/JSBI.BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');

@@ -414,7 +404,5 @@

}
this.numerator = JSBI.BigInt(numerator);
this.denominator = JSBI.BigInt(denominator);
}
Fraction.tryParseFraction = function tryParseFraction(fractionish) {

@@ -424,31 +412,23 @@ if (fractionish instanceof JSBI || typeof fractionish === 'number' || typeof fractionish === 'string') return new Fraction(fractionish);

throw new Error('Could not parse fraction');
} // performs floor division
}
// performs floor division
;
var _proto = Fraction.prototype;
_proto.invert = function invert() {
return new Fraction(this.denominator, this.numerator);
};
_proto.add = function add(other) {
var otherParsed = Fraction.tryParseFraction(other);
if (JSBI.equal(this.denominator, otherParsed.denominator)) {
return new Fraction(JSBI.add(this.numerator, otherParsed.numerator), this.denominator);
}
return new Fraction(JSBI.add(JSBI.multiply(this.numerator, otherParsed.denominator), JSBI.multiply(otherParsed.numerator, this.denominator)), JSBI.multiply(this.denominator, otherParsed.denominator));
};
_proto.subtract = function subtract(other) {
var otherParsed = Fraction.tryParseFraction(other);
if (JSBI.equal(this.denominator, otherParsed.denominator)) {
return new Fraction(JSBI.subtract(this.numerator, otherParsed.numerator), this.denominator);
}
return new Fraction(JSBI.subtract(JSBI.multiply(this.numerator, otherParsed.denominator), JSBI.multiply(otherParsed.numerator, this.denominator)), JSBI.multiply(this.denominator, otherParsed.denominator));
};
_proto.lessThan = function lessThan(other) {

@@ -458,3 +438,2 @@ var otherParsed = Fraction.tryParseFraction(other);

};
_proto.equalTo = function equalTo(other) {

@@ -464,3 +443,2 @@ var otherParsed = Fraction.tryParseFraction(other);

};
_proto.greaterThan = function greaterThan(other) {

@@ -470,3 +448,2 @@ var otherParsed = Fraction.tryParseFraction(other);

};
_proto.multiply = function multiply(other) {

@@ -476,3 +453,2 @@ var otherParsed = Fraction.tryParseFraction(other);

};
_proto.divide = function divide(other) {

@@ -482,3 +458,2 @@ var otherParsed = Fraction.tryParseFraction(other);

};
_proto.toSignificant = function toSignificant(significantDigits, format, rounding) {

@@ -490,7 +465,5 @@ if (format === void 0) {

}
if (rounding === void 0) {
rounding = exports.Rounding.ROUND_HALF_UP;
}
!Number.isInteger(significantDigits) ? invariant(false, significantDigits + " is not an integer.") : void 0;

@@ -505,3 +478,2 @@ !(significantDigits > 0) ? invariant(false, significantDigits + " is not positive.") : void 0;

};
_proto.toFixed = function toFixed(decimalPlaces, format, rounding) {

@@ -513,7 +485,5 @@ if (format === void 0) {

}
if (rounding === void 0) {
rounding = exports.Rounding.ROUND_HALF_UP;
}
!Number.isInteger(decimalPlaces) ? invariant(false, decimalPlaces + " is not an integer.") : void 0;

@@ -527,5 +497,3 @@ !(decimalPlaces >= 0) ? invariant(false, decimalPlaces + " is negative.") : void 0;

* Helper method for converting any super class back to a fraction
*/
;
*/;
_createClass(Fraction, [{

@@ -535,4 +503,4 @@ key: "quotient",

return JSBI.divide(this.numerator, this.denominator);
} // remainder after floor division
}
// remainder after floor division
}, {

@@ -549,3 +517,2 @@ key: "remainder",

}]);
return Fraction;

@@ -557,6 +524,4 @@ }();

_inheritsLoose(CurrencyAmount, _Fraction);
function CurrencyAmount(currency, numerator, denominator) {
var _this;
_this = _Fraction.call(this, numerator, denominator) || this;

@@ -573,4 +538,2 @@ !JSBI.lessThanOrEqual(_this.quotient, MaxUint256) ? invariant(false, 'AMOUNT') : void 0;

*/
CurrencyAmount.fromRawAmount = function fromRawAmount(currency, rawAmount) {

@@ -584,39 +547,25 @@ return new CurrencyAmount(currency, rawAmount);

* @param denominator the denominator of the fractional token amount
*/
;
*/;
CurrencyAmount.fromFractionalAmount = function fromFractionalAmount(currency, numerator, denominator) {
return new CurrencyAmount(currency, numerator, denominator);
};
var _proto = CurrencyAmount.prototype;
_proto.add = function add(other) {
!this.currency.equals(other.currency) ? invariant(false, 'CURRENCY') : void 0;
var added = _Fraction.prototype.add.call(this, other);
return CurrencyAmount.fromFractionalAmount(this.currency, added.numerator, added.denominator);
};
_proto.subtract = function subtract(other) {
!this.currency.equals(other.currency) ? invariant(false, 'CURRENCY') : void 0;
var subtracted = _Fraction.prototype.subtract.call(this, other);
return CurrencyAmount.fromFractionalAmount(this.currency, subtracted.numerator, subtracted.denominator);
};
_proto.multiply = function multiply(other) {
var multiplied = _Fraction.prototype.multiply.call(this, other);
return CurrencyAmount.fromFractionalAmount(this.currency, multiplied.numerator, multiplied.denominator);
};
_proto.divide = function divide(other) {
var divided = _Fraction.prototype.divide.call(this, other);
return CurrencyAmount.fromFractionalAmount(this.currency, divided.numerator, divided.denominator);
};
_proto.toSignificant = function toSignificant(significantDigits, format, rounding) {

@@ -626,10 +575,7 @@ if (significantDigits === void 0) {

}
if (rounding === void 0) {
rounding = exports.Rounding.ROUND_DOWN;
}
return _Fraction.prototype.divide.call(this, this.decimalScale).toSignificant(significantDigits, format, rounding);
};
_proto.toFixed = function toFixed(decimalPlaces, format, rounding) {

@@ -639,11 +585,8 @@ if (decimalPlaces === void 0) {

}
if (rounding === void 0) {
rounding = exports.Rounding.ROUND_DOWN;
}
!(decimalPlaces <= this.currency.decimals) ? invariant(false, 'DECIMALS') : void 0;
return _Fraction.prototype.divide.call(this, this.decimalScale).toFixed(decimalPlaces, format, rounding);
};
_proto.toExact = function toExact(format) {

@@ -655,7 +598,5 @@ if (format === void 0) {

}
Big$1.DP = this.currency.decimals;
return new Big$1(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(format);
};
_createClass(CurrencyAmount, [{

@@ -668,3 +609,2 @@ key: "wrapped",

}]);
return CurrencyAmount;

@@ -678,13 +618,9 @@ }(Fraction);

*/
function toPercent(fraction) {
return new Percent(fraction.numerator, fraction.denominator);
}
var Percent = /*#__PURE__*/function (_Fraction) {
_inheritsLoose(Percent, _Fraction);
function Percent() {
var _this;
_this = _Fraction.apply(this, arguments) || this;

@@ -694,25 +630,18 @@ /**

*/
_this.isPercent = true;
return _this;
}
var _proto = Percent.prototype;
_proto.add = function add(other) {
return toPercent(_Fraction.prototype.add.call(this, other));
};
_proto.subtract = function subtract(other) {
return toPercent(_Fraction.prototype.subtract.call(this, other));
};
_proto.multiply = function multiply(other) {
return toPercent(_Fraction.prototype.multiply.call(this, other));
};
_proto.divide = function divide(other) {
return toPercent(_Fraction.prototype.divide.call(this, other));
};
_proto.toSignificant = function toSignificant(significantDigits, format, rounding) {

@@ -722,6 +651,4 @@ if (significantDigits === void 0) {

}
return _Fraction.prototype.multiply.call(this, ONE_HUNDRED).toSignificant(significantDigits, format, rounding);
};
_proto.toFixed = function toFixed(decimalPlaces, format, rounding) {

@@ -731,6 +658,4 @@ if (decimalPlaces === void 0) {

}
return _Fraction.prototype.multiply.call(this, ONE_HUNDRED).toFixed(decimalPlaces, format, rounding);
};
return Percent;

@@ -741,3 +666,2 @@ }(Fraction);

_inheritsLoose(Price, _Fraction);
/**

@@ -749,9 +673,6 @@ * Construct a price, either with the base and quote currency amount, or the

var _this;
var baseCurrency, quoteCurrency, denominator, numerator;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (args.length === 4) {

@@ -770,3 +691,2 @@ baseCurrency = args[0];

}
_this = _Fraction.call(this, numerator, denominator) || this;

@@ -781,6 +701,3 @@ _this.baseCurrency = baseCurrency;

*/
var _proto = Price.prototype;
_proto.invert = function invert() {

@@ -792,10 +709,6 @@ return new Price(this.quoteCurrency, this.baseCurrency, this.numerator, this.denominator);

* @param other the other price
*/
;
*/;
_proto.multiply = function multiply(other) {
!this.quoteCurrency.equals(other.baseCurrency) ? invariant(false, 'TOKEN') : void 0;
var fraction = _Fraction.prototype.multiply.call(this, other);
return new Price(this.baseCurrency, other.quoteCurrency, fraction.denominator, fraction.numerator);

@@ -806,10 +719,6 @@ }

* @param currencyAmount the amount of base currency to quote against the price
*/
;
*/;
_proto.quote = function quote(currencyAmount) {
!currencyAmount.currency.equals(this.baseCurrency) ? invariant(false, 'TOKEN') : void 0;
var result = _Fraction.prototype.multiply.call(this, currencyAmount);
return CurrencyAmount.fromFractionalAmount(this.quoteCurrency, result.numerator, result.denominator);

@@ -820,5 +729,3 @@ }

* @private
*/
;
*/;
_proto.toSignificant = function toSignificant(significantDigits, format, rounding) {

@@ -828,6 +735,4 @@ if (significantDigits === void 0) {

}
return this.adjustedForDecimals.toSignificant(significantDigits, format, rounding);
};
_proto.toFixed = function toFixed(decimalPlaces, format, rounding) {

@@ -837,6 +742,4 @@ if (decimalPlaces === void 0) {

}
return this.adjustedForDecimals.toFixed(decimalPlaces, format, rounding);
};
_createClass(Price, [{

@@ -848,3 +751,2 @@ key: "adjustedForDecimals",

}]);
return Price;

@@ -856,3 +758,2 @@ }(Fraction);

*/
var BaseCurrency =

@@ -878,9 +779,6 @@ /**

*/
var NativeCurrency = /*#__PURE__*/function (_BaseCurrency) {
_inheritsLoose(NativeCurrency, _BaseCurrency);
function NativeCurrency() {
var _this;
_this = _BaseCurrency.apply(this, arguments) || this;

@@ -891,3 +789,2 @@ _this.isNative = true;

}
return NativeCurrency;

@@ -900,3 +797,2 @@ }(BaseCurrency);

*/
function validateAndParseAddress(address$1) {

@@ -908,4 +804,4 @@ try {

}
} // Checks a string starts with 0x, is 42 characters long and contains only hex characters after 0x
}
// Checks a string starts with 0x, is 42 characters long and contains only hex characters after 0x
var startsWith0xLen42HexRegex = /^0x[0-9a-fA-F]{40}$/;

@@ -916,3 +812,2 @@ /**

*/
function checkValidAddress(address) {

@@ -922,3 +817,2 @@ if (startsWith0xLen42HexRegex.test(address)) {

}
throw new Error(address + " is not a valid address.");

@@ -930,6 +824,4 @@ }

*/
var Token = /*#__PURE__*/function (_BaseCurrency) {
_inheritsLoose(Token, _BaseCurrency);
/**

@@ -948,7 +840,5 @@ *

var _this;
_this = _BaseCurrency.call(this, chainId, decimals, symbol, name) || this;
_this.isNative = false;
_this.isToken = true;
if (bypassChecksum) {

@@ -959,11 +849,8 @@ _this.address = checkValidAddress(address);

}
if (buyFeeBps) {
!buyFeeBps.gte(bignumber.BigNumber.from(0)) ? invariant(false, 'NON-NEGATIVE FOT FEES') : void 0;
}
if (sellFeeBps) {
!sellFeeBps.gte(bignumber.BigNumber.from(0)) ? invariant(false, 'NON-NEGATIVE FOT FEES') : void 0;
}
_this.buyFeeBps = buyFeeBps;

@@ -977,6 +864,3 @@ _this.sellFeeBps = sellFeeBps;

*/
var _proto = Token.prototype;
_proto.equals = function equals(other) {

@@ -990,5 +874,3 @@ return other.isToken && this.chainId === other.chainId && this.address.toLowerCase() === other.address.toLowerCase();

* @throws if the tokens are on different chains
*/
;
*/;
_proto.sortsBefore = function sortsBefore(other) {

@@ -1001,5 +883,3 @@ !(this.chainId === other.chainId) ? invariant(false, 'CHAIN_IDS') : void 0;

* Return this token, which does not need to be wrapped
*/
;
*/;
_createClass(Token, [{

@@ -1011,36 +891,42 @@ key: "wrapped",

}]);
return Token;
}(BaseCurrency);
var _WETH;
/**
* Known WETH9 implementation addresses, used in our implementation of Ether#wrapped
*/
var WETH9 = {
1: /*#__PURE__*/new Token(1, '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 18, 'WETH', 'Wrapped Ether'),
3: /*#__PURE__*/new Token(3, '0xc778417E063141139Fce010982780140Aa0cD5Ab', 18, 'WETH', 'Wrapped Ether'),
4: /*#__PURE__*/new Token(4, '0xc778417E063141139Fce010982780140Aa0cD5Ab', 18, 'WETH', 'Wrapped Ether'),
5: /*#__PURE__*/new Token(5, '0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6', 18, 'WETH', 'Wrapped Ether'),
42: /*#__PURE__*/new Token(42, '0xd0A1E359811322d97991E03f863a0C30C2cF029C', 18, 'WETH', 'Wrapped Ether'),
10: /*#__PURE__*/new Token(10, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'),
69: /*#__PURE__*/new Token(69, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'),
11155420: /*#__PURE__*/new Token(11155420, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'),
42161: /*#__PURE__*/new Token(42161, '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', 18, 'WETH', 'Wrapped Ether'),
421611: /*#__PURE__*/new Token(421611, '0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681', 18, 'WETH', 'Wrapped Ether'),
421614: /*#__PURE__*/new Token(421614, '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', 18, 'WETH', 'Wrapped Ether'),
8453: /*#__PURE__*/new Token(8453, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'),
56: /*#__PURE__*/new Token(56, '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', 18, 'WBNB', 'Wrapped BNB'),
137: /*#__PURE__*/new Token(137, '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', 18, 'WMATIC', 'Wrapped MATIC'),
43114: /*#__PURE__*/new Token(43114, '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7', 18, 'WAVAX', 'Wrapped AVAX')
};
var WETH9 = (_WETH = {}, _WETH[1] = /*#__PURE__*/new Token(1, '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 18, 'WETH', 'Wrapped Ether'), _WETH[3] = /*#__PURE__*/new Token(3, '0xc778417E063141139Fce010982780140Aa0cD5Ab', 18, 'WETH', 'Wrapped Ether'), _WETH[4] = /*#__PURE__*/new Token(4, '0xc778417E063141139Fce010982780140Aa0cD5Ab', 18, 'WETH', 'Wrapped Ether'), _WETH[5] = /*#__PURE__*/new Token(5, '0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6', 18, 'WETH', 'Wrapped Ether'), _WETH[42] = /*#__PURE__*/new Token(42, '0xd0A1E359811322d97991E03f863a0C30C2cF029C', 18, 'WETH', 'Wrapped Ether'), _WETH[10] = /*#__PURE__*/new Token(10, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'), _WETH[69] = /*#__PURE__*/new Token(69, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'), _WETH[11155420] = /*#__PURE__*/new Token(11155420, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'), _WETH[42161] = /*#__PURE__*/new Token(42161, '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', 18, 'WETH', 'Wrapped Ether'), _WETH[421611] = /*#__PURE__*/new Token(421611, '0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681', 18, 'WETH', 'Wrapped Ether'), _WETH[421614] = /*#__PURE__*/new Token(421614, '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', 18, 'WETH', 'Wrapped Ether'), _WETH[8453] = /*#__PURE__*/new Token(8453, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'), _WETH[56] = /*#__PURE__*/new Token(56, '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', 18, 'WBNB', 'Wrapped BNB'), _WETH[137] = /*#__PURE__*/new Token(137, '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', 18, 'WMATIC', 'Wrapped MATIC'), _WETH[43114] = /*#__PURE__*/new Token(43114, '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7', 18, 'WAVAX', 'Wrapped AVAX'), _WETH);
/**
* Ether is the main usage of a 'native' currency, i.e. for Ethereum mainnet and all testnets
*/
var Ether = /*#__PURE__*/function (_NativeCurrency) {
_inheritsLoose(Ether, _NativeCurrency);
function Ether(chainId) {
return _NativeCurrency.call(this, chainId, 18, 'ETH', 'Ether') || this;
}
Ether.onChain = function onChain(chainId) {
var _this$_etherCache$cha;
return (_this$_etherCache$cha = this._etherCache[chainId]) != null ? _this$_etherCache$cha : this._etherCache[chainId] = new Ether(chainId);
};
var _proto = Ether.prototype;
_proto.equals = function equals(other) {
return other.isNative && other.chainId === this.chainId;
};
_createClass(Ether, [{

@@ -1054,3 +940,2 @@ key: "wrapped",

}]);
return Ether;

@@ -1066,6 +951,5 @@ }(NativeCurrency);

*/
function computePriceImpact(midPrice, inputAmount, outputAmount) {
var quotedOutputAmount = midPrice.quote(inputAmount); // calculate price impact := (exactQuote - outputAmount) / exactQuote
var quotedOutputAmount = midPrice.quote(inputAmount);
// calculate price impact := (exactQuote - outputAmount) / exactQuote
var priceImpact = quotedOutputAmount.subtract(outputAmount).divide(quotedOutputAmount);

@@ -1075,9 +959,9 @@ return new Percent(priceImpact.numerator, priceImpact.denominator);

// given an array of items sorted by `comparator`, insert an item into its sort index and constrain the size to
// `maxSize` by removing the last item
function sortedInsert(items, add, maxSize, comparator) {
!(maxSize > 0) ? invariant(false, 'MAX_SIZE_ZERO') : void 0; // this is an invariant because the interface cannot return multiple removed items if items.length exceeds maxSize
!(items.length <= maxSize) ? invariant(false, 'ITEMS_SIZE') : void 0; // short circuit first item add
!(maxSize > 0) ? invariant(false, 'MAX_SIZE_ZERO') : void 0;
// this is an invariant because the interface cannot return multiple removed items if items.length exceeds maxSize
!(items.length <= maxSize) ? invariant(false, 'ITEMS_SIZE') : void 0;
// short circuit first item add
if (items.length === 0) {

@@ -1087,14 +971,11 @@ items.push(add);

} else {
var isFull = items.length === maxSize; // short circuit if full and the additional item does not come before the last item
var isFull = items.length === maxSize;
// short circuit if full and the additional item does not come before the last item
if (isFull && comparator(items[items.length - 1], add) <= 0) {
return add;
}
var lo = 0,
hi = items.length;
hi = items.length;
while (lo < hi) {
var mid = lo + hi >>> 1;
if (comparator(items[mid], add) <= 0) {

@@ -1106,3 +987,2 @@ lo = mid + 1;

}
items.splice(lo, 0, add);

@@ -1121,10 +1001,8 @@ return isFull ? items.pop() : null;

*/
function sqrt(value) {
!JSBI.greaterThanOrEqual(value, ZERO) ? invariant(false, 'NEGATIVE') : void 0; // rely on built in sqrt if possible
!JSBI.greaterThanOrEqual(value, ZERO) ? invariant(false, 'NEGATIVE') : void 0;
// rely on built in sqrt if possible
if (JSBI.lessThan(value, MAX_SAFE_INTEGER)) {
return JSBI.BigInt(Math.floor(Math.sqrt(JSBI.toNumber(value))));
}
var z;

@@ -1134,3 +1012,2 @@ var x;

x = JSBI.add(JSBI.divide(value, TWO), ONE);
while (JSBI.lessThan(x, z)) {

@@ -1140,3 +1017,2 @@ z = x;

}
return z;

@@ -1143,0 +1019,0 @@ }

@@ -1,2 +0,2 @@

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r,t=e(require("jsbi")),n=e(require("tiny-invariant")),d=e(require("decimal.js-light")),a=e(require("big.js")),o=e(require("toformat")),i=require("@ethersproject/bignumber"),s=require("@ethersproject/address");function c(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function A(e,r,t){return r&&c(e.prototype,r),t&&c(e,t),e}function u(){return(u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function f(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r}(r=exports.ChainId||(exports.ChainId={}))[r.MAINNET=1]="MAINNET",r[r.GOERLI=5]="GOERLI",r[r.SEPOLIA=11155111]="SEPOLIA",r[r.OPTIMISM=10]="OPTIMISM",r[r.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",r[r.OPTIMISM_SEPOLIA=11155420]="OPTIMISM_SEPOLIA",r[r.ARBITRUM_ONE=42161]="ARBITRUM_ONE",r[r.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",r[r.ARBITRUM_SEPOLIA=421614]="ARBITRUM_SEPOLIA",r[r.POLYGON=137]="POLYGON",r[r.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",r[r.CELO=42220]="CELO",r[r.CELO_ALFAJORES=44787]="CELO_ALFAJORES",r[r.GNOSIS=100]="GNOSIS",r[r.MOONBEAM=1284]="MOONBEAM",r[r.BNB=56]="BNB",r[r.AVALANCHE=43114]="AVALANCHE",r[r.BASE_GOERLI=84531]="BASE_GOERLI",r[r.BASE=8453]="BASE",r[r.ZORA=7777777]="ZORA",r[r.ZORA_SEPOLIA=999999999]="ZORA_SEPOLIA",r[r.ROOTSTOCK=30]="ROOTSTOCK",r[r.BLAST=81457]="BLAST";var E,C,x,p,b,D,l,B,h,I=[exports.ChainId.MAINNET,exports.ChainId.OPTIMISM,exports.ChainId.OPTIMISM_GOERLI,exports.ChainId.OPTIMISM_SEPOLIA,exports.ChainId.ARBITRUM_ONE,exports.ChainId.ARBITRUM_GOERLI,exports.ChainId.ARBITRUM_SEPOLIA,exports.ChainId.POLYGON,exports.ChainId.POLYGON_MUMBAI,exports.ChainId.GOERLI,exports.ChainId.SEPOLIA,exports.ChainId.CELO_ALFAJORES,exports.ChainId.CELO,exports.ChainId.BNB,exports.ChainId.AVALANCHE,exports.ChainId.BASE,exports.ChainId.BASE_GOERLI,exports.ChainId.ZORA,exports.ChainId.ZORA_SEPOLIA,exports.ChainId.ROOTSTOCK,exports.ChainId.BLAST];(E=exports.NativeCurrencyName||(exports.NativeCurrencyName={})).ETHER="ETH",E.MATIC="MATIC",E.CELO="CELO",E.GNOSIS="XDAI",E.MOONBEAM="GLMR",E.BNB="BNB",E.AVAX="AVAX",E.ROOTSTOCK="RBTC";var F=[exports.ChainId.MAINNET,exports.ChainId.GOERLI,exports.ChainId.SEPOLIA];function O(e,r){return void 0===r&&(r=[]),F.concat(r).reduce((function(r,t){return r[t]=e,r}),{})}var m,R,S=O("0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",[exports.ChainId.OPTIMISM,exports.ChainId.ARBITRUM_ONE,exports.ChainId.POLYGON,exports.ChainId.POLYGON_MUMBAI,exports.ChainId.SEPOLIA]),_=((C={})[exports.ChainId.MAINNET]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",C[exports.ChainId.GOERLI]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",C[exports.ChainId.SEPOLIA]="0xB7f907f7A9eBC822a80BD25E224be42Ce0A698A0",C[exports.ChainId.OPTIMISM]="0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf",C[exports.ChainId.ARBITRUM_ONE]="0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9",C[exports.ChainId.AVALANCHE]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",C[exports.ChainId.BASE]="0x8909dc15e40173ff4699343b6eb8132c65e18ec6",C[exports.ChainId.BNB]="0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6",C[exports.ChainId.POLYGON]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",C[exports.ChainId.CELO]="0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f",C[exports.ChainId.BLAST]="0x5C346464d33F90bABaf70dB6388507CC889C1070",C),T=((x={})[exports.ChainId.MAINNET]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",x[exports.ChainId.GOERLI]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",x[exports.ChainId.ARBITRUM_ONE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",x[exports.ChainId.OPTIMISM]="0x4a7b5da61326a6379179b40d00f57e5bbdc962c2",x[exports.ChainId.BASE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",x[exports.ChainId.AVALANCHE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",x[exports.ChainId.BNB]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",x[exports.ChainId.POLYGON]="0xedf6066a2b290c185783862c7f4776a2c8077ad1",x[exports.ChainId.BLAST]="0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035",x),y={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x1F98415757620B543A52E61c46B32eB19261F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",v3MigratorAddress:"0xA5644E29708357803b5A882D272c41cC0dF92B34",nonfungiblePositionManagerAddress:"0xC36442b4a4522E871399CD717aBDD847Ab11FE88"},v=u({},y,{v1MixedRouteQuoterAddress:"0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E"}),N=u({},y,{v1MixedRouteQuoterAddress:"0xBa60b6e6fF25488308789E6e0A65D838be34194e"}),g=y,M=u({},y,{multicallAddress:"0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB",tickLensAddress:"0xbfd8137f7d1516D3ea5cA83523914859ec47F573"}),L=y,P={v3CoreFactoryAddress:"0xAfE208a311B21f13EF87E33A90049fC17A7acDEc",multicallAddress:"0x633987602DE5C4F337e3DbF265303A1080324204",quoterAddress:"0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8",v3MigratorAddress:"0x3cFd4d48EDfDCC53D3f173F596f621064614C582",nonfungiblePositionManagerAddress:"0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A",tickLensAddress:"0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D"},U=((p={})[exports.ChainId.MAINNET]=v,p[exports.ChainId.OPTIMISM]=g,p[exports.ChainId.ARBITRUM_ONE]=M,p[exports.ChainId.POLYGON]=L,p[exports.ChainId.POLYGON_MUMBAI]=L,p[exports.ChainId.GOERLI]=N,p[exports.ChainId.CELO]=P,p[exports.ChainId.CELO_ALFAJORES]=P,p[exports.ChainId.BNB]={v3CoreFactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",multicallAddress:"0x963Df249eD09c358A4819E39d9Cd5736c3087184",quoterAddress:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",v3MigratorAddress:"0x32681814957e0C13117ddc0c2aba232b5c9e760f",nonfungiblePositionManagerAddress:"0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613",tickLensAddress:"0xD9270014D396281579760619CCf4c3af0501A47C",swapRouter02Address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2"},p[exports.ChainId.OPTIMISM_GOERLI]={v3CoreFactoryAddress:"0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10",multicallAddress:"0x07F2D8a2a02251B62af965f22fC4744A5f96BCCd",quoterAddress:"0x9569CbA925c8ca2248772A9A4976A516743A246F",v3MigratorAddress:"0xf6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8",nonfungiblePositionManagerAddress:"0x39Ca85Af2F383190cBf7d7c41ED9202D27426EF6",tickLensAddress:"0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e"},p[exports.ChainId.OPTIMISM_SEPOLIA]={v3CoreFactoryAddress:"0x8CE191193D15ea94e11d327b4c7ad8bbE520f6aF",multicallAddress:"0x80e4e06841bb76AA9735E0448cB8d003C0EF009a",quoterAddress:"0x0FBEa6cf957d95ee9313490050F6A0DA68039404",v3MigratorAddress:"0xE7EcbAAaA54D007A00dbb6c1d2f150066D69dA07",nonfungiblePositionManagerAddress:"0xdA75cEf1C93078e8b736FCA5D5a30adb97C8957d",tickLensAddress:"0xCb7f54747F58F8944973cea5b8f4ac2209BadDC5",swapRouter02Address:"0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4"},p[exports.ChainId.ARBITRUM_GOERLI]={v3CoreFactoryAddress:"0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6",multicallAddress:"0x8260CB40247290317a4c062F3542622367F206Ee",quoterAddress:"0x1dd92b83591781D0C6d98d07391eea4b9a6008FA",v3MigratorAddress:"0xA815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3",nonfungiblePositionManagerAddress:"0x622e4726a167799826d1E1D150b076A7725f5D81",tickLensAddress:"0xb52429333da969a0C79a60930a4Bf0020E5D1DE8"},p[exports.ChainId.ARBITRUM_SEPOLIA]={v3CoreFactoryAddress:"0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e",multicallAddress:"0x2B718b475e385eD29F56775a66aAB1F5cC6B2A0A",quoterAddress:"0x2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B",v3MigratorAddress:"0x398f43ef2c67B941147157DA1c5a868E906E043D",nonfungiblePositionManagerAddress:"0x6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65",tickLensAddress:"0x0fd18587734e5C2dcE2dccDcC7DD1EC89ba557d9",swapRouter02Address:"0x101F443B4d1b059569D643917553c771E1b9663E"},p[exports.ChainId.SEPOLIA]={v3CoreFactoryAddress:"0x0227628f3F023bb0B980b67D528571c95c6DaC1c",multicallAddress:"0xD7F33bCdb21b359c8ee6F0251d30E94832baAd07",quoterAddress:"0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3",v3MigratorAddress:"0x729004182cF005CEC8Bd85df140094b6aCbe8b15",nonfungiblePositionManagerAddress:"0x1238536071E1c677A632429e3655c799b22cDA52",tickLensAddress:"0xd7f33bcdb21b359c8ee6f0251d30e94832baad07",swapRouter02Address:"0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E"},p[exports.ChainId.AVALANCHE]={v3CoreFactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",multicallAddress:"0x0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2",quoterAddress:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",v3MigratorAddress:"0x44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97",nonfungiblePositionManagerAddress:"0x655C406EBFa14EE2006250925e54ec43AD184f8B",tickLensAddress:"0xEB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950",swapRouter02Address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE"},p[exports.ChainId.BASE]={v3CoreFactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",multicallAddress:"0x091e99cb1C49331a94dD62755D168E941AbD0693",quoterAddress:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",v3MigratorAddress:"0x23cF10b1ee3AdfCA73B0eF17C07F7577e7ACd2d7",nonfungiblePositionManagerAddress:"0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",tickLensAddress:"0x0CdeE061c75D43c82520eD998C23ac2991c9ac6d",swapRouter02Address:"0x2626664c2603336E57B271c5C0b26F421741e481"},p[exports.ChainId.BASE_GOERLI]={v3CoreFactoryAddress:"0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2",multicallAddress:"0xB206027a9E0E13F05eBEFa5D2402Bab3eA716439",quoterAddress:"0xedf539058e28E5937dAef3f69cEd0b25fbE66Ae9",v3MigratorAddress:"0x3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE",nonfungiblePositionManagerAddress:"0x3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30",tickLensAddress:"0x1acB873Ee909D0c98adB18e4474943249F931b92",swapRouter02Address:"0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d"},p[exports.ChainId.ZORA]={v3CoreFactoryAddress:"0x7145F8aeef1f6510E92164038E1B6F8cB2c42Cbb",multicallAddress:"0xA51c76bEE6746cB487a7e9312E43e2b8f4A37C15",quoterAddress:"0x11867e1b3348F3ce4FcC170BC5af3d23E07E64Df",v3MigratorAddress:"0x048352d8dCF13686982C799da63fA6426a9D0b60",nonfungiblePositionManagerAddress:"0xbC91e8DfA3fF18De43853372A3d7dfe585137D78",tickLensAddress:"0x209AAda09D74Ad3B8D0E92910Eaf85D2357e3044",swapRouter02Address:"0x7De04c96BE5159c3b5CeffC82aa176dc81281557"},p[exports.ChainId.ZORA_SEPOLIA]={v3CoreFactoryAddress:"0x4324A677D74764f46f33ED447964252441aA8Db6",multicallAddress:"0xA1E7e3A69671C4494EC59Dbd442de930a93F911A",quoterAddress:"0xC195976fEF0985886E37036E2DF62bF371E12Df0",v3MigratorAddress:"0x65ef259b31bf1d977c37e9434658694267674897",nonfungiblePositionManagerAddress:"0xB8458EaAe43292e3c1F7994EFd016bd653d23c20",tickLensAddress:"0x23C0F71877a1Fc4e20A78018f9831365c85f3064"},p[exports.ChainId.ROOTSTOCK]={v3CoreFactoryAddress:"0xaF37EC98A00FD63689CF3060BF3B6784E00caD82",multicallAddress:"0x996a9858cDfa45Ad68E47c9A30a7201E29c6a386",quoterAddress:"0xb51727c996C68E60F598A923a5006853cd2fEB31",v3MigratorAddress:"0x16678977CA4ec3DAD5efc7b15780295FE5f56162",nonfungiblePositionManagerAddress:"0x9d9386c042F194B460Ec424a1e57ACDE25f5C4b1",tickLensAddress:"0x55B9dF5bF68ADe972191a91980459f48ecA16afC",swapRouter02Address:"0x0B14ff67f0014046b4b99057Aec4509640b3947A"},p[exports.ChainId.BLAST]={v3CoreFactoryAddress:"0x792edAdE80af5fC680d96a2eD80A44247D2Cf6Fd",multicallAddress:"0xdC7f370de7631cE9e2c2e1DCDA6B3B5744Cf4705",quoterAddress:"0x6Cdcd65e03c1CEc3730AeeCd45bc140D57A25C77",v3MigratorAddress:"0x15CA7043CD84C5D21Ae76Ba0A1A967d42c40ecE0",nonfungiblePositionManagerAddress:"0xB218e4f7cF0533d4696fDfC419A0023D33345F28",tickLensAddress:"0x2E95185bCdD928a3e984B7e2D6560Ab1b17d7274",swapRouter02Address:"0x549FEB8c9bd4c12Ad2AB27022dA12492aC452B66"},p),w=u({},I.reduce((function(e,r){return e[r]=U[r].v3CoreFactoryAddress,e}),{})),q=u({},I.reduce((function(e,r){var t=U[r].v3MigratorAddress;return t&&(e[r]=t),e}),{})),G=u({},I.reduce((function(e,r){return e[r]=U[r].multicallAddress,e}),{})),W=O("0x5e4be8Bc9637f0EAA1A755019e06A68ce081D58F"),H=((b={})[exports.ChainId.MAINNET]="0xC4e172459f1E7939D522503B81AFAaC1014CE6F6",b),k=((D={})[exports.ChainId.MAINNET]="0x408ED6354d4973f66138C91495F2f2FCbd8724C3",D),V=O("0x1a9C8182C09F50C8318d769245beA52c32BE35BC"),Y=((l={})[exports.ChainId.MAINNET]="0x090D4613473dEE047c3f2706764f49E0821D256e",l),j=((B={})[exports.ChainId.MAINNET]="0xeca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8",B),X=u({},I.reduce((function(e,r){return e[r]=U[r].quoterAddress,e}),{})),K=u({},I.reduce((function(e,r){var t=U[r].nonfungiblePositionManagerAddress;return t&&(e[r]=t),e}),{})),Z=u({},O("0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e")),Q=((h={})[exports.ChainId.MAINNET]="0x65770b5283117639760beA3F867b69b3697a91dd",h),J=u({},I.reduce((function(e,r){var t=U[r].tickLensAddress;return t&&(e[r]=t),e}),{})),$=I.reduce((function(e,r){var t=U[r].v1MixedRouteQuoterAddress;return t&&(e[r]=t),e}),{});(m=exports.TradeType||(exports.TradeType={}))[m.EXACT_INPUT=0]="EXACT_INPUT",m[m.EXACT_OUTPUT=1]="EXACT_OUTPUT",(R=exports.Rounding||(exports.Rounding={}))[R.ROUND_DOWN=0]="ROUND_DOWN",R[R.ROUND_HALF_UP=1]="ROUND_HALF_UP",R[R.ROUND_UP=2]="ROUND_UP";var z,ee,re=t.BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),te=o(d),ne=o(a),de=((z={})[exports.Rounding.ROUND_DOWN]=te.ROUND_DOWN,z[exports.Rounding.ROUND_HALF_UP]=te.ROUND_HALF_UP,z[exports.Rounding.ROUND_UP]=te.ROUND_UP,z),ae=((ee={})[exports.Rounding.ROUND_DOWN]=0,ee[exports.Rounding.ROUND_HALF_UP]=1,ee[exports.Rounding.ROUND_UP]=3,ee),oe=function(){function e(e,r){void 0===r&&(r=t.BigInt(1)),this.numerator=t.BigInt(e),this.denominator=t.BigInt(r)}e.tryParseFraction=function(r){if(r instanceof t||"number"==typeof r||"string"==typeof r)return new e(r);if("numerator"in r&&"denominator"in r)return r;throw new Error("Could not parse fraction")};var r=e.prototype;return r.invert=function(){return new e(this.denominator,this.numerator)},r.add=function(r){var n=e.tryParseFraction(r);return t.equal(this.denominator,n.denominator)?new e(t.add(this.numerator,n.numerator),this.denominator):new e(t.add(t.multiply(this.numerator,n.denominator),t.multiply(n.numerator,this.denominator)),t.multiply(this.denominator,n.denominator))},r.subtract=function(r){var n=e.tryParseFraction(r);return t.equal(this.denominator,n.denominator)?new e(t.subtract(this.numerator,n.numerator),this.denominator):new e(t.subtract(t.multiply(this.numerator,n.denominator),t.multiply(n.numerator,this.denominator)),t.multiply(this.denominator,n.denominator))},r.lessThan=function(r){var n=e.tryParseFraction(r);return t.lessThan(t.multiply(this.numerator,n.denominator),t.multiply(n.numerator,this.denominator))},r.equalTo=function(r){var n=e.tryParseFraction(r);return t.equal(t.multiply(this.numerator,n.denominator),t.multiply(n.numerator,this.denominator))},r.greaterThan=function(r){var n=e.tryParseFraction(r);return t.greaterThan(t.multiply(this.numerator,n.denominator),t.multiply(n.numerator,this.denominator))},r.multiply=function(r){var n=e.tryParseFraction(r);return new e(t.multiply(this.numerator,n.numerator),t.multiply(this.denominator,n.denominator))},r.divide=function(r){var n=e.tryParseFraction(r);return new e(t.multiply(this.numerator,n.denominator),t.multiply(this.denominator,n.numerator))},r.toSignificant=function(e,r,t){void 0===r&&(r={groupSeparator:""}),void 0===t&&(t=exports.Rounding.ROUND_HALF_UP),Number.isInteger(e)||n(!1),e>0||n(!1),te.set({precision:e+1,rounding:de[t]});var d=new te(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(e);return d.toFormat(d.decimalPlaces(),r)},r.toFixed=function(e,r,t){return void 0===r&&(r={groupSeparator:""}),void 0===t&&(t=exports.Rounding.ROUND_HALF_UP),Number.isInteger(e)||n(!1),e>=0||n(!1),ne.DP=e,ne.RM=ae[t],new ne(this.numerator.toString()).div(this.denominator.toString()).toFormat(e,r)},A(e,[{key:"quotient",get:function(){return t.divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new e(t.remainder(this.numerator,this.denominator),this.denominator)}},{key:"asFraction",get:function(){return new e(this.numerator,this.denominator)}}]),e}(),ie=o(a),se=function(e){function r(r,d,a){var o;return o=e.call(this,d,a)||this,t.lessThanOrEqual(o.quotient,re)||n(!1),o.currency=r,o.decimalScale=t.exponentiate(t.BigInt(10),t.BigInt(r.decimals)),o}f(r,e),r.fromRawAmount=function(e,t){return new r(e,t)},r.fromFractionalAmount=function(e,t,n){return new r(e,t,n)};var d=r.prototype;return d.add=function(t){this.currency.equals(t.currency)||n(!1);var d=e.prototype.add.call(this,t);return r.fromFractionalAmount(this.currency,d.numerator,d.denominator)},d.subtract=function(t){this.currency.equals(t.currency)||n(!1);var d=e.prototype.subtract.call(this,t);return r.fromFractionalAmount(this.currency,d.numerator,d.denominator)},d.multiply=function(t){var n=e.prototype.multiply.call(this,t);return r.fromFractionalAmount(this.currency,n.numerator,n.denominator)},d.divide=function(t){var n=e.prototype.divide.call(this,t);return r.fromFractionalAmount(this.currency,n.numerator,n.denominator)},d.toSignificant=function(r,t,n){return void 0===r&&(r=6),void 0===n&&(n=exports.Rounding.ROUND_DOWN),e.prototype.divide.call(this,this.decimalScale).toSignificant(r,t,n)},d.toFixed=function(r,t,d){return void 0===r&&(r=this.currency.decimals),void 0===d&&(d=exports.Rounding.ROUND_DOWN),r<=this.currency.decimals||n(!1),e.prototype.divide.call(this,this.decimalScale).toFixed(r,t,d)},d.toExact=function(e){return void 0===e&&(e={groupSeparator:""}),ie.DP=this.currency.decimals,new ie(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(e)},A(r,[{key:"wrapped",get:function(){return this.currency.isToken?this:r.fromFractionalAmount(this.currency.wrapped,this.numerator,this.denominator)}}]),r}(oe),ce=new oe(t.BigInt(100));function Ae(e){return new ue(e.numerator,e.denominator)}var ue=function(e){function r(){var r;return(r=e.apply(this,arguments)||this).isPercent=!0,r}f(r,e);var t=r.prototype;return t.add=function(r){return Ae(e.prototype.add.call(this,r))},t.subtract=function(r){return Ae(e.prototype.subtract.call(this,r))},t.multiply=function(r){return Ae(e.prototype.multiply.call(this,r))},t.divide=function(r){return Ae(e.prototype.divide.call(this,r))},t.toSignificant=function(r,t,n){return void 0===r&&(r=5),e.prototype.multiply.call(this,ce).toSignificant(r,t,n)},t.toFixed=function(r,t,n){return void 0===r&&(r=2),e.prototype.multiply.call(this,ce).toFixed(r,t,n)},r}(oe),fe=function(e){function r(){for(var r,n,d,a,o,i=arguments.length,s=new Array(i),c=0;c<i;c++)s[c]=arguments[c];if(4===s.length)n=s[0],d=s[1],a=s[2],o=s[3];else{var A=s[0].quoteAmount.divide(s[0].baseAmount),u=[s[0].baseAmount.currency,s[0].quoteAmount.currency,A.denominator,A.numerator];n=u[0],d=u[1],a=u[2],o=u[3]}return(r=e.call(this,o,a)||this).baseCurrency=n,r.quoteCurrency=d,r.scalar=new oe(t.exponentiate(t.BigInt(10),t.BigInt(n.decimals)),t.exponentiate(t.BigInt(10),t.BigInt(d.decimals))),r}f(r,e);var d=r.prototype;return d.invert=function(){return new r(this.quoteCurrency,this.baseCurrency,this.numerator,this.denominator)},d.multiply=function(t){this.quoteCurrency.equals(t.baseCurrency)||n(!1);var d=e.prototype.multiply.call(this,t);return new r(this.baseCurrency,t.quoteCurrency,d.denominator,d.numerator)},d.quote=function(r){r.currency.equals(this.baseCurrency)||n(!1);var t=e.prototype.multiply.call(this,r);return se.fromFractionalAmount(this.quoteCurrency,t.numerator,t.denominator)},d.toSignificant=function(e,r,t){return void 0===e&&(e=6),this.adjustedForDecimals.toSignificant(e,r,t)},d.toFixed=function(e,r,t){return void 0===e&&(e=4),this.adjustedForDecimals.toFixed(e,r,t)},A(r,[{key:"adjustedForDecimals",get:function(){return e.prototype.multiply.call(this,this.scalar)}}]),r}(oe),Ee=function(e,r,t,d){Number.isSafeInteger(e)||n(!1),r>=0&&r<255&&Number.isInteger(r)||n(!1),this.chainId=e,this.decimals=r,this.symbol=t,this.name=d},Ce=function(e){function r(){var r;return(r=e.apply(this,arguments)||this).isNative=!0,r.isToken=!1,r}return f(r,e),r}(Ee);function xe(e){try{return s.getAddress(e)}catch(r){throw new Error(e+" is not a valid address.")}}var pe,be=/^0x[0-9a-fA-F]{40}$/,De=function(e){function r(r,t,d,a,o,s,c,A){var u;return(u=e.call(this,r,d,a,o)||this).isNative=!1,u.isToken=!0,u.address=s?function(e){if(be.test(e))return e;throw new Error(e+" is not a valid address.")}(t):xe(t),c&&(c.gte(i.BigNumber.from(0))||n(!1)),A&&(A.gte(i.BigNumber.from(0))||n(!1)),u.buyFeeBps=c,u.sellFeeBps=A,u}f(r,e);var t=r.prototype;return t.equals=function(e){return e.isToken&&this.chainId===e.chainId&&this.address.toLowerCase()===e.address.toLowerCase()},t.sortsBefore=function(e){return this.chainId!==e.chainId&&n(!1),this.address.toLowerCase()===e.address.toLowerCase()&&n(!1),this.address.toLowerCase()<e.address.toLowerCase()},A(r,[{key:"wrapped",get:function(){return this}}]),r}(Ee),le=((pe={})[1]=new De(1,"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",18,"WETH","Wrapped Ether"),pe[3]=new De(3,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),pe[4]=new De(4,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),pe[5]=new De(5,"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",18,"WETH","Wrapped Ether"),pe[42]=new De(42,"0xd0A1E359811322d97991E03f863a0C30C2cF029C",18,"WETH","Wrapped Ether"),pe[10]=new De(10,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),pe[69]=new De(69,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),pe[11155420]=new De(11155420,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),pe[42161]=new De(42161,"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",18,"WETH","Wrapped Ether"),pe[421611]=new De(421611,"0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681",18,"WETH","Wrapped Ether"),pe[421614]=new De(421614,"0x980B62Da83eFf3D4576C647993b0c1D7faf17c73",18,"WETH","Wrapped Ether"),pe[8453]=new De(8453,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),pe[56]=new De(56,"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",18,"WBNB","Wrapped BNB"),pe[137]=new De(137,"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",18,"WMATIC","Wrapped MATIC"),pe[43114]=new De(43114,"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",18,"WAVAX","Wrapped AVAX"),pe),Be=function(e){function r(r){return e.call(this,r,18,"ETH","Ether")||this}return f(r,e),r.onChain=function(e){var t;return null!=(t=this._etherCache[e])?t:this._etherCache[e]=new r(e)},r.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},A(r,[{key:"wrapped",get:function(){var e=le[this.chainId];return e||n(!1),e}}]),r}(Ce);Be._etherCache={};var he=t.BigInt(Number.MAX_SAFE_INTEGER),Ie=t.BigInt(0),Fe=t.BigInt(1),Oe=t.BigInt(2);exports.ARGENT_WALLET_DETECTOR_ADDRESS=j,exports.CHAIN_TO_ADDRESSES_MAP=U,exports.CurrencyAmount=se,exports.ENS_REGISTRAR_ADDRESSES=Z,exports.Ether=Be,exports.Fraction=oe,exports.GOVERNANCE_ALPHA_V0_ADDRESSES=W,exports.GOVERNANCE_ALPHA_V1_ADDRESSES=H,exports.GOVERNANCE_BRAVO_ADDRESSES=k,exports.MERKLE_DISTRIBUTOR_ADDRESS=Y,exports.MIXED_ROUTE_QUOTER_V1_ADDRESSES=$,exports.MULTICALL_ADDRESSES=G,exports.MaxUint256=re,exports.NONFUNGIBLE_POSITION_MANAGER_ADDRESSES=K,exports.NativeCurrency=Ce,exports.Percent=ue,exports.Price=fe,exports.QUOTER_ADDRESSES=X,exports.SOCKS_CONTROLLER_ADDRESSES=Q,exports.SUPPORTED_CHAINS=I,exports.SWAP_ROUTER_02_ADDRESSES=function(e){var r;return I.includes(e)?null!=(r=U[e].swapRouter02Address)?r:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45":""},exports.TICK_LENS_ADDRESSES=J,exports.TIMELOCK_ADDRESSES=V,exports.Token=De,exports.UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS="0x8B799381ac40b838BBA4131ffB26197C432AFe78",exports.UNI_ADDRESSES=S,exports.V2_FACTORY_ADDRESS="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",exports.V2_FACTORY_ADDRESSES=_,exports.V2_ROUTER_ADDRESS="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",exports.V2_ROUTER_ADDRESSES=T,exports.V3_CORE_FACTORY_ADDRESSES=w,exports.V3_MIGRATOR_ADDRESSES=q,exports.WETH9=le,exports.computePriceImpact=function(e,r,t){var n=e.quote(r),d=n.subtract(t).divide(n);return new ue(d.numerator,d.denominator)},exports.sortedInsert=function(e,r,t,d){if(t>0||n(!1),e.length<=t||n(!1),0===e.length)return e.push(r),null;var a=e.length===t;if(a&&d(e[e.length-1],r)<=0)return r;for(var o=0,i=e.length;o<i;){var s=o+i>>>1;d(e[s],r)<=0?o=s+1:i=s}return e.splice(o,0,r),a?e.pop():null},exports.sqrt=function(e){if(t.greaterThanOrEqual(e,Ie)||n(!1),t.lessThan(e,he))return t.BigInt(Math.floor(Math.sqrt(t.toNumber(e))));var r,d;for(r=e,d=t.add(t.divide(e,Oe),Fe);t.lessThan(d,r);)r=d,d=t.divide(t.add(t.divide(e,d),d),Oe);return r},exports.validateAndParseAddress=xe;
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r,t=e(require("jsbi")),n=e(require("tiny-invariant")),d=e(require("decimal.js-light")),o=e(require("big.js")),a=e(require("toformat")),i=require("@ethersproject/bignumber"),s=require("@ethersproject/address");function c(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof r?r:String(r)}function A(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function u(e,r,t){return r&&A(e.prototype,r),t&&A(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function E(e,r){var t,n;e.prototype=Object.create(r.prototype),e.prototype.constructor=e,t=e,n=r,(Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e})(t,n)}(r=exports.ChainId||(exports.ChainId={}))[r.MAINNET=1]="MAINNET",r[r.GOERLI=5]="GOERLI",r[r.SEPOLIA=11155111]="SEPOLIA",r[r.OPTIMISM=10]="OPTIMISM",r[r.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",r[r.OPTIMISM_SEPOLIA=11155420]="OPTIMISM_SEPOLIA",r[r.ARBITRUM_ONE=42161]="ARBITRUM_ONE",r[r.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",r[r.ARBITRUM_SEPOLIA=421614]="ARBITRUM_SEPOLIA",r[r.POLYGON=137]="POLYGON",r[r.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",r[r.CELO=42220]="CELO",r[r.CELO_ALFAJORES=44787]="CELO_ALFAJORES",r[r.GNOSIS=100]="GNOSIS",r[r.MOONBEAM=1284]="MOONBEAM",r[r.BNB=56]="BNB",r[r.AVALANCHE=43114]="AVALANCHE",r[r.BASE_GOERLI=84531]="BASE_GOERLI",r[r.BASE=8453]="BASE",r[r.ZORA=7777777]="ZORA",r[r.ZORA_SEPOLIA=999999999]="ZORA_SEPOLIA",r[r.ROOTSTOCK=30]="ROOTSTOCK",r[r.BLAST=81457]="BLAST";var C,p,x,b,D,l,B,h,I,F=[exports.ChainId.MAINNET,exports.ChainId.OPTIMISM,exports.ChainId.OPTIMISM_GOERLI,exports.ChainId.OPTIMISM_SEPOLIA,exports.ChainId.ARBITRUM_ONE,exports.ChainId.ARBITRUM_GOERLI,exports.ChainId.ARBITRUM_SEPOLIA,exports.ChainId.POLYGON,exports.ChainId.POLYGON_MUMBAI,exports.ChainId.GOERLI,exports.ChainId.SEPOLIA,exports.ChainId.CELO_ALFAJORES,exports.ChainId.CELO,exports.ChainId.BNB,exports.ChainId.AVALANCHE,exports.ChainId.BASE,exports.ChainId.BASE_GOERLI,exports.ChainId.ZORA,exports.ChainId.ZORA_SEPOLIA,exports.ChainId.ROOTSTOCK,exports.ChainId.BLAST];(C=exports.NativeCurrencyName||(exports.NativeCurrencyName={})).ETHER="ETH",C.MATIC="MATIC",C.CELO="CELO",C.GNOSIS="XDAI",C.MOONBEAM="GLMR",C.BNB="BNB",C.AVAX="AVAX",C.ROOTSTOCK="RBTC";var O=[exports.ChainId.MAINNET,exports.ChainId.GOERLI,exports.ChainId.SEPOLIA];function m(e,r){return void 0===r&&(r=[]),O.concat(r).reduce((function(r,t){return r[t]=e,r}),{})}var R,S,y=m("0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",[exports.ChainId.OPTIMISM,exports.ChainId.ARBITRUM_ONE,exports.ChainId.POLYGON,exports.ChainId.POLYGON_MUMBAI,exports.ChainId.SEPOLIA]),v=((p={})[exports.ChainId.MAINNET]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",p[exports.ChainId.GOERLI]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",p[exports.ChainId.SEPOLIA]="0xB7f907f7A9eBC822a80BD25E224be42Ce0A698A0",p[exports.ChainId.OPTIMISM]="0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf",p[exports.ChainId.ARBITRUM_ONE]="0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9",p[exports.ChainId.AVALANCHE]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",p[exports.ChainId.BASE]="0x8909dc15e40173ff4699343b6eb8132c65e18ec6",p[exports.ChainId.BNB]="0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6",p[exports.ChainId.POLYGON]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",p[exports.ChainId.CELO]="0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f",p[exports.ChainId.BLAST]="0x5C346464d33F90bABaf70dB6388507CC889C1070",p),_=((x={})[exports.ChainId.MAINNET]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",x[exports.ChainId.GOERLI]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",x[exports.ChainId.ARBITRUM_ONE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",x[exports.ChainId.OPTIMISM]="0x4a7b5da61326a6379179b40d00f57e5bbdc962c2",x[exports.ChainId.BASE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",x[exports.ChainId.AVALANCHE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",x[exports.ChainId.BNB]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",x[exports.ChainId.POLYGON]="0xedf6066a2b290c185783862c7f4776a2c8077ad1",x[exports.ChainId.BLAST]="0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035",x),T={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x1F98415757620B543A52E61c46B32eB19261F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",v3MigratorAddress:"0xA5644E29708357803b5A882D272c41cC0dF92B34",nonfungiblePositionManagerAddress:"0xC36442b4a4522E871399CD717aBDD847Ab11FE88"},g=f({},T,{v1MixedRouteQuoterAddress:"0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E"}),N=f({},T,{v1MixedRouteQuoterAddress:"0xBa60b6e6fF25488308789E6e0A65D838be34194e"}),M=T,L=f({},T,{multicallAddress:"0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB",tickLensAddress:"0xbfd8137f7d1516D3ea5cA83523914859ec47F573"}),P=T,w={v3CoreFactoryAddress:"0xAfE208a311B21f13EF87E33A90049fC17A7acDEc",multicallAddress:"0x633987602DE5C4F337e3DbF265303A1080324204",quoterAddress:"0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8",v3MigratorAddress:"0x3cFd4d48EDfDCC53D3f173F596f621064614C582",nonfungiblePositionManagerAddress:"0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A",tickLensAddress:"0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D"},U=((b={})[exports.ChainId.MAINNET]=g,b[exports.ChainId.OPTIMISM]=M,b[exports.ChainId.ARBITRUM_ONE]=L,b[exports.ChainId.POLYGON]=P,b[exports.ChainId.POLYGON_MUMBAI]=P,b[exports.ChainId.GOERLI]=N,b[exports.ChainId.CELO]=w,b[exports.ChainId.CELO_ALFAJORES]=w,b[exports.ChainId.BNB]={v3CoreFactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",multicallAddress:"0x963Df249eD09c358A4819E39d9Cd5736c3087184",quoterAddress:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",v3MigratorAddress:"0x32681814957e0C13117ddc0c2aba232b5c9e760f",nonfungiblePositionManagerAddress:"0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613",tickLensAddress:"0xD9270014D396281579760619CCf4c3af0501A47C",swapRouter02Address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2"},b[exports.ChainId.OPTIMISM_GOERLI]={v3CoreFactoryAddress:"0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10",multicallAddress:"0x07F2D8a2a02251B62af965f22fC4744A5f96BCCd",quoterAddress:"0x9569CbA925c8ca2248772A9A4976A516743A246F",v3MigratorAddress:"0xf6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8",nonfungiblePositionManagerAddress:"0x39Ca85Af2F383190cBf7d7c41ED9202D27426EF6",tickLensAddress:"0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e"},b[exports.ChainId.OPTIMISM_SEPOLIA]={v3CoreFactoryAddress:"0x8CE191193D15ea94e11d327b4c7ad8bbE520f6aF",multicallAddress:"0x80e4e06841bb76AA9735E0448cB8d003C0EF009a",quoterAddress:"0x0FBEa6cf957d95ee9313490050F6A0DA68039404",v3MigratorAddress:"0xE7EcbAAaA54D007A00dbb6c1d2f150066D69dA07",nonfungiblePositionManagerAddress:"0xdA75cEf1C93078e8b736FCA5D5a30adb97C8957d",tickLensAddress:"0xCb7f54747F58F8944973cea5b8f4ac2209BadDC5",swapRouter02Address:"0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4"},b[exports.ChainId.ARBITRUM_GOERLI]={v3CoreFactoryAddress:"0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6",multicallAddress:"0x8260CB40247290317a4c062F3542622367F206Ee",quoterAddress:"0x1dd92b83591781D0C6d98d07391eea4b9a6008FA",v3MigratorAddress:"0xA815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3",nonfungiblePositionManagerAddress:"0x622e4726a167799826d1E1D150b076A7725f5D81",tickLensAddress:"0xb52429333da969a0C79a60930a4Bf0020E5D1DE8"},b[exports.ChainId.ARBITRUM_SEPOLIA]={v3CoreFactoryAddress:"0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e",multicallAddress:"0x2B718b475e385eD29F56775a66aAB1F5cC6B2A0A",quoterAddress:"0x2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B",v3MigratorAddress:"0x398f43ef2c67B941147157DA1c5a868E906E043D",nonfungiblePositionManagerAddress:"0x6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65",tickLensAddress:"0x0fd18587734e5C2dcE2dccDcC7DD1EC89ba557d9",swapRouter02Address:"0x101F443B4d1b059569D643917553c771E1b9663E"},b[exports.ChainId.SEPOLIA]={v3CoreFactoryAddress:"0x0227628f3F023bb0B980b67D528571c95c6DaC1c",multicallAddress:"0xD7F33bCdb21b359c8ee6F0251d30E94832baAd07",quoterAddress:"0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3",v3MigratorAddress:"0x729004182cF005CEC8Bd85df140094b6aCbe8b15",nonfungiblePositionManagerAddress:"0x1238536071E1c677A632429e3655c799b22cDA52",tickLensAddress:"0xd7f33bcdb21b359c8ee6f0251d30e94832baad07",swapRouter02Address:"0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E"},b[exports.ChainId.AVALANCHE]={v3CoreFactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",multicallAddress:"0x0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2",quoterAddress:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",v3MigratorAddress:"0x44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97",nonfungiblePositionManagerAddress:"0x655C406EBFa14EE2006250925e54ec43AD184f8B",tickLensAddress:"0xEB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950",swapRouter02Address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE"},b[exports.ChainId.BASE]={v3CoreFactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",multicallAddress:"0x091e99cb1C49331a94dD62755D168E941AbD0693",quoterAddress:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",v3MigratorAddress:"0x23cF10b1ee3AdfCA73B0eF17C07F7577e7ACd2d7",nonfungiblePositionManagerAddress:"0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",tickLensAddress:"0x0CdeE061c75D43c82520eD998C23ac2991c9ac6d",swapRouter02Address:"0x2626664c2603336E57B271c5C0b26F421741e481"},b[exports.ChainId.BASE_GOERLI]={v3CoreFactoryAddress:"0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2",multicallAddress:"0xB206027a9E0E13F05eBEFa5D2402Bab3eA716439",quoterAddress:"0xedf539058e28E5937dAef3f69cEd0b25fbE66Ae9",v3MigratorAddress:"0x3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE",nonfungiblePositionManagerAddress:"0x3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30",tickLensAddress:"0x1acB873Ee909D0c98adB18e4474943249F931b92",swapRouter02Address:"0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d"},b[exports.ChainId.ZORA]={v3CoreFactoryAddress:"0x7145F8aeef1f6510E92164038E1B6F8cB2c42Cbb",multicallAddress:"0xA51c76bEE6746cB487a7e9312E43e2b8f4A37C15",quoterAddress:"0x11867e1b3348F3ce4FcC170BC5af3d23E07E64Df",v3MigratorAddress:"0x048352d8dCF13686982C799da63fA6426a9D0b60",nonfungiblePositionManagerAddress:"0xbC91e8DfA3fF18De43853372A3d7dfe585137D78",tickLensAddress:"0x209AAda09D74Ad3B8D0E92910Eaf85D2357e3044",swapRouter02Address:"0x7De04c96BE5159c3b5CeffC82aa176dc81281557"},b[exports.ChainId.ZORA_SEPOLIA]={v3CoreFactoryAddress:"0x4324A677D74764f46f33ED447964252441aA8Db6",multicallAddress:"0xA1E7e3A69671C4494EC59Dbd442de930a93F911A",quoterAddress:"0xC195976fEF0985886E37036E2DF62bF371E12Df0",v3MigratorAddress:"0x65ef259b31bf1d977c37e9434658694267674897",nonfungiblePositionManagerAddress:"0xB8458EaAe43292e3c1F7994EFd016bd653d23c20",tickLensAddress:"0x23C0F71877a1Fc4e20A78018f9831365c85f3064"},b[exports.ChainId.ROOTSTOCK]={v3CoreFactoryAddress:"0xaF37EC98A00FD63689CF3060BF3B6784E00caD82",multicallAddress:"0x996a9858cDfa45Ad68E47c9A30a7201E29c6a386",quoterAddress:"0xb51727c996C68E60F598A923a5006853cd2fEB31",v3MigratorAddress:"0x16678977CA4ec3DAD5efc7b15780295FE5f56162",nonfungiblePositionManagerAddress:"0x9d9386c042F194B460Ec424a1e57ACDE25f5C4b1",tickLensAddress:"0x55B9dF5bF68ADe972191a91980459f48ecA16afC",swapRouter02Address:"0x0B14ff67f0014046b4b99057Aec4509640b3947A"},b[exports.ChainId.BLAST]={v3CoreFactoryAddress:"0x792edAdE80af5fC680d96a2eD80A44247D2Cf6Fd",multicallAddress:"0xdC7f370de7631cE9e2c2e1DCDA6B3B5744Cf4705",quoterAddress:"0x6Cdcd65e03c1CEc3730AeeCd45bc140D57A25C77",v3MigratorAddress:"0x15CA7043CD84C5D21Ae76Ba0A1A967d42c40ecE0",nonfungiblePositionManagerAddress:"0xB218e4f7cF0533d4696fDfC419A0023D33345F28",tickLensAddress:"0x2E95185bCdD928a3e984B7e2D6560Ab1b17d7274",swapRouter02Address:"0x549FEB8c9bd4c12Ad2AB27022dA12492aC452B66"},b),q=f({},F.reduce((function(e,r){return e[r]=U[r].v3CoreFactoryAddress,e}),{})),G=f({},F.reduce((function(e,r){var t=U[r].v3MigratorAddress;return t&&(e[r]=t),e}),{})),W=f({},F.reduce((function(e,r){return e[r]=U[r].multicallAddress,e}),{})),H=m("0x5e4be8Bc9637f0EAA1A755019e06A68ce081D58F"),k=((D={})[exports.ChainId.MAINNET]="0xC4e172459f1E7939D522503B81AFAaC1014CE6F6",D),V=((l={})[exports.ChainId.MAINNET]="0x408ED6354d4973f66138C91495F2f2FCbd8724C3",l),j=m("0x1a9C8182C09F50C8318d769245beA52c32BE35BC"),Y=((B={})[exports.ChainId.MAINNET]="0x090D4613473dEE047c3f2706764f49E0821D256e",B),X=((h={})[exports.ChainId.MAINNET]="0xeca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8",h),K=f({},F.reduce((function(e,r){return e[r]=U[r].quoterAddress,e}),{})),Z=f({},F.reduce((function(e,r){var t=U[r].nonfungiblePositionManagerAddress;return t&&(e[r]=t),e}),{})),Q=f({},m("0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e")),J=((I={})[exports.ChainId.MAINNET]="0x65770b5283117639760beA3F867b69b3697a91dd",I),$=f({},F.reduce((function(e,r){var t=U[r].tickLensAddress;return t&&(e[r]=t),e}),{})),z=F.reduce((function(e,r){var t=U[r].v1MixedRouteQuoterAddress;return t&&(e[r]=t),e}),{});(R=exports.TradeType||(exports.TradeType={}))[R.EXACT_INPUT=0]="EXACT_INPUT",R[R.EXACT_OUTPUT=1]="EXACT_OUTPUT",(S=exports.Rounding||(exports.Rounding={}))[S.ROUND_DOWN=0]="ROUND_DOWN",S[S.ROUND_HALF_UP=1]="ROUND_HALF_UP",S[S.ROUND_UP=2]="ROUND_UP";var ee,re,te=t.BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ne=a(d),de=a(o),oe=((ee={})[exports.Rounding.ROUND_DOWN]=ne.ROUND_DOWN,ee[exports.Rounding.ROUND_HALF_UP]=ne.ROUND_HALF_UP,ee[exports.Rounding.ROUND_UP]=ne.ROUND_UP,ee),ae=((re={})[exports.Rounding.ROUND_DOWN]=0,re[exports.Rounding.ROUND_HALF_UP]=1,re[exports.Rounding.ROUND_UP]=3,re),ie=function(){function e(e,r){void 0===r&&(r=t.BigInt(1)),this.numerator=t.BigInt(e),this.denominator=t.BigInt(r)}e.tryParseFraction=function(r){if(r instanceof t||"number"==typeof r||"string"==typeof r)return new e(r);if("numerator"in r&&"denominator"in r)return r;throw new Error("Could not parse fraction")};var r=e.prototype;return r.invert=function(){return new e(this.denominator,this.numerator)},r.add=function(r){var n=e.tryParseFraction(r);return t.equal(this.denominator,n.denominator)?new e(t.add(this.numerator,n.numerator),this.denominator):new e(t.add(t.multiply(this.numerator,n.denominator),t.multiply(n.numerator,this.denominator)),t.multiply(this.denominator,n.denominator))},r.subtract=function(r){var n=e.tryParseFraction(r);return t.equal(this.denominator,n.denominator)?new e(t.subtract(this.numerator,n.numerator),this.denominator):new e(t.subtract(t.multiply(this.numerator,n.denominator),t.multiply(n.numerator,this.denominator)),t.multiply(this.denominator,n.denominator))},r.lessThan=function(r){var n=e.tryParseFraction(r);return t.lessThan(t.multiply(this.numerator,n.denominator),t.multiply(n.numerator,this.denominator))},r.equalTo=function(r){var n=e.tryParseFraction(r);return t.equal(t.multiply(this.numerator,n.denominator),t.multiply(n.numerator,this.denominator))},r.greaterThan=function(r){var n=e.tryParseFraction(r);return t.greaterThan(t.multiply(this.numerator,n.denominator),t.multiply(n.numerator,this.denominator))},r.multiply=function(r){var n=e.tryParseFraction(r);return new e(t.multiply(this.numerator,n.numerator),t.multiply(this.denominator,n.denominator))},r.divide=function(r){var n=e.tryParseFraction(r);return new e(t.multiply(this.numerator,n.denominator),t.multiply(this.denominator,n.numerator))},r.toSignificant=function(e,r,t){void 0===r&&(r={groupSeparator:""}),void 0===t&&(t=exports.Rounding.ROUND_HALF_UP),Number.isInteger(e)||n(!1),e>0||n(!1),ne.set({precision:e+1,rounding:oe[t]});var d=new ne(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(e);return d.toFormat(d.decimalPlaces(),r)},r.toFixed=function(e,r,t){return void 0===r&&(r={groupSeparator:""}),void 0===t&&(t=exports.Rounding.ROUND_HALF_UP),Number.isInteger(e)||n(!1),e>=0||n(!1),de.DP=e,de.RM=ae[t],new de(this.numerator.toString()).div(this.denominator.toString()).toFormat(e,r)},u(e,[{key:"quotient",get:function(){return t.divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new e(t.remainder(this.numerator,this.denominator),this.denominator)}},{key:"asFraction",get:function(){return new e(this.numerator,this.denominator)}}]),e}(),se=a(o),ce=function(e){function r(r,d,o){var a;return a=e.call(this,d,o)||this,t.lessThanOrEqual(a.quotient,te)||n(!1),a.currency=r,a.decimalScale=t.exponentiate(t.BigInt(10),t.BigInt(r.decimals)),a}E(r,e),r.fromRawAmount=function(e,t){return new r(e,t)},r.fromFractionalAmount=function(e,t,n){return new r(e,t,n)};var d=r.prototype;return d.add=function(t){this.currency.equals(t.currency)||n(!1);var d=e.prototype.add.call(this,t);return r.fromFractionalAmount(this.currency,d.numerator,d.denominator)},d.subtract=function(t){this.currency.equals(t.currency)||n(!1);var d=e.prototype.subtract.call(this,t);return r.fromFractionalAmount(this.currency,d.numerator,d.denominator)},d.multiply=function(t){var n=e.prototype.multiply.call(this,t);return r.fromFractionalAmount(this.currency,n.numerator,n.denominator)},d.divide=function(t){var n=e.prototype.divide.call(this,t);return r.fromFractionalAmount(this.currency,n.numerator,n.denominator)},d.toSignificant=function(r,t,n){return void 0===r&&(r=6),void 0===n&&(n=exports.Rounding.ROUND_DOWN),e.prototype.divide.call(this,this.decimalScale).toSignificant(r,t,n)},d.toFixed=function(r,t,d){return void 0===r&&(r=this.currency.decimals),void 0===d&&(d=exports.Rounding.ROUND_DOWN),r<=this.currency.decimals||n(!1),e.prototype.divide.call(this,this.decimalScale).toFixed(r,t,d)},d.toExact=function(e){return void 0===e&&(e={groupSeparator:""}),se.DP=this.currency.decimals,new se(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(e)},u(r,[{key:"wrapped",get:function(){return this.currency.isToken?this:r.fromFractionalAmount(this.currency.wrapped,this.numerator,this.denominator)}}]),r}(ie),Ae=new ie(t.BigInt(100));function ue(e){return new fe(e.numerator,e.denominator)}var fe=function(e){function r(){var r;return(r=e.apply(this,arguments)||this).isPercent=!0,r}E(r,e);var t=r.prototype;return t.add=function(r){return ue(e.prototype.add.call(this,r))},t.subtract=function(r){return ue(e.prototype.subtract.call(this,r))},t.multiply=function(r){return ue(e.prototype.multiply.call(this,r))},t.divide=function(r){return ue(e.prototype.divide.call(this,r))},t.toSignificant=function(r,t,n){return void 0===r&&(r=5),e.prototype.multiply.call(this,Ae).toSignificant(r,t,n)},t.toFixed=function(r,t,n){return void 0===r&&(r=2),e.prototype.multiply.call(this,Ae).toFixed(r,t,n)},r}(ie),Ee=function(e){function r(){for(var r,n,d,o,a,i=arguments.length,s=new Array(i),c=0;c<i;c++)s[c]=arguments[c];if(4===s.length)n=s[0],d=s[1],o=s[2],a=s[3];else{var A=s[0].quoteAmount.divide(s[0].baseAmount),u=[s[0].baseAmount.currency,s[0].quoteAmount.currency,A.denominator,A.numerator];n=u[0],d=u[1],o=u[2],a=u[3]}return(r=e.call(this,a,o)||this).baseCurrency=n,r.quoteCurrency=d,r.scalar=new ie(t.exponentiate(t.BigInt(10),t.BigInt(n.decimals)),t.exponentiate(t.BigInt(10),t.BigInt(d.decimals))),r}E(r,e);var d=r.prototype;return d.invert=function(){return new r(this.quoteCurrency,this.baseCurrency,this.numerator,this.denominator)},d.multiply=function(t){this.quoteCurrency.equals(t.baseCurrency)||n(!1);var d=e.prototype.multiply.call(this,t);return new r(this.baseCurrency,t.quoteCurrency,d.denominator,d.numerator)},d.quote=function(r){r.currency.equals(this.baseCurrency)||n(!1);var t=e.prototype.multiply.call(this,r);return ce.fromFractionalAmount(this.quoteCurrency,t.numerator,t.denominator)},d.toSignificant=function(e,r,t){return void 0===e&&(e=6),this.adjustedForDecimals.toSignificant(e,r,t)},d.toFixed=function(e,r,t){return void 0===e&&(e=4),this.adjustedForDecimals.toFixed(e,r,t)},u(r,[{key:"adjustedForDecimals",get:function(){return e.prototype.multiply.call(this,this.scalar)}}]),r}(ie),Ce=function(e,r,t,d){Number.isSafeInteger(e)||n(!1),r>=0&&r<255&&Number.isInteger(r)||n(!1),this.chainId=e,this.decimals=r,this.symbol=t,this.name=d},pe=function(e){function r(){var r;return(r=e.apply(this,arguments)||this).isNative=!0,r.isToken=!1,r}return E(r,e),r}(Ce);function xe(e){try{return s.getAddress(e)}catch(r){throw new Error(e+" is not a valid address.")}}var be=/^0x[0-9a-fA-F]{40}$/,De=function(e){function r(r,t,d,o,a,s,c,A){var u;return(u=e.call(this,r,d,o,a)||this).isNative=!1,u.isToken=!0,u.address=s?function(e){if(be.test(e))return e;throw new Error(e+" is not a valid address.")}(t):xe(t),c&&(c.gte(i.BigNumber.from(0))||n(!1)),A&&(A.gte(i.BigNumber.from(0))||n(!1)),u.buyFeeBps=c,u.sellFeeBps=A,u}E(r,e);var t=r.prototype;return t.equals=function(e){return e.isToken&&this.chainId===e.chainId&&this.address.toLowerCase()===e.address.toLowerCase()},t.sortsBefore=function(e){return this.chainId!==e.chainId&&n(!1),this.address.toLowerCase()===e.address.toLowerCase()&&n(!1),this.address.toLowerCase()<e.address.toLowerCase()},u(r,[{key:"wrapped",get:function(){return this}}]),r}(Ce),le={1:new De(1,"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",18,"WETH","Wrapped Ether"),3:new De(3,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),4:new De(4,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),5:new De(5,"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",18,"WETH","Wrapped Ether"),42:new De(42,"0xd0A1E359811322d97991E03f863a0C30C2cF029C",18,"WETH","Wrapped Ether"),10:new De(10,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),69:new De(69,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),11155420:new De(11155420,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),42161:new De(42161,"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",18,"WETH","Wrapped Ether"),421611:new De(421611,"0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681",18,"WETH","Wrapped Ether"),421614:new De(421614,"0x980B62Da83eFf3D4576C647993b0c1D7faf17c73",18,"WETH","Wrapped Ether"),8453:new De(8453,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),56:new De(56,"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",18,"WBNB","Wrapped BNB"),137:new De(137,"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",18,"WMATIC","Wrapped MATIC"),43114:new De(43114,"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",18,"WAVAX","Wrapped AVAX")},Be=function(e){function r(r){return e.call(this,r,18,"ETH","Ether")||this}return E(r,e),r.onChain=function(e){var t;return null!=(t=this._etherCache[e])?t:this._etherCache[e]=new r(e)},r.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},u(r,[{key:"wrapped",get:function(){var e=le[this.chainId];return e||n(!1),e}}]),r}(pe);Be._etherCache={};var he=t.BigInt(Number.MAX_SAFE_INTEGER),Ie=t.BigInt(0),Fe=t.BigInt(1),Oe=t.BigInt(2);exports.ARGENT_WALLET_DETECTOR_ADDRESS=X,exports.CHAIN_TO_ADDRESSES_MAP=U,exports.CurrencyAmount=ce,exports.ENS_REGISTRAR_ADDRESSES=Q,exports.Ether=Be,exports.Fraction=ie,exports.GOVERNANCE_ALPHA_V0_ADDRESSES=H,exports.GOVERNANCE_ALPHA_V1_ADDRESSES=k,exports.GOVERNANCE_BRAVO_ADDRESSES=V,exports.MERKLE_DISTRIBUTOR_ADDRESS=Y,exports.MIXED_ROUTE_QUOTER_V1_ADDRESSES=z,exports.MULTICALL_ADDRESSES=W,exports.MaxUint256=te,exports.NONFUNGIBLE_POSITION_MANAGER_ADDRESSES=Z,exports.NativeCurrency=pe,exports.Percent=fe,exports.Price=Ee,exports.QUOTER_ADDRESSES=K,exports.SOCKS_CONTROLLER_ADDRESSES=J,exports.SUPPORTED_CHAINS=F,exports.SWAP_ROUTER_02_ADDRESSES=function(e){var r;return F.includes(e)?null!=(r=U[e].swapRouter02Address)?r:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45":""},exports.TICK_LENS_ADDRESSES=$,exports.TIMELOCK_ADDRESSES=j,exports.Token=De,exports.UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS="0x8B799381ac40b838BBA4131ffB26197C432AFe78",exports.UNI_ADDRESSES=y,exports.V2_FACTORY_ADDRESS="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",exports.V2_FACTORY_ADDRESSES=v,exports.V2_ROUTER_ADDRESS="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",exports.V2_ROUTER_ADDRESSES=_,exports.V3_CORE_FACTORY_ADDRESSES=q,exports.V3_MIGRATOR_ADDRESSES=G,exports.WETH9=le,exports.computePriceImpact=function(e,r,t){var n=e.quote(r),d=n.subtract(t).divide(n);return new fe(d.numerator,d.denominator)},exports.sortedInsert=function(e,r,t,d){if(t>0||n(!1),e.length<=t||n(!1),0===e.length)return e.push(r),null;var o=e.length===t;if(o&&d(e[e.length-1],r)<=0)return r;for(var a=0,i=e.length;a<i;){var s=a+i>>>1;d(e[s],r)<=0?a=s+1:i=s}return e.splice(a,0,r),o?e.pop():null},exports.sqrt=function(e){if(t.greaterThanOrEqual(e,Ie)||n(!1),t.lessThan(e,he))return t.BigInt(Math.floor(Math.sqrt(t.toNumber(e))));var r,d;for(r=e,d=t.add(t.divide(e,Oe),Fe);t.lessThan(d,r);)r=d,d=t.divide(t.add(t.divide(e,d),d),Oe);return r},exports.validateAndParseAddress=xe;
//# sourceMappingURL=sdk-core.cjs.production.min.js.map

@@ -9,2 +9,16 @@ import JSBI from 'jsbi';

function _toPrimitive(t, r) {
if ("object" != typeof t || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != typeof i) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
function _toPropertyKey(t) {
var i = _toPrimitive(t, "string");
return "symbol" == typeof i ? i : String(i);
}
function _defineProperties(target, props) {

@@ -16,17 +30,17 @@ for (var i = 0; i < props.length; i++) {

if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {

@@ -38,17 +52,20 @@ if (Object.prototype.hasOwnProperty.call(source, key)) {

}
return target;
};
return _extends.apply(this, arguments);
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
subClass.__proto__ = superClass;
_setPrototypeOf(subClass, superClass);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
var ChainId;
(function (ChainId) {

@@ -79,6 +96,4 @@ ChainId[ChainId["MAINNET"] = 1] = "MAINNET";

})(ChainId || (ChainId = {}));
var SUPPORTED_CHAINS = [ChainId.MAINNET, ChainId.OPTIMISM, ChainId.OPTIMISM_GOERLI, ChainId.OPTIMISM_SEPOLIA, ChainId.ARBITRUM_ONE, ChainId.ARBITRUM_GOERLI, ChainId.ARBITRUM_SEPOLIA, ChainId.POLYGON, ChainId.POLYGON_MUMBAI, ChainId.GOERLI, ChainId.SEPOLIA, ChainId.CELO_ALFAJORES, ChainId.CELO, ChainId.BNB, ChainId.AVALANCHE, ChainId.BASE, ChainId.BASE_GOERLI, ChainId.ZORA, ChainId.ZORA_SEPOLIA, ChainId.ROOTSTOCK, ChainId.BLAST];
var NativeCurrencyName;
(function (NativeCurrencyName) {

@@ -98,3 +113,2 @@ // Strings match input for CLI

var DEFAULT_NETWORKS = [ChainId.MAINNET, ChainId.GOERLI, ChainId.SEPOLIA];
function constructSameAddressMap(address, additionalNetworks) {

@@ -104,3 +118,2 @@ if (additionalNetworks === void 0) {

}
return DEFAULT_NETWORKS.concat(additionalNetworks).reduce(function (memo, chainId) {

@@ -111,3 +124,2 @@ memo[chainId] = address;

}
var UNI_ADDRESSES = /*#__PURE__*/constructSameAddressMap('0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', [ChainId.OPTIMISM, ChainId.ARBITRUM_ONE, ChainId.POLYGON, ChainId.POLYGON_MUMBAI, ChainId.SEPOLIA]);

@@ -118,3 +130,2 @@ var UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS = '0x8B799381ac40b838BBA4131ffB26197C432AFe78';

*/
var V2_FACTORY_ADDRESS = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f';

@@ -125,6 +136,5 @@ var V2_FACTORY_ADDRESSES = (_V2_FACTORY_ADDRESSES = {}, _V2_FACTORY_ADDRESSES[ChainId.MAINNET] = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f', _V2_FACTORY_ADDRESSES[ChainId.GOERLI] = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f', _V2_FACTORY_ADDRESSES[ChainId.SEPOLIA] = '0xB7f907f7A9eBC822a80BD25E224be42Ce0A698A0', _V2_FACTORY_ADDRESSES[ChainId.OPTIMISM] = '0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf', _V2_FACTORY_ADDRESSES[ChainId.ARBITRUM_ONE] = '0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9', _V2_FACTORY_ADDRESSES[ChainId.AVALANCHE] = '0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C', _V2_FACTORY_ADDRESSES[ChainId.BASE] = '0x8909dc15e40173ff4699343b6eb8132c65e18ec6', _V2_FACTORY_ADDRESSES[ChainId.BNB] = '0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6', _V2_FACTORY_ADDRESSES[ChainId.POLYGON] = '0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C', _V2_FACTORY_ADDRESSES[ChainId.CELO] = '0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f', _V2_FACTORY_ADDRESSES[ChainId.BLAST] = '0x5C346464d33F90bABaf70dB6388507CC889C1070', _V2_FACTORY_ADDRESSES);

*/
var V2_ROUTER_ADDRESS = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D';
var V2_ROUTER_ADDRESSES = (_V2_ROUTER_ADDRESSES = {}, _V2_ROUTER_ADDRESSES[ChainId.MAINNET] = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', _V2_ROUTER_ADDRESSES[ChainId.GOERLI] = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', _V2_ROUTER_ADDRESSES[ChainId.ARBITRUM_ONE] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[ChainId.OPTIMISM] = '0x4a7b5da61326a6379179b40d00f57e5bbdc962c2', _V2_ROUTER_ADDRESSES[ChainId.BASE] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[ChainId.AVALANCHE] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[ChainId.BNB] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[ChainId.POLYGON] = '0xedf6066a2b290c185783862c7f4776a2c8077ad1', _V2_ROUTER_ADDRESSES[ChainId.BLAST] = '0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035', _V2_ROUTER_ADDRESSES); // Networks that share most of the same addresses i.e. Mainnet, Goerli, Optimism, Arbitrum, Polygon
var V2_ROUTER_ADDRESSES = (_V2_ROUTER_ADDRESSES = {}, _V2_ROUTER_ADDRESSES[ChainId.MAINNET] = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', _V2_ROUTER_ADDRESSES[ChainId.GOERLI] = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', _V2_ROUTER_ADDRESSES[ChainId.ARBITRUM_ONE] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[ChainId.OPTIMISM] = '0x4a7b5da61326a6379179b40d00f57e5bbdc962c2', _V2_ROUTER_ADDRESSES[ChainId.BASE] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[ChainId.AVALANCHE] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[ChainId.BNB] = '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', _V2_ROUTER_ADDRESSES[ChainId.POLYGON] = '0xedf6066a2b290c185783862c7f4776a2c8077ad1', _V2_ROUTER_ADDRESSES[ChainId.BLAST] = '0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035', _V2_ROUTER_ADDRESSES);
// Networks that share most of the same addresses i.e. Mainnet, Goerli, Optimism, Arbitrum, Polygon
var DEFAULT_ADDRESSES = {

@@ -137,13 +147,9 @@ v3CoreFactoryAddress: '0x1F98431c8aD98523631AE4a59f267346ea31F984',

};
var MAINNET_ADDRESSES = /*#__PURE__*/_extends({}, DEFAULT_ADDRESSES, {
v1MixedRouteQuoterAddress: '0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E'
});
var GOERLI_ADDRESSES = /*#__PURE__*/_extends({}, DEFAULT_ADDRESSES, {
v1MixedRouteQuoterAddress: '0xBa60b6e6fF25488308789E6e0A65D838be34194e'
});
var OPTIMISM_ADDRESSES = DEFAULT_ADDRESSES;
var ARBITRUM_ONE_ADDRESSES = /*#__PURE__*/_extends({}, DEFAULT_ADDRESSES, {

@@ -153,5 +159,4 @@ multicallAddress: '0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB',

});
var POLYGON_ADDRESSES = DEFAULT_ADDRESSES; // celo v3 addresses
var POLYGON_ADDRESSES = DEFAULT_ADDRESSES;
// celo v3 addresses
var CELO_ADDRESSES = {

@@ -164,4 +169,4 @@ v3CoreFactoryAddress: '0xAfE208a311B21f13EF87E33A90049fC17A7acDEc',

tickLensAddress: '0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D'
}; // BNB v3 addresses
};
// BNB v3 addresses
var BNB_ADDRESSES = {

@@ -175,4 +180,4 @@ v3CoreFactoryAddress: '0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7',

swapRouter02Address: '0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2'
}; // optimism goerli addresses
};
// optimism goerli addresses
var OPTIMISM_GOERLI_ADDRESSES = {

@@ -185,4 +190,4 @@ v3CoreFactoryAddress: '0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10',

tickLensAddress: '0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e'
}; // optimism sepolia addresses
};
// optimism sepolia addresses
var OPTIMISM_SEPOLIA_ADDRESSES = {

@@ -196,4 +201,4 @@ v3CoreFactoryAddress: '0x8CE191193D15ea94e11d327b4c7ad8bbE520f6aF',

swapRouter02Address: '0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4'
}; // arbitrum goerli v3 addresses
};
// arbitrum goerli v3 addresses
var ARBITRUM_GOERLI_ADDRESSES = {

@@ -206,4 +211,4 @@ v3CoreFactoryAddress: '0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6',

tickLensAddress: '0xb52429333da969a0C79a60930a4Bf0020E5D1DE8'
}; // arbitrum sepolia v3 addresses
};
// arbitrum sepolia v3 addresses
var ARBITRUM_SEPOLIA_ADDRESSES = {

@@ -217,4 +222,4 @@ v3CoreFactoryAddress: '0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e',

swapRouter02Address: '0x101F443B4d1b059569D643917553c771E1b9663E'
}; // sepolia v3 addresses
};
// sepolia v3 addresses
var SEPOLIA_ADDRESSES = {

@@ -228,4 +233,4 @@ v3CoreFactoryAddress: '0x0227628f3F023bb0B980b67D528571c95c6DaC1c',

swapRouter02Address: '0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E'
}; // Avalanche v3 addresses
};
// Avalanche v3 addresses
var AVALANCHE_ADDRESSES = {

@@ -248,4 +253,4 @@ v3CoreFactoryAddress: '0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD',

swapRouter02Address: '0x2626664c2603336E57B271c5C0b26F421741e481'
}; // Base Goerli v3 addresses
};
// Base Goerli v3 addresses
var BASE_GOERLI_ADDRESSES = {

@@ -297,3 +302,2 @@ v3CoreFactoryAddress: '0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2',

/* V3 Contract Addresses */
var V3_CORE_FACTORY_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {

@@ -305,7 +309,5 @@ memo[chainId] = CHAIN_TO_ADDRESSES_MAP[chainId].v3CoreFactoryAddress;

var v3MigratorAddress = CHAIN_TO_ADDRESSES_MAP[chainId].v3MigratorAddress;
if (v3MigratorAddress) {
memo[chainId] = v3MigratorAddress;
}
return memo;

@@ -320,3 +322,2 @@ }, {}));

*/
var GOVERNANCE_ALPHA_V0_ADDRESSES = /*#__PURE__*/constructSameAddressMap('0x5e4be8Bc9637f0EAA1A755019e06A68ce081D58F');

@@ -326,3 +327,2 @@ /**

*/
var GOVERNANCE_ALPHA_V1_ADDRESSES = (_GOVERNANCE_ALPHA_V1_ = {}, _GOVERNANCE_ALPHA_V1_[ChainId.MAINNET] = '0xC4e172459f1E7939D522503B81AFAaC1014CE6F6', _GOVERNANCE_ALPHA_V1_);

@@ -332,3 +332,2 @@ /**

*/
var GOVERNANCE_BRAVO_ADDRESSES = (_GOVERNANCE_BRAVO_ADD = {}, _GOVERNANCE_BRAVO_ADD[ChainId.MAINNET] = '0x408ED6354d4973f66138C91495F2f2FCbd8724C3', _GOVERNANCE_BRAVO_ADD);

@@ -344,7 +343,5 @@ var TIMELOCK_ADDRESSES = /*#__PURE__*/constructSameAddressMap('0x1a9C8182C09F50C8318d769245beA52c32BE35BC');

var nonfungiblePositionManagerAddress = CHAIN_TO_ADDRESSES_MAP[chainId].nonfungiblePositionManagerAddress;
if (nonfungiblePositionManagerAddress) {
memo[chainId] = nonfungiblePositionManagerAddress;
}
return memo;

@@ -356,7 +353,5 @@ }, {}));

var tickLensAddress = CHAIN_TO_ADDRESSES_MAP[chainId].tickLensAddress;
if (tickLensAddress) {
memo[chainId] = tickLensAddress;
}
return memo;

@@ -366,7 +361,5 @@ }, {}));

var v1MixedRouteQuoterAddress = CHAIN_TO_ADDRESSES_MAP[chainId].v1MixedRouteQuoterAddress;
if (v1MixedRouteQuoterAddress) {
memo[chainId] = v1MixedRouteQuoterAddress;
}
return memo;

@@ -377,7 +370,5 @@ }, {});

var _CHAIN_TO_ADDRESSES_M2;
var id = chainId;
return (_CHAIN_TO_ADDRESSES_M2 = CHAIN_TO_ADDRESSES_MAP[id].swapRouter02Address) != null ? _CHAIN_TO_ADDRESSES_M2 : '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45';
}
return '';

@@ -387,3 +378,2 @@ };

var TradeType;
(function (TradeType) {

@@ -393,5 +383,3 @@ TradeType[TradeType["EXACT_INPUT"] = 0] = "EXACT_INPUT";

})(TradeType || (TradeType = {}));
var Rounding;
(function (Rounding) {

@@ -402,3 +390,2 @@ Rounding[Rounding["ROUND_DOWN"] = 0] = "ROUND_DOWN";

})(Rounding || (Rounding = {}));
var MaxUint256 = /*#__PURE__*/JSBI.BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');

@@ -416,7 +403,5 @@

}
this.numerator = JSBI.BigInt(numerator);
this.denominator = JSBI.BigInt(denominator);
}
Fraction.tryParseFraction = function tryParseFraction(fractionish) {

@@ -426,31 +411,23 @@ if (fractionish instanceof JSBI || typeof fractionish === 'number' || typeof fractionish === 'string') return new Fraction(fractionish);

throw new Error('Could not parse fraction');
} // performs floor division
}
// performs floor division
;
var _proto = Fraction.prototype;
_proto.invert = function invert() {
return new Fraction(this.denominator, this.numerator);
};
_proto.add = function add(other) {
var otherParsed = Fraction.tryParseFraction(other);
if (JSBI.equal(this.denominator, otherParsed.denominator)) {
return new Fraction(JSBI.add(this.numerator, otherParsed.numerator), this.denominator);
}
return new Fraction(JSBI.add(JSBI.multiply(this.numerator, otherParsed.denominator), JSBI.multiply(otherParsed.numerator, this.denominator)), JSBI.multiply(this.denominator, otherParsed.denominator));
};
_proto.subtract = function subtract(other) {
var otherParsed = Fraction.tryParseFraction(other);
if (JSBI.equal(this.denominator, otherParsed.denominator)) {
return new Fraction(JSBI.subtract(this.numerator, otherParsed.numerator), this.denominator);
}
return new Fraction(JSBI.subtract(JSBI.multiply(this.numerator, otherParsed.denominator), JSBI.multiply(otherParsed.numerator, this.denominator)), JSBI.multiply(this.denominator, otherParsed.denominator));
};
_proto.lessThan = function lessThan(other) {

@@ -460,3 +437,2 @@ var otherParsed = Fraction.tryParseFraction(other);

};
_proto.equalTo = function equalTo(other) {

@@ -466,3 +442,2 @@ var otherParsed = Fraction.tryParseFraction(other);

};
_proto.greaterThan = function greaterThan(other) {

@@ -472,3 +447,2 @@ var otherParsed = Fraction.tryParseFraction(other);

};
_proto.multiply = function multiply(other) {

@@ -478,3 +452,2 @@ var otherParsed = Fraction.tryParseFraction(other);

};
_proto.divide = function divide(other) {

@@ -484,3 +457,2 @@ var otherParsed = Fraction.tryParseFraction(other);

};
_proto.toSignificant = function toSignificant(significantDigits, format, rounding) {

@@ -492,7 +464,5 @@ if (format === void 0) {

}
if (rounding === void 0) {
rounding = Rounding.ROUND_HALF_UP;
}
!Number.isInteger(significantDigits) ? process.env.NODE_ENV !== "production" ? invariant(false, significantDigits + " is not an integer.") : invariant(false) : void 0;

@@ -507,3 +477,2 @@ !(significantDigits > 0) ? process.env.NODE_ENV !== "production" ? invariant(false, significantDigits + " is not positive.") : invariant(false) : void 0;

};
_proto.toFixed = function toFixed(decimalPlaces, format, rounding) {

@@ -515,7 +484,5 @@ if (format === void 0) {

}
if (rounding === void 0) {
rounding = Rounding.ROUND_HALF_UP;
}
!Number.isInteger(decimalPlaces) ? process.env.NODE_ENV !== "production" ? invariant(false, decimalPlaces + " is not an integer.") : invariant(false) : void 0;

@@ -529,5 +496,3 @@ !(decimalPlaces >= 0) ? process.env.NODE_ENV !== "production" ? invariant(false, decimalPlaces + " is negative.") : invariant(false) : void 0;

* Helper method for converting any super class back to a fraction
*/
;
*/;
_createClass(Fraction, [{

@@ -537,4 +502,4 @@ key: "quotient",

return JSBI.divide(this.numerator, this.denominator);
} // remainder after floor division
}
// remainder after floor division
}, {

@@ -551,3 +516,2 @@ key: "remainder",

}]);
return Fraction;

@@ -559,6 +523,4 @@ }();

_inheritsLoose(CurrencyAmount, _Fraction);
function CurrencyAmount(currency, numerator, denominator) {
var _this;
_this = _Fraction.call(this, numerator, denominator) || this;

@@ -575,4 +537,2 @@ !JSBI.lessThanOrEqual(_this.quotient, MaxUint256) ? process.env.NODE_ENV !== "production" ? invariant(false, 'AMOUNT') : invariant(false) : void 0;

*/
CurrencyAmount.fromRawAmount = function fromRawAmount(currency, rawAmount) {

@@ -586,39 +546,25 @@ return new CurrencyAmount(currency, rawAmount);

* @param denominator the denominator of the fractional token amount
*/
;
*/;
CurrencyAmount.fromFractionalAmount = function fromFractionalAmount(currency, numerator, denominator) {
return new CurrencyAmount(currency, numerator, denominator);
};
var _proto = CurrencyAmount.prototype;
_proto.add = function add(other) {
!this.currency.equals(other.currency) ? process.env.NODE_ENV !== "production" ? invariant(false, 'CURRENCY') : invariant(false) : void 0;
var added = _Fraction.prototype.add.call(this, other);
return CurrencyAmount.fromFractionalAmount(this.currency, added.numerator, added.denominator);
};
_proto.subtract = function subtract(other) {
!this.currency.equals(other.currency) ? process.env.NODE_ENV !== "production" ? invariant(false, 'CURRENCY') : invariant(false) : void 0;
var subtracted = _Fraction.prototype.subtract.call(this, other);
return CurrencyAmount.fromFractionalAmount(this.currency, subtracted.numerator, subtracted.denominator);
};
_proto.multiply = function multiply(other) {
var multiplied = _Fraction.prototype.multiply.call(this, other);
return CurrencyAmount.fromFractionalAmount(this.currency, multiplied.numerator, multiplied.denominator);
};
_proto.divide = function divide(other) {
var divided = _Fraction.prototype.divide.call(this, other);
return CurrencyAmount.fromFractionalAmount(this.currency, divided.numerator, divided.denominator);
};
_proto.toSignificant = function toSignificant(significantDigits, format, rounding) {

@@ -628,10 +574,7 @@ if (significantDigits === void 0) {

}
if (rounding === void 0) {
rounding = Rounding.ROUND_DOWN;
}
return _Fraction.prototype.divide.call(this, this.decimalScale).toSignificant(significantDigits, format, rounding);
};
_proto.toFixed = function toFixed(decimalPlaces, format, rounding) {

@@ -641,11 +584,8 @@ if (decimalPlaces === void 0) {

}
if (rounding === void 0) {
rounding = Rounding.ROUND_DOWN;
}
!(decimalPlaces <= this.currency.decimals) ? process.env.NODE_ENV !== "production" ? invariant(false, 'DECIMALS') : invariant(false) : void 0;
return _Fraction.prototype.divide.call(this, this.decimalScale).toFixed(decimalPlaces, format, rounding);
};
_proto.toExact = function toExact(format) {

@@ -657,7 +597,5 @@ if (format === void 0) {

}
Big$1.DP = this.currency.decimals;
return new Big$1(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(format);
};
_createClass(CurrencyAmount, [{

@@ -670,3 +608,2 @@ key: "wrapped",

}]);
return CurrencyAmount;

@@ -680,13 +617,9 @@ }(Fraction);

*/
function toPercent(fraction) {
return new Percent(fraction.numerator, fraction.denominator);
}
var Percent = /*#__PURE__*/function (_Fraction) {
_inheritsLoose(Percent, _Fraction);
function Percent() {
var _this;
_this = _Fraction.apply(this, arguments) || this;

@@ -696,25 +629,18 @@ /**

*/
_this.isPercent = true;
return _this;
}
var _proto = Percent.prototype;
_proto.add = function add(other) {
return toPercent(_Fraction.prototype.add.call(this, other));
};
_proto.subtract = function subtract(other) {
return toPercent(_Fraction.prototype.subtract.call(this, other));
};
_proto.multiply = function multiply(other) {
return toPercent(_Fraction.prototype.multiply.call(this, other));
};
_proto.divide = function divide(other) {
return toPercent(_Fraction.prototype.divide.call(this, other));
};
_proto.toSignificant = function toSignificant(significantDigits, format, rounding) {

@@ -724,6 +650,4 @@ if (significantDigits === void 0) {

}
return _Fraction.prototype.multiply.call(this, ONE_HUNDRED).toSignificant(significantDigits, format, rounding);
};
_proto.toFixed = function toFixed(decimalPlaces, format, rounding) {

@@ -733,6 +657,4 @@ if (decimalPlaces === void 0) {

}
return _Fraction.prototype.multiply.call(this, ONE_HUNDRED).toFixed(decimalPlaces, format, rounding);
};
return Percent;

@@ -743,3 +665,2 @@ }(Fraction);

_inheritsLoose(Price, _Fraction);
/**

@@ -751,9 +672,6 @@ * Construct a price, either with the base and quote currency amount, or the

var _this;
var baseCurrency, quoteCurrency, denominator, numerator;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (args.length === 4) {

@@ -772,3 +690,2 @@ baseCurrency = args[0];

}
_this = _Fraction.call(this, numerator, denominator) || this;

@@ -783,6 +700,3 @@ _this.baseCurrency = baseCurrency;

*/
var _proto = Price.prototype;
_proto.invert = function invert() {

@@ -794,10 +708,6 @@ return new Price(this.quoteCurrency, this.baseCurrency, this.numerator, this.denominator);

* @param other the other price
*/
;
*/;
_proto.multiply = function multiply(other) {
!this.quoteCurrency.equals(other.baseCurrency) ? process.env.NODE_ENV !== "production" ? invariant(false, 'TOKEN') : invariant(false) : void 0;
var fraction = _Fraction.prototype.multiply.call(this, other);
return new Price(this.baseCurrency, other.quoteCurrency, fraction.denominator, fraction.numerator);

@@ -808,10 +718,6 @@ }

* @param currencyAmount the amount of base currency to quote against the price
*/
;
*/;
_proto.quote = function quote(currencyAmount) {
!currencyAmount.currency.equals(this.baseCurrency) ? process.env.NODE_ENV !== "production" ? invariant(false, 'TOKEN') : invariant(false) : void 0;
var result = _Fraction.prototype.multiply.call(this, currencyAmount);
return CurrencyAmount.fromFractionalAmount(this.quoteCurrency, result.numerator, result.denominator);

@@ -822,5 +728,3 @@ }

* @private
*/
;
*/;
_proto.toSignificant = function toSignificant(significantDigits, format, rounding) {

@@ -830,6 +734,4 @@ if (significantDigits === void 0) {

}
return this.adjustedForDecimals.toSignificant(significantDigits, format, rounding);
};
_proto.toFixed = function toFixed(decimalPlaces, format, rounding) {

@@ -839,6 +741,4 @@ if (decimalPlaces === void 0) {

}
return this.adjustedForDecimals.toFixed(decimalPlaces, format, rounding);
};
_createClass(Price, [{

@@ -850,3 +750,2 @@ key: "adjustedForDecimals",

}]);
return Price;

@@ -858,3 +757,2 @@ }(Fraction);

*/
var BaseCurrency =

@@ -880,9 +778,6 @@ /**

*/
var NativeCurrency = /*#__PURE__*/function (_BaseCurrency) {
_inheritsLoose(NativeCurrency, _BaseCurrency);
function NativeCurrency() {
var _this;
_this = _BaseCurrency.apply(this, arguments) || this;

@@ -893,3 +788,2 @@ _this.isNative = true;

}
return NativeCurrency;

@@ -902,3 +796,2 @@ }(BaseCurrency);

*/
function validateAndParseAddress(address) {

@@ -910,4 +803,4 @@ try {

}
} // Checks a string starts with 0x, is 42 characters long and contains only hex characters after 0x
}
// Checks a string starts with 0x, is 42 characters long and contains only hex characters after 0x
var startsWith0xLen42HexRegex = /^0x[0-9a-fA-F]{40}$/;

@@ -918,3 +811,2 @@ /**

*/
function checkValidAddress(address) {

@@ -924,3 +816,2 @@ if (startsWith0xLen42HexRegex.test(address)) {

}
throw new Error(address + " is not a valid address.");

@@ -932,6 +823,4 @@ }

*/
var Token = /*#__PURE__*/function (_BaseCurrency) {
_inheritsLoose(Token, _BaseCurrency);
/**

@@ -950,7 +839,5 @@ *

var _this;
_this = _BaseCurrency.call(this, chainId, decimals, symbol, name) || this;
_this.isNative = false;
_this.isToken = true;
if (bypassChecksum) {

@@ -961,11 +848,8 @@ _this.address = checkValidAddress(address);

}
if (buyFeeBps) {
!buyFeeBps.gte(BigNumber.from(0)) ? process.env.NODE_ENV !== "production" ? invariant(false, 'NON-NEGATIVE FOT FEES') : invariant(false) : void 0;
}
if (sellFeeBps) {
!sellFeeBps.gte(BigNumber.from(0)) ? process.env.NODE_ENV !== "production" ? invariant(false, 'NON-NEGATIVE FOT FEES') : invariant(false) : void 0;
}
_this.buyFeeBps = buyFeeBps;

@@ -979,6 +863,3 @@ _this.sellFeeBps = sellFeeBps;

*/
var _proto = Token.prototype;
_proto.equals = function equals(other) {

@@ -992,5 +873,3 @@ return other.isToken && this.chainId === other.chainId && this.address.toLowerCase() === other.address.toLowerCase();

* @throws if the tokens are on different chains
*/
;
*/;
_proto.sortsBefore = function sortsBefore(other) {

@@ -1003,5 +882,3 @@ !(this.chainId === other.chainId) ? process.env.NODE_ENV !== "production" ? invariant(false, 'CHAIN_IDS') : invariant(false) : void 0;

* Return this token, which does not need to be wrapped
*/
;
*/;
_createClass(Token, [{

@@ -1013,36 +890,42 @@ key: "wrapped",

}]);
return Token;
}(BaseCurrency);
var _WETH;
/**
* Known WETH9 implementation addresses, used in our implementation of Ether#wrapped
*/
var WETH9 = {
1: /*#__PURE__*/new Token(1, '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 18, 'WETH', 'Wrapped Ether'),
3: /*#__PURE__*/new Token(3, '0xc778417E063141139Fce010982780140Aa0cD5Ab', 18, 'WETH', 'Wrapped Ether'),
4: /*#__PURE__*/new Token(4, '0xc778417E063141139Fce010982780140Aa0cD5Ab', 18, 'WETH', 'Wrapped Ether'),
5: /*#__PURE__*/new Token(5, '0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6', 18, 'WETH', 'Wrapped Ether'),
42: /*#__PURE__*/new Token(42, '0xd0A1E359811322d97991E03f863a0C30C2cF029C', 18, 'WETH', 'Wrapped Ether'),
10: /*#__PURE__*/new Token(10, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'),
69: /*#__PURE__*/new Token(69, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'),
11155420: /*#__PURE__*/new Token(11155420, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'),
42161: /*#__PURE__*/new Token(42161, '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', 18, 'WETH', 'Wrapped Ether'),
421611: /*#__PURE__*/new Token(421611, '0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681', 18, 'WETH', 'Wrapped Ether'),
421614: /*#__PURE__*/new Token(421614, '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', 18, 'WETH', 'Wrapped Ether'),
8453: /*#__PURE__*/new Token(8453, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'),
56: /*#__PURE__*/new Token(56, '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', 18, 'WBNB', 'Wrapped BNB'),
137: /*#__PURE__*/new Token(137, '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', 18, 'WMATIC', 'Wrapped MATIC'),
43114: /*#__PURE__*/new Token(43114, '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7', 18, 'WAVAX', 'Wrapped AVAX')
};
var WETH9 = (_WETH = {}, _WETH[1] = /*#__PURE__*/new Token(1, '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 18, 'WETH', 'Wrapped Ether'), _WETH[3] = /*#__PURE__*/new Token(3, '0xc778417E063141139Fce010982780140Aa0cD5Ab', 18, 'WETH', 'Wrapped Ether'), _WETH[4] = /*#__PURE__*/new Token(4, '0xc778417E063141139Fce010982780140Aa0cD5Ab', 18, 'WETH', 'Wrapped Ether'), _WETH[5] = /*#__PURE__*/new Token(5, '0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6', 18, 'WETH', 'Wrapped Ether'), _WETH[42] = /*#__PURE__*/new Token(42, '0xd0A1E359811322d97991E03f863a0C30C2cF029C', 18, 'WETH', 'Wrapped Ether'), _WETH[10] = /*#__PURE__*/new Token(10, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'), _WETH[69] = /*#__PURE__*/new Token(69, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'), _WETH[11155420] = /*#__PURE__*/new Token(11155420, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'), _WETH[42161] = /*#__PURE__*/new Token(42161, '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', 18, 'WETH', 'Wrapped Ether'), _WETH[421611] = /*#__PURE__*/new Token(421611, '0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681', 18, 'WETH', 'Wrapped Ether'), _WETH[421614] = /*#__PURE__*/new Token(421614, '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', 18, 'WETH', 'Wrapped Ether'), _WETH[8453] = /*#__PURE__*/new Token(8453, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'), _WETH[56] = /*#__PURE__*/new Token(56, '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', 18, 'WBNB', 'Wrapped BNB'), _WETH[137] = /*#__PURE__*/new Token(137, '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', 18, 'WMATIC', 'Wrapped MATIC'), _WETH[43114] = /*#__PURE__*/new Token(43114, '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7', 18, 'WAVAX', 'Wrapped AVAX'), _WETH);
/**
* Ether is the main usage of a 'native' currency, i.e. for Ethereum mainnet and all testnets
*/
var Ether = /*#__PURE__*/function (_NativeCurrency) {
_inheritsLoose(Ether, _NativeCurrency);
function Ether(chainId) {
return _NativeCurrency.call(this, chainId, 18, 'ETH', 'Ether') || this;
}
Ether.onChain = function onChain(chainId) {
var _this$_etherCache$cha;
return (_this$_etherCache$cha = this._etherCache[chainId]) != null ? _this$_etherCache$cha : this._etherCache[chainId] = new Ether(chainId);
};
var _proto = Ether.prototype;
_proto.equals = function equals(other) {
return other.isNative && other.chainId === this.chainId;
};
_createClass(Ether, [{

@@ -1056,3 +939,2 @@ key: "wrapped",

}]);
return Ether;

@@ -1068,6 +950,5 @@ }(NativeCurrency);

*/
function computePriceImpact(midPrice, inputAmount, outputAmount) {
var quotedOutputAmount = midPrice.quote(inputAmount); // calculate price impact := (exactQuote - outputAmount) / exactQuote
var quotedOutputAmount = midPrice.quote(inputAmount);
// calculate price impact := (exactQuote - outputAmount) / exactQuote
var priceImpact = quotedOutputAmount.subtract(outputAmount).divide(quotedOutputAmount);

@@ -1077,9 +958,9 @@ return new Percent(priceImpact.numerator, priceImpact.denominator);

// given an array of items sorted by `comparator`, insert an item into its sort index and constrain the size to
// `maxSize` by removing the last item
function sortedInsert(items, add, maxSize, comparator) {
!(maxSize > 0) ? process.env.NODE_ENV !== "production" ? invariant(false, 'MAX_SIZE_ZERO') : invariant(false) : void 0; // this is an invariant because the interface cannot return multiple removed items if items.length exceeds maxSize
!(items.length <= maxSize) ? process.env.NODE_ENV !== "production" ? invariant(false, 'ITEMS_SIZE') : invariant(false) : void 0; // short circuit first item add
!(maxSize > 0) ? process.env.NODE_ENV !== "production" ? invariant(false, 'MAX_SIZE_ZERO') : invariant(false) : void 0;
// this is an invariant because the interface cannot return multiple removed items if items.length exceeds maxSize
!(items.length <= maxSize) ? process.env.NODE_ENV !== "production" ? invariant(false, 'ITEMS_SIZE') : invariant(false) : void 0;
// short circuit first item add
if (items.length === 0) {

@@ -1089,14 +970,11 @@ items.push(add);

} else {
var isFull = items.length === maxSize; // short circuit if full and the additional item does not come before the last item
var isFull = items.length === maxSize;
// short circuit if full and the additional item does not come before the last item
if (isFull && comparator(items[items.length - 1], add) <= 0) {
return add;
}
var lo = 0,
hi = items.length;
hi = items.length;
while (lo < hi) {
var mid = lo + hi >>> 1;
if (comparator(items[mid], add) <= 0) {

@@ -1108,3 +986,2 @@ lo = mid + 1;

}
items.splice(lo, 0, add);

@@ -1123,10 +1000,8 @@ return isFull ? items.pop() : null;

*/
function sqrt(value) {
!JSBI.greaterThanOrEqual(value, ZERO) ? process.env.NODE_ENV !== "production" ? invariant(false, 'NEGATIVE') : invariant(false) : void 0; // rely on built in sqrt if possible
!JSBI.greaterThanOrEqual(value, ZERO) ? process.env.NODE_ENV !== "production" ? invariant(false, 'NEGATIVE') : invariant(false) : void 0;
// rely on built in sqrt if possible
if (JSBI.lessThan(value, MAX_SAFE_INTEGER)) {
return JSBI.BigInt(Math.floor(Math.sqrt(JSBI.toNumber(value))));
}
var z;

@@ -1136,3 +1011,2 @@ var x;

x = JSBI.add(JSBI.divide(value, TWO), ONE);
while (JSBI.lessThan(x, z)) {

@@ -1142,3 +1016,2 @@ z = x;

}
return z;

@@ -1145,0 +1018,0 @@ }

{
"name": "@uniswap/sdk-core",
"description": "⚒️ An SDK for building applications on top of Uniswap V3",
"repository": "https://github.com/Uniswap/sdks.git",
"keywords": [
"uniswap",
"ethereum"
],
"license": "MIT",
"version": "4.2.0",
"description": "⚒️ An SDK for building applications on top of Uniswap V3",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"module": "dist/sdk-core.esm.js",
"files": [
"dist"
],
"repository": "https://github.com/Uniswap/uniswap-sdk-core.git",
"keywords": [
"uniswap",
"ethereum"
],
"module": "dist/sdk-core.esm.js",
"engines": {
"node": ">=10"
},
"scripts": {
"build": "tsdx build",
"lint": "tsdx lint src",
"release": "semantic-release",
"start": "tsdx watch",
"test": "tsdx test",
"prepublishOnly": "tsdx build"
"test": "tsdx test"
},

@@ -36,5 +39,2 @@ "dependencies": {

},
"engines": {
"node": ">=10"
},
"prettier": {

@@ -44,3 +44,40 @@ "printWidth": 120,

"singleQuote": true
}
},
"publishConfig": {
"access": "public"
},
"release": {
"extends": "semantic-release-monorepo",
"branches": [
{
"name": "main",
"prerelease": false
},
{
"name": "beta",
"prerelease": true
}
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": "../../publishing/release-rules.cjs"
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github",
[
"@semantic-release/exec",
{
"successCmd": "git restore yarn.lock && yarn",
"failCmd": "git restore yarn.lock && yarn",
"execCwd": "../.."
}
]
]
},
"version": "4.2.1-beta.1"
}
# Uniswap SDK Core
[![Unit Tests](https://github.com/Uniswap/uniswap-sdk-core/workflows/Unit%20Tests/badge.svg)](https://github.com/Uniswap/uniswap-sdk-core/actions?query=workflow%3A%22Unit+Tests%22)
[![Lint](https://github.com/Uniswap/uniswap-sdk-core/workflows/Lint/badge.svg)](https://github.com/Uniswap/uniswap-sdk-core/actions?query=workflow%3ALint)
[![npm version](https://img.shields.io/npm/v/@uniswap/sdk-core/latest.svg)](https://www.npmjs.com/package/@uniswap/sdk-core/v/latest)

@@ -6,0 +4,0 @@ [![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/sdk-core/latest.svg)](https://bundlephobia.com/result?p=@uniswap/sdk-core@latest)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc