@reyaxyz/common 0.49.1 → 0.51.0
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/types/types.d.ts +44 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/token-info.d.ts.map +1 -1
- package/dist/types/utils/token.d.ts +1 -0
- package/dist/types/utils/token.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/socket/reyaCronos.json +260 -0
- package/dist/utils/token-info.js +42 -50
- package/dist/utils/token-info.js.map +1 -1
- package/dist/utils/token.js +5 -1
- package/dist/utils/token.js.map +1 -1
- package/package.json +2 -2
- package/src/types.ts +56 -1
- package/src/utils/socket/reyaCronos.json +260 -0
- package/src/utils/token-info.ts +115 -0
- package/src/utils/token.ts +6 -0
package/dist/types/types.d.ts
CHANGED
|
@@ -358,17 +358,60 @@ export type GetAccountLGEStatusResult = {
|
|
|
358
358
|
currentBoost: number;
|
|
359
359
|
deposited: number;
|
|
360
360
|
};
|
|
361
|
+
export type GetAccountTradingXPParams = {
|
|
362
|
+
address: string;
|
|
363
|
+
};
|
|
364
|
+
export type GetAccountTradingXPResult = {
|
|
365
|
+
xp: XPEntity;
|
|
366
|
+
currentBoost: number;
|
|
367
|
+
openBase: number;
|
|
368
|
+
};
|
|
361
369
|
export type GetLGEBoostRateParams = void;
|
|
362
370
|
export type GetLGEBoostRateResult = number;
|
|
371
|
+
export type LeaderboardEntity = {
|
|
372
|
+
address: string;
|
|
373
|
+
currentBoost: number;
|
|
374
|
+
liquidityXp: number;
|
|
375
|
+
rank: number;
|
|
376
|
+
ranking: number;
|
|
377
|
+
tradingXp: number;
|
|
378
|
+
};
|
|
379
|
+
export type UserLeaderboardDataEntity = {
|
|
380
|
+
address: string;
|
|
381
|
+
rank: number;
|
|
382
|
+
claimedRank: number;
|
|
383
|
+
currentRankPoints: number;
|
|
384
|
+
nextRankPoints: number;
|
|
385
|
+
ranking: number;
|
|
386
|
+
liquidityXp: number;
|
|
387
|
+
tradingXp: number;
|
|
388
|
+
};
|
|
389
|
+
export type GetLeaderboardParams = {
|
|
390
|
+
page: number;
|
|
391
|
+
perPage: number;
|
|
392
|
+
};
|
|
393
|
+
export type GetLeaderboardResult = LeaderboardEntity[];
|
|
394
|
+
export type ClaimRankParams = {
|
|
395
|
+
address: string;
|
|
396
|
+
};
|
|
397
|
+
export type ClaimRankResult = {
|
|
398
|
+
success: boolean;
|
|
399
|
+
};
|
|
400
|
+
export type GetUserLeaderboardDataParams = {
|
|
401
|
+
address: string;
|
|
402
|
+
};
|
|
403
|
+
export type GetUserLeaderboardDataResult = UserLeaderboardDataEntity;
|
|
363
404
|
export type TokenEntityWithMinValue = TokenEntity & {
|
|
364
405
|
minDepositAmount: number;
|
|
365
406
|
minWithdrawAmount: number;
|
|
366
407
|
minTransferAmount: number;
|
|
367
|
-
stepSize: number;
|
|
368
408
|
};
|
|
369
409
|
export type TokenInfo = {
|
|
370
410
|
name: TokenName;
|
|
371
411
|
address: Address;
|
|
372
412
|
decimals: number;
|
|
413
|
+
minDepositAmount: number;
|
|
414
|
+
minWithdrawAmount: number;
|
|
415
|
+
minTransferAmount: number;
|
|
373
416
|
};
|
|
374
417
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AACxC,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AAG1C,MAAM,MAAM,eAAe,GAAG;IAC5B,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,E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SAAS,GAAG;IACtB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-info.d.ts","sourceRoot":"/","sources":["utils/token-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"token-info.d.ts","sourceRoot":"/","sources":["utils/token-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAWrE,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,WAAW,GAAG,iBAAiB,EAAE,SAAS,EAAE,CAkLzE,CAAC"}
|
|
@@ -6,6 +6,7 @@ export declare const getERC20TokenContract: (tokenAddress: string, subject: Sign
|
|
|
6
6
|
export declare const convertToAddress: (str: string) => Address;
|
|
7
7
|
export declare const getTokenInfoByAddress: (tokenAddressParam: Address | string, chainId?: ReyaChainId | MoneyInOutChainId) => TokenInfo;
|
|
8
8
|
export declare const getTokenInfoByName: (tokenName: TokenName, chainId: ReyaChainId | MoneyInOutChainId) => TokenInfo;
|
|
9
|
+
export declare const getTokenInfosByChain: (chainId: ReyaChainId | MoneyInOutChainId) => TokenInfo[];
|
|
9
10
|
export declare const getERC20Allowance: ({ walletAddress, tokenAddress, spenderAddress, subject, }: GetERC20AllowanceParams) => Promise<number>;
|
|
10
11
|
export type GetERC20BalanceArgs = {
|
|
11
12
|
tokenAddress: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token.d.ts","sourceRoot":"/","sources":["utils/token.ts"],"names":[],"mappings":"AAEA,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6B,QAOxC","sourcesContent":["import { Signer } from 'ethers';\n\nexport type Address = Lowercase<string>;\nexport type TokenName = Uppercase<string>;\n\n// -- Markets --\nexport type MarketOrderInfo = {\n counterpartyAccountIds: number[];\n exchangeId: number;\n};\n\nexport type MarketEntity = {\n id: number;\n ticker: string;\n underlyingAsset: string;\n quoteToken: string;\n markPrice: number;\n isActive: boolean;\n maxLeverage: number;\n volume24H: number;\n priceChange24H: number;\n priceChange24HPercentage: number;\n openInterest: number;\n fundingRate: number;\n description: string;\n orderInfo: MarketOrderInfo;\n tickSizeDecimals: number;\n minOrderSize: number;\n baseSpacing: number;\n};\n\nexport enum ReyaChainId {\n reyaNetwork = 1729,\n reyaCronos = 89346161,\n}\n\nexport enum MoneyInOutChainId {\n polygonMumbai = 80001,\n arbitrumSepolia = 421614,\n opSepolia = 11155420,\n ethereumSepolia = 11155111,\n}\n\nexport enum CandlesResolution {\n ONE_MINUTE = '1MIN',\n FIVE_MINUTES = '5MINS',\n FIFTEEN_MINUTES = '15MINS',\n THIRTY_MINUTES = '30MINS',\n ONE_HOUR = '1HOUR',\n FOUR_HOURS = '4HOURS',\n ONE_DAY = '1DAY',\n}\n\n// -- Candles --\nexport interface Candle {\n id: string;\n startedAt: string;\n ticker: string;\n resolution: CandlesResolution;\n low: string;\n high: string;\n open: string;\n close: string;\n baseTokenVolume: string;\n usdVolume: string;\n trades: number;\n startingOpenInterest: string;\n}\n\n// -- Account --\n\nexport type Status = 'OPEN' | 'CLOSED' | 'LIQUIDATED' | 'FILLED';\nexport type Side = 'long' | 'short';\n\nexport type CollateralEntity = {\n token: string;\n percentage: number;\n balance: number;\n balanceRUSD: number;\n exchangeRate: number;\n exchangeRateChange24HPercentage: number;\n};\n\nexport type MarginAccountEntity = {\n id: number;\n name: string;\n marginRatioHealth: 'danger' | 'healthy' | 'warning';\n marginRatioPercentage: number;\n totalBalance: number;\n totalBalanceUnderlyingAsset: string;\n totalBalanceChange24HPercentage: 5;\n livePnL: number;\n livePnLUnderlyingAsset: string;\n realizedPnL: number;\n realizedPnLUnderlyingAsset: string;\n totalPositionsCount: number;\n collaterals: CollateralEntity[];\n positions: PositionEntity[];\n};\n\nexport type PositionEntity = {\n id: number;\n side: Side;\n size: number;\n base: number;\n price: number;\n markPrice: number;\n orderStatus: Status;\n realisedPnl?: number | null;\n unrealisedPnl?: number | null;\n liquidationPrice: number;\n fundingRate: number;\n market: MarketEntity;\n};\n\nexport type TradingHistoryEntity = {\n id: number;\n price: number;\n priceUnderlyingToken: string;\n size: number;\n sizeUnderlyingToken: string;\n timestampMillisecondsUTC: number;\n};\n\nexport type OrderType = 'market';\n\nexport type PositionHistoryType =\n | 'long-trade'\n | 'short-trade'\n | 'long-liquidation'\n | 'short-liquidation';\n\nexport type PositionHistoryEntity = {\n id: number;\n action: PositionHistoryType;\n orderType: OrderType;\n base: number;\n executionPrice: number;\n realisedPnl?: number | null;\n fees: number;\n timestamp: number;\n market: MarketEntity;\n};\n\nexport type LpPoolEntity = {\n id: number;\n name: string;\n description: string;\n longDescription: string;\n readMoreLink: string;\n currentAPY: number;\n apyChange24H: number;\n tokenAddress: Address;\n token: string;\n minDepositAmount: number;\n minWithdrawAmount: number;\n minTransferFromMAToPoolAmount: number;\n minTransferFromPoolToMAAmount: number;\n stepSize: number;\n allowedChainsForLiquidity: MoneyInOutChainId[];\n};\n\nexport type LpWithdrawBalanceEntity = {\n withdrawableBalance: number;\n poolSharePrice: number;\n accountShareBalance: number;\n};\n\nexport type TransactionHistoryType = 'deposit' | 'withdrawal';\n\nexport type LpTransactionHistoryEntity = {\n id: number;\n type: TransactionHistoryType;\n token: string;\n amount: number;\n transactionLink: string;\n timestamp: number;\n};\n\nexport type LpPositionEntity = {\n id: number;\n capitalInvested: number;\n currentBalance: number;\n pnl: number;\n lpPool: LpPoolEntity;\n};\n\nexport type MarginAccountTransactionHistoryType =\n | 'deposit'\n | 'withdrawal'\n | 'transfer'\n | 'auto_exchange';\n\nexport type MarginAccountTransactionStatus = 'confirmed' | 'pending';\n\nexport type MarginAccountTransactionHistoryEntity = {\n id: number;\n type: MarginAccountTransactionHistoryType;\n token: string;\n amount: number;\n transactionLink: string;\n status: MarginAccountTransactionStatus;\n timestamp: number;\n};\n\nexport type TokenEntity = {\n id: string;\n address: Address;\n};\n// --- Lp Pool Balance ---\nexport enum LpBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\nexport type GetLpPoolBalanceChartDataResult = {\n data: {\n timestampInMs: number;\n value: number;\n }[];\n tvl: number;\n tvlChangePercentage: number;\n apy: number;\n apyChangePercentage: number;\n};\n\n// - LP Account Performance -\nexport type GetLpPoolPerformanceChartDataResult = {\n capitalInvestedData: {\n timestampInMs: number;\n value: number;\n }[];\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n capitalInvested: number;\n capitalInvestedChangePercentage: number;\n};\n\nexport type SocketTokenConnectors = {\n deposit: Address;\n withdraw: Address;\n};\n\nexport type GetSocketConnectorParams = {\n moneyInOutChainId: MoneyInOutChainId;\n tokenName: TokenName;\n};\n\nexport type GetSocketControllerParams = {\n reyaChainId: ReyaChainId;\n tokenName: TokenName;\n};\n\nexport type GetSocketVaultParams = {\n moneyInOutChainId: MoneyInOutChainId;\n tokenName: TokenName;\n};\n\nexport type GetSocketBridgeTimeParams = {\n moneyInOutChainId: MoneyInOutChainId;\n};\n\nexport type GetSocketBridgeTimeResult = {\n bridgeTimeInMS: number;\n};\n\nexport type GetSocketDepositFeesParams = {\n moneyInOutChainId: MoneyInOutChainId;\n};\n\nexport type GetSocketDepositFeesResult = {\n fees: number;\n feesUnderlyingToken: string;\n};\n\nexport type GetSocketWithdrawFeesParams = {\n reyaChainId: ReyaChainId;\n tokenAddress: TokenEntity['address'];\n};\n\nexport type GetSocketWithdrawFeesResult = {\n fees: number;\n};\n\n// --- Margin Account Balance ---\nexport enum MarginAccountBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\nexport type GetMarginAccountBalanceChartDataResult = {\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n};\n\n// --- Margin Account Collaterals Balance ---\nexport enum MarginAccountCollateralsBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\nexport type GetMarginAccountCollateralsBalanceChartDataResult = {\n data: {\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n token: string;\n }[];\n balance: number;\n balanceChangePercentage: number;\n};\n\nexport type OwnerMetadataEntity = {\n address: Address;\n coreSigNonce: number;\n poolSigNonce: number;\n};\n\nexport type GetAllMarginAccountsBalanceChartDataResult = {\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n};\n\nexport enum AllMarginAccountsBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\n// --- Funding Rate History ----\nexport enum FundingRateHistoryGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\nexport type GetFundingRateChartDataResult = {\n fundingRateData: {\n timestampInMs: number;\n value: number;\n }[];\n fundingRate: number;\n};\n\nexport type GetERC20AllowanceParams = {\n walletAddress: string;\n tokenAddress: LpPoolEntity['tokenAddress'];\n spenderAddress: string;\n subject: Signer;\n};\n\nexport type DepthSimulationState = {\n spotPrice: number;\n maxLongExposure: number;\n maxShortExposure: number;\n netExposure: number;\n};\n\nexport type GetLpPoolDepthChartSimulationDataResult = DepthSimulationState;\n\nexport type SignatureData = {\n signature: string;\n timestamp: number;\n walletAddress: Address;\n message: string;\n};\n\nexport type SaveSignatureResult = {\n signatureSavedSuccessfully: boolean;\n};\n\n// --- Community ----\nexport type VoteDetailsEntity = {\n id: number;\n startDate: number; // timestamp in UTC milliseconds\n endDate: number; // timestamp in UTC milliseconds\n percentageToPass: number; // Example: 4%\n yesCount: number;\n noCount: number;\n voteCountToPass: number; // Example: 1453\n};\n\nexport type VoteStatusEntity = {\n votingPower: number;\n hasVoted: boolean;\n};\n\n// --- XP ----\nexport type XPEntity = {\n value: number;\n valueTimestampMilliseconds: number;\n rate: number;\n};\n\nexport type GetAccountLGEStatusParams = {\n address: string; // wallet address\n};\n\nexport type GetAccountLGEStatusResult = {\n xp: XPEntity;\n currentBoost: number;\n deposited: number;\n};\n\nexport type GetLGEBoostRateParams = void;\n\nexport type GetLGEBoostRateResult = number;\n\nexport type TokenEntityWithMinValue = TokenEntity & {\n minDepositAmount: number;\n minWithdrawAmount: number;\n minTransferAmount: number;\n stepSize: number;\n};\n\nexport type TokenInfo = {\n name: TokenName;\n address: Address;\n decimals: number;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"/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CAA0C,QAOrD;AA6BD,IAAY,mCAOX;AAPD,WAAY,mCAAmC;IAC7C,6GAAsB,CAAA;IACtB,2GAAyB,CAAA;IACzB,0GAA6B,CAAA;IAC7B,6GAAkC,CAAA;IAClC,gHAAoC,CAAA;IACpC,+GAAoC,CAAA;AACtC,CAAC,EAPW,mCAAmC,mDAAnC,mCAAmC,QAO9C;AAED,gCAAgC;AAChC,IAAY,6BAOX;AAPD,WAAY,6BAA6B;IACvC,iGAAsB,CAAA;IACtB,+FAAyB,CAAA;IACzB,8FAA6B,CAAA;IAC7B,iGAAkC,CAAA;IAClC,oGAAoC,CAAA;IACpC,mGAAoC,CAAA;AACtC,CAAC,EAPW,6BAA6B,6CAA7B,6BAA6B,QAOxC","sourcesContent":["import { Signer } from 'ethers';\n\nexport type Address = Lowercase<string>;\nexport type TokenName = Uppercase<string>;\n\n// -- Markets --\nexport type MarketOrderInfo = {\n counterpartyAccountIds: number[];\n exchangeId: number;\n};\n\nexport type MarketEntity = {\n id: number;\n ticker: string;\n underlyingAsset: string;\n quoteToken: string;\n markPrice: number;\n isActive: boolean;\n maxLeverage: number;\n volume24H: number;\n priceChange24H: number;\n priceChange24HPercentage: number;\n openInterest: number;\n fundingRate: number;\n description: string;\n orderInfo: MarketOrderInfo;\n tickSizeDecimals: number;\n minOrderSize: number;\n baseSpacing: number;\n};\n\nexport enum ReyaChainId {\n reyaNetwork = 1729,\n reyaCronos = 89346161,\n}\n\nexport enum MoneyInOutChainId {\n polygonMumbai = 80001,\n arbitrumSepolia = 421614,\n opSepolia = 11155420,\n ethereumSepolia = 11155111,\n}\n\nexport enum CandlesResolution {\n ONE_MINUTE = '1MIN',\n FIVE_MINUTES = '5MINS',\n FIFTEEN_MINUTES = '15MINS',\n THIRTY_MINUTES = '30MINS',\n ONE_HOUR = '1HOUR',\n FOUR_HOURS = '4HOURS',\n ONE_DAY = '1DAY',\n}\n\n// -- Candles --\nexport interface Candle {\n id: string;\n startedAt: string;\n ticker: string;\n resolution: CandlesResolution;\n low: string;\n high: string;\n open: string;\n close: string;\n baseTokenVolume: string;\n usdVolume: string;\n trades: number;\n startingOpenInterest: string;\n}\n\n// -- Account --\n\nexport type Status = 'OPEN' | 'CLOSED' | 'LIQUIDATED' | 'FILLED';\nexport type Side = 'long' | 'short';\n\nexport type CollateralEntity = {\n token: string;\n percentage: number;\n balance: number;\n balanceRUSD: number;\n exchangeRate: number;\n exchangeRateChange24HPercentage: number;\n};\n\nexport type MarginAccountEntity = {\n id: number;\n name: string;\n marginRatioHealth: 'danger' | 'healthy' | 'warning';\n marginRatioPercentage: number;\n totalBalance: number;\n totalBalanceUnderlyingAsset: string;\n totalBalanceChange24HPercentage: 5;\n livePnL: number;\n livePnLUnderlyingAsset: string;\n realizedPnL: number;\n realizedPnLUnderlyingAsset: string;\n totalPositionsCount: number;\n collaterals: CollateralEntity[];\n positions: PositionEntity[];\n};\n\nexport type PositionEntity = {\n id: number;\n side: Side;\n size: number;\n base: number;\n price: number;\n markPrice: number;\n orderStatus: Status;\n realisedPnl?: number | null;\n unrealisedPnl?: number | null;\n liquidationPrice: number;\n fundingRate: number;\n market: MarketEntity;\n};\n\nexport type TradingHistoryEntity = {\n id: number;\n price: number;\n priceUnderlyingToken: string;\n size: number;\n sizeUnderlyingToken: string;\n timestampMillisecondsUTC: number;\n};\n\nexport type OrderType = 'market';\n\nexport type PositionHistoryType =\n | 'long-trade'\n | 'short-trade'\n | 'long-liquidation'\n | 'short-liquidation';\n\nexport type PositionHistoryEntity = {\n id: number;\n action: PositionHistoryType;\n orderType: OrderType;\n base: number;\n executionPrice: number;\n realisedPnl?: number | null;\n fees: number;\n timestamp: number;\n market: MarketEntity;\n};\n\nexport type LpPoolEntity = {\n id: number;\n name: string;\n description: string;\n longDescription: string;\n readMoreLink: string;\n currentAPY: number;\n apyChange24H: number;\n tokenAddress: Address;\n token: string;\n minDepositAmount: number;\n minWithdrawAmount: number;\n minTransferFromMAToPoolAmount: number;\n minTransferFromPoolToMAAmount: number;\n stepSize: number;\n allowedChainsForLiquidity: MoneyInOutChainId[];\n};\n\nexport type LpWithdrawBalanceEntity = {\n withdrawableBalance: number;\n poolSharePrice: number;\n accountShareBalance: number;\n};\n\nexport type TransactionHistoryType = 'deposit' | 'withdrawal';\n\nexport type LpTransactionHistoryEntity = {\n id: number;\n type: TransactionHistoryType;\n token: string;\n amount: number;\n transactionLink: string;\n timestamp: number;\n};\n\nexport type LpPositionEntity = {\n id: number;\n capitalInvested: number;\n currentBalance: number;\n pnl: number;\n lpPool: LpPoolEntity;\n};\n\nexport type MarginAccountTransactionHistoryType =\n | 'deposit'\n | 'withdrawal'\n | 'transfer'\n | 'auto_exchange';\n\nexport type MarginAccountTransactionStatus = 'confirmed' | 'pending';\n\nexport type MarginAccountTransactionHistoryEntity = {\n id: number;\n type: MarginAccountTransactionHistoryType;\n token: string;\n amount: number;\n transactionLink: string;\n status: MarginAccountTransactionStatus;\n timestamp: number;\n};\n\nexport type TokenEntity = {\n id: string;\n address: Address;\n};\n// --- Lp Pool Balance ---\nexport enum LpBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\nexport type GetLpPoolBalanceChartDataResult = {\n data: {\n timestampInMs: number;\n value: number;\n }[];\n tvl: number;\n tvlChangePercentage: number;\n apy: number;\n apyChangePercentage: number;\n};\n\n// - LP Account Performance -\nexport type GetLpPoolPerformanceChartDataResult = {\n capitalInvestedData: {\n timestampInMs: number;\n value: number;\n }[];\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n capitalInvested: number;\n capitalInvestedChangePercentage: number;\n};\n\nexport type SocketTokenConnectors = {\n deposit: Address;\n withdraw: Address;\n};\n\nexport type GetSocketConnectorParams = {\n moneyInOutChainId: MoneyInOutChainId;\n tokenName: TokenName;\n};\n\nexport type GetSocketControllerParams = {\n reyaChainId: ReyaChainId;\n tokenName: TokenName;\n};\n\nexport type GetSocketVaultParams = {\n moneyInOutChainId: MoneyInOutChainId;\n tokenName: TokenName;\n};\n\nexport type GetSocketBridgeTimeParams = {\n moneyInOutChainId: MoneyInOutChainId;\n};\n\nexport type GetSocketBridgeTimeResult = {\n bridgeTimeInMS: number;\n};\n\nexport type GetSocketDepositFeesParams = {\n moneyInOutChainId: MoneyInOutChainId;\n};\n\nexport type GetSocketDepositFeesResult = {\n fees: number;\n feesUnderlyingToken: string;\n};\n\nexport type GetSocketWithdrawFeesParams = {\n reyaChainId: ReyaChainId;\n tokenAddress: TokenEntity['address'];\n};\n\nexport type GetSocketWithdrawFeesResult = {\n fees: number;\n};\n\n// --- Margin Account Balance ---\nexport enum MarginAccountBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\nexport type GetMarginAccountBalanceChartDataResult = {\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n};\n\n// --- Margin Account Collaterals Balance ---\nexport enum MarginAccountCollateralsBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\nexport type GetMarginAccountCollateralsBalanceChartDataResult = {\n data: {\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n token: string;\n }[];\n balance: number;\n balanceChangePercentage: number;\n};\n\nexport type OwnerMetadataEntity = {\n address: Address;\n coreSigNonce: number;\n poolSigNonce: number;\n};\n\nexport type GetAllMarginAccountsBalanceChartDataResult = {\n balanceData: {\n timestampInMs: number;\n value: number;\n }[];\n balance: number;\n balanceChangePercentage: number;\n};\n\nexport enum AllMarginAccountsBalanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\n// --- Funding Rate History ----\nexport enum FundingRateHistoryGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\nexport type GetFundingRateChartDataResult = {\n fundingRateData: {\n timestampInMs: number;\n value: number;\n }[];\n fundingRate: number;\n};\n\nexport type GetERC20AllowanceParams = {\n walletAddress: string;\n tokenAddress: LpPoolEntity['tokenAddress'];\n spenderAddress: string;\n subject: Signer;\n};\n\nexport type DepthSimulationState = {\n spotPrice: number;\n maxLongExposure: number;\n maxShortExposure: number;\n netExposure: number;\n};\n\nexport type GetLpPoolDepthChartSimulationDataResult = DepthSimulationState;\n\nexport type SignatureData = {\n signature: string;\n timestamp: number;\n walletAddress: Address;\n message: string;\n};\n\nexport type SaveSignatureResult = {\n signatureSavedSuccessfully: boolean;\n};\n\n// --- Community ----\nexport type VoteDetailsEntity = {\n id: number;\n startDate: number; // timestamp in UTC milliseconds\n endDate: number; // timestamp in UTC milliseconds\n percentageToPass: number; // Example: 4%\n yesCount: number;\n noCount: number;\n voteCountToPass: number; // Example: 1453\n};\n\nexport type VoteStatusEntity = {\n votingPower: number;\n hasVoted: boolean;\n};\n\n// --- XP ----\nexport type XPEntity = {\n value: number;\n valueTimestampMilliseconds: number;\n rate: number;\n};\n\nexport type GetAccountLGEStatusParams = {\n address: string; // wallet address\n};\n\nexport type GetAccountLGEStatusResult = {\n xp: XPEntity;\n currentBoost: number;\n deposited: number;\n};\n\nexport type GetAccountTradingXPParams = {\n address: string; // wallet address\n};\n\nexport type GetAccountTradingXPResult = {\n xp: XPEntity;\n currentBoost: number;\n openBase: number;\n};\n\nexport type GetLGEBoostRateParams = void;\n\nexport type GetLGEBoostRateResult = number;\n\nexport type LeaderboardEntity = {\n address: string;\n currentBoost: number;\n liquidityXp: number;\n // current rank for user (fish, whale, shrimp)\n rank: number;\n // leaderboard ranking 1,2,3...1230,...\n ranking: number;\n tradingXp: number;\n};\n\nexport type UserLeaderboardDataEntity = {\n address: string;\n rank: number;\n claimedRank: number;\n currentRankPoints: number;\n nextRankPoints: number;\n ranking: number;\n liquidityXp: number;\n tradingXp: number;\n};\n\nexport type GetLeaderboardParams = {\n page: number;\n perPage: number;\n};\n\nexport type GetLeaderboardResult = LeaderboardEntity[];\n\nexport type ClaimRankParams = {\n address: string;\n};\n\nexport type ClaimRankResult = {\n success: boolean;\n};\n\nexport type GetUserLeaderboardDataParams = {\n address: string;\n};\n\nexport type GetUserLeaderboardDataResult = UserLeaderboardDataEntity;\n\nexport type TokenEntityWithMinValue = TokenEntity & {\n minDepositAmount: number;\n minWithdrawAmount: number;\n minTransferAmount: number;\n};\n\nexport type TokenInfo = {\n name: TokenName;\n address: Address;\n decimals: number;\n minDepositAmount: number;\n minWithdrawAmount: number;\n minTransferAmount: number;\n};\n"]}
|
|
@@ -10,6 +10,50 @@
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"ExecutionHelper": "0xA858f95c50240A6a28E5cd323869cE77ee7677Bd"
|
|
13
|
+
},
|
|
14
|
+
"USDT": {
|
|
15
|
+
"isAppChain": false,
|
|
16
|
+
"NonMintableToken": "0x4f8ecb190b9Ef36113127D97c7f9300875b6563F",
|
|
17
|
+
"ExecutionHelper": "0x4513F50921A0333f2067EBdB9369daa81BCfc24C",
|
|
18
|
+
"Vault": "0x792b49617491B936cbd61592f2c7d2E07D17e90d",
|
|
19
|
+
"connectors": {
|
|
20
|
+
"89346161": {
|
|
21
|
+
"FAST": "0xF873a063D74aE5F27AaC1ef6317095A383032775"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"DAI": {
|
|
26
|
+
"isAppChain": false,
|
|
27
|
+
"NonMintableToken": "0x35479b023e508Ee9A7B533Dbb5B516BB6875F937",
|
|
28
|
+
"ExecutionHelper": "0x60e04bAB3d82A16a7963bCD44b494BD9BBB5F8fB",
|
|
29
|
+
"Vault": "0x28ac26B4f6A4483D11Ad209F08F7b4DbB7364fD9",
|
|
30
|
+
"connectors": {
|
|
31
|
+
"89346161": {
|
|
32
|
+
"FAST": "0x6ec499b869716BB479a843cebe048A90ec6D343C"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"WETH": {
|
|
37
|
+
"isAppChain": false,
|
|
38
|
+
"NonMintableToken": "0x6c7a28F6ae2D245B0130520B112FA3544a06d9AE",
|
|
39
|
+
"ExecutionHelper": "0x4F04f092daf8e0e3F30e0dCc3947A08C409a730F",
|
|
40
|
+
"Vault": "0xA63b923825A49137107Da6893E37f64E83aFfd81",
|
|
41
|
+
"connectors": {
|
|
42
|
+
"89346161": {
|
|
43
|
+
"FAST": "0xd50426F73fd16d8D286c63EB8AE3838e0CeD6de1"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"WBTC": {
|
|
48
|
+
"isAppChain": false,
|
|
49
|
+
"NonMintableToken": "0x92c7a51BD507736AC0Dda48b5F35A4AaD0c2Bb4D",
|
|
50
|
+
"ExecutionHelper": "0xF65dE0C2dFE936159085ea8E0CeF6FAeff5C8c99",
|
|
51
|
+
"Vault": "0x0b7E87B305dE1fe6139E42f7f65736184057b073",
|
|
52
|
+
"connectors": {
|
|
53
|
+
"89346161": {
|
|
54
|
+
"FAST": "0xcB4064F135835dE26746Ff19C99808497f266A80"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
13
57
|
}
|
|
14
58
|
},
|
|
15
59
|
"421614": {
|
|
@@ -23,6 +67,50 @@
|
|
|
23
67
|
}
|
|
24
68
|
},
|
|
25
69
|
"ExecutionHelper": "0x4caE6101A2645AE58038Aeb04079621458b00753"
|
|
70
|
+
},
|
|
71
|
+
"USDT": {
|
|
72
|
+
"isAppChain": false,
|
|
73
|
+
"NonMintableToken": "0x66DFb9987C36c4be232156e70B085f664367599A",
|
|
74
|
+
"ExecutionHelper": "0x9838Fc33ea56F7664c677b1F2917c60d75a73BC6",
|
|
75
|
+
"Vault": "0x36580Ab5CC5db1E220e20156ad333Ef2229d1F2e",
|
|
76
|
+
"connectors": {
|
|
77
|
+
"89346161": {
|
|
78
|
+
"FAST": "0x1485BdF9fd30e32cAb4E608158D9604f4d8110f3"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"DAI": {
|
|
83
|
+
"isAppChain": false,
|
|
84
|
+
"NonMintableToken": "0x9a573B27D7298c6E2f4d2D4a41c37A0C8AF6accA",
|
|
85
|
+
"ExecutionHelper": "0xfD6d6D95eC911b2415F34C93d1a74e0c67E49370",
|
|
86
|
+
"Vault": "0x56aDAD63615A2605aF3F00C34DC4caD1AFaed5bF",
|
|
87
|
+
"connectors": {
|
|
88
|
+
"89346161": {
|
|
89
|
+
"FAST": "0x805Dc5ac616bCB1A59a446eb1777C0Cc3Aa0c3Fe"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"WETH": {
|
|
94
|
+
"isAppChain": false,
|
|
95
|
+
"NonMintableToken": "0x565810cbfa3Cf1390963E5aFa2fB953795686339",
|
|
96
|
+
"ExecutionHelper": "0x88618fD449836578a6FA6d19a256E21b7cac792b",
|
|
97
|
+
"Vault": "0xb72ef406330853C86e2Dbb003e422CaEe27E0Fcd",
|
|
98
|
+
"connectors": {
|
|
99
|
+
"89346161": {
|
|
100
|
+
"FAST": "0xA78426325b5e32Affd5f4Bc8ab6575B24DCB1762"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"WBTC": {
|
|
105
|
+
"isAppChain": false,
|
|
106
|
+
"NonMintableToken": "0x1019958C2BD43B882a4e1349337a32Ef9563FC4D",
|
|
107
|
+
"ExecutionHelper": "0x1486AA8436A2e6Dc2C4D52A795A84f657f236CB7",
|
|
108
|
+
"Vault": "0x2d1abA6FaBAe80bF5C1C9EA433AAe9030E07CB22",
|
|
109
|
+
"connectors": {
|
|
110
|
+
"89346161": {
|
|
111
|
+
"FAST": "0xDC0258dc3dB980090E97EbF4f1FD9Cc3C5AD5894"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
26
114
|
}
|
|
27
115
|
},
|
|
28
116
|
"11155111": {
|
|
@@ -36,6 +124,50 @@
|
|
|
36
124
|
}
|
|
37
125
|
},
|
|
38
126
|
"ExecutionHelper": "0x4F3e01e8f7d0224b5988Cb0FBf7f6D156B9255cD"
|
|
127
|
+
},
|
|
128
|
+
"USDT": {
|
|
129
|
+
"isAppChain": false,
|
|
130
|
+
"NonMintableToken": "0xB4130e87A180b9448286B291331aEe8A9C154A3A",
|
|
131
|
+
"ExecutionHelper": "0xAE3dd4C0E3cA6823Cdbe9641B1938551cCb25a2d",
|
|
132
|
+
"Vault": "0xF9791c6AC0253005616A91dF42Ee59A699651d67",
|
|
133
|
+
"connectors": {
|
|
134
|
+
"89346161": {
|
|
135
|
+
"FAST": "0x3694Ab37011764fA64A648C2d5d6aC0E9cD5F98e"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"DAI": {
|
|
140
|
+
"isAppChain": false,
|
|
141
|
+
"NonMintableToken": "0x255745E5C7Ae620b7f523F5E4A0Ead37660EC5d6",
|
|
142
|
+
"ExecutionHelper": "0xE00321E336691AC3A9Ac2d1a02970d22FE8861cF",
|
|
143
|
+
"Vault": "0x530654F6e96198bC269074156b321d8B91d10366",
|
|
144
|
+
"connectors": {
|
|
145
|
+
"89346161": {
|
|
146
|
+
"FAST": "0xd95c5254Df051f378696100a7D7f29505e5cF5c9"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"WETH": {
|
|
151
|
+
"isAppChain": false,
|
|
152
|
+
"NonMintableToken": "0x771d1Ae208377453D478dF08BbC38034F72aC833",
|
|
153
|
+
"ExecutionHelper": "0xffC2D8f660a5CC41273f1Db714EaEcd19D28d147",
|
|
154
|
+
"Vault": "0x4caE6101A2645AE58038Aeb04079621458b00753",
|
|
155
|
+
"connectors": {
|
|
156
|
+
"89346161": {
|
|
157
|
+
"FAST": "0x858f61B6DE2edBF4d79e3B4baEB00b80cC146251"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"WBTC": {
|
|
162
|
+
"isAppChain": false,
|
|
163
|
+
"NonMintableToken": "0x94BEff5da6201cB2C8F489196FD970B3DF5aA32A",
|
|
164
|
+
"ExecutionHelper": "0x1019958C2BD43B882a4e1349337a32Ef9563FC4D",
|
|
165
|
+
"Vault": "0x9838Fc33ea56F7664c677b1F2917c60d75a73BC6",
|
|
166
|
+
"connectors": {
|
|
167
|
+
"89346161": {
|
|
168
|
+
"FAST": "0x36580Ab5CC5db1E220e20156ad333Ef2229d1F2e"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
39
171
|
}
|
|
40
172
|
},
|
|
41
173
|
"11155420": {
|
|
@@ -49,6 +181,50 @@
|
|
|
49
181
|
}
|
|
50
182
|
},
|
|
51
183
|
"ExecutionHelper": "0xD664eF6159562190ea6D1AFa3f0Ea1C0D77D14E3"
|
|
184
|
+
},
|
|
185
|
+
"USDT": {
|
|
186
|
+
"isAppChain": false,
|
|
187
|
+
"NonMintableToken": "0x2d1abA6FaBAe80bF5C1C9EA433AAe9030E07CB22",
|
|
188
|
+
"ExecutionHelper": "0x20b2c1F9E555C424ed4F8D3079A9E784dAEA6770",
|
|
189
|
+
"Vault": "0xe0510E14D9ebE633872d485278D0f3e2bD5DDb3a",
|
|
190
|
+
"connectors": {
|
|
191
|
+
"89346161": {
|
|
192
|
+
"FAST": "0xBd79f26d3c86A19290e1745b433611399c5d54b2"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"DAI": {
|
|
197
|
+
"isAppChain": false,
|
|
198
|
+
"NonMintableToken": "0xDC0258dc3dB980090E97EbF4f1FD9Cc3C5AD5894",
|
|
199
|
+
"ExecutionHelper": "0xDc336B079BD0D39AE27011df648e103a472A1390",
|
|
200
|
+
"Vault": "0x3c903b4D5327C6665dE1EA64890399381C280dB5",
|
|
201
|
+
"connectors": {
|
|
202
|
+
"89346161": {
|
|
203
|
+
"FAST": "0x04fB309B00e82d0265D057785b1d18F771F4402A"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"WETH": {
|
|
208
|
+
"isAppChain": false,
|
|
209
|
+
"NonMintableToken": "0x2b42AFFD4b7C14d9B7C2579229495c052672Ccd3",
|
|
210
|
+
"ExecutionHelper": "0x10849E7Efb9F1EDC7Ce80D3cC6117E6A30D33D22",
|
|
211
|
+
"Vault": "0xF5D4ea96d2efbdAB9C63fA85d2c45e8B75dF640c",
|
|
212
|
+
"connectors": {
|
|
213
|
+
"89346161": {
|
|
214
|
+
"FAST": "0xC53D91C6D595b4259fa5649d77e1e31E648202A3"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"WBTC": {
|
|
219
|
+
"isAppChain": false,
|
|
220
|
+
"NonMintableToken": "0xfC5CC93d85861ac82d89fc2D3e56315540E9C8A7",
|
|
221
|
+
"ExecutionHelper": "0x8d422bb223EDe166A6Ca821Fb472e07B446a243b",
|
|
222
|
+
"Vault": "0x1156bAFb7c72bfFC963038E5C65E8531F15a4a21",
|
|
223
|
+
"connectors": {
|
|
224
|
+
"89346161": {
|
|
225
|
+
"FAST": "0xd21109653316B21853e3FAB84E4C1E06B9Ee4429"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
52
228
|
}
|
|
53
229
|
},
|
|
54
230
|
"89346161": {
|
|
@@ -72,6 +248,90 @@
|
|
|
72
248
|
}
|
|
73
249
|
},
|
|
74
250
|
"ExecutionHelper": "0xB6fb3062405985F700fa23758A3053162ddBeFb9"
|
|
251
|
+
},
|
|
252
|
+
"USDT": {
|
|
253
|
+
"isAppChain": true,
|
|
254
|
+
"MintableToken": "0x9ADe781DacBD220f0161D98F496A2982b231A9d6",
|
|
255
|
+
"ExchangeRate": "0x1Aba89fC7ff67D27ccaa51893c46FD1e5fEE924B",
|
|
256
|
+
"ExecutionHelper": "0x0fd9F11B9C54a9F100234EeEf9ee7873d73C2204",
|
|
257
|
+
"Controller": "0xE0361B2b4B1511e4a805086216011D0786747cCD",
|
|
258
|
+
"connectors": {
|
|
259
|
+
"80001": {
|
|
260
|
+
"FAST": "0x4C9faD010D8be90Aba505c85eacc483dFf9b8Fa9"
|
|
261
|
+
},
|
|
262
|
+
"421614": {
|
|
263
|
+
"FAST": "0x1281C1464449DB73bdAa30928BCC63Dc25D8D187"
|
|
264
|
+
},
|
|
265
|
+
"11155111": {
|
|
266
|
+
"FAST": "0x19609EeE157BC38E1A40E19c38218fC3900d97ac"
|
|
267
|
+
},
|
|
268
|
+
"11155420": {
|
|
269
|
+
"FAST": "0x771d1Ae208377453D478dF08BbC38034F72aC833"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"DAI": {
|
|
274
|
+
"isAppChain": true,
|
|
275
|
+
"MintableToken": "0x733299259C45726EE1bfc9bD0deebA58e48a1853",
|
|
276
|
+
"ExchangeRate": "0x1Aba89fC7ff67D27ccaa51893c46FD1e5fEE924B",
|
|
277
|
+
"ExecutionHelper": "0x58900B39387633A0a0C80D1dBDFe879F20b4F2fb",
|
|
278
|
+
"Controller": "0x316945A9384824A0fc86d9BE779b76456f045ad6",
|
|
279
|
+
"connectors": {
|
|
280
|
+
"80001": {
|
|
281
|
+
"FAST": "0x33BE2a7CF4Bb94d28131116F840d313Cab1eD2DA"
|
|
282
|
+
},
|
|
283
|
+
"421614": {
|
|
284
|
+
"FAST": "0x97c6031ff915b570A6A6cBEF4b6f94C2112f9416"
|
|
285
|
+
},
|
|
286
|
+
"11155111": {
|
|
287
|
+
"FAST": "0x201c8d3AC4C261690e7C42A26bA49e614585c0D1"
|
|
288
|
+
},
|
|
289
|
+
"11155420": {
|
|
290
|
+
"FAST": "0x031c67Ee65e508E96c184Fc8D8559B50CedeBaa9"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"WETH": {
|
|
295
|
+
"isAppChain": true,
|
|
296
|
+
"MintableToken": "0xC123B7aEb9D2B2e8a035217d5C29e317c91842E2",
|
|
297
|
+
"ExchangeRate": "0x1Aba89fC7ff67D27ccaa51893c46FD1e5fEE924B",
|
|
298
|
+
"ExecutionHelper": "0xe22541aBaE4235909d70ac79f4D774Ad443008aa",
|
|
299
|
+
"Controller": "0x7D0e65D8914Dbd4259c6D430b79E5aEc2B08De9a",
|
|
300
|
+
"connectors": {
|
|
301
|
+
"80001": {
|
|
302
|
+
"FAST": "0x73019b64e31e699fFd27d54E91D686313C14191C"
|
|
303
|
+
},
|
|
304
|
+
"421614": {
|
|
305
|
+
"FAST": "0x7b9ed5C43E87DAFB03211651d4FA41fEa1Eb9b3D"
|
|
306
|
+
},
|
|
307
|
+
"11155111": {
|
|
308
|
+
"FAST": "0xfD5849d46CE6Bac16C4BD39bA78638e9e9091b2c"
|
|
309
|
+
},
|
|
310
|
+
"11155420": {
|
|
311
|
+
"FAST": "0x43193BF7bDacDFB4DE655AeaA0e62cce7900b1cb"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"WBTC": {
|
|
316
|
+
"isAppChain": true,
|
|
317
|
+
"MintableToken": "0xD382E2F0dF859ff9E82F963dcad1Aaee939c5E4F",
|
|
318
|
+
"ExchangeRate": "0x1Aba89fC7ff67D27ccaa51893c46FD1e5fEE924B",
|
|
319
|
+
"ExecutionHelper": "0x8d169dA827971aC5CEed406d3195614e297c648F",
|
|
320
|
+
"Controller": "0xBdE9e687F3A23Ebbc972c58D510dfc1f58Fb35EF",
|
|
321
|
+
"connectors": {
|
|
322
|
+
"80001": {
|
|
323
|
+
"FAST": "0xe821234B2e1B66F23e3bA48b50E7cFD2724ba971"
|
|
324
|
+
},
|
|
325
|
+
"421614": {
|
|
326
|
+
"FAST": "0xFc1e42b0C3Ff8d69FBe639a6a674fF5f0FcE778D"
|
|
327
|
+
},
|
|
328
|
+
"11155111": {
|
|
329
|
+
"FAST": "0xaf33761742beF3B7d0D0726671660CCF260fc5c3"
|
|
330
|
+
},
|
|
331
|
+
"11155420": {
|
|
332
|
+
"FAST": "0xC50Abb760555f73CCCa8C4D4ff56D4Bd4AAAAfC9"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
75
335
|
}
|
|
76
336
|
}
|
|
77
337
|
}
|
package/dist/utils/token-info.js
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var _a;
|
|
3
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
15
|
exports.TOKEN_INFO = void 0;
|
|
5
16
|
var types_1 = require("../types");
|
|
17
|
+
var defaultTokenThresholds = {
|
|
18
|
+
minDepositAmount: 1,
|
|
19
|
+
minWithdrawAmount: 1,
|
|
20
|
+
minTransferAmount: 1,
|
|
21
|
+
};
|
|
6
22
|
exports.TOKEN_INFO = (_a = {},
|
|
7
23
|
/* ------------------------------------------------------ */
|
|
8
24
|
/* MAINNET */
|
|
@@ -14,64 +30,40 @@ exports.TOKEN_INFO = (_a = {},
|
|
|
14
30
|
/* TESTNET */
|
|
15
31
|
/* ------------------------------------------------------ */
|
|
16
32
|
_a[types_1.ReyaChainId.reyaCronos] = [
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'USDC',
|
|
24
|
-
address: '0x1b700a40a0707dd5f0bc31cbc57d730558e5714d',
|
|
25
|
-
decimals: 6,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'USDT',
|
|
29
|
-
address: '0x9ade781dacbd220f0161d98f496a2982b231a9d6',
|
|
30
|
-
decimals: 6,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: 'DAI',
|
|
34
|
-
address: '0x733299259c45726ee1bfc9bd0deeba58e48a1853',
|
|
35
|
-
decimals: 18,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: 'WETH',
|
|
39
|
-
address: '0xc123b7aeb9d2b2e8a035217d5c29e317c91842e2',
|
|
40
|
-
decimals: 18,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: 'WBTC',
|
|
44
|
-
address: '0xd382e2f0df859ff9e82f963dcad1aaee939c5e4f',
|
|
45
|
-
decimals: 8,
|
|
46
|
-
},
|
|
33
|
+
__assign({ name: 'RUSD', address: '0xcfbb14b2a2acb5779b6365a260e4a9d63a12100b', decimals: 6 }, defaultTokenThresholds),
|
|
34
|
+
__assign({ name: 'USDC', address: '0x1b700a40a0707dd5f0bc31cbc57d730558e5714d', decimals: 6 }, defaultTokenThresholds),
|
|
35
|
+
__assign({ name: 'USDT', address: '0x9ade781dacbd220f0161d98f496a2982b231a9d6', decimals: 6 }, defaultTokenThresholds),
|
|
36
|
+
__assign({ name: 'DAI', address: '0x733299259c45726ee1bfc9bd0deeba58e48a1853', decimals: 18 }, defaultTokenThresholds),
|
|
37
|
+
__assign({ name: 'WETH', address: '0xc123b7aeb9d2b2e8a035217d5c29e317c91842e2', decimals: 18 }, defaultTokenThresholds),
|
|
38
|
+
__assign({ name: 'WBTC', address: '0xd382e2f0df859ff9e82f963dcad1aaee939c5e4f', decimals: 8 }, defaultTokenThresholds),
|
|
47
39
|
],
|
|
48
40
|
_a[types_1.MoneyInOutChainId.polygonMumbai] = [
|
|
49
|
-
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
41
|
+
__assign({ name: 'USDC', address: '0xd9edcc943ed9729b08e52bb1e110fe43d1930773', decimals: 6 }, defaultTokenThresholds),
|
|
42
|
+
__assign({ name: 'USDT', address: '0x4f8ecb190b9ef36113127d97c7f9300875b6563f', decimals: 6 }, defaultTokenThresholds),
|
|
43
|
+
__assign({ name: 'DAI', address: '0x35479b023e508ee9a7b533dbb5b516bb6875f937', decimals: 18 }, defaultTokenThresholds),
|
|
44
|
+
__assign({ name: 'WETH', address: '0x6c7a28f6ae2d245b0130520b112fa3544a06d9ae', decimals: 18 }, defaultTokenThresholds),
|
|
45
|
+
__assign({ name: 'WBTC', address: '0x92c7a51bd507736ac0dda48b5f35a4aad0c2bb4d', decimals: 8 }, defaultTokenThresholds),
|
|
54
46
|
],
|
|
55
47
|
_a[types_1.MoneyInOutChainId.arbitrumSepolia] = [
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
48
|
+
__assign({ name: 'USDC', address: '0x8537307810fc40f4073a12a38554d4ff78efff41', decimals: 6 }, defaultTokenThresholds),
|
|
49
|
+
__assign({ name: 'USDT', address: '0x66dfb9987c36c4be232156e70b085f664367599a', decimals: 6 }, defaultTokenThresholds),
|
|
50
|
+
__assign({ name: 'DAI', address: '0x9a573b27d7298c6e2f4d2d4a41c37a0c8af6acca', decimals: 18 }, defaultTokenThresholds),
|
|
51
|
+
__assign({ name: 'WETH', address: '0x565810cbfa3cf1390963e5afa2fb953795686339', decimals: 18 }, defaultTokenThresholds),
|
|
52
|
+
__assign({ name: 'WBTC', address: '0x1019958c2bd43b882a4e1349337a32ef9563fc4d', decimals: 8 }, defaultTokenThresholds),
|
|
61
53
|
],
|
|
62
54
|
_a[types_1.MoneyInOutChainId.opSepolia] = [
|
|
63
|
-
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
55
|
+
__assign({ name: 'USDC', address: '0x6d290609b3f5f02d52f28d97c75a443ed8564cbf', decimals: 6 }, defaultTokenThresholds),
|
|
56
|
+
__assign({ name: 'USDT', address: '0x2d1aba6fabae80bf5c1c9ea433aae9030e07cb22', decimals: 6 }, defaultTokenThresholds),
|
|
57
|
+
__assign({ name: 'DAI', address: '0xdc0258dc3db980090e97ebf4f1fd9cc3c5ad5894', decimals: 18 }, defaultTokenThresholds),
|
|
58
|
+
__assign({ name: 'WETH', address: '0x2b42affd4b7c14d9b7c2579229495c052672ccd3', decimals: 18 }, defaultTokenThresholds),
|
|
59
|
+
__assign({ name: 'WBTC', address: '0xfc5cc93d85861ac82d89fc2d3e56315540e9c8a7', decimals: 8 }, defaultTokenThresholds),
|
|
68
60
|
],
|
|
69
61
|
_a[types_1.MoneyInOutChainId.ethereumSepolia] = [
|
|
70
|
-
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
62
|
+
__assign({ name: 'USDC', address: '0x565810cbfa3cf1390963e5afa2fb953795686339', decimals: 6 }, defaultTokenThresholds),
|
|
63
|
+
__assign({ name: 'USDT', address: '0xb4130e87a180b9448286b291331aee8a9c154a3a', decimals: 6 }, defaultTokenThresholds),
|
|
64
|
+
__assign({ name: 'DAI', address: '0x255745e5c7ae620b7f523f5e4a0ead37660ec5d6', decimals: 18 }, defaultTokenThresholds),
|
|
65
|
+
__assign({ name: 'WETH', address: '0x771d1ae208377453d478df08bbc38034f72ac833', decimals: 18 }, defaultTokenThresholds),
|
|
66
|
+
__assign({ name: 'WBTC', address: '0x94beff5da6201cb2c8f489196fd970b3df5aa32a', decimals: 8 }, defaultTokenThresholds),
|
|
75
67
|
],
|
|
76
68
|
_a);
|
|
77
69
|
//# sourceMappingURL=token-info.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-info.js","sourceRoot":"/","sources":["utils/token-info.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"token-info.js","sourceRoot":"/","sources":["utils/token-info.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kCAAqE;AAErE,IAAM,sBAAsB,GAGxB;IACF,gBAAgB,EAAE,CAAC;IACnB,iBAAiB,EAAE,CAAC;IACpB,iBAAiB,EAAE,CAAC;CACrB,CAAC;AAEW,QAAA,UAAU;IAEnB,4DAA4D;IAC5D,4DAA4D;IAC5D,4DAA4D;IAC5D,GAAC,mBAAW,CAAC,WAAW,IAAG;IACzB,OAAO;KACR;IAED,4DAA4D;IAC5D,4DAA4D;IAC5D,4DAA4D;IAC5D,GAAC,mBAAW,CAAC,UAAU,IAAG;mBAEtB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,IACR,sBAAsB;mBAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,IACR,sBAAsB;mBAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,IACR,sBAAsB;mBAGzB,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,IACT,sBAAs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BAE3B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,IACR,sBAAsB;mBAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,IACR,sBAAsB;mBAGzB,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,IACT,sBAAsB;mBAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,IACT,sBAAsB;mBAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,IACR,sBAAsB;KAE5B;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;mBAEjC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,IACR,sBAAsB;mBAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,IACR,sBAAsB;mBAGzB,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,IACT,sBAAsB;mBAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,IACT,sBAAsB;mBAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,IACR,sBAAsB;KAE5B;QACD","sourcesContent":["import { MoneyInOutChainId, ReyaChainId, TokenInfo } from '../types';\n\nconst defaultTokenThresholds: Pick<\n TokenInfo,\n 'minDepositAmount' | 'minWithdrawAmount' | 'minTransferAmount'\n> = {\n minDepositAmount: 1,\n minWithdrawAmount: 1,\n minTransferAmount: 1,\n};\n\nexport const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =\n {\n /* ------------------------------------------------------ */\n /* MAINNET */\n /* ------------------------------------------------------ */\n [ReyaChainId.reyaNetwork]: [\n // todo\n ],\n\n /* ------------------------------------------------------ */\n /* TESTNET */\n /* ------------------------------------------------------ */\n [ReyaChainId.reyaCronos]: [\n {\n name: 'RUSD',\n address: '0xcfbb14b2a2acb5779b6365a260e4a9d63a12100b',\n decimals: 6,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDC',\n address: '0x1b700a40a0707dd5f0bc31cbc57d730558e5714d',\n decimals: 6,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDT',\n address: '0x9ade781dacbd220f0161d98f496a2982b231a9d6',\n decimals: 6,\n ...defaultTokenThresholds,\n },\n {\n name: 'DAI',\n address: '0x733299259c45726ee1bfc9bd0deeba58e48a1853',\n decimals: 18,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0xc123b7aeb9d2b2e8a035217d5c29e317c91842e2',\n decimals: 18,\n ...defaultTokenThresholds,\n },\n {\n name: 'WBTC',\n address: '0xd382e2f0df859ff9e82f963dcad1aaee939c5e4f',\n decimals: 8,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.polygonMumbai]: [\n {\n name: 'USDC',\n address: '0xd9edcc943ed9729b08e52bb1e110fe43d1930773',\n decimals: 6,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDT',\n address: '0x4f8ecb190b9ef36113127d97c7f9300875b6563f',\n decimals: 6,\n ...defaultTokenThresholds,\n },\n {\n name: 'DAI',\n address: '0x35479b023e508ee9a7b533dbb5b516bb6875f937',\n decimals: 18,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x6c7a28f6ae2d245b0130520b112fa3544a06d9ae',\n decimals: 18,\n ...defaultTokenThresholds,\n },\n {\n name: 'WBTC',\n address: '0x92c7a51bd507736ac0dda48b5f35a4aad0c2bb4d',\n decimals: 8,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.arbitrumSepolia]: [\n {\n name: 'USDC',\n address: '0x8537307810fc40f4073a12a38554d4ff78efff41',\n decimals: 6,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDT',\n address: '0x66dfb9987c36c4be232156e70b085f664367599a',\n decimals: 6,\n ...defaultTokenThresholds,\n },\n {\n name: 'DAI',\n address: '0x9a573b27d7298c6e2f4d2d4a41c37a0c8af6acca',\n decimals: 18,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x565810cbfa3cf1390963e5afa2fb953795686339',\n decimals: 18,\n ...defaultTokenThresholds,\n },\n {\n name: 'WBTC',\n address: '0x1019958c2bd43b882a4e1349337a32ef9563fc4d',\n decimals: 8,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.opSepolia]: [\n {\n name: 'USDC',\n address: '0x6d290609b3f5f02d52f28d97c75a443ed8564cbf',\n decimals: 6,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDT',\n address: '0x2d1aba6fabae80bf5c1c9ea433aae9030e07cb22',\n decimals: 6,\n ...defaultTokenThresholds,\n },\n {\n name: 'DAI',\n address: '0xdc0258dc3db980090e97ebf4f1fd9cc3c5ad5894',\n decimals: 18,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x2b42affd4b7c14d9b7c2579229495c052672ccd3',\n decimals: 18,\n ...defaultTokenThresholds,\n },\n {\n name: 'WBTC',\n address: '0xfc5cc93d85861ac82d89fc2d3e56315540e9c8a7',\n decimals: 8,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.ethereumSepolia]: [\n {\n name: 'USDC',\n address: '0x565810cbfa3cf1390963e5afa2fb953795686339',\n decimals: 6,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDT',\n address: '0xb4130e87a180b9448286b291331aee8a9c154a3a',\n decimals: 6,\n ...defaultTokenThresholds,\n },\n {\n name: 'DAI',\n address: '0x255745e5c7ae620b7f523f5e4a0ead37660ec5d6',\n decimals: 18,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x771d1ae208377453d478df08bbc38034f72ac833',\n decimals: 18,\n ...defaultTokenThresholds,\n },\n {\n name: 'WBTC',\n address: '0x94beff5da6201cb2c8f489196fd970b3df5aa32a',\n decimals: 8,\n ...defaultTokenThresholds,\n },\n ],\n };\n"]}
|
package/dist/utils/token.js
CHANGED
|
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.getERC20Balance = exports.getERC20Allowance = exports.getTokenInfoByName = exports.getTokenInfoByAddress = exports.convertToAddress = exports.getERC20TokenContract = exports.scale = exports.descale = void 0;
|
|
39
|
+
exports.getERC20Balance = exports.getERC20Allowance = exports.getTokenInfosByChain = exports.getTokenInfoByName = exports.getTokenInfoByAddress = exports.convertToAddress = exports.getERC20TokenContract = exports.scale = exports.descale = void 0;
|
|
40
40
|
var ethers_1 = require("ethers");
|
|
41
41
|
var ethers_2 = require("ethers");
|
|
42
42
|
var token_info_1 = require("./token-info");
|
|
@@ -113,6 +113,10 @@ var getTokenInfoByName = function (tokenName, chainId) {
|
|
|
113
113
|
return tokenInfo;
|
|
114
114
|
};
|
|
115
115
|
exports.getTokenInfoByName = getTokenInfoByName;
|
|
116
|
+
var getTokenInfosByChain = function (chainId) {
|
|
117
|
+
return token_info_1.TOKEN_INFO[chainId];
|
|
118
|
+
};
|
|
119
|
+
exports.getTokenInfosByChain = getTokenInfosByChain;
|
|
116
120
|
var getERC20Allowance = function (_a) {
|
|
117
121
|
var walletAddress = _a.walletAddress, tokenAddress = _a.tokenAddress, spenderAddress = _a.spenderAddress, subject = _a.subject;
|
|
118
122
|
return __awaiter(void 0, void 0, void 0, function () {
|
package/dist/utils/token.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token.js","sourceRoot":"/","sources":["utils/token.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;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AAC,CAAC,CAAC;oBAEjD,qBAAM,IAAA,0BAAkB,EAAC;4BAC9C,OAAA,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;wBAA9B,CAA8B,CAC/B,EAAA;;oBAFK,cAAc,GAAG,SAEtB;oBAED,sBAAO,IAAA,eAAO,EAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,cAAc,CAAC,EAAC;;;;CACpD,CAAC;AAdW,QAAA,eAAe,mBAc1B","sourcesContent":["import { ethers } from 'ethers';\n\nimport { Contract, Signer } from 'ethers';\nimport { TOKEN_INFO } from './token-info';\nimport { exponentialBackoff } from './retry';\nimport {\n Address,\n GetERC20AllowanceParams,\n MoneyInOutChainId,\n ReyaChainId,\n TokenInfo,\n TokenName,\n} from '../types';\n\nexport const descale = (tokenDecimals: number) => {\n const f = (value: bigint) => {\n return Number(ethers.formatUnits(value.toString(), tokenDecimals));\n };\n\n return f;\n};\n\nexport const scale = (tokenDecimals: number): ((value: number) => bigint) => {\n return (value: number): bigint => {\n // Convert the number to a string\n const valueStr = value.toString();\n // Split the string into whole and fractional parts\n // eslint-disable-next-line prefer-const\n let [whole, fractional = ''] = valueStr.split('.');\n // Ensure the fractional part is the correct length, padding with zeros if necessary\n fractional = fractional\n .padEnd(tokenDecimals, '0')\n .substring(0, tokenDecimals);\n // Concatenate the whole part with the correctly length-limited fractional part\n const scaledValueStr = whole + fractional;\n // Convert the concatenated string to a BigInt, assuming it represents a value in wei (or equivalent smallest unit)\n // This is safe as we're not losing precision - just scaling the number to its smallest unit representation\n return BigInt(scaledValueStr);\n };\n};\n\nexport const getERC20TokenContract = (\n tokenAddress: string,\n subject: Signer,\n): Contract => {\n const abi: string[] = [\n `function approve(address, uint256) external returns (bool)`,\n `function balanceOf(address) external view returns (uint256)`,\n `function allowance(address,address) external view returns (uint256)`,\n `function approve(address,uint256) external returns (bool)`,\n ];\n\n const contract = new Contract(tokenAddress, abi, subject);\n\n return contract;\n};\n\nexport const convertToAddress = (str: string): Address => {\n return str.toLowerCase() as Address;\n};\n\nexport const getTokenInfoByAddress = (\n tokenAddressParam: Address | string,\n chainId?: ReyaChainId | MoneyInOutChainId,\n): TokenInfo => {\n const tokenAddress =\n typeof tokenAddressParam === 'string'\n ? convertToAddress(tokenAddressParam)\n : tokenAddressParam;\n\n if (chainId) {\n const tokenInfo = TOKEN_INFO[chainId].find(\n (tokenInfo) => tokenInfo.address === tokenAddress,\n );\n if (!tokenInfo) {\n throw new Error(\n `getTokenInfoByAddress: no token info found [chainId ${chainId}, token address ${tokenAddress}]`,\n );\n }\n return tokenInfo;\n } else {\n for (const chainId in TOKEN_INFO) {\n const tokenInfos =\n TOKEN_INFO[chainId as unknown as keyof typeof TOKEN_INFO];\n const tokenInfo = tokenInfos.find(\n (tokenInfo) => tokenInfo.address === tokenAddress,\n );\n if (tokenInfo) {\n return tokenInfo;\n }\n }\n throw new Error(\n `getTokenInfoByAddress: no token info found [token address ${tokenAddress}]`,\n );\n }\n};\n\nexport const getTokenInfoByName = (\n tokenName: TokenName,\n chainId: ReyaChainId | MoneyInOutChainId,\n): TokenInfo => {\n const tokenInfo = TOKEN_INFO[chainId].find(\n (tokenInfo) => tokenInfo.name === tokenName,\n );\n\n if (!tokenInfo) {\n throw new Error(\n `getTokenInfoByName: no token info found [chain id ${chainId}, token name ${tokenName}]`,\n );\n }\n\n return tokenInfo;\n};\n\nexport const getERC20Allowance = async ({\n walletAddress,\n tokenAddress,\n spenderAddress,\n subject,\n}: GetERC20AllowanceParams): Promise<number> => {\n const tokenContract = getERC20TokenContract(tokenAddress, subject);\n const tokenInfo = getTokenInfoByAddress(tokenAddress);\n\n const allowance = await exponentialBackoff(() =>\n tokenContract.allowance(walletAddress, spenderAddress),\n );\n\n return BigInt(allowance) > scale(tokenInfo.decimals)(Number.MAX_SAFE_INTEGER)\n ? Number.MAX_SAFE_INTEGER\n : descale(tokenInfo.decimals)(allowance);\n};\n\nexport type GetERC20BalanceArgs = {\n tokenAddress: string;\n walletAddress: string;\n subject: Signer;\n};\n\nexport const getERC20Balance = async ({\n tokenAddress,\n walletAddress,\n subject,\n}: GetERC20BalanceArgs): Promise<number> => {\n const token = getERC20TokenContract(tokenAddress, subject);\n\n const tokenInfo = getTokenInfoByAddress(convertToAddress(tokenAddress));\n\n const currentBalance = await exponentialBackoff(() =>\n token.balanceOf(walletAddress),\n );\n\n return descale(tokenInfo.decimals)(currentBalance);\n};\n"]}
|
|
1
|
+
{"version":3,"file":"token.js","sourceRoot":"/","sources":["utils/token.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAgC;AAEhC,iCAA0C;AAC1C,2CAA0C;AAC1C,iCAA6C;AAUtC,IAAM,OAAO,GAAG,UAAC,aAAqB;IAC3C,IAAM,CAAC,GAAG,UAAC,KAAa;QACtB,OAAO,MAAM,CAAC,eAAM,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC;IACrE,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AANW,QAAA,OAAO,WAMlB;AAEK,IAAM,KAAK,GAAG,UAAC,aAAqB;IACzC,OAAO,UAAC,KAAa;QACnB,iCAAiC;QACjC,IAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAClC,mDAAmD;QACnD,wCAAwC;QACpC,IAAA,KAA2B,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAA7C,KAAK,QAAA,EAAE,UAAe,EAAf,UAAU,mBAAG,EAAE,KAAuB,CAAC;QACnD,oFAAoF;QACpF,UAAU,GAAG,UAAU;aACpB,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC;aAC1B,SAAS,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;QAC/B,+EAA+E;QAC/E,IAAM,cAAc,GAAG,KAAK,GAAG,UAAU,CAAC;QAC1C,mHAAmH;QACnH,2GAA2G;QAC3G,OAAO,MAAM,CAAC,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aAAK,EAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC;4BAC3E,CAAC,CAAC,MAAM,CAAC,gBAAgB;4BACzB,CAAC,CAAC,IAAA,eAAO,EAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAC;;;;CAC5C,CAAC;AAhBW,QAAA,iBAAiB,qBAgB5B;AAQK,IAAM,eAAe,GAAG,UAAO,EAIhB;QAHpB,YAAY,kBAAA,EACZ,aAAa,mBAAA,EACb,OAAO,aAAA;;;;;;oBAED,KAAK,GAAG,IAAA,6BAAqB,EAAC,YAAY,EAAE,OAAO,CAAC,CAAC;oBAErD,SAAS,GAAG,IAAA,6BAAqB,EAAC,IAAA,wBAAgB,EAAC,YAAY,CAAC,CAAC,CAAC;oBAEjD,qBAAM,IAAA,0BAAkB,EAAC;4BAC9C,OAAA,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;wBAA9B,CAA8B,CAC/B,EAAA;;oBAFK,cAAc,GAAG,SAEtB;oBAED,sBAAO,IAAA,eAAO,EAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,cAAc,CAAC,EAAC;;;;CACpD,CAAC;AAdW,QAAA,eAAe,mBAc1B","sourcesContent":["import { ethers } from 'ethers';\n\nimport { Contract, Signer } from 'ethers';\nimport { TOKEN_INFO } from './token-info';\nimport { exponentialBackoff } from './retry';\nimport {\n Address,\n GetERC20AllowanceParams,\n MoneyInOutChainId,\n ReyaChainId,\n TokenInfo,\n TokenName,\n} from '../types';\n\nexport const descale = (tokenDecimals: number) => {\n const f = (value: bigint) => {\n return Number(ethers.formatUnits(value.toString(), tokenDecimals));\n };\n\n return f;\n};\n\nexport const scale = (tokenDecimals: number): ((value: number) => bigint) => {\n return (value: number): bigint => {\n // Convert the number to a string\n const valueStr = value.toString();\n // Split the string into whole and fractional parts\n // eslint-disable-next-line prefer-const\n let [whole, fractional = ''] = valueStr.split('.');\n // Ensure the fractional part is the correct length, padding with zeros if necessary\n fractional = fractional\n .padEnd(tokenDecimals, '0')\n .substring(0, tokenDecimals);\n // Concatenate the whole part with the correctly length-limited fractional part\n const scaledValueStr = whole + fractional;\n // Convert the concatenated string to a BigInt, assuming it represents a value in wei (or equivalent smallest unit)\n // This is safe as we're not losing precision - just scaling the number to its smallest unit representation\n return BigInt(scaledValueStr);\n };\n};\n\nexport const getERC20TokenContract = (\n tokenAddress: string,\n subject: Signer,\n): Contract => {\n const abi: string[] = [\n `function approve(address, uint256) external returns (bool)`,\n `function balanceOf(address) external view returns (uint256)`,\n `function allowance(address,address) external view returns (uint256)`,\n `function approve(address,uint256) external returns (bool)`,\n ];\n\n const contract = new Contract(tokenAddress, abi, subject);\n\n return contract;\n};\n\nexport const convertToAddress = (str: string): Address => {\n return str.toLowerCase() as Address;\n};\n\nexport const getTokenInfoByAddress = (\n tokenAddressParam: Address | string,\n chainId?: ReyaChainId | MoneyInOutChainId,\n): TokenInfo => {\n const tokenAddress =\n typeof tokenAddressParam === 'string'\n ? convertToAddress(tokenAddressParam)\n : tokenAddressParam;\n\n if (chainId) {\n const tokenInfo = TOKEN_INFO[chainId].find(\n (tokenInfo) => tokenInfo.address === tokenAddress,\n );\n if (!tokenInfo) {\n throw new Error(\n `getTokenInfoByAddress: no token info found [chainId ${chainId}, token address ${tokenAddress}]`,\n );\n }\n return tokenInfo;\n } else {\n for (const chainId in TOKEN_INFO) {\n const tokenInfos =\n TOKEN_INFO[chainId as unknown as keyof typeof TOKEN_INFO];\n const tokenInfo = tokenInfos.find(\n (tokenInfo) => tokenInfo.address === tokenAddress,\n );\n if (tokenInfo) {\n return tokenInfo;\n }\n }\n throw new Error(\n `getTokenInfoByAddress: no token info found [token address ${tokenAddress}]`,\n );\n }\n};\n\nexport const getTokenInfoByName = (\n tokenName: TokenName,\n chainId: ReyaChainId | MoneyInOutChainId,\n): TokenInfo => {\n const tokenInfo = TOKEN_INFO[chainId].find(\n (tokenInfo) => tokenInfo.name === tokenName,\n );\n\n if (!tokenInfo) {\n throw new Error(\n `getTokenInfoByName: no token info found [chain id ${chainId}, token name ${tokenName}]`,\n );\n }\n\n return tokenInfo;\n};\n\nexport const getTokenInfosByChain = (\n chainId: ReyaChainId | MoneyInOutChainId,\n): TokenInfo[] => {\n return TOKEN_INFO[chainId];\n};\n\nexport const getERC20Allowance = async ({\n walletAddress,\n tokenAddress,\n spenderAddress,\n subject,\n}: GetERC20AllowanceParams): Promise<number> => {\n const tokenContract = getERC20TokenContract(tokenAddress, subject);\n const tokenInfo = getTokenInfoByAddress(tokenAddress);\n\n const allowance = await exponentialBackoff(() =>\n tokenContract.allowance(walletAddress, spenderAddress),\n );\n\n return BigInt(allowance) > scale(tokenInfo.decimals)(Number.MAX_SAFE_INTEGER)\n ? Number.MAX_SAFE_INTEGER\n : descale(tokenInfo.decimals)(allowance);\n};\n\nexport type GetERC20BalanceArgs = {\n tokenAddress: string;\n walletAddress: string;\n subject: Signer;\n};\n\nexport const getERC20Balance = async ({\n tokenAddress,\n walletAddress,\n subject,\n}: GetERC20BalanceArgs): Promise<number> => {\n const token = getERC20TokenContract(tokenAddress, subject);\n\n const tokenInfo = getTokenInfoByAddress(convertToAddress(tokenAddress));\n\n const currentBalance = await exponentialBackoff(() =>\n token.balanceOf(walletAddress),\n );\n\n return descale(tokenInfo.decimals)(currentBalance);\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/common",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"generate:coverage-badges": "npx istanbul-badges-readme --silent"
|
|
43
43
|
},
|
|
44
44
|
"packageManager": "pnpm@8.10.4",
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "f24123eb4d3297b27388606da51290d1754a8b70"
|
|
46
46
|
}
|
package/src/types.ts
CHANGED
|
@@ -431,19 +431,74 @@ export type GetAccountLGEStatusResult = {
|
|
|
431
431
|
deposited: number;
|
|
432
432
|
};
|
|
433
433
|
|
|
434
|
+
export type GetAccountTradingXPParams = {
|
|
435
|
+
address: string; // wallet address
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
export type GetAccountTradingXPResult = {
|
|
439
|
+
xp: XPEntity;
|
|
440
|
+
currentBoost: number;
|
|
441
|
+
openBase: number;
|
|
442
|
+
};
|
|
443
|
+
|
|
434
444
|
export type GetLGEBoostRateParams = void;
|
|
435
445
|
|
|
436
446
|
export type GetLGEBoostRateResult = number;
|
|
437
447
|
|
|
448
|
+
export type LeaderboardEntity = {
|
|
449
|
+
address: string;
|
|
450
|
+
currentBoost: number;
|
|
451
|
+
liquidityXp: number;
|
|
452
|
+
// current rank for user (fish, whale, shrimp)
|
|
453
|
+
rank: number;
|
|
454
|
+
// leaderboard ranking 1,2,3...1230,...
|
|
455
|
+
ranking: number;
|
|
456
|
+
tradingXp: number;
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
export type UserLeaderboardDataEntity = {
|
|
460
|
+
address: string;
|
|
461
|
+
rank: number;
|
|
462
|
+
claimedRank: number;
|
|
463
|
+
currentRankPoints: number;
|
|
464
|
+
nextRankPoints: number;
|
|
465
|
+
ranking: number;
|
|
466
|
+
liquidityXp: number;
|
|
467
|
+
tradingXp: number;
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
export type GetLeaderboardParams = {
|
|
471
|
+
page: number;
|
|
472
|
+
perPage: number;
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
export type GetLeaderboardResult = LeaderboardEntity[];
|
|
476
|
+
|
|
477
|
+
export type ClaimRankParams = {
|
|
478
|
+
address: string;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
export type ClaimRankResult = {
|
|
482
|
+
success: boolean;
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
export type GetUserLeaderboardDataParams = {
|
|
486
|
+
address: string;
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
export type GetUserLeaderboardDataResult = UserLeaderboardDataEntity;
|
|
490
|
+
|
|
438
491
|
export type TokenEntityWithMinValue = TokenEntity & {
|
|
439
492
|
minDepositAmount: number;
|
|
440
493
|
minWithdrawAmount: number;
|
|
441
494
|
minTransferAmount: number;
|
|
442
|
-
stepSize: number;
|
|
443
495
|
};
|
|
444
496
|
|
|
445
497
|
export type TokenInfo = {
|
|
446
498
|
name: TokenName;
|
|
447
499
|
address: Address;
|
|
448
500
|
decimals: number;
|
|
501
|
+
minDepositAmount: number;
|
|
502
|
+
minWithdrawAmount: number;
|
|
503
|
+
minTransferAmount: number;
|
|
449
504
|
};
|
|
@@ -10,6 +10,50 @@
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"ExecutionHelper": "0xA858f95c50240A6a28E5cd323869cE77ee7677Bd"
|
|
13
|
+
},
|
|
14
|
+
"USDT": {
|
|
15
|
+
"isAppChain": false,
|
|
16
|
+
"NonMintableToken": "0x4f8ecb190b9Ef36113127D97c7f9300875b6563F",
|
|
17
|
+
"ExecutionHelper": "0x4513F50921A0333f2067EBdB9369daa81BCfc24C",
|
|
18
|
+
"Vault": "0x792b49617491B936cbd61592f2c7d2E07D17e90d",
|
|
19
|
+
"connectors": {
|
|
20
|
+
"89346161": {
|
|
21
|
+
"FAST": "0xF873a063D74aE5F27AaC1ef6317095A383032775"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"DAI": {
|
|
26
|
+
"isAppChain": false,
|
|
27
|
+
"NonMintableToken": "0x35479b023e508Ee9A7B533Dbb5B516BB6875F937",
|
|
28
|
+
"ExecutionHelper": "0x60e04bAB3d82A16a7963bCD44b494BD9BBB5F8fB",
|
|
29
|
+
"Vault": "0x28ac26B4f6A4483D11Ad209F08F7b4DbB7364fD9",
|
|
30
|
+
"connectors": {
|
|
31
|
+
"89346161": {
|
|
32
|
+
"FAST": "0x6ec499b869716BB479a843cebe048A90ec6D343C"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"WETH": {
|
|
37
|
+
"isAppChain": false,
|
|
38
|
+
"NonMintableToken": "0x6c7a28F6ae2D245B0130520B112FA3544a06d9AE",
|
|
39
|
+
"ExecutionHelper": "0x4F04f092daf8e0e3F30e0dCc3947A08C409a730F",
|
|
40
|
+
"Vault": "0xA63b923825A49137107Da6893E37f64E83aFfd81",
|
|
41
|
+
"connectors": {
|
|
42
|
+
"89346161": {
|
|
43
|
+
"FAST": "0xd50426F73fd16d8D286c63EB8AE3838e0CeD6de1"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"WBTC": {
|
|
48
|
+
"isAppChain": false,
|
|
49
|
+
"NonMintableToken": "0x92c7a51BD507736AC0Dda48b5F35A4AaD0c2Bb4D",
|
|
50
|
+
"ExecutionHelper": "0xF65dE0C2dFE936159085ea8E0CeF6FAeff5C8c99",
|
|
51
|
+
"Vault": "0x0b7E87B305dE1fe6139E42f7f65736184057b073",
|
|
52
|
+
"connectors": {
|
|
53
|
+
"89346161": {
|
|
54
|
+
"FAST": "0xcB4064F135835dE26746Ff19C99808497f266A80"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
13
57
|
}
|
|
14
58
|
},
|
|
15
59
|
"421614": {
|
|
@@ -23,6 +67,50 @@
|
|
|
23
67
|
}
|
|
24
68
|
},
|
|
25
69
|
"ExecutionHelper": "0x4caE6101A2645AE58038Aeb04079621458b00753"
|
|
70
|
+
},
|
|
71
|
+
"USDT": {
|
|
72
|
+
"isAppChain": false,
|
|
73
|
+
"NonMintableToken": "0x66DFb9987C36c4be232156e70B085f664367599A",
|
|
74
|
+
"ExecutionHelper": "0x9838Fc33ea56F7664c677b1F2917c60d75a73BC6",
|
|
75
|
+
"Vault": "0x36580Ab5CC5db1E220e20156ad333Ef2229d1F2e",
|
|
76
|
+
"connectors": {
|
|
77
|
+
"89346161": {
|
|
78
|
+
"FAST": "0x1485BdF9fd30e32cAb4E608158D9604f4d8110f3"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"DAI": {
|
|
83
|
+
"isAppChain": false,
|
|
84
|
+
"NonMintableToken": "0x9a573B27D7298c6E2f4d2D4a41c37A0C8AF6accA",
|
|
85
|
+
"ExecutionHelper": "0xfD6d6D95eC911b2415F34C93d1a74e0c67E49370",
|
|
86
|
+
"Vault": "0x56aDAD63615A2605aF3F00C34DC4caD1AFaed5bF",
|
|
87
|
+
"connectors": {
|
|
88
|
+
"89346161": {
|
|
89
|
+
"FAST": "0x805Dc5ac616bCB1A59a446eb1777C0Cc3Aa0c3Fe"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"WETH": {
|
|
94
|
+
"isAppChain": false,
|
|
95
|
+
"NonMintableToken": "0x565810cbfa3Cf1390963E5aFa2fB953795686339",
|
|
96
|
+
"ExecutionHelper": "0x88618fD449836578a6FA6d19a256E21b7cac792b",
|
|
97
|
+
"Vault": "0xb72ef406330853C86e2Dbb003e422CaEe27E0Fcd",
|
|
98
|
+
"connectors": {
|
|
99
|
+
"89346161": {
|
|
100
|
+
"FAST": "0xA78426325b5e32Affd5f4Bc8ab6575B24DCB1762"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"WBTC": {
|
|
105
|
+
"isAppChain": false,
|
|
106
|
+
"NonMintableToken": "0x1019958C2BD43B882a4e1349337a32Ef9563FC4D",
|
|
107
|
+
"ExecutionHelper": "0x1486AA8436A2e6Dc2C4D52A795A84f657f236CB7",
|
|
108
|
+
"Vault": "0x2d1abA6FaBAe80bF5C1C9EA433AAe9030E07CB22",
|
|
109
|
+
"connectors": {
|
|
110
|
+
"89346161": {
|
|
111
|
+
"FAST": "0xDC0258dc3dB980090E97EbF4f1FD9Cc3C5AD5894"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
26
114
|
}
|
|
27
115
|
},
|
|
28
116
|
"11155111": {
|
|
@@ -36,6 +124,50 @@
|
|
|
36
124
|
}
|
|
37
125
|
},
|
|
38
126
|
"ExecutionHelper": "0x4F3e01e8f7d0224b5988Cb0FBf7f6D156B9255cD"
|
|
127
|
+
},
|
|
128
|
+
"USDT": {
|
|
129
|
+
"isAppChain": false,
|
|
130
|
+
"NonMintableToken": "0xB4130e87A180b9448286B291331aEe8A9C154A3A",
|
|
131
|
+
"ExecutionHelper": "0xAE3dd4C0E3cA6823Cdbe9641B1938551cCb25a2d",
|
|
132
|
+
"Vault": "0xF9791c6AC0253005616A91dF42Ee59A699651d67",
|
|
133
|
+
"connectors": {
|
|
134
|
+
"89346161": {
|
|
135
|
+
"FAST": "0x3694Ab37011764fA64A648C2d5d6aC0E9cD5F98e"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"DAI": {
|
|
140
|
+
"isAppChain": false,
|
|
141
|
+
"NonMintableToken": "0x255745E5C7Ae620b7f523F5E4A0Ead37660EC5d6",
|
|
142
|
+
"ExecutionHelper": "0xE00321E336691AC3A9Ac2d1a02970d22FE8861cF",
|
|
143
|
+
"Vault": "0x530654F6e96198bC269074156b321d8B91d10366",
|
|
144
|
+
"connectors": {
|
|
145
|
+
"89346161": {
|
|
146
|
+
"FAST": "0xd95c5254Df051f378696100a7D7f29505e5cF5c9"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"WETH": {
|
|
151
|
+
"isAppChain": false,
|
|
152
|
+
"NonMintableToken": "0x771d1Ae208377453D478dF08BbC38034F72aC833",
|
|
153
|
+
"ExecutionHelper": "0xffC2D8f660a5CC41273f1Db714EaEcd19D28d147",
|
|
154
|
+
"Vault": "0x4caE6101A2645AE58038Aeb04079621458b00753",
|
|
155
|
+
"connectors": {
|
|
156
|
+
"89346161": {
|
|
157
|
+
"FAST": "0x858f61B6DE2edBF4d79e3B4baEB00b80cC146251"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"WBTC": {
|
|
162
|
+
"isAppChain": false,
|
|
163
|
+
"NonMintableToken": "0x94BEff5da6201cB2C8F489196FD970B3DF5aA32A",
|
|
164
|
+
"ExecutionHelper": "0x1019958C2BD43B882a4e1349337a32Ef9563FC4D",
|
|
165
|
+
"Vault": "0x9838Fc33ea56F7664c677b1F2917c60d75a73BC6",
|
|
166
|
+
"connectors": {
|
|
167
|
+
"89346161": {
|
|
168
|
+
"FAST": "0x36580Ab5CC5db1E220e20156ad333Ef2229d1F2e"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
39
171
|
}
|
|
40
172
|
},
|
|
41
173
|
"11155420": {
|
|
@@ -49,6 +181,50 @@
|
|
|
49
181
|
}
|
|
50
182
|
},
|
|
51
183
|
"ExecutionHelper": "0xD664eF6159562190ea6D1AFa3f0Ea1C0D77D14E3"
|
|
184
|
+
},
|
|
185
|
+
"USDT": {
|
|
186
|
+
"isAppChain": false,
|
|
187
|
+
"NonMintableToken": "0x2d1abA6FaBAe80bF5C1C9EA433AAe9030E07CB22",
|
|
188
|
+
"ExecutionHelper": "0x20b2c1F9E555C424ed4F8D3079A9E784dAEA6770",
|
|
189
|
+
"Vault": "0xe0510E14D9ebE633872d485278D0f3e2bD5DDb3a",
|
|
190
|
+
"connectors": {
|
|
191
|
+
"89346161": {
|
|
192
|
+
"FAST": "0xBd79f26d3c86A19290e1745b433611399c5d54b2"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"DAI": {
|
|
197
|
+
"isAppChain": false,
|
|
198
|
+
"NonMintableToken": "0xDC0258dc3dB980090E97EbF4f1FD9Cc3C5AD5894",
|
|
199
|
+
"ExecutionHelper": "0xDc336B079BD0D39AE27011df648e103a472A1390",
|
|
200
|
+
"Vault": "0x3c903b4D5327C6665dE1EA64890399381C280dB5",
|
|
201
|
+
"connectors": {
|
|
202
|
+
"89346161": {
|
|
203
|
+
"FAST": "0x04fB309B00e82d0265D057785b1d18F771F4402A"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"WETH": {
|
|
208
|
+
"isAppChain": false,
|
|
209
|
+
"NonMintableToken": "0x2b42AFFD4b7C14d9B7C2579229495c052672Ccd3",
|
|
210
|
+
"ExecutionHelper": "0x10849E7Efb9F1EDC7Ce80D3cC6117E6A30D33D22",
|
|
211
|
+
"Vault": "0xF5D4ea96d2efbdAB9C63fA85d2c45e8B75dF640c",
|
|
212
|
+
"connectors": {
|
|
213
|
+
"89346161": {
|
|
214
|
+
"FAST": "0xC53D91C6D595b4259fa5649d77e1e31E648202A3"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"WBTC": {
|
|
219
|
+
"isAppChain": false,
|
|
220
|
+
"NonMintableToken": "0xfC5CC93d85861ac82d89fc2D3e56315540E9C8A7",
|
|
221
|
+
"ExecutionHelper": "0x8d422bb223EDe166A6Ca821Fb472e07B446a243b",
|
|
222
|
+
"Vault": "0x1156bAFb7c72bfFC963038E5C65E8531F15a4a21",
|
|
223
|
+
"connectors": {
|
|
224
|
+
"89346161": {
|
|
225
|
+
"FAST": "0xd21109653316B21853e3FAB84E4C1E06B9Ee4429"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
52
228
|
}
|
|
53
229
|
},
|
|
54
230
|
"89346161": {
|
|
@@ -72,6 +248,90 @@
|
|
|
72
248
|
}
|
|
73
249
|
},
|
|
74
250
|
"ExecutionHelper": "0xB6fb3062405985F700fa23758A3053162ddBeFb9"
|
|
251
|
+
},
|
|
252
|
+
"USDT": {
|
|
253
|
+
"isAppChain": true,
|
|
254
|
+
"MintableToken": "0x9ADe781DacBD220f0161D98F496A2982b231A9d6",
|
|
255
|
+
"ExchangeRate": "0x1Aba89fC7ff67D27ccaa51893c46FD1e5fEE924B",
|
|
256
|
+
"ExecutionHelper": "0x0fd9F11B9C54a9F100234EeEf9ee7873d73C2204",
|
|
257
|
+
"Controller": "0xE0361B2b4B1511e4a805086216011D0786747cCD",
|
|
258
|
+
"connectors": {
|
|
259
|
+
"80001": {
|
|
260
|
+
"FAST": "0x4C9faD010D8be90Aba505c85eacc483dFf9b8Fa9"
|
|
261
|
+
},
|
|
262
|
+
"421614": {
|
|
263
|
+
"FAST": "0x1281C1464449DB73bdAa30928BCC63Dc25D8D187"
|
|
264
|
+
},
|
|
265
|
+
"11155111": {
|
|
266
|
+
"FAST": "0x19609EeE157BC38E1A40E19c38218fC3900d97ac"
|
|
267
|
+
},
|
|
268
|
+
"11155420": {
|
|
269
|
+
"FAST": "0x771d1Ae208377453D478dF08BbC38034F72aC833"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"DAI": {
|
|
274
|
+
"isAppChain": true,
|
|
275
|
+
"MintableToken": "0x733299259C45726EE1bfc9bD0deebA58e48a1853",
|
|
276
|
+
"ExchangeRate": "0x1Aba89fC7ff67D27ccaa51893c46FD1e5fEE924B",
|
|
277
|
+
"ExecutionHelper": "0x58900B39387633A0a0C80D1dBDFe879F20b4F2fb",
|
|
278
|
+
"Controller": "0x316945A9384824A0fc86d9BE779b76456f045ad6",
|
|
279
|
+
"connectors": {
|
|
280
|
+
"80001": {
|
|
281
|
+
"FAST": "0x33BE2a7CF4Bb94d28131116F840d313Cab1eD2DA"
|
|
282
|
+
},
|
|
283
|
+
"421614": {
|
|
284
|
+
"FAST": "0x97c6031ff915b570A6A6cBEF4b6f94C2112f9416"
|
|
285
|
+
},
|
|
286
|
+
"11155111": {
|
|
287
|
+
"FAST": "0x201c8d3AC4C261690e7C42A26bA49e614585c0D1"
|
|
288
|
+
},
|
|
289
|
+
"11155420": {
|
|
290
|
+
"FAST": "0x031c67Ee65e508E96c184Fc8D8559B50CedeBaa9"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"WETH": {
|
|
295
|
+
"isAppChain": true,
|
|
296
|
+
"MintableToken": "0xC123B7aEb9D2B2e8a035217d5C29e317c91842E2",
|
|
297
|
+
"ExchangeRate": "0x1Aba89fC7ff67D27ccaa51893c46FD1e5fEE924B",
|
|
298
|
+
"ExecutionHelper": "0xe22541aBaE4235909d70ac79f4D774Ad443008aa",
|
|
299
|
+
"Controller": "0x7D0e65D8914Dbd4259c6D430b79E5aEc2B08De9a",
|
|
300
|
+
"connectors": {
|
|
301
|
+
"80001": {
|
|
302
|
+
"FAST": "0x73019b64e31e699fFd27d54E91D686313C14191C"
|
|
303
|
+
},
|
|
304
|
+
"421614": {
|
|
305
|
+
"FAST": "0x7b9ed5C43E87DAFB03211651d4FA41fEa1Eb9b3D"
|
|
306
|
+
},
|
|
307
|
+
"11155111": {
|
|
308
|
+
"FAST": "0xfD5849d46CE6Bac16C4BD39bA78638e9e9091b2c"
|
|
309
|
+
},
|
|
310
|
+
"11155420": {
|
|
311
|
+
"FAST": "0x43193BF7bDacDFB4DE655AeaA0e62cce7900b1cb"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"WBTC": {
|
|
316
|
+
"isAppChain": true,
|
|
317
|
+
"MintableToken": "0xD382E2F0dF859ff9E82F963dcad1Aaee939c5E4F",
|
|
318
|
+
"ExchangeRate": "0x1Aba89fC7ff67D27ccaa51893c46FD1e5fEE924B",
|
|
319
|
+
"ExecutionHelper": "0x8d169dA827971aC5CEed406d3195614e297c648F",
|
|
320
|
+
"Controller": "0xBdE9e687F3A23Ebbc972c58D510dfc1f58Fb35EF",
|
|
321
|
+
"connectors": {
|
|
322
|
+
"80001": {
|
|
323
|
+
"FAST": "0xe821234B2e1B66F23e3bA48b50E7cFD2724ba971"
|
|
324
|
+
},
|
|
325
|
+
"421614": {
|
|
326
|
+
"FAST": "0xFc1e42b0C3Ff8d69FBe639a6a674fF5f0FcE778D"
|
|
327
|
+
},
|
|
328
|
+
"11155111": {
|
|
329
|
+
"FAST": "0xaf33761742beF3B7d0D0726671660CCF260fc5c3"
|
|
330
|
+
},
|
|
331
|
+
"11155420": {
|
|
332
|
+
"FAST": "0xC50Abb760555f73CCCa8C4D4ff56D4Bd4AAAAfC9"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
75
335
|
}
|
|
76
336
|
}
|
|
77
337
|
}
|
package/src/utils/token-info.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { MoneyInOutChainId, ReyaChainId, TokenInfo } from '../types';
|
|
2
2
|
|
|
3
|
+
const defaultTokenThresholds: Pick<
|
|
4
|
+
TokenInfo,
|
|
5
|
+
'minDepositAmount' | 'minWithdrawAmount' | 'minTransferAmount'
|
|
6
|
+
> = {
|
|
7
|
+
minDepositAmount: 1,
|
|
8
|
+
minWithdrawAmount: 1,
|
|
9
|
+
minTransferAmount: 1,
|
|
10
|
+
};
|
|
11
|
+
|
|
3
12
|
export const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =
|
|
4
13
|
{
|
|
5
14
|
/* ------------------------------------------------------ */
|
|
@@ -17,31 +26,37 @@ export const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =
|
|
|
17
26
|
name: 'RUSD',
|
|
18
27
|
address: '0xcfbb14b2a2acb5779b6365a260e4a9d63a12100b',
|
|
19
28
|
decimals: 6,
|
|
29
|
+
...defaultTokenThresholds,
|
|
20
30
|
},
|
|
21
31
|
{
|
|
22
32
|
name: 'USDC',
|
|
23
33
|
address: '0x1b700a40a0707dd5f0bc31cbc57d730558e5714d',
|
|
24
34
|
decimals: 6,
|
|
35
|
+
...defaultTokenThresholds,
|
|
25
36
|
},
|
|
26
37
|
{
|
|
27
38
|
name: 'USDT',
|
|
28
39
|
address: '0x9ade781dacbd220f0161d98f496a2982b231a9d6',
|
|
29
40
|
decimals: 6,
|
|
41
|
+
...defaultTokenThresholds,
|
|
30
42
|
},
|
|
31
43
|
{
|
|
32
44
|
name: 'DAI',
|
|
33
45
|
address: '0x733299259c45726ee1bfc9bd0deeba58e48a1853',
|
|
34
46
|
decimals: 18,
|
|
47
|
+
...defaultTokenThresholds,
|
|
35
48
|
},
|
|
36
49
|
{
|
|
37
50
|
name: 'WETH',
|
|
38
51
|
address: '0xc123b7aeb9d2b2e8a035217d5c29e317c91842e2',
|
|
39
52
|
decimals: 18,
|
|
53
|
+
...defaultTokenThresholds,
|
|
40
54
|
},
|
|
41
55
|
{
|
|
42
56
|
name: 'WBTC',
|
|
43
57
|
address: '0xd382e2f0df859ff9e82f963dcad1aaee939c5e4f',
|
|
44
58
|
decimals: 8,
|
|
59
|
+
...defaultTokenThresholds,
|
|
45
60
|
},
|
|
46
61
|
],
|
|
47
62
|
[MoneyInOutChainId.polygonMumbai]: [
|
|
@@ -49,6 +64,31 @@ export const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =
|
|
|
49
64
|
name: 'USDC',
|
|
50
65
|
address: '0xd9edcc943ed9729b08e52bb1e110fe43d1930773',
|
|
51
66
|
decimals: 6,
|
|
67
|
+
...defaultTokenThresholds,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'USDT',
|
|
71
|
+
address: '0x4f8ecb190b9ef36113127d97c7f9300875b6563f',
|
|
72
|
+
decimals: 6,
|
|
73
|
+
...defaultTokenThresholds,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'DAI',
|
|
77
|
+
address: '0x35479b023e508ee9a7b533dbb5b516bb6875f937',
|
|
78
|
+
decimals: 18,
|
|
79
|
+
...defaultTokenThresholds,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'WETH',
|
|
83
|
+
address: '0x6c7a28f6ae2d245b0130520b112fa3544a06d9ae',
|
|
84
|
+
decimals: 18,
|
|
85
|
+
...defaultTokenThresholds,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'WBTC',
|
|
89
|
+
address: '0x92c7a51bd507736ac0dda48b5f35a4aad0c2bb4d',
|
|
90
|
+
decimals: 8,
|
|
91
|
+
...defaultTokenThresholds,
|
|
52
92
|
},
|
|
53
93
|
],
|
|
54
94
|
[MoneyInOutChainId.arbitrumSepolia]: [
|
|
@@ -56,6 +96,31 @@ export const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =
|
|
|
56
96
|
name: 'USDC',
|
|
57
97
|
address: '0x8537307810fc40f4073a12a38554d4ff78efff41',
|
|
58
98
|
decimals: 6,
|
|
99
|
+
...defaultTokenThresholds,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'USDT',
|
|
103
|
+
address: '0x66dfb9987c36c4be232156e70b085f664367599a',
|
|
104
|
+
decimals: 6,
|
|
105
|
+
...defaultTokenThresholds,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'DAI',
|
|
109
|
+
address: '0x9a573b27d7298c6e2f4d2d4a41c37a0c8af6acca',
|
|
110
|
+
decimals: 18,
|
|
111
|
+
...defaultTokenThresholds,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'WETH',
|
|
115
|
+
address: '0x565810cbfa3cf1390963e5afa2fb953795686339',
|
|
116
|
+
decimals: 18,
|
|
117
|
+
...defaultTokenThresholds,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'WBTC',
|
|
121
|
+
address: '0x1019958c2bd43b882a4e1349337a32ef9563fc4d',
|
|
122
|
+
decimals: 8,
|
|
123
|
+
...defaultTokenThresholds,
|
|
59
124
|
},
|
|
60
125
|
],
|
|
61
126
|
[MoneyInOutChainId.opSepolia]: [
|
|
@@ -63,6 +128,31 @@ export const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =
|
|
|
63
128
|
name: 'USDC',
|
|
64
129
|
address: '0x6d290609b3f5f02d52f28d97c75a443ed8564cbf',
|
|
65
130
|
decimals: 6,
|
|
131
|
+
...defaultTokenThresholds,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: 'USDT',
|
|
135
|
+
address: '0x2d1aba6fabae80bf5c1c9ea433aae9030e07cb22',
|
|
136
|
+
decimals: 6,
|
|
137
|
+
...defaultTokenThresholds,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'DAI',
|
|
141
|
+
address: '0xdc0258dc3db980090e97ebf4f1fd9cc3c5ad5894',
|
|
142
|
+
decimals: 18,
|
|
143
|
+
...defaultTokenThresholds,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'WETH',
|
|
147
|
+
address: '0x2b42affd4b7c14d9b7c2579229495c052672ccd3',
|
|
148
|
+
decimals: 18,
|
|
149
|
+
...defaultTokenThresholds,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'WBTC',
|
|
153
|
+
address: '0xfc5cc93d85861ac82d89fc2d3e56315540e9c8a7',
|
|
154
|
+
decimals: 8,
|
|
155
|
+
...defaultTokenThresholds,
|
|
66
156
|
},
|
|
67
157
|
],
|
|
68
158
|
[MoneyInOutChainId.ethereumSepolia]: [
|
|
@@ -70,6 +160,31 @@ export const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =
|
|
|
70
160
|
name: 'USDC',
|
|
71
161
|
address: '0x565810cbfa3cf1390963e5afa2fb953795686339',
|
|
72
162
|
decimals: 6,
|
|
163
|
+
...defaultTokenThresholds,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'USDT',
|
|
167
|
+
address: '0xb4130e87a180b9448286b291331aee8a9c154a3a',
|
|
168
|
+
decimals: 6,
|
|
169
|
+
...defaultTokenThresholds,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'DAI',
|
|
173
|
+
address: '0x255745e5c7ae620b7f523f5e4a0ead37660ec5d6',
|
|
174
|
+
decimals: 18,
|
|
175
|
+
...defaultTokenThresholds,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'WETH',
|
|
179
|
+
address: '0x771d1ae208377453d478df08bbc38034f72ac833',
|
|
180
|
+
decimals: 18,
|
|
181
|
+
...defaultTokenThresholds,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: 'WBTC',
|
|
185
|
+
address: '0x94beff5da6201cb2c8f489196fd970b3df5aa32a',
|
|
186
|
+
decimals: 8,
|
|
187
|
+
...defaultTokenThresholds,
|
|
73
188
|
},
|
|
74
189
|
],
|
|
75
190
|
};
|
package/src/utils/token.ts
CHANGED
|
@@ -112,6 +112,12 @@ export const getTokenInfoByName = (
|
|
|
112
112
|
return tokenInfo;
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
+
export const getTokenInfosByChain = (
|
|
116
|
+
chainId: ReyaChainId | MoneyInOutChainId,
|
|
117
|
+
): TokenInfo[] => {
|
|
118
|
+
return TOKEN_INFO[chainId];
|
|
119
|
+
};
|
|
120
|
+
|
|
115
121
|
export const getERC20Allowance = async ({
|
|
116
122
|
walletAddress,
|
|
117
123
|
tokenAddress,
|