@pioneer-platform/uniswap-client 0.0.22 → 0.0.25

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.
Files changed (74) hide show
  1. package/lib/constants/chainInfo.d.ts +19 -22
  2. package/lib/constants/chainInfo.js +134 -117
  3. package/lib/constants/chains.d.ts +36 -47
  4. package/lib/constants/chains.js +118 -83
  5. package/lib/constants/chains.test.js +22 -25
  6. package/lib/constants/governance.d.ts +8 -0
  7. package/lib/constants/governance.js +24 -0
  8. package/lib/constants/lists.d.ts +12 -0
  9. package/lib/constants/lists.js +64 -0
  10. package/lib/constants/localCurrencies.d.ts +6 -0
  11. package/lib/constants/localCurrencies.js +94 -0
  12. package/lib/constants/localCurrencyIcons.d.ts +18 -0
  13. package/lib/constants/localCurrencyIcons.js +298 -0
  14. package/lib/constants/locales.d.ts +1 -1
  15. package/lib/constants/locales.js +0 -3
  16. package/lib/constants/misc.d.ts +2 -7
  17. package/lib/constants/misc.js +17 -23
  18. package/lib/constants/networks.d.ts +21 -0
  19. package/lib/constants/networks.js +170 -0
  20. package/lib/constants/proposals/index.d.ts +5 -0
  21. package/lib/constants/proposals/index.js +8 -0
  22. package/lib/constants/proposals/polygon_proposal_title.d.ts +1 -0
  23. package/lib/constants/proposals/polygon_proposal_title.js +4 -0
  24. package/lib/constants/proposals/uniswap_grants_proposal_description.d.ts +1 -0
  25. package/lib/constants/proposals/uniswap_grants_proposal_description.js +4 -0
  26. package/lib/constants/providers.d.ts +19 -0
  27. package/lib/constants/providers.js +33 -0
  28. package/lib/constants/routing.d.ts +9 -13
  29. package/lib/constants/routing.js +91 -55
  30. package/lib/constants/routing.test.d.ts +1 -0
  31. package/lib/constants/routing.test.js +32 -0
  32. package/lib/constants/supportArticles.d.ts +13 -0
  33. package/lib/constants/supportArticles.js +17 -0
  34. package/lib/constants/tokenLists/broken.tokenlist.json +22 -0
  35. package/lib/constants/tokenLogoLookup.d.ts +8 -0
  36. package/lib/constants/tokenLogoLookup.js +48 -0
  37. package/lib/constants/tokenSafety.js +129 -0
  38. package/lib/constants/tokenSafetyLookup.d.ts +18 -0
  39. package/lib/constants/tokenSafetyLookup.js +66 -0
  40. package/lib/constants/tokenSaftey.test.d.ts +1 -0
  41. package/lib/constants/tokenSaftey.test.js +31 -0
  42. package/lib/constants/tokens.d.ts +34 -42
  43. package/lib/constants/tokens.js +190 -147
  44. package/lib/index.d.ts +1 -40
  45. package/lib/index.js +158 -642
  46. package/lib/routing/clientSideSmartOrderRouter.d.ts +5 -0
  47. package/lib/routing/clientSideSmartOrderRouter.js +136 -0
  48. package/lib/routing/gas.d.ts +5 -0
  49. package/lib/routing/gas.js +158 -0
  50. package/lib/routing/types.d.ts +393 -0
  51. package/lib/routing/types.js +424 -0
  52. package/lib/routing/utils.d.ts +28 -0
  53. package/lib/routing/utils.js +319 -0
  54. package/lib/rpc/AppJsonRpcProvider.d.ts +44 -0
  55. package/lib/rpc/AppJsonRpcProvider.js +183 -0
  56. package/lib/rpc/ConfiguredJsonRpcProvider.d.ts +8 -0
  57. package/lib/rpc/ConfiguredJsonRpcProvider.js +35 -0
  58. package/lib/utils/contracts/getContract.d.ts +3 -0
  59. package/lib/utils/contracts/getContract.js +29 -0
  60. package/lib/utils/transformSwapRouteToGetQuoteResult.d.ts +4 -0
  61. package/lib/utils/transformSwapRouteToGetQuoteResult.js +116 -0
  62. package/lib/utils/uniswapData.d.ts +21 -0
  63. package/lib/utils/uniswapData.js +217 -0
  64. package/package.json +11 -8
  65. package/lib/constants/addresses.d.ts +0 -9
  66. package/lib/constants/addresses.js +0 -41
  67. package/lib/constants/eip1193.d.ts +0 -8
  68. package/lib/constants/eip1193.js +0 -14
  69. package/lib/constants/index.d.ts +0 -9
  70. package/lib/constants/index.js +0 -26
  71. package/lib/constants/jsonRpcEndpoints.d.ts +0 -12
  72. package/lib/constants/jsonRpcEndpoints.js +0 -101
  73. package/lib/constants/utils/constructSameAddressMap.d.ts +0 -4
  74. package/lib/constants/utils/constructSameAddressMap.js +0 -19
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var state_1 = __importDefault(require("state"));
7
+ var lists_1 = require("./lists");
8
+ var TokenLogoLookupTable = /** @class */ (function () {
9
+ function TokenLogoLookupTable() {
10
+ this.dict = {};
11
+ this.initialized = false;
12
+ }
13
+ TokenLogoLookupTable.prototype.initialize = function () {
14
+ var dict = {};
15
+ lists_1.DEFAULT_LIST_OF_LISTS.forEach(function (list) {
16
+ var _a;
17
+ var listData = state_1.default.getState().lists.byUrl[list];
18
+ if (!listData) {
19
+ return;
20
+ }
21
+ (_a = listData.current) === null || _a === void 0 ? void 0 : _a.tokens.forEach(function (token) {
22
+ if (token.logoURI) {
23
+ var lowercaseAddress = token.address.toLowerCase();
24
+ var currentEntry = dict[lowercaseAddress + ':' + token.chainId];
25
+ if (currentEntry) {
26
+ currentEntry.push(token.logoURI);
27
+ }
28
+ else {
29
+ dict[lowercaseAddress + ':' + token.chainId] = [token.logoURI];
30
+ }
31
+ }
32
+ });
33
+ });
34
+ this.dict = dict;
35
+ this.initialized = true;
36
+ };
37
+ TokenLogoLookupTable.prototype.getIcons = function (address, chainId) {
38
+ if (chainId === void 0) { chainId = 1; }
39
+ if (!address)
40
+ return undefined;
41
+ if (!this.initialized) {
42
+ this.initialize();
43
+ }
44
+ return this.dict[address.toLowerCase() + ':' + chainId];
45
+ };
46
+ return TokenLogoLookupTable;
47
+ }());
48
+ exports.default = new TokenLogoLookupTable();
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.displayWarningLabel = exports.checkSearchTokenWarning = exports.checkWarning = exports.NotFoundWarning = exports.BlockedWarning = exports.StrongWarning = exports.MediumWarning = exports.getWarningCopy = exports.getPriorityWarning = exports.WARNING_LEVEL = exports.TOKEN_SAFETY_ARTICLE = void 0;
27
+ var i18n_1 = require("i18n");
28
+ var types_and_hooks_1 = require("uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks");
29
+ var misc_1 = require("./misc");
30
+ var tokenSafetyLookup_1 = __importStar(require("./tokenSafetyLookup"));
31
+ var tokens_1 = require("./tokens");
32
+ exports.TOKEN_SAFETY_ARTICLE = 'https://support.uniswap.org/hc/en-us/articles/8723118437133';
33
+ var WARNING_LEVEL;
34
+ (function (WARNING_LEVEL) {
35
+ WARNING_LEVEL[WARNING_LEVEL["MEDIUM"] = 0] = "MEDIUM";
36
+ WARNING_LEVEL[WARNING_LEVEL["UNKNOWN"] = 1] = "UNKNOWN";
37
+ WARNING_LEVEL[WARNING_LEVEL["BLOCKED"] = 2] = "BLOCKED";
38
+ })(WARNING_LEVEL || (exports.WARNING_LEVEL = WARNING_LEVEL = {}));
39
+ /**
40
+ * Determine which warning to display based on the priority of the warnings. Prioritize blocked, than unknown, followed by the rest. Accepts two warnings passed in.
41
+ */
42
+ function getPriorityWarning(token0Warning, token1Warning) {
43
+ if (token0Warning && token1Warning) {
44
+ if ((token1Warning === null || token1Warning === void 0 ? void 0 : token1Warning.level) === WARNING_LEVEL.BLOCKED ||
45
+ ((token1Warning === null || token1Warning === void 0 ? void 0 : token1Warning.level) === WARNING_LEVEL.UNKNOWN && (token0Warning === null || token0Warning === void 0 ? void 0 : token0Warning.level) !== WARNING_LEVEL.BLOCKED)) {
46
+ return token1Warning;
47
+ }
48
+ return token0Warning;
49
+ }
50
+ return token0Warning !== null && token0Warning !== void 0 ? token0Warning : token1Warning;
51
+ }
52
+ exports.getPriorityWarning = getPriorityWarning;
53
+ function getWarningCopy(warning, plural, tokenSymbol) {
54
+ if (plural === void 0) { plural = false; }
55
+ var heading = null, description = null;
56
+ if (warning) {
57
+ switch (warning.level) {
58
+ case WARNING_LEVEL.MEDIUM:
59
+ heading = (<i18n_1.Plural value={plural ? 2 : 1} one={(0, i18n_1.t)("{{name}} isn't traded on leading U.S. centralized exchanges.", {
60
+ name: tokenSymbol !== null && tokenSymbol !== void 0 ? tokenSymbol : 'This token',
61
+ })} other="These tokens aren't traded on leading U.S. centralized exchanges."/>);
62
+ description = <i18n_1.Trans>Always conduct your own research before trading.</i18n_1.Trans>;
63
+ break;
64
+ case WARNING_LEVEL.UNKNOWN:
65
+ heading = (<i18n_1.Plural value={plural ? 2 : 1} one={(0, i18n_1.t)("{{name}} isn't traded on leading U.S. centralized exchanges or frequently swapped on Uniswap.", {
66
+ name: tokenSymbol !== null && tokenSymbol !== void 0 ? tokenSymbol : 'This token',
67
+ })} other="These tokens aren't traded on leading U.S. centralized exchanges or frequently swapped on Uniswap."/>);
68
+ description = <i18n_1.Trans>Always conduct your own research before trading.</i18n_1.Trans>;
69
+ break;
70
+ case WARNING_LEVEL.BLOCKED:
71
+ description = (<i18n_1.Plural value={plural ? 2 : 1} one={(0, i18n_1.t)("You can't trade {{name}} using the Uniswap App.", {
72
+ name: tokenSymbol !== null && tokenSymbol !== void 0 ? tokenSymbol : 'this token',
73
+ })} other="You can't trade these tokens using the Uniswap App."/>);
74
+ break;
75
+ }
76
+ }
77
+ return { heading: heading, description: description };
78
+ }
79
+ exports.getWarningCopy = getWarningCopy;
80
+ exports.MediumWarning = {
81
+ level: WARNING_LEVEL.MEDIUM,
82
+ message: <i18n_1.Trans>Caution</i18n_1.Trans>,
83
+ canProceed: true,
84
+ };
85
+ exports.StrongWarning = {
86
+ level: WARNING_LEVEL.UNKNOWN,
87
+ message: <i18n_1.Trans>Warning</i18n_1.Trans>,
88
+ canProceed: true,
89
+ };
90
+ exports.BlockedWarning = {
91
+ level: WARNING_LEVEL.BLOCKED,
92
+ message: <i18n_1.Trans>Not available</i18n_1.Trans>,
93
+ canProceed: false,
94
+ };
95
+ exports.NotFoundWarning = {
96
+ level: WARNING_LEVEL.UNKNOWN,
97
+ message: <i18n_1.Trans>Token not found</i18n_1.Trans>,
98
+ canProceed: false,
99
+ };
100
+ function checkWarning(tokenAddress, chainId) {
101
+ if (tokenAddress === tokens_1.NATIVE_CHAIN_ID || tokenAddress === misc_1.ZERO_ADDRESS) {
102
+ return undefined;
103
+ }
104
+ switch (tokenSafetyLookup_1.default.checkToken(tokenAddress.toLowerCase(), chainId)) {
105
+ case tokenSafetyLookup_1.TOKEN_LIST_TYPES.UNI_DEFAULT:
106
+ return undefined;
107
+ case tokenSafetyLookup_1.TOKEN_LIST_TYPES.UNI_EXTENDED:
108
+ return exports.MediumWarning;
109
+ case tokenSafetyLookup_1.TOKEN_LIST_TYPES.UNKNOWN:
110
+ return exports.StrongWarning;
111
+ case tokenSafetyLookup_1.TOKEN_LIST_TYPES.BLOCKED:
112
+ return exports.BlockedWarning;
113
+ case tokenSafetyLookup_1.TOKEN_LIST_TYPES.BROKEN:
114
+ return exports.BlockedWarning;
115
+ }
116
+ }
117
+ exports.checkWarning = checkWarning;
118
+ // TODO(cartcrom): Replace all usage of WARNING_LEVEL with SafetyLevel
119
+ function checkSearchTokenWarning(token) {
120
+ if (!token.address) {
121
+ return token.standard === types_and_hooks_1.TokenStandard.Native ? undefined : exports.StrongWarning;
122
+ }
123
+ return checkWarning(token.address);
124
+ }
125
+ exports.checkSearchTokenWarning = checkSearchTokenWarning;
126
+ function displayWarningLabel(warning) {
127
+ return warning && warning.level !== WARNING_LEVEL.MEDIUM;
128
+ }
129
+ exports.displayWarningLabel = displayWarningLabel;
@@ -0,0 +1,18 @@
1
+ import { ListsState } from 'state/lists/types';
2
+ export declare enum TOKEN_LIST_TYPES {
3
+ UNI_DEFAULT = 1,
4
+ UNI_EXTENDED = 2,
5
+ UNKNOWN = 3,
6
+ BLOCKED = 4,
7
+ BROKEN = 5
8
+ }
9
+ declare class TokenSafetyLookupTable {
10
+ initialized: boolean;
11
+ dict: {
12
+ [key: string]: TOKEN_LIST_TYPES;
13
+ };
14
+ update(lists: ListsState): void;
15
+ checkToken(address: string, chainId?: number | null): TOKEN_LIST_TYPES;
16
+ }
17
+ declare const _default: TokenSafetyLookupTable;
18
+ export default _default;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TOKEN_LIST_TYPES = void 0;
7
+ var state_1 = __importDefault(require("../state"));
8
+ var lists_1 = require("./lists");
9
+ var routing_1 = require("./routing");
10
+ var broken_tokenlist_json_1 = __importDefault(require("./tokenLists/broken.tokenlist.json"));
11
+ var tokens_1 = require("./tokens");
12
+ var TOKEN_LIST_TYPES;
13
+ (function (TOKEN_LIST_TYPES) {
14
+ TOKEN_LIST_TYPES[TOKEN_LIST_TYPES["UNI_DEFAULT"] = 1] = "UNI_DEFAULT";
15
+ TOKEN_LIST_TYPES[TOKEN_LIST_TYPES["UNI_EXTENDED"] = 2] = "UNI_EXTENDED";
16
+ TOKEN_LIST_TYPES[TOKEN_LIST_TYPES["UNKNOWN"] = 3] = "UNKNOWN";
17
+ TOKEN_LIST_TYPES[TOKEN_LIST_TYPES["BLOCKED"] = 4] = "BLOCKED";
18
+ TOKEN_LIST_TYPES[TOKEN_LIST_TYPES["BROKEN"] = 5] = "BROKEN";
19
+ })(TOKEN_LIST_TYPES || (exports.TOKEN_LIST_TYPES = TOKEN_LIST_TYPES = {}));
20
+ var TokenSafetyLookupTable = /** @class */ (function () {
21
+ function TokenSafetyLookupTable() {
22
+ this.initialized = false;
23
+ this.dict = {};
24
+ }
25
+ // TODO(WEB-2488): Index lookups by chainId
26
+ TokenSafetyLookupTable.prototype.update = function (lists) {
27
+ var _this = this;
28
+ var _a, _b, _c, _d;
29
+ this.initialized = true;
30
+ // Initialize extended tokens first
31
+ (_b = (_a = lists.byUrl[lists_1.UNI_EXTENDED_LIST]) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.tokens.forEach(function (token) {
32
+ _this.dict[token.address.toLowerCase()] = TOKEN_LIST_TYPES.UNI_EXTENDED;
33
+ });
34
+ // Initialize default tokens second, so that any tokens on both default and extended will display as default (no warning)
35
+ (_d = (_c = lists.byUrl[lists_1.UNI_LIST]) === null || _c === void 0 ? void 0 : _c.current) === null || _d === void 0 ? void 0 : _d.tokens.forEach(function (token) {
36
+ _this.dict[token.address.toLowerCase()] = TOKEN_LIST_TYPES.UNI_DEFAULT;
37
+ });
38
+ // TODO: Figure out if this list is still relevant
39
+ broken_tokenlist_json_1.default.tokens.forEach(function (token) {
40
+ _this.dict[token.address.toLowerCase()] = TOKEN_LIST_TYPES.BROKEN;
41
+ });
42
+ // Initialize blocked tokens from all urls included
43
+ lists_1.UNSUPPORTED_LIST_URLS.map(function (url) { var _a, _b; return (_b = (_a = lists.byUrl[url]) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.tokens; })
44
+ .filter(function (x) { return !!x; })
45
+ .flat(1)
46
+ .forEach(function (token) {
47
+ _this.dict[token.address.toLowerCase()] = TOKEN_LIST_TYPES.BLOCKED;
48
+ });
49
+ };
50
+ TokenSafetyLookupTable.prototype.checkToken = function (address, chainId) {
51
+ var _a, _b;
52
+ if (!this.initialized)
53
+ this.update(state_1.default.getState().lists);
54
+ if (address === tokens_1.NATIVE_CHAIN_ID.toLowerCase()) {
55
+ return TOKEN_LIST_TYPES.UNI_DEFAULT;
56
+ }
57
+ else if (chainId && ((_a = routing_1.COMMON_BASES[chainId]) === null || _a === void 0 ? void 0 : _a.some(function (base) { return address === base.wrapped.address.toLowerCase(); }))) {
58
+ return TOKEN_LIST_TYPES.UNI_DEFAULT;
59
+ }
60
+ else {
61
+ return (_b = this.dict[address]) !== null && _b !== void 0 ? _b : TOKEN_LIST_TYPES.UNKNOWN;
62
+ }
63
+ };
64
+ return TokenSafetyLookupTable;
65
+ }());
66
+ exports.default = new TokenSafetyLookupTable();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tokenSafety_1 = require("./tokenSafety");
4
+ describe('getPriorityWarning', function () {
5
+ it('returns token1Warning when both warnings exist and token1Warning is BLOCKED', function () {
6
+ var token0Warning = tokenSafety_1.StrongWarning;
7
+ var token1Warning = tokenSafety_1.BlockedWarning;
8
+ expect((0, tokenSafety_1.getPriorityWarning)(token0Warning, token1Warning)).toBe(token1Warning);
9
+ });
10
+ it('returns token1Warning when both warnings exist, token1Warning is UNKNOWN, and token0Warning is not BLOCKED', function () {
11
+ var token0Warning = tokenSafety_1.StrongWarning;
12
+ var token1Warning = tokenSafety_1.StrongWarning;
13
+ expect((0, tokenSafety_1.getPriorityWarning)(token0Warning, token1Warning)).toBe(token1Warning);
14
+ });
15
+ it('returns token0Warning when both warnings exist and token1Warning is not BLOCKED or UNKNOWN', function () {
16
+ var token0Warning = tokenSafety_1.StrongWarning;
17
+ var token1Warning = tokenSafety_1.MediumWarning;
18
+ expect((0, tokenSafety_1.getPriorityWarning)(token0Warning, token1Warning)).toBe(token0Warning);
19
+ });
20
+ it('returns token0Warning when only token0Warning exists', function () {
21
+ var token0Warning = tokenSafety_1.StrongWarning;
22
+ expect((0, tokenSafety_1.getPriorityWarning)(token0Warning, undefined)).toBe(token0Warning);
23
+ });
24
+ it('returns token1Warning when only token1Warning exists', function () {
25
+ var token1Warning = tokenSafety_1.BlockedWarning;
26
+ expect((0, tokenSafety_1.getPriorityWarning)(undefined, token1Warning)).toBe(token1Warning);
27
+ });
28
+ it('returns undefined when both warnings are undefined', function () {
29
+ expect((0, tokenSafety_1.getPriorityWarning)(undefined, undefined)).toBeUndefined();
30
+ });
31
+ });
@@ -1,26 +1,21 @@
1
- import { Ether, NativeCurrency, Token } from '@uniswap/sdk-core';
2
- import { SupportedChainId } from './chains';
1
+ import { ChainId, Currency, NativeCurrency, Token } from '@uniswap/sdk-core';
2
+ export declare const NATIVE_CHAIN_ID = "NATIVE";
3
3
  export declare const USDC_MAINNET: Token;
4
- export declare const USDC_ROPSTEN: Token;
5
- export declare const USDC_RINKEBY: Token;
6
4
  export declare const USDC_GOERLI: Token;
7
- export declare const USDC_KOVAN: Token;
5
+ export declare const USDC_SEPOLIA: Token;
8
6
  export declare const USDC_OPTIMISM: Token;
7
+ export declare const USDC_OPTIMISM_GOERLI: Token;
9
8
  export declare const USDC_ARBITRUM: Token;
10
- export declare const USDC_ARBITRUM_RINKEBY: Token;
9
+ export declare const USDC_ARBITRUM_GOERLI: Token;
11
10
  export declare const USDC_POLYGON: Token;
12
11
  export declare const USDC_POLYGON_MUMBAI: Token;
13
- export declare const PORTAL_USDC_CELO: Token;
14
- export declare const USDC_CELO_ALFAJORES: Token;
15
- export declare const AMPL: Token;
12
+ export declare const USDC_CELO: Token;
13
+ export declare const USDC_BASE: Token;
16
14
  export declare const DAI: Token;
17
15
  export declare const DAI_ARBITRUM_ONE: Token;
18
16
  export declare const DAI_OPTIMISM: Token;
19
- export declare const USDC_BNB_CHAIN: Token;
20
- export declare const USDC_BASE: Token;
21
- export declare const USDC: {
22
- [chainId in SupportedChainId]: Token;
23
- };
17
+ export declare const MATIC_MAINNET: Token;
18
+ export declare const MATIC_POLYGON: Token;
24
19
  export declare const DAI_POLYGON: Token;
25
20
  export declare const USDT_POLYGON: Token;
26
21
  export declare const WBTC_POLYGON: Token;
@@ -30,49 +25,46 @@ export declare const USDT_OPTIMISM: Token;
30
25
  export declare const WBTC: Token;
31
26
  export declare const WBTC_ARBITRUM_ONE: Token;
32
27
  export declare const WBTC_OPTIMISM: Token;
33
- export declare const FEI: Token;
34
- export declare const TRIBE: Token;
35
- export declare const FRAX: Token;
36
- export declare const FXS: Token;
37
- export declare const renBTC: Token;
38
- export declare const ETH2X_FLI: Token;
39
- export declare const sETH2: Token;
40
- export declare const rETH2: Token;
41
- export declare const SWISE: Token;
42
28
  export declare const WETH_POLYGON_MUMBAI: Token;
43
29
  export declare const WETH_POLYGON: Token;
44
- export declare const CELO_CELO: Token;
45
30
  export declare const CUSD_CELO: Token;
46
31
  export declare const CEUR_CELO: Token;
47
32
  export declare const PORTAL_ETH_CELO: Token;
48
- export declare const CMC02_CELO: Token;
49
- export declare const CELO_CELO_ALFAJORES: Token;
33
+ export declare const WBTC_CELO: Token;
50
34
  export declare const CUSD_CELO_ALFAJORES: Token;
51
35
  export declare const CEUR_CELO_ALFAJORES: Token;
52
- export declare const USDT_BNB_CHAIN: Token;
53
- export declare const ETH_BNB_CHAIN: Token;
54
- export declare const MATIC_BNB_CHAIN: Token;
55
- export declare const FRAX_BNB_CHAIN: Token;
56
- export declare const BTC_BNB_CHAIN: Token;
57
- export declare const CAKE_BNB_CHAIN: Token;
58
- export declare const BUSD_BNB_CHAIN: Token;
59
- export declare const DAI_BNB_CHAIN: Token;
60
- export declare const DAI_BASE: Token;
36
+ export declare const USDC_BSC: Token;
37
+ export declare const USDT_BSC: Token;
38
+ export declare const ETH_BSC: Token;
39
+ export declare const BTC_BSC: Token;
40
+ export declare const BUSD_BSC: Token;
41
+ export declare const DAI_BSC: Token;
42
+ export declare const USDB_BLAST: Token;
43
+ export declare const USDC_AVALANCHE: Token;
44
+ export declare const USDT_AVALANCHE: Token;
45
+ export declare const WETH_AVALANCHE: Token;
46
+ export declare const DAI_AVALANCHE: Token;
61
47
  export declare const UNI: {
62
48
  [chainId: number]: Token;
63
49
  };
50
+ export declare const ARB: Token;
51
+ export declare const OP: Token;
52
+ export declare const LDO: Token;
53
+ export declare const NMR: Token;
54
+ export declare const MNW: Token;
64
55
  export declare const WRAPPED_NATIVE_CURRENCY: {
65
56
  [chainId: number]: Token | undefined;
66
57
  };
67
- export declare function isCelo(chainId: number): chainId is SupportedChainId.CELO | SupportedChainId.CELO_ALFAJORES;
68
- export declare class ExtendedEther extends Ether {
69
- get wrapped(): Token;
70
- private static _cachedExtendedEther;
71
- static onChain(chainId: number): ExtendedEther;
72
- }
58
+ export declare function isCelo(chainId: number): chainId is ChainId.CELO | ChainId.CELO_ALFAJORES;
59
+ export declare function isPolygon(chainId: number): chainId is ChainId.POLYGON | ChainId.POLYGON_MUMBAI;
60
+ export declare function isBsc(chainId: number): chainId is ChainId.BNB;
61
+ export declare function isAvalanche(chainId: number): chainId is ChainId.AVALANCHE;
73
62
  export declare function nativeOnChain(chainId: number): NativeCurrency | Token;
74
63
  export declare const TOKEN_SHORTHANDS: {
75
64
  [shorthand: string]: {
76
- [chainId in SupportedChainId]?: string;
65
+ [chainId in ChainId]?: string;
77
66
  };
78
67
  };
68
+ export declare function isStablecoin(currency?: Currency): boolean;
69
+ export declare const UNKNOWN_TOKEN_SYMBOL = "UNKNOWN";
70
+ export declare const UNKNOWN_TOKEN_NAME = "Unknown Token";