@mento-protocol/mento-sdk 1.15.2 → 1.15.5
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.
- package/dist/cjs/constants/tokens.11142220.js +9 -9
- package/dist/cjs/constants/tokens.42220.js +1 -1
- package/dist/cjs/constants/tokens.d.ts +0 -17
- package/dist/cjs/constants/tokens.js +43 -95
- package/dist/cjs/constants/tradablePairs.11142220.js +1212 -1212
- package/dist/cjs/constants/tradablePairs.js +0 -2
- package/dist/cjs/mento.js +26 -4
- package/dist/cjs/utils.d.ts +16 -3
- package/dist/cjs/utils.js +30 -12
- package/dist/esm/constants/tokens.11142220.js +9 -9
- package/dist/esm/constants/tokens.42220.js +1 -1
- package/dist/esm/constants/tokens.d.ts +0 -17
- package/dist/esm/constants/tokens.js +42 -92
- package/dist/esm/constants/tradablePairs.11142220.js +1212 -1212
- package/dist/esm/constants/tradablePairs.js +0 -2
- package/dist/esm/mento.js +3 -4
- package/dist/esm/utils.d.ts +16 -3
- package/dist/esm/utils.js +25 -9
- package/package.json +1 -2
- package/dist/cjs/constants/tokens.44787.d.ts +0 -2
- package/dist/cjs/constants/tokens.44787.js +0 -128
- package/dist/cjs/constants/tradablePairs.44787.d.ts +0 -2
- package/dist/cjs/constants/tradablePairs.44787.js +0 -7391
- package/dist/esm/constants/tokens.44787.d.ts +0 -2
- package/dist/esm/constants/tokens.44787.js +0 -125
- package/dist/esm/constants/tradablePairs.44787.d.ts +0 -2
- package/dist/esm/constants/tradablePairs.44787.js +0 -7388
|
@@ -43,8 +43,6 @@ function getCachedTradablePairs(chainId) {
|
|
|
43
43
|
switch (chainId) {
|
|
44
44
|
case 42220:
|
|
45
45
|
return yield Promise.resolve().then(() => __importStar(require('./tradablePairs.42220'))).then((module) => module.tradablePairs42220);
|
|
46
|
-
case 44787:
|
|
47
|
-
return yield Promise.resolve().then(() => __importStar(require('./tradablePairs.44787'))).then((module) => module.tradablePairs44787);
|
|
48
46
|
case 11142220:
|
|
49
47
|
return yield Promise.resolve().then(() => __importStar(require('./tradablePairs.11142220'))).then((module) => module.tradablePairs11142220);
|
|
50
48
|
default:
|
package/dist/cjs/mento.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
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
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -175,7 +198,7 @@ class Mento {
|
|
|
175
198
|
* @throws Error if no cached tokens are available for the current chain or if chainId is not yet initialized
|
|
176
199
|
*/
|
|
177
200
|
getTokens() {
|
|
178
|
-
if (this.cachedChainId
|
|
201
|
+
if (!this.cachedChainId) {
|
|
179
202
|
throw new Error('Chain ID not yet initialized. Use Mento.create() to initialize the SDK, or use getTokensAsync() instead.');
|
|
180
203
|
}
|
|
181
204
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
@@ -196,8 +219,7 @@ class Mento {
|
|
|
196
219
|
return __awaiter(this, void 0, void 0, function* () {
|
|
197
220
|
// If cached is true, try to use the static cache first
|
|
198
221
|
if (cached) {
|
|
199
|
-
|
|
200
|
-
const { getCachedTokens } = require('./constants/tokens');
|
|
222
|
+
const { getCachedTokens } = yield Promise.resolve().then(() => __importStar(require('./constants/tokens')));
|
|
201
223
|
const chainId = yield this.chainId();
|
|
202
224
|
const cachedTokens = yield getCachedTokens(chainId);
|
|
203
225
|
if (cachedTokens) {
|
|
@@ -629,7 +651,7 @@ class Mento {
|
|
|
629
651
|
}
|
|
630
652
|
chainId() {
|
|
631
653
|
return __awaiter(this, void 0, void 0, function* () {
|
|
632
|
-
if (this.cachedChainId
|
|
654
|
+
if (!this.cachedChainId) {
|
|
633
655
|
this.cachedChainId = yield (0, utils_1.getChainId)(this.signerOrProvider);
|
|
634
656
|
}
|
|
635
657
|
return this.cachedChainId;
|
package/dist/cjs/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BigNumberish, providers, Signer } from 'ethers';
|
|
2
2
|
import { TokenSymbol } from './constants';
|
|
3
3
|
import { Address } from './interfaces';
|
|
4
|
-
import { TradablePair } from './mento';
|
|
4
|
+
import { Token, TradablePair } from './mento';
|
|
5
5
|
/**
|
|
6
6
|
* Gets the chain ID from a signer or provider
|
|
7
7
|
* @param signerOrProvider an ethers provider or signer
|
|
@@ -56,5 +56,18 @@ export declare function increaseAllowance(tokenAddr: string, spender: string, am
|
|
|
56
56
|
* @param symbol the token symbol to find (case-insensitive)
|
|
57
57
|
* @returns the token address if found, null otherwise
|
|
58
58
|
*/
|
|
59
|
-
export declare function
|
|
60
|
-
export declare function capitalize(str: string): string;
|
|
59
|
+
export declare function findTokenAddressBySymbolInTradablePairs(symbol: TokenSymbol, pairs: readonly TradablePair[]): Address | null;
|
|
60
|
+
export declare function capitalize(str: string): string; /**
|
|
61
|
+
* Helper function to get token address by symbol for a specific chain
|
|
62
|
+
* @param symbol - The token symbol
|
|
63
|
+
* @param chainId - The chain ID
|
|
64
|
+
* @returns The token address or undefined if not found
|
|
65
|
+
*/
|
|
66
|
+
export declare function getTokenAddress(symbol: TokenSymbol, chainId: number): string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Helper function to find a token by symbol in the cached tokens
|
|
69
|
+
* @param symbol - The token symbol to search for
|
|
70
|
+
* @param chainId - The chain ID
|
|
71
|
+
* @returns The token object or undefined if not found
|
|
72
|
+
*/
|
|
73
|
+
export declare function findTokenBySymbol(symbol: string, chainId: number): Token | undefined;
|
package/dist/cjs/utils.js
CHANGED
|
@@ -9,8 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.capitalize = exports.
|
|
12
|
+
exports.findTokenBySymbol = exports.getTokenAddress = exports.capitalize = exports.findTokenAddressBySymbolInTradablePairs = exports.increaseAllowance = exports.getDecimalsFromTokenAddress = exports.getNameFromTokenAddress = exports.getSymbolFromTokenAddress = exports.validateSignerOrProvider = exports.validateSigner = exports.getChainId = void 0;
|
|
13
13
|
const ethers_1 = require("ethers");
|
|
14
|
+
const tokens_1 = require("./constants/tokens");
|
|
14
15
|
/**
|
|
15
16
|
* Gets the chain ID from a signer or provider
|
|
16
17
|
* @param signerOrProvider an ethers provider or signer
|
|
@@ -123,18 +124,35 @@ exports.increaseAllowance = increaseAllowance;
|
|
|
123
124
|
* @param symbol the token symbol to find (case-insensitive)
|
|
124
125
|
* @returns the token address if found, null otherwise
|
|
125
126
|
*/
|
|
126
|
-
function
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return null;
|
|
127
|
+
function findTokenAddressBySymbolInTradablePairs(symbol, pairs) {
|
|
128
|
+
var _a, _b;
|
|
129
|
+
return ((_b = (_a = pairs
|
|
130
|
+
.flatMap((pair) => pair.assets)
|
|
131
|
+
.find((asset) => asset.symbol.toLowerCase() === symbol.toLowerCase())) === null || _a === void 0 ? void 0 : _a.address) !== null && _b !== void 0 ? _b : null);
|
|
135
132
|
}
|
|
136
|
-
exports.
|
|
133
|
+
exports.findTokenAddressBySymbolInTradablePairs = findTokenAddressBySymbolInTradablePairs;
|
|
137
134
|
function capitalize(str) {
|
|
138
135
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
139
|
-
}
|
|
136
|
+
} /**
|
|
137
|
+
* Helper function to get token address by symbol for a specific chain
|
|
138
|
+
* @param symbol - The token symbol
|
|
139
|
+
* @param chainId - The chain ID
|
|
140
|
+
* @returns The token address or undefined if not found
|
|
141
|
+
*/
|
|
140
142
|
exports.capitalize = capitalize;
|
|
143
|
+
function getTokenAddress(symbol, chainId) {
|
|
144
|
+
var _a;
|
|
145
|
+
return (_a = tokens_1.TOKEN_ADDRESSES_BY_CHAIN[chainId]) === null || _a === void 0 ? void 0 : _a[symbol];
|
|
146
|
+
}
|
|
147
|
+
exports.getTokenAddress = getTokenAddress;
|
|
148
|
+
/**
|
|
149
|
+
* Helper function to find a token by symbol in the cached tokens
|
|
150
|
+
* @param symbol - The token symbol to search for
|
|
151
|
+
* @param chainId - The chain ID
|
|
152
|
+
* @returns The token object or undefined if not found
|
|
153
|
+
*/
|
|
154
|
+
function findTokenBySymbol(symbol, chainId) {
|
|
155
|
+
const tokens = (0, tokens_1.getCachedTokensSync)(chainId);
|
|
156
|
+
return tokens.find((token) => token.symbol === symbol);
|
|
157
|
+
}
|
|
158
|
+
exports.findTokenBySymbol = findTokenBySymbol;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated. Do not edit manually.
|
|
2
|
-
// Generated on 2025-
|
|
2
|
+
// Generated on 2025-11-06T15:50:12.595Z
|
|
3
3
|
import { TokenSymbol } from '../mento';
|
|
4
4
|
export const tokens11142220 = [
|
|
5
5
|
{
|
|
@@ -111,15 +111,15 @@ export const tokens11142220 = [
|
|
|
111
111
|
decimals: 18,
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
|
-
address: '
|
|
115
|
-
symbol: TokenSymbol.
|
|
116
|
-
name: '
|
|
117
|
-
decimals:
|
|
114
|
+
address: '0xd077A400968890Eacc75cdc901F0356c943e4fDb',
|
|
115
|
+
symbol: TokenSymbol.USD_,
|
|
116
|
+
name: 'Tether USD',
|
|
117
|
+
decimals: 6,
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
|
-
address: '
|
|
121
|
-
symbol: TokenSymbol.
|
|
122
|
-
name: '
|
|
123
|
-
decimals:
|
|
120
|
+
address: '0x01C5C0122039549AD1493B8220cABEdD739BC44E',
|
|
121
|
+
symbol: TokenSymbol.USDC,
|
|
122
|
+
name: 'USDC',
|
|
123
|
+
decimals: 6,
|
|
124
124
|
},
|
|
125
125
|
];
|
|
@@ -20,12 +20,9 @@ export declare function getCachedTokensSync(chainId: number): readonly Token[];
|
|
|
20
20
|
* Note: Not all tokens are available on all chains - check TOKEN_ADDRESSES_BY_CHAIN
|
|
21
21
|
*/
|
|
22
22
|
export declare enum TokenSymbol {
|
|
23
|
-
BridgedEUROC = "BridgedEUROC",
|
|
24
|
-
BridgedUSDC = "BridgedUSDC",
|
|
25
23
|
CELO = "CELO",
|
|
26
24
|
PUSO = "PUSO",
|
|
27
25
|
USDC = "USDC",
|
|
28
|
-
USDT = "USDT",
|
|
29
26
|
USD_ = "USD\u20AE",
|
|
30
27
|
axlEUROC = "axlEUROC",
|
|
31
28
|
axlUSDC = "axlUSDC",
|
|
@@ -51,17 +48,3 @@ export declare enum TokenSymbol {
|
|
|
51
48
|
export declare const TOKEN_ADDRESSES_BY_CHAIN: {
|
|
52
49
|
[chainId: number]: Partial<Record<TokenSymbol, string>>;
|
|
53
50
|
};
|
|
54
|
-
/**
|
|
55
|
-
* Helper function to get token address by symbol for a specific chain
|
|
56
|
-
* @param symbol - The token symbol
|
|
57
|
-
* @param chainId - The chain ID
|
|
58
|
-
* @returns The token address or undefined if not found
|
|
59
|
-
*/
|
|
60
|
-
export declare function getTokenAddress(symbol: TokenSymbol, chainId: number): string | undefined;
|
|
61
|
-
/**
|
|
62
|
-
* Helper function to find a token by symbol in the cached tokens
|
|
63
|
-
* @param symbol - The token symbol to search for
|
|
64
|
-
* @param chainId - The chain ID
|
|
65
|
-
* @returns The token object or undefined if not found
|
|
66
|
-
*/
|
|
67
|
-
export declare function findTokenBySymbol(symbol: string, chainId: number): Token | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated. Do not edit manually.
|
|
2
|
-
// Generated on 2025-
|
|
2
|
+
// Generated on 2025-11-06T15:50:12.597Z
|
|
3
3
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4
4
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5
5
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -19,8 +19,6 @@ export function getCachedTokens(chainId) {
|
|
|
19
19
|
switch (chainId) {
|
|
20
20
|
case 42220:
|
|
21
21
|
return yield import('./tokens.42220').then((module) => module.tokens42220);
|
|
22
|
-
case 44787:
|
|
23
|
-
return yield import('./tokens.44787').then((module) => module.tokens44787);
|
|
24
22
|
case 11142220:
|
|
25
23
|
return yield import('./tokens.11142220').then((module) => module.tokens11142220);
|
|
26
24
|
default:
|
|
@@ -42,15 +40,12 @@ export function getCachedTokensSync(chainId) {
|
|
|
42
40
|
case 42220:
|
|
43
41
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
44
42
|
return require('./tokens.42220').tokens42220;
|
|
45
|
-
case 44787:
|
|
46
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
47
|
-
return require('./tokens.44787').tokens44787;
|
|
48
43
|
case 11142220:
|
|
49
44
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
50
45
|
return require('./tokens.11142220').tokens11142220;
|
|
51
46
|
default:
|
|
52
47
|
throw new Error(`No cached tokens available for chain ID ${chainId}. ` +
|
|
53
|
-
`Supported chains: 42220 (Celo),
|
|
48
|
+
`Supported chains: 42220 (Celo), 11142220 (Celo Sepolia)`);
|
|
54
49
|
}
|
|
55
50
|
}
|
|
56
51
|
/**
|
|
@@ -59,12 +54,9 @@ export function getCachedTokensSync(chainId) {
|
|
|
59
54
|
*/
|
|
60
55
|
export var TokenSymbol;
|
|
61
56
|
(function (TokenSymbol) {
|
|
62
|
-
TokenSymbol["BridgedEUROC"] = "BridgedEUROC";
|
|
63
|
-
TokenSymbol["BridgedUSDC"] = "BridgedUSDC";
|
|
64
57
|
TokenSymbol["CELO"] = "CELO";
|
|
65
58
|
TokenSymbol["PUSO"] = "PUSO";
|
|
66
59
|
TokenSymbol["USDC"] = "USDC";
|
|
67
|
-
TokenSymbol["USDT"] = "USDT";
|
|
68
60
|
TokenSymbol["USD_"] = "USD\u20AE";
|
|
69
61
|
TokenSymbol["axlEUROC"] = "axlEUROC";
|
|
70
62
|
TokenSymbol["axlUSDC"] = "axlUSDC";
|
|
@@ -89,89 +81,47 @@ export var TokenSymbol;
|
|
|
89
81
|
*/
|
|
90
82
|
export const TOKEN_ADDRESSES_BY_CHAIN = {
|
|
91
83
|
42220: {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
44787: {
|
|
114
|
-
[TokenSymbol.BridgedEUROC]: '0x6e673502c5b55F3169657C004e5797fFE5be6653',
|
|
115
|
-
[TokenSymbol.BridgedUSDC]: '0x87D61dA3d668797786D73BC674F053f87111570d',
|
|
116
|
-
[TokenSymbol.cAUD]: '0x84CBD49F5aE07632B6B88094E81Cce8236125Fe0',
|
|
117
|
-
[TokenSymbol.cCAD]: '0x02EC9E0D2Fd73e89168C1709e542a48f58d7B133',
|
|
118
|
-
[TokenSymbol.cCHF]: '0xADC57C2C34aD021Df4421230a6532F4e2E1dCE4F',
|
|
119
|
-
[TokenSymbol.cCOP]: '0xe6A57340f0df6E020c1c0a80bC6E13048601f0d4',
|
|
120
|
-
[TokenSymbol.CELO]: '0xF194afDf50B03e69Bd7D057c1Aa9e10c9954E4C9',
|
|
121
|
-
[TokenSymbol.cEUR]: '0x10c892A6EC43a53E45D0B916B4b7D383B1b78C0F',
|
|
122
|
-
[TokenSymbol.cGBP]: '0x47f2Fb88105155a18c390641C8a73f1402B2BB12',
|
|
123
|
-
[TokenSymbol.cGHS]: '0x295B66bE7714458Af45E6A6Ea142A5358A6cA375',
|
|
124
|
-
[TokenSymbol.cJPY]: '0x2E51F41238cA36a421C9B8b3e189e8Cc7653FE67',
|
|
125
|
-
[TokenSymbol.cKES]: '0x1E0433C1769271ECcF4CFF9FDdD515eefE6CdF92',
|
|
126
|
-
[TokenSymbol.cNGN]: '0x4a5b03B8b16122D330306c65e4CA4BC5Dd6511d0',
|
|
127
|
-
[TokenSymbol.cREAL]: '0xE4D517785D091D3c54818832dB6094bcc2744545',
|
|
128
|
-
[TokenSymbol.cUSD]: '0x874069Fa1Eb16D44d622F2e0Ca25eeA172369bC1',
|
|
129
|
-
[TokenSymbol.cZAR]: '0x1e5b44015Ff90610b54000DAad31C89b3284df4d',
|
|
130
|
-
[TokenSymbol.eXOF]: '0xB0FA15e002516d0301884059c0aaC0F0C72b019D',
|
|
131
|
-
[TokenSymbol.PUSO]: '0x5E0E3c9419C42a1B04e2525991FB1A2C467AB8bF',
|
|
132
|
-
[TokenSymbol.USDC]: '0x2F25deB3848C207fc8E0c34035B3Ba7fC157602B',
|
|
133
|
-
[TokenSymbol.USDT]: '0xBba91F588d031469ABCCA566FE80fB1Ad8Ee3287',
|
|
84
|
+
axlEUROC: '0x061cc5a2C863E0C1Cb404006D559dB18A34C762d',
|
|
85
|
+
axlUSDC: '0xEB466342C4d449BC9f53A865D5Cb90586f405215',
|
|
86
|
+
cAUD: '0x7175504C455076F15c04A2F90a8e352281F492F9',
|
|
87
|
+
cCAD: '0xff4Ab19391af240c311c54200a492233052B6325',
|
|
88
|
+
cCHF: '0xb55a79F398E759E43C95b979163f30eC87Ee131D',
|
|
89
|
+
cCOP: '0x8A567e2aE79CA692Bd748aB832081C45de4041eA',
|
|
90
|
+
CELO: '0x471EcE3750Da237f93B8E339c536989b8978a438',
|
|
91
|
+
cEUR: '0xD8763CBa276a3738E6DE85b4b3bF5FDed6D6cA73',
|
|
92
|
+
cGBP: '0xCCF663b1fF11028f0b19058d0f7B674004a40746',
|
|
93
|
+
cGHS: '0xfAeA5F3404bbA20D3cc2f8C4B0A888F55a3c7313',
|
|
94
|
+
cJPY: '0xc45eCF20f3CD864B32D9794d6f76814aE8892e20',
|
|
95
|
+
cKES: '0x456a3D042C0DbD3db53D5489e98dFb038553B0d0',
|
|
96
|
+
cNGN: '0xE2702Bd97ee33c88c8f6f92DA3B733608aa76F71',
|
|
97
|
+
cREAL: '0xe8537a3d056DA446677B9E9d6c5dB704EaAb4787',
|
|
98
|
+
cUSD: '0x765DE816845861e75A25fCA122bb6898B8B1282a',
|
|
99
|
+
cZAR: '0x4c35853A3B4e647fD266f4de678dCc8fEC410BF6',
|
|
100
|
+
eXOF: '0x73F93dcc49cB8A239e2032663e9475dd5ef29A08',
|
|
101
|
+
PUSO: '0x105d4A9306D2E55a71d2Eb95B81553AE1dC20d7B',
|
|
102
|
+
'USD₮': '0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e',
|
|
103
|
+
USDC: '0xcebA9300f2b948710d2653dD7B07f33A8B32118C',
|
|
134
104
|
},
|
|
135
105
|
11142220: {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
106
|
+
axlEUROC: '0x9883d788d40F1C7595a780ed881Ea833C7743B4B',
|
|
107
|
+
axlUSDC: '0x6285De9DA7C1d329C0451628638908915002d9d1',
|
|
108
|
+
cAUD: '0x5873Faeb42F3563dcD77F0fbbdA818E6d6DA3139',
|
|
109
|
+
cCAD: '0xF151c9a13b78C84f93f50B8b3bC689fedc134F60',
|
|
110
|
+
cCHF: '0x284E9b7B623eAE866914b7FA0eB720C2Bb3C2980',
|
|
111
|
+
cCOP: '0x5F8d55c3627d2dc0a2B4afa798f877242F382F67',
|
|
112
|
+
CELO: '0x471EcE3750Da237f93B8E339c536989b8978a438',
|
|
113
|
+
cEUR: '0xA99dC247d6b7B2E3ab48a1fEE101b83cD6aCd82a',
|
|
114
|
+
cGBP: '0x85F5181Abdbf0e1814Fc4358582Ae07b8eBA3aF3',
|
|
115
|
+
cGHS: '0x5e94B8C872bD47BC4255E60ECBF44D5E66e7401C',
|
|
116
|
+
cJPY: '0x85Bee67D435A39f7467a8a9DE34a5B73D25Df426',
|
|
117
|
+
cKES: '0xC7e4635651E3e3Af82b61d3E23c159438daE3BbF',
|
|
118
|
+
cNGN: '0x3d5ae86F34E2a82771496D140daFAEf3789dF888',
|
|
119
|
+
cREAL: '0x2294298942fdc79417DE9E0D740A4957E0e7783a',
|
|
120
|
+
cUSD: '0xdE9e4C3ce781b4bA68120d6261cbad65ce0aB00b',
|
|
121
|
+
cZAR: '0x10CCfB235b0E1Ed394bACE4560C3ed016697687e',
|
|
122
|
+
eXOF: '0x5505b70207aE3B826c1A7607F19F3Bf73444A082',
|
|
123
|
+
PUSO: '0x0352976d940a2C3FBa0C3623198947Ee1d17869E',
|
|
124
|
+
'USD₮': '0xd077A400968890Eacc75cdc901F0356c943e4fDb',
|
|
125
|
+
USDC: '0x01C5C0122039549AD1493B8220cABEdD739BC44E',
|
|
156
126
|
},
|
|
157
127
|
};
|
|
158
|
-
/**
|
|
159
|
-
* Helper function to get token address by symbol for a specific chain
|
|
160
|
-
* @param symbol - The token symbol
|
|
161
|
-
* @param chainId - The chain ID
|
|
162
|
-
* @returns The token address or undefined if not found
|
|
163
|
-
*/
|
|
164
|
-
export function getTokenAddress(symbol, chainId) {
|
|
165
|
-
var _a;
|
|
166
|
-
return (_a = TOKEN_ADDRESSES_BY_CHAIN[chainId]) === null || _a === void 0 ? void 0 : _a[symbol];
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Helper function to find a token by symbol in the cached tokens
|
|
170
|
-
* @param symbol - The token symbol to search for
|
|
171
|
-
* @param chainId - The chain ID
|
|
172
|
-
* @returns The token object or undefined if not found
|
|
173
|
-
*/
|
|
174
|
-
export function findTokenBySymbol(symbol, chainId) {
|
|
175
|
-
const tokens = getCachedTokensSync(chainId);
|
|
176
|
-
return tokens.find((token) => token.symbol === symbol);
|
|
177
|
-
}
|