@uniswap/sdk-core 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,47 @@
1
+ import { SupportedChainsType } from './chains';
2
+ declare type AddressMap = {
3
+ [chainId: number]: string;
4
+ };
5
+ declare type ChainAddresses = {
6
+ v3CoreFactoryAddress: string;
7
+ multicallAddress: string;
8
+ quoterAddress: string;
9
+ v3MigratorAddress?: string;
10
+ nonfungiblePositionManagerAddress?: string;
11
+ tickLensAddress?: string;
12
+ swapRouter02Address?: string;
13
+ v1MixedRouteQuoterAddress?: string;
14
+ };
15
+ export declare const UNI_ADDRESSES: AddressMap;
16
+ export declare const UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS = "0x8B799381ac40b838BBA4131ffB26197C432AFe78";
17
+ export declare const V2_FACTORY_ADDRESS = "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f";
18
+ export declare const V2_FACTORY_ADDRESSES: AddressMap;
19
+ export declare const V2_ROUTER_ADDRESS = "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D";
20
+ export declare const V2_ROUTER_ADDRESSES: AddressMap;
21
+ export declare const CHAIN_TO_ADDRESSES_MAP: Record<SupportedChainsType, ChainAddresses>;
22
+ export declare const V3_CORE_FACTORY_ADDRESSES: AddressMap;
23
+ export declare const V3_MIGRATOR_ADDRESSES: AddressMap;
24
+ export declare const MULTICALL_ADDRESSES: AddressMap;
25
+ /**
26
+ * The oldest V0 governance address
27
+ */
28
+ export declare const GOVERNANCE_ALPHA_V0_ADDRESSES: AddressMap;
29
+ /**
30
+ * The older V1 governance address
31
+ */
32
+ export declare const GOVERNANCE_ALPHA_V1_ADDRESSES: AddressMap;
33
+ /**
34
+ * The latest governor bravo that is currently admin of timelock
35
+ */
36
+ export declare const GOVERNANCE_BRAVO_ADDRESSES: AddressMap;
37
+ export declare const TIMELOCK_ADDRESSES: AddressMap;
38
+ export declare const MERKLE_DISTRIBUTOR_ADDRESS: AddressMap;
39
+ export declare const ARGENT_WALLET_DETECTOR_ADDRESS: AddressMap;
40
+ export declare const QUOTER_ADDRESSES: AddressMap;
41
+ export declare const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap;
42
+ export declare const ENS_REGISTRAR_ADDRESSES: AddressMap;
43
+ export declare const SOCKS_CONTROLLER_ADDRESSES: AddressMap;
44
+ export declare const TICK_LENS_ADDRESSES: AddressMap;
45
+ export declare const MIXED_ROUTE_QUOTER_V1_ADDRESSES: AddressMap;
46
+ export declare const SWAP_ROUTER_02_ADDRESSES: (chainId: number) => string | undefined;
47
+ export {};
@@ -0,0 +1,29 @@
1
+ export declare enum ChainId {
2
+ MAINNET = 1,
3
+ GOERLI = 5,
4
+ SEPOLIA = 11155111,
5
+ OPTIMISM = 10,
6
+ OPTIMISM_GOERLI = 420,
7
+ ARBITRUM_ONE = 42161,
8
+ ARBITRUM_GOERLI = 421613,
9
+ POLYGON = 137,
10
+ POLYGON_MUMBAI = 80001,
11
+ CELO = 42220,
12
+ CELO_ALFAJORES = 44787,
13
+ GNOSIS = 100,
14
+ MOONBEAM = 1284,
15
+ BNB = 56,
16
+ AVALANCHE = 43114,
17
+ BASE_GOERLI = 84531
18
+ }
19
+ export declare const SUPPORTED_CHAINS: readonly [ChainId.MAINNET, ChainId.OPTIMISM, ChainId.OPTIMISM_GOERLI, ChainId.ARBITRUM_ONE, ChainId.ARBITRUM_GOERLI, ChainId.POLYGON, ChainId.POLYGON_MUMBAI, ChainId.GOERLI, ChainId.SEPOLIA, ChainId.CELO_ALFAJORES, ChainId.CELO, ChainId.BNB, ChainId.AVALANCHE, ChainId.BASE_GOERLI];
20
+ export declare type SupportedChainsType = typeof SUPPORTED_CHAINS[number];
21
+ export declare enum NativeCurrencyName {
22
+ ETHER = "ETH",
23
+ MATIC = "MATIC",
24
+ CELO = "CELO",
25
+ GNOSIS = "XDAI",
26
+ MOONBEAM = "GLMR",
27
+ BNB = "BNB",
28
+ AVAX = "AVAX"
29
+ }
@@ -1,17 +1,4 @@
1
1
  import JSBI from 'jsbi';
2
- export declare enum SupportedChainId {
3
- MAINNET = 1,
4
- GOERLI = 5,
5
- ARBITRUM_ONE = 42161,
6
- ARBITRUM_GOERLI = 421613,
7
- OPTIMISM = 10,
8
- OPTIMISM_GOERLI = 420,
9
- POLYGON = 137,
10
- POLYGON_MUMBAI = 80001,
11
- CELO = 42220,
12
- CELO_ALFAJORES = 44787,
13
- BSC = 56
14
- }
15
2
  export declare type BigintIsh = JSBI | string | number;
16
3
  export declare enum TradeType {
17
4
  EXACT_INPUT = 0,
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export * from './addresses';
2
+ export * from './chains';
1
3
  export * from './constants';
2
4
  export * from './entities';
3
5
  export * from './utils';
@@ -11,33 +11,6 @@ var _Big = _interopDefault(require('big.js'));
11
11
  var toFormat = _interopDefault(require('toformat'));
12
12
  var address = require('@ethersproject/address');
13
13
 
14
- (function (SupportedChainId) {
15
- SupportedChainId[SupportedChainId["MAINNET"] = 1] = "MAINNET";
16
- SupportedChainId[SupportedChainId["GOERLI"] = 5] = "GOERLI";
17
- SupportedChainId[SupportedChainId["ARBITRUM_ONE"] = 42161] = "ARBITRUM_ONE";
18
- SupportedChainId[SupportedChainId["ARBITRUM_GOERLI"] = 421613] = "ARBITRUM_GOERLI";
19
- SupportedChainId[SupportedChainId["OPTIMISM"] = 10] = "OPTIMISM";
20
- SupportedChainId[SupportedChainId["OPTIMISM_GOERLI"] = 420] = "OPTIMISM_GOERLI";
21
- SupportedChainId[SupportedChainId["POLYGON"] = 137] = "POLYGON";
22
- SupportedChainId[SupportedChainId["POLYGON_MUMBAI"] = 80001] = "POLYGON_MUMBAI";
23
- SupportedChainId[SupportedChainId["CELO"] = 42220] = "CELO";
24
- SupportedChainId[SupportedChainId["CELO_ALFAJORES"] = 44787] = "CELO_ALFAJORES";
25
- SupportedChainId[SupportedChainId["BSC"] = 56] = "BSC";
26
- })(exports.SupportedChainId || (exports.SupportedChainId = {}));
27
-
28
- (function (TradeType) {
29
- TradeType[TradeType["EXACT_INPUT"] = 0] = "EXACT_INPUT";
30
- TradeType[TradeType["EXACT_OUTPUT"] = 1] = "EXACT_OUTPUT";
31
- })(exports.TradeType || (exports.TradeType = {}));
32
-
33
- (function (Rounding) {
34
- Rounding[Rounding["ROUND_DOWN"] = 0] = "ROUND_DOWN";
35
- Rounding[Rounding["ROUND_HALF_UP"] = 1] = "ROUND_HALF_UP";
36
- Rounding[Rounding["ROUND_UP"] = 2] = "ROUND_UP";
37
- })(exports.Rounding || (exports.Rounding = {}));
38
-
39
- var MaxUint256 = /*#__PURE__*/JSBI.BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');
40
-
41
14
  function _defineProperties(target, props) {
42
15
  for (var i = 0; i < props.length; i++) {
43
16
  var descriptor = props[i];
@@ -54,12 +27,265 @@ function _createClass(Constructor, protoProps, staticProps) {
54
27
  return Constructor;
55
28
  }
56
29
 
30
+ function _extends() {
31
+ _extends = Object.assign || function (target) {
32
+ for (var i = 1; i < arguments.length; i++) {
33
+ var source = arguments[i];
34
+
35
+ for (var key in source) {
36
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
37
+ target[key] = source[key];
38
+ }
39
+ }
40
+ }
41
+
42
+ return target;
43
+ };
44
+
45
+ return _extends.apply(this, arguments);
46
+ }
47
+
57
48
  function _inheritsLoose(subClass, superClass) {
58
49
  subClass.prototype = Object.create(superClass.prototype);
59
50
  subClass.prototype.constructor = subClass;
60
51
  subClass.__proto__ = superClass;
61
52
  }
62
53
 
54
+ (function (ChainId) {
55
+ ChainId[ChainId["MAINNET"] = 1] = "MAINNET";
56
+ ChainId[ChainId["GOERLI"] = 5] = "GOERLI";
57
+ ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
58
+ ChainId[ChainId["OPTIMISM"] = 10] = "OPTIMISM";
59
+ ChainId[ChainId["OPTIMISM_GOERLI"] = 420] = "OPTIMISM_GOERLI";
60
+ ChainId[ChainId["ARBITRUM_ONE"] = 42161] = "ARBITRUM_ONE";
61
+ ChainId[ChainId["ARBITRUM_GOERLI"] = 421613] = "ARBITRUM_GOERLI";
62
+ ChainId[ChainId["POLYGON"] = 137] = "POLYGON";
63
+ ChainId[ChainId["POLYGON_MUMBAI"] = 80001] = "POLYGON_MUMBAI";
64
+ ChainId[ChainId["CELO"] = 42220] = "CELO";
65
+ ChainId[ChainId["CELO_ALFAJORES"] = 44787] = "CELO_ALFAJORES";
66
+ ChainId[ChainId["GNOSIS"] = 100] = "GNOSIS";
67
+ ChainId[ChainId["MOONBEAM"] = 1284] = "MOONBEAM";
68
+ ChainId[ChainId["BNB"] = 56] = "BNB";
69
+ ChainId[ChainId["AVALANCHE"] = 43114] = "AVALANCHE";
70
+ ChainId[ChainId["BASE_GOERLI"] = 84531] = "BASE_GOERLI";
71
+ })(exports.ChainId || (exports.ChainId = {}));
72
+
73
+ var SUPPORTED_CHAINS = [exports.ChainId.MAINNET, exports.ChainId.OPTIMISM, exports.ChainId.OPTIMISM_GOERLI, exports.ChainId.ARBITRUM_ONE, exports.ChainId.ARBITRUM_GOERLI, 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_GOERLI];
74
+
75
+ (function (NativeCurrencyName) {
76
+ // Strings match input for CLI
77
+ NativeCurrencyName["ETHER"] = "ETH";
78
+ NativeCurrencyName["MATIC"] = "MATIC";
79
+ NativeCurrencyName["CELO"] = "CELO";
80
+ NativeCurrencyName["GNOSIS"] = "XDAI";
81
+ NativeCurrencyName["MOONBEAM"] = "GLMR";
82
+ NativeCurrencyName["BNB"] = "BNB";
83
+ NativeCurrencyName["AVAX"] = "AVAX";
84
+ })(exports.NativeCurrencyName || (exports.NativeCurrencyName = {}));
85
+
86
+ var _CHAIN_TO_ADDRESSES_M, _GOVERNANCE_ALPHA_V1_, _GOVERNANCE_BRAVO_ADD, _MERKLE_DISTRIBUTOR_A, _ARGENT_WALLET_DETECT, _SOCKS_CONTROLLER_ADD;
87
+ var DEFAULT_NETWORKS = [exports.ChainId.MAINNET, exports.ChainId.GOERLI];
88
+
89
+ function constructSameAddressMap(address, additionalNetworks) {
90
+ if (additionalNetworks === void 0) {
91
+ additionalNetworks = [];
92
+ }
93
+
94
+ return DEFAULT_NETWORKS.concat(additionalNetworks).reduce(function (memo, chainId) {
95
+ memo[chainId] = address;
96
+ return memo;
97
+ }, {});
98
+ }
99
+
100
+ var UNI_ADDRESSES = /*#__PURE__*/constructSameAddressMap('0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', [exports.ChainId.OPTIMISM, exports.ChainId.ARBITRUM_ONE, exports.ChainId.POLYGON, exports.ChainId.POLYGON_MUMBAI, exports.ChainId.SEPOLIA]);
101
+ var UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS = '0x8B799381ac40b838BBA4131ffB26197C432AFe78';
102
+ var V2_FACTORY_ADDRESS = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f';
103
+ var V2_FACTORY_ADDRESSES = /*#__PURE__*/constructSameAddressMap(V2_FACTORY_ADDRESS);
104
+ var V2_ROUTER_ADDRESS = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D';
105
+ var V2_ROUTER_ADDRESSES = /*#__PURE__*/constructSameAddressMap(V2_ROUTER_ADDRESS); // Networks that share most of the same addresses i.e. Mainnet, Goerli, Optimism, Arbitrum, Polygon
106
+
107
+ var DEFAULT_ADDRESSES = {
108
+ v3CoreFactoryAddress: '0x1F98431c8aD98523631AE4a59f267346ea31F984',
109
+ multicallAddress: '0x1F98415757620B543A52E61c46B32eB19261F984',
110
+ quoterAddress: '0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6',
111
+ v3MigratorAddress: '0xA5644E29708357803b5A882D272c41cC0dF92B34',
112
+ nonfungiblePositionManagerAddress: '0xC36442b4a4522E871399CD717aBDD847Ab11FE88'
113
+ };
114
+
115
+ var MAINNET_ADDRESSES = /*#__PURE__*/_extends({}, DEFAULT_ADDRESSES, {
116
+ v1MixedRouteQuoterAddress: '0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E'
117
+ });
118
+
119
+ var GOERLI_ADDRESSES = /*#__PURE__*/_extends({}, DEFAULT_ADDRESSES, {
120
+ v1MixedRouteQuoterAddress: '0xBa60b6e6fF25488308789E6e0A65D838be34194e'
121
+ });
122
+
123
+ var OPTIMISM_ADDRESSES = DEFAULT_ADDRESSES;
124
+
125
+ var ARBITRUM_ONE_ADDRESSES = /*#__PURE__*/_extends({}, DEFAULT_ADDRESSES, {
126
+ multicallAddress: '0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB',
127
+ tickLensAddress: '0xbfd8137f7d1516D3ea5cA83523914859ec47F573'
128
+ });
129
+
130
+ var POLYGON_ADDRESSES = DEFAULT_ADDRESSES; // celo v3 addresses
131
+
132
+ var CELO_ADDRESSES = {
133
+ v3CoreFactoryAddress: '0xAfE208a311B21f13EF87E33A90049fC17A7acDEc',
134
+ multicallAddress: '0x633987602DE5C4F337e3DbF265303A1080324204',
135
+ quoterAddress: '0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8',
136
+ v3MigratorAddress: '0x3cFd4d48EDfDCC53D3f173F596f621064614C582',
137
+ nonfungiblePositionManagerAddress: '0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A',
138
+ tickLensAddress: '0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D'
139
+ }; // BNB v3 addresses
140
+
141
+ var BNB_ADDRESSES = {
142
+ v3CoreFactoryAddress: '0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7',
143
+ multicallAddress: '0x963Df249eD09c358A4819E39d9Cd5736c3087184',
144
+ quoterAddress: '0x78D78E420Da98ad378D7799bE8f4AF69033EB077',
145
+ v3MigratorAddress: '0x32681814957e0C13117ddc0c2aba232b5c9e760f',
146
+ nonfungiblePositionManagerAddress: '0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613',
147
+ tickLensAddress: '0xD9270014D396281579760619CCf4c3af0501A47C',
148
+ swapRouter02Address: '0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2'
149
+ }; // optimism goerli addresses
150
+
151
+ var OPTIMISM_GOERLI_ADDRESSES = {
152
+ v3CoreFactoryAddress: '0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10',
153
+ multicallAddress: '0x07F2D8a2a02251B62af965f22fC4744A5f96BCCd',
154
+ quoterAddress: '0x9569CbA925c8ca2248772A9A4976A516743A246F',
155
+ v3MigratorAddress: '0xf6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8',
156
+ nonfungiblePositionManagerAddress: '0x39Ca85Af2F383190cBf7d7c41ED9202D27426EF6',
157
+ tickLensAddress: '0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e'
158
+ }; // arbitrum goerli v3 addresses
159
+
160
+ var ARBITRUM_GOERLI_ADDRESSES = {
161
+ v3CoreFactoryAddress: '0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6',
162
+ multicallAddress: '0x8260CB40247290317a4c062F3542622367F206Ee',
163
+ quoterAddress: '0x1dd92b83591781D0C6d98d07391eea4b9a6008FA',
164
+ v3MigratorAddress: '0xA815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3',
165
+ nonfungiblePositionManagerAddress: '0x622e4726a167799826d1E1D150b076A7725f5D81',
166
+ tickLensAddress: '0xb52429333da969a0C79a60930a4Bf0020E5D1DE8'
167
+ }; // sepolia v3 addresses
168
+
169
+ var SEPOLIA_ADDRESSES = {
170
+ v3CoreFactoryAddress: '0x0227628f3F023bb0B980b67D528571c95c6DaC1c',
171
+ multicallAddress: '0xD7F33bCdb21b359c8ee6F0251d30E94832baAd07',
172
+ quoterAddress: '0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3',
173
+ v3MigratorAddress: '0x729004182cF005CEC8Bd85df140094b6aCbe8b15',
174
+ nonfungiblePositionManagerAddress: '0x1238536071E1c677A632429e3655c799b22cDA52',
175
+ tickLensAddress: '0xd7f33bcdb21b359c8ee6f0251d30e94832baad07'
176
+ }; // Avalanche v3 addresses
177
+
178
+ var AVALANCHE_ADDRESSES = {
179
+ v3CoreFactoryAddress: '0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD',
180
+ multicallAddress: '0x0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2',
181
+ quoterAddress: '0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F',
182
+ v3MigratorAddress: '0x44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97',
183
+ nonfungiblePositionManagerAddress: '0x655C406EBFa14EE2006250925e54ec43AD184f8B',
184
+ tickLensAddress: '0xEB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950',
185
+ swapRouter02Address: '0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE'
186
+ }; // Base Goerli v3 addresses
187
+
188
+ var BASE_GOERLI_ADDRESSES = {
189
+ v3CoreFactoryAddress: '0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2',
190
+ multicallAddress: '0xB206027a9E0E13F05eBEFa5D2402Bab3eA716439',
191
+ quoterAddress: '0xedf539058e28E5937dAef3f69cEd0b25fbE66Ae9',
192
+ v3MigratorAddress: '0x3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE',
193
+ nonfungiblePositionManagerAddress: '0x3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30',
194
+ tickLensAddress: '0x1acB873Ee909D0c98adB18e4474943249F931b92',
195
+ swapRouter02Address: '0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d'
196
+ };
197
+ var CHAIN_TO_ADDRESSES_MAP = (_CHAIN_TO_ADDRESSES_M = {}, _CHAIN_TO_ADDRESSES_M[exports.ChainId.MAINNET] = MAINNET_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.OPTIMISM] = OPTIMISM_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.ARBITRUM_ONE] = ARBITRUM_ONE_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.POLYGON] = POLYGON_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.POLYGON_MUMBAI] = POLYGON_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.GOERLI] = GOERLI_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.CELO] = CELO_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.CELO_ALFAJORES] = CELO_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.BNB] = BNB_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.OPTIMISM_GOERLI] = OPTIMISM_GOERLI_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.ARBITRUM_GOERLI] = ARBITRUM_GOERLI_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.SEPOLIA] = SEPOLIA_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.AVALANCHE] = AVALANCHE_ADDRESSES, _CHAIN_TO_ADDRESSES_M[exports.ChainId.BASE_GOERLI] = BASE_GOERLI_ADDRESSES, _CHAIN_TO_ADDRESSES_M);
198
+ /* V3 Contract Addresses */
199
+
200
+ var V3_CORE_FACTORY_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
201
+ memo[chainId] = CHAIN_TO_ADDRESSES_MAP[chainId].v3CoreFactoryAddress;
202
+ return memo;
203
+ }, {}));
204
+ var V3_MIGRATOR_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
205
+ var v3MigratorAddress = CHAIN_TO_ADDRESSES_MAP[chainId].v3MigratorAddress;
206
+
207
+ if (v3MigratorAddress) {
208
+ memo[chainId] = v3MigratorAddress;
209
+ }
210
+
211
+ return memo;
212
+ }, {}));
213
+ var MULTICALL_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
214
+ memo[chainId] = CHAIN_TO_ADDRESSES_MAP[chainId].multicallAddress;
215
+ return memo;
216
+ }, {}));
217
+ /**
218
+ * The oldest V0 governance address
219
+ */
220
+
221
+ var GOVERNANCE_ALPHA_V0_ADDRESSES = /*#__PURE__*/constructSameAddressMap('0x5e4be8Bc9637f0EAA1A755019e06A68ce081D58F');
222
+ /**
223
+ * The older V1 governance address
224
+ */
225
+
226
+ var GOVERNANCE_ALPHA_V1_ADDRESSES = (_GOVERNANCE_ALPHA_V1_ = {}, _GOVERNANCE_ALPHA_V1_[exports.ChainId.MAINNET] = '0xC4e172459f1E7939D522503B81AFAaC1014CE6F6', _GOVERNANCE_ALPHA_V1_);
227
+ /**
228
+ * The latest governor bravo that is currently admin of timelock
229
+ */
230
+
231
+ var GOVERNANCE_BRAVO_ADDRESSES = (_GOVERNANCE_BRAVO_ADD = {}, _GOVERNANCE_BRAVO_ADD[exports.ChainId.MAINNET] = '0x408ED6354d4973f66138C91495F2f2FCbd8724C3', _GOVERNANCE_BRAVO_ADD);
232
+ var TIMELOCK_ADDRESSES = /*#__PURE__*/constructSameAddressMap('0x1a9C8182C09F50C8318d769245beA52c32BE35BC');
233
+ var MERKLE_DISTRIBUTOR_ADDRESS = (_MERKLE_DISTRIBUTOR_A = {}, _MERKLE_DISTRIBUTOR_A[exports.ChainId.MAINNET] = '0x090D4613473dEE047c3f2706764f49E0821D256e', _MERKLE_DISTRIBUTOR_A);
234
+ var ARGENT_WALLET_DETECTOR_ADDRESS = (_ARGENT_WALLET_DETECT = {}, _ARGENT_WALLET_DETECT[exports.ChainId.MAINNET] = '0xeca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8', _ARGENT_WALLET_DETECT);
235
+ var QUOTER_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
236
+ memo[chainId] = CHAIN_TO_ADDRESSES_MAP[chainId].quoterAddress;
237
+ return memo;
238
+ }, {}));
239
+ var NONFUNGIBLE_POSITION_MANAGER_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
240
+ var nonfungiblePositionManagerAddress = CHAIN_TO_ADDRESSES_MAP[chainId].nonfungiblePositionManagerAddress;
241
+
242
+ if (nonfungiblePositionManagerAddress) {
243
+ memo[chainId] = nonfungiblePositionManagerAddress;
244
+ }
245
+
246
+ return memo;
247
+ }, {}));
248
+ var ENS_REGISTRAR_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/constructSameAddressMap('0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'));
249
+ var SOCKS_CONTROLLER_ADDRESSES = (_SOCKS_CONTROLLER_ADD = {}, _SOCKS_CONTROLLER_ADD[exports.ChainId.MAINNET] = '0x65770b5283117639760beA3F867b69b3697a91dd', _SOCKS_CONTROLLER_ADD);
250
+ var TICK_LENS_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
251
+ var tickLensAddress = CHAIN_TO_ADDRESSES_MAP[chainId].tickLensAddress;
252
+
253
+ if (tickLensAddress) {
254
+ memo[chainId] = tickLensAddress;
255
+ }
256
+
257
+ return memo;
258
+ }, {}));
259
+ var MIXED_ROUTE_QUOTER_V1_ADDRESSES = /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
260
+ var v1MixedRouteQuoterAddress = CHAIN_TO_ADDRESSES_MAP[chainId].v1MixedRouteQuoterAddress;
261
+
262
+ if (v1MixedRouteQuoterAddress) {
263
+ memo[chainId] = v1MixedRouteQuoterAddress;
264
+ }
265
+
266
+ return memo;
267
+ }, {});
268
+ var SWAP_ROUTER_02_ADDRESSES = function SWAP_ROUTER_02_ADDRESSES(chainId) {
269
+ if (chainId == exports.ChainId.BNB) {
270
+ return CHAIN_TO_ADDRESSES_MAP[chainId].swapRouter02Address;
271
+ }
272
+
273
+ return '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45';
274
+ };
275
+
276
+ (function (TradeType) {
277
+ TradeType[TradeType["EXACT_INPUT"] = 0] = "EXACT_INPUT";
278
+ TradeType[TradeType["EXACT_OUTPUT"] = 1] = "EXACT_OUTPUT";
279
+ })(exports.TradeType || (exports.TradeType = {}));
280
+
281
+ (function (Rounding) {
282
+ Rounding[Rounding["ROUND_DOWN"] = 0] = "ROUND_DOWN";
283
+ Rounding[Rounding["ROUND_HALF_UP"] = 1] = "ROUND_HALF_UP";
284
+ Rounding[Rounding["ROUND_UP"] = 2] = "ROUND_UP";
285
+ })(exports.Rounding || (exports.Rounding = {}));
286
+
287
+ var MaxUint256 = /*#__PURE__*/JSBI.BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');
288
+
63
289
  var _toSignificantRoundin, _toFixedRounding;
64
290
  var Decimal = /*#__PURE__*/toFormat(_Decimal);
65
291
  var Big = /*#__PURE__*/toFormat(_Big);
@@ -582,7 +808,7 @@ var Token = /*#__PURE__*/function (_BaseCurrency) {
582
808
  var _proto = Token.prototype;
583
809
 
584
810
  _proto.equals = function equals(other) {
585
- return other.isToken && this.chainId === other.chainId && this.address === other.address;
811
+ return other.isToken && this.chainId === other.chainId && this.address.toLowerCase() === other.address.toLowerCase();
586
812
  }
587
813
  /**
588
814
  * Returns true if the address of this token sorts before the address of the other token
@@ -594,7 +820,7 @@ var Token = /*#__PURE__*/function (_BaseCurrency) {
594
820
 
595
821
  _proto.sortsBefore = function sortsBefore(other) {
596
822
  !(this.chainId === other.chainId) ? invariant(false, 'CHAIN_IDS') : void 0;
597
- !(this.address !== other.address) ? invariant(false, 'ADDRESSES') : void 0;
823
+ !(this.address.toLowerCase() !== other.address.toLowerCase()) ? invariant(false, 'ADDRESSES') : void 0;
598
824
  return this.address.toLowerCase() < other.address.toLowerCase();
599
825
  }
600
826
  /**
@@ -733,14 +959,38 @@ function sqrt(value) {
733
959
  return z;
734
960
  }
735
961
 
962
+ exports.ARGENT_WALLET_DETECTOR_ADDRESS = ARGENT_WALLET_DETECTOR_ADDRESS;
963
+ exports.CHAIN_TO_ADDRESSES_MAP = CHAIN_TO_ADDRESSES_MAP;
736
964
  exports.CurrencyAmount = CurrencyAmount;
965
+ exports.ENS_REGISTRAR_ADDRESSES = ENS_REGISTRAR_ADDRESSES;
737
966
  exports.Ether = Ether;
738
967
  exports.Fraction = Fraction;
968
+ exports.GOVERNANCE_ALPHA_V0_ADDRESSES = GOVERNANCE_ALPHA_V0_ADDRESSES;
969
+ exports.GOVERNANCE_ALPHA_V1_ADDRESSES = GOVERNANCE_ALPHA_V1_ADDRESSES;
970
+ exports.GOVERNANCE_BRAVO_ADDRESSES = GOVERNANCE_BRAVO_ADDRESSES;
971
+ exports.MERKLE_DISTRIBUTOR_ADDRESS = MERKLE_DISTRIBUTOR_ADDRESS;
972
+ exports.MIXED_ROUTE_QUOTER_V1_ADDRESSES = MIXED_ROUTE_QUOTER_V1_ADDRESSES;
973
+ exports.MULTICALL_ADDRESSES = MULTICALL_ADDRESSES;
739
974
  exports.MaxUint256 = MaxUint256;
975
+ exports.NONFUNGIBLE_POSITION_MANAGER_ADDRESSES = NONFUNGIBLE_POSITION_MANAGER_ADDRESSES;
740
976
  exports.NativeCurrency = NativeCurrency;
741
977
  exports.Percent = Percent;
742
978
  exports.Price = Price;
979
+ exports.QUOTER_ADDRESSES = QUOTER_ADDRESSES;
980
+ exports.SOCKS_CONTROLLER_ADDRESSES = SOCKS_CONTROLLER_ADDRESSES;
981
+ exports.SUPPORTED_CHAINS = SUPPORTED_CHAINS;
982
+ exports.SWAP_ROUTER_02_ADDRESSES = SWAP_ROUTER_02_ADDRESSES;
983
+ exports.TICK_LENS_ADDRESSES = TICK_LENS_ADDRESSES;
984
+ exports.TIMELOCK_ADDRESSES = TIMELOCK_ADDRESSES;
743
985
  exports.Token = Token;
986
+ exports.UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS = UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS;
987
+ exports.UNI_ADDRESSES = UNI_ADDRESSES;
988
+ exports.V2_FACTORY_ADDRESS = V2_FACTORY_ADDRESS;
989
+ exports.V2_FACTORY_ADDRESSES = V2_FACTORY_ADDRESSES;
990
+ exports.V2_ROUTER_ADDRESS = V2_ROUTER_ADDRESS;
991
+ exports.V2_ROUTER_ADDRESSES = V2_ROUTER_ADDRESSES;
992
+ exports.V3_CORE_FACTORY_ADDRESSES = V3_CORE_FACTORY_ADDRESSES;
993
+ exports.V3_MIGRATOR_ADDRESSES = V3_MIGRATOR_ADDRESSES;
744
994
  exports.WETH9 = WETH9;
745
995
  exports.computePriceImpact = computePriceImpact;
746
996
  exports.sortedInsert = sortedInsert;