@gearbox-protocol/sdk 15.1.0-next.19 → 15.1.0-next.20
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/common-utils/charts/credit-session.js +1 -1
- package/dist/cjs/model/opportunities.js +4 -4
- package/dist/cjs/model/opportunities.schema.js +1 -2
- package/dist/cjs/new-sdk/prepare/PrepareApi.js +14 -10
- package/dist/cjs/offchain/opportunities/OffchainOpportunities.js +1 -1
- package/dist/cjs/plugins/accounts-counter/AccountsCounterPlugin.js +1 -1
- package/dist/cjs/sdk/OnchainSDK.js +2 -2
- package/dist/cjs/sdk/accounts/intents/testing/market.js +2 -1
- package/dist/cjs/sdk/accounts/intents/testing/sdk-mock.js +1 -0
- package/dist/cjs/sdk/accounts/intents/utils/pick-token.js +2 -2
- package/dist/cjs/sdk/accounts/intents/utils/quotas-for-update.js +1 -1
- package/dist/cjs/sdk/accounts/liquidations/LiquidationsService.js +2 -2
- package/dist/cjs/sdk/chain/chains.js +140 -51
- package/dist/cjs/sdk/chain/index.js +3 -0
- package/dist/cjs/sdk/constants/networks.js +1 -1
- package/dist/cjs/sdk/core/AbstractAddressProviderContract.js +1 -1
- package/dist/cjs/sdk/index.js +11 -7
- package/dist/cjs/sdk/market/MarketSuite.js +8 -39
- package/dist/cjs/sdk/market/credit/CreditSuite.js +61 -37
- package/dist/cjs/sdk/market/credit/{isStrategyCollateral.js → collateralUtils.js} +52 -5
- package/dist/cjs/sdk/market/credit/index.js +5 -6
- package/dist/cjs/sdk/market/index.js +7 -6
- package/dist/cjs/sdk/market/strategyName.js +19 -0
- package/dist/cjs/sdk/opportunities/OpportunitiesService.js +5 -3
- package/dist/cjs/sdk/positions/PositionsService.js +5 -10
- package/dist/cjs/sdk/utils/index.js +1 -1
- package/dist/esm/common-utils/charts/credit-session.js +1 -1
- package/dist/esm/model/opportunities.js +4 -4
- package/dist/esm/model/opportunities.schema.js +1 -2
- package/dist/esm/new-sdk/prepare/PrepareApi.js +14 -10
- package/dist/esm/offchain/opportunities/OffchainOpportunities.js +1 -1
- package/dist/esm/plugins/accounts-counter/AccountsCounterPlugin.js +1 -1
- package/dist/esm/sdk/OnchainSDK.js +2 -2
- package/dist/esm/sdk/accounts/intents/testing/market.js +2 -1
- package/dist/esm/sdk/accounts/intents/testing/sdk-mock.js +1 -0
- package/dist/esm/sdk/accounts/intents/utils/pick-token.js +1 -1
- package/dist/esm/sdk/accounts/intents/utils/quotas-for-update.js +1 -1
- package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +1 -1
- package/dist/esm/sdk/chain/chains.js +139 -53
- package/dist/esm/sdk/chain/index.js +2 -2
- package/dist/esm/sdk/constants/networks.js +1 -1
- package/dist/esm/sdk/core/AbstractAddressProviderContract.js +1 -1
- package/dist/esm/sdk/index.js +5 -5
- package/dist/esm/sdk/market/MarketSuite.js +8 -39
- package/dist/esm/sdk/market/credit/CreditSuite.js +62 -38
- package/dist/esm/sdk/market/credit/{isStrategyCollateral.js → collateralUtils.js} +51 -6
- package/dist/esm/sdk/market/credit/index.js +2 -3
- package/dist/esm/sdk/market/index.js +3 -3
- package/dist/esm/sdk/market/strategyName.js +18 -0
- package/dist/esm/sdk/opportunities/OpportunitiesService.js +5 -3
- package/dist/esm/sdk/positions/PositionsService.js +5 -10
- package/dist/esm/sdk/utils/index.js +1 -1
- package/dist/types/model/index.d.ts +1 -1
- package/dist/types/model/opportunities.d.ts +8 -15
- package/dist/types/model/opportunities.schema.d.ts +0 -2
- package/dist/types/model/positions.d.ts +2 -10
- package/dist/types/new-sdk/errors/SourceChainMismatchError.d.ts +1 -1
- package/dist/types/new-sdk/positions/mergePositionList.d.ts +3 -2
- package/dist/types/new-sdk/types.d.ts +1 -1
- package/dist/types/sdk/accounts/intents/testing/sdk-mock.d.ts +5 -0
- package/dist/types/sdk/accounts/liquidations/types.d.ts +1 -1
- package/dist/types/sdk/base/MultichainConstruct.d.ts +1 -1
- package/dist/types/sdk/base/TokensMeta.d.ts +1 -1
- package/dist/types/sdk/chain/chains.d.ts +51 -7
- package/dist/types/sdk/chain/index.d.ts +2 -2
- package/dist/types/sdk/index.d.ts +7 -7
- package/dist/types/sdk/market/MarketRegister.d.ts +1 -1
- package/dist/types/sdk/market/MarketSuite.d.ts +4 -34
- package/dist/types/sdk/market/ZapperRegister.d.ts +1 -1
- package/dist/types/sdk/market/credit/CreditSuite.d.ts +23 -14
- package/dist/types/sdk/market/credit/{isStrategyCollateral.d.ts → collateralUtils.d.ts} +36 -8
- package/dist/types/sdk/market/credit/index.d.ts +2 -3
- package/dist/types/sdk/market/index.d.ts +4 -4
- package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +1 -1
- package/dist/types/sdk/market/oracle/types.d.ts +1 -1
- package/dist/types/sdk/market/strategyName.d.ts +18 -0
- package/dist/types/sdk/opportunities/OpportunitiesService.d.ts +2 -2
- package/dist/types/sdk/positions/types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/sdk/market/credit/dominantCollateral.js +0 -47
- package/dist/esm/sdk/market/credit/dominantCollateral.js +0 -45
- package/dist/types/sdk/market/credit/dominantCollateral.d.ts +0 -29
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sdk_utils_mappers = require("../../sdk/utils/mappers.js");
|
|
3
2
|
const require_sdk_constants_math = require("../../sdk/constants/math.js");
|
|
3
|
+
const require_sdk_utils_mappers = require("../../sdk/utils/mappers.js");
|
|
4
4
|
const require_sdk_utils_formatter = require("../../sdk/utils/formatter.js");
|
|
5
5
|
//#region src/common-utils/charts/credit-session.ts
|
|
6
6
|
const CREDIT_SESSION_STATUS_BY_ID = {
|
|
@@ -17,17 +17,17 @@ function poolOpportunityId(chainId, pool) {
|
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* ```ts
|
|
20
|
-
* strategyOpportunityId(1, "0x3eb9..."
|
|
20
|
+
* strategyOpportunityId(1, "0x3eb9...") // "1:0x3eb9..."
|
|
21
21
|
* ```
|
|
22
22
|
**/
|
|
23
|
-
function strategyOpportunityId(chainId, creditManager
|
|
24
|
-
return `${chainId}:${creditManager.toLowerCase()}
|
|
23
|
+
function strategyOpportunityId(chainId, creditManager) {
|
|
24
|
+
return `${chainId}:${creditManager.toLowerCase()}`;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Canonical id of any opportunity, dispatching on {@link Opportunity.kind}.
|
|
28
28
|
**/
|
|
29
29
|
function opportunityId(opportunity) {
|
|
30
|
-
return opportunity.kind === "pool" ? poolOpportunityId(opportunity.chainId, opportunity.pool) : strategyOpportunityId(opportunity.chainId, opportunity.creditManager
|
|
30
|
+
return opportunity.kind === "pool" ? poolOpportunityId(opportunity.chainId, opportunity.pool) : strategyOpportunityId(opportunity.chainId, opportunity.creditManager);
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Whether an opportunity satisfies every condition of a filter.
|
|
@@ -233,8 +233,7 @@ const poolOpportunityKeySchema = zod_v4.z.object({
|
|
|
233
233
|
**/
|
|
234
234
|
const strategyOpportunityKeySchema = zod_v4.z.object({
|
|
235
235
|
chainId: require_model_primitives_schema.chainIdSchema,
|
|
236
|
-
creditManager: require_sdk_utils_zod.ZodAddress()
|
|
237
|
-
targetCollateral: require_sdk_utils_zod.ZodAddress()
|
|
236
|
+
creditManager: require_sdk_utils_zod.ZodAddress()
|
|
238
237
|
});
|
|
239
238
|
/**
|
|
240
239
|
* {@link OpportunityKey}
|
|
@@ -155,16 +155,20 @@ var PrepareApi = class extends require_sdk_base_MultichainConstruct.MultichainCo
|
|
|
155
155
|
async openNewStrategy(strategy, params) {
|
|
156
156
|
return this.queryChain({
|
|
157
157
|
network: strategy.chainId,
|
|
158
|
-
run: (sdk) =>
|
|
159
|
-
sdk
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
158
|
+
run: (sdk) => {
|
|
159
|
+
const targetToken = params.targetToken ?? sdk.marketRegister.findCreditManager(strategy.creditManager).strategyTargetCollateral;
|
|
160
|
+
if (!targetToken) throw new Error(`credit manager ${strategy.creditManager} has no strategy target collateral`);
|
|
161
|
+
return service(sdk).openStrategyIntent({
|
|
162
|
+
sdk,
|
|
163
|
+
creditManager: strategy.creditManager,
|
|
164
|
+
collateral: params.collateral,
|
|
165
|
+
targetToken,
|
|
166
|
+
leverage: params.leverage,
|
|
167
|
+
leftoverBalances: params.leftoverBalances,
|
|
168
|
+
slippage: params.slippage,
|
|
169
|
+
quotaReserve: params.quotaReserve
|
|
170
|
+
});
|
|
171
|
+
}
|
|
168
172
|
});
|
|
169
173
|
}
|
|
170
174
|
/**
|
|
@@ -53,7 +53,7 @@ var OffchainOpportunities = class extends require_offchain_AbstractOffchainNames
|
|
|
53
53
|
return `${this.#root}/pools/${key.chainId}/${key.pool}`;
|
|
54
54
|
}
|
|
55
55
|
#strategyPath(key) {
|
|
56
|
-
return `${this.#root}/strategies/${key.chainId}/${key.creditManager}
|
|
56
|
+
return `${this.#root}/strategies/${key.chainId}/${key.creditManager}`;
|
|
57
57
|
}
|
|
58
58
|
#chartRoot(key) {
|
|
59
59
|
return key.kind === "pool" ? this.#poolPath(key) : this.#strategyPath(key);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_sdk_utils_AddressMap = require("../../sdk/utils/AddressMap.js");
|
|
3
|
-
const require_sdk_utils_mappers = require("../../sdk/utils/mappers.js");
|
|
4
3
|
const require_sdk_constants_address_provider = require("../../sdk/constants/address-provider.js");
|
|
5
4
|
const require_sdk_constants_addresses = require("../../sdk/constants/addresses.js");
|
|
6
5
|
const require_sdk_constants_math = require("../../sdk/constants/math.js");
|
|
6
|
+
const require_sdk_utils_mappers = require("../../sdk/utils/mappers.js");
|
|
7
7
|
const require_sdk_constants_versions = require("../../sdk/constants/versions.js");
|
|
8
8
|
const require_abi_compressors_creditAccountCompressor = require("../../abi/compressors/creditAccountCompressor.js");
|
|
9
9
|
const require_sdk_plugins_BasePlugin = require("../../sdk/plugins/BasePlugin.js");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sdk_utils_mappers = require("./utils/mappers.js");
|
|
3
2
|
const require_sdk_chain_chains = require("./chain/chains.js");
|
|
4
3
|
require("./chain/index.js");
|
|
5
4
|
const require_sdk_constants_address_provider = require("./constants/address-provider.js");
|
|
5
|
+
const require_sdk_utils_mappers = require("./utils/mappers.js");
|
|
6
6
|
const require_sdk_constants_versions = require("./constants/versions.js");
|
|
7
7
|
require("./constants/index.js");
|
|
8
8
|
const require_sdk_utils_formatter = require("./utils/formatter.js");
|
|
@@ -153,7 +153,7 @@ var OnchainSDK = class extends require_sdk_base_ChainContractsRegister.ChainCont
|
|
|
153
153
|
async attach(options) {
|
|
154
154
|
if (this.#attached) throw new require_sdk_core_errors.SdkAlreadyAttachedError();
|
|
155
155
|
const { addressProvider = require_sdk_constants_address_provider.ADDRESS_PROVIDER_V310, blockNumber, ignoreUpdateablePrices, ignoreMarkets, marketConfigurators: mcs, redstone } = options ?? {};
|
|
156
|
-
const marketConfigurators = mcs ??
|
|
156
|
+
const marketConfigurators = mcs ?? this.client.chain.defaultMarketConfigurators.keys();
|
|
157
157
|
const rwaFactories = options?.rwaFactories ?? this.client.chain.rwaFactories;
|
|
158
158
|
this.logger?.info({
|
|
159
159
|
networkType: this.networkType,
|
|
@@ -106,7 +106,8 @@ function buildMarketSdk(extras) {
|
|
|
106
106
|
availableLiquidity: extras?.availableLiquidity,
|
|
107
107
|
debtLimitAvailable: extras?.debtLimitAvailable,
|
|
108
108
|
maxDebtPerBlockMultiplier: extras?.maxDebtPerBlockMultiplier,
|
|
109
|
-
forbiddenTokens: extras?.forbiddenTokens
|
|
109
|
+
forbiddenTokens: extras?.forbiddenTokens,
|
|
110
|
+
strategyTargetCollateral: POS
|
|
110
111
|
});
|
|
111
112
|
}
|
|
112
113
|
/** Converts an amount to UND at fixture prices (mirrors the mock oracle). */
|
|
@@ -177,6 +177,7 @@ function buildMockSdk(args) {
|
|
|
177
177
|
},
|
|
178
178
|
market,
|
|
179
179
|
isPaused: facadePaused || poolPaused,
|
|
180
|
+
strategyTargetCollateral: args.strategyTargetCollateral ?? collateralTokens.find((t) => t !== args.underlying.toLowerCase()),
|
|
180
181
|
isExpired: expirationDate > 0 && expirationDate < (args.timestamp ?? 0)
|
|
181
182
|
};
|
|
182
183
|
const routeCalls = (tokenIn, tokenOut) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
2
|
+
const require_sdk_market_credit_collateralUtils = require("../../../market/credit/collateralUtils.js");
|
|
3
3
|
const require_sdk_accounts_intents_utils_common = require("./common.js");
|
|
4
4
|
const require_sdk_accounts_intents_utils_convert_amount = require("./convert-amount.js");
|
|
5
5
|
//#region src/sdk/accounts/intents/utils/pick-token.ts
|
|
@@ -16,7 +16,7 @@ const PHANTOM_TOKEN_PREFIX = "PHANTOM_TOKEN::";
|
|
|
16
16
|
function isPhantomToken(sdk, token) {
|
|
17
17
|
return !!sdk.tokensMeta.get(token)?.contractType?.startsWith(PHANTOM_TOKEN_PREFIX);
|
|
18
18
|
}
|
|
19
|
-
const REDEMPTION_PHANTOM_TOKEN_TYPES = new Set(
|
|
19
|
+
const REDEMPTION_PHANTOM_TOKEN_TYPES = new Set(require_sdk_market_credit_collateralUtils.NON_STRATEGY_PHANTOM_TOKEN_TYPES);
|
|
20
20
|
/**
|
|
21
21
|
* Whether `token` is the phantom of a redemption in flight, rather than one of
|
|
22
22
|
* the phantoms a position is simply held in (Convex, Infrared, staking
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sdk_utils_mappers = require("../../../utils/mappers.js");
|
|
3
2
|
const require_sdk_constants_math = require("../../../constants/math.js");
|
|
3
|
+
const require_sdk_utils_mappers = require("../../../utils/mappers.js");
|
|
4
4
|
const require_common_utils_utils_creditAccount_quota_utils = require("../../../../common-utils/utils/creditAccount/quota-utils.js");
|
|
5
5
|
//#region src/sdk/accounts/intents/utils/quotas-for-update.ts
|
|
6
6
|
function getQuotasForUpdate({ assetsBefore, assetsAfter, initialQuotas, quotaReserve = 0, liquidationThresholds: liquidationThresholdsMap, quotas: quotasMap, maxDebt, underlyingToken, convert }) {
|
|
@@ -10,7 +10,7 @@ require("../../utils/index.js");
|
|
|
10
10
|
const require_sdk_base_SDKConstruct = require("../../base/SDKConstruct.js");
|
|
11
11
|
require("../../base/index.js");
|
|
12
12
|
const require_sdk_market_math = require("../../market/math.js");
|
|
13
|
-
const
|
|
13
|
+
const require_sdk_market_credit_collateralUtils = require("../../market/credit/collateralUtils.js");
|
|
14
14
|
const require_model_liquidations = require("../../../model/liquidations.js");
|
|
15
15
|
require("../../../model/index.js");
|
|
16
16
|
const require_sdk_market_rwa_midas_constants = require("../../market/rwa/midas/constants.js");
|
|
@@ -285,7 +285,7 @@ var LiquidationsService = class extends require_sdk_base_SDKConstruct.SDKConstru
|
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
287
|
#mainAsset(ca, market, fallback) {
|
|
288
|
-
const asset =
|
|
288
|
+
const asset = require_sdk_market_credit_collateralUtils.dominantCollateral(ca, market);
|
|
289
289
|
if (!asset) return fallback;
|
|
290
290
|
return this.sdk.withdrawalCompressor?.getWithdrawalSourceToken(asset) ?? asset;
|
|
291
291
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
2
|
+
const require_sdk_utils_AddressMap = require("../utils/AddressMap.js");
|
|
3
|
+
const require_sdk_utils_AddressSet = require("../utils/AddressSet.js");
|
|
3
4
|
let viem = require("viem");
|
|
4
5
|
let viem_chains = require("viem/chains");
|
|
5
6
|
let zod_v4 = require("zod/v4");
|
|
@@ -48,7 +49,7 @@ const chains = {
|
|
|
48
49
|
Mainnet: withPublicNode({
|
|
49
50
|
...viem_chains.mainnet,
|
|
50
51
|
network: "Mainnet",
|
|
51
|
-
defaultMarketConfigurators: {
|
|
52
|
+
defaultMarketConfigurators: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
52
53
|
"0xc168343c791d56dd1da4b4b8b0cc1c1ec1a16e6b": "cp0x",
|
|
53
54
|
"0x3b56538833fc02f4f0e75609390f26ded0c32e42": "Re7",
|
|
54
55
|
"0x7a133fbd01736fd076158307c9476cc3877f1af5": "Invariant Group",
|
|
@@ -56,26 +57,57 @@ const chains = {
|
|
|
56
57
|
"0x1b265b97eb169fb6668e3258007c3b0242c7bdbe": "KPK",
|
|
57
58
|
"0x9dddd1b9ce0ac8aa0c80e4ec141600b9bf0101c3": "UltraYield",
|
|
58
59
|
"0x601067eba24bb5b558a184fc082525637e96a42d": "Gami Labs"
|
|
59
|
-
},
|
|
60
|
-
testMarketConfigurators: {
|
|
60
|
+
}),
|
|
61
|
+
testMarketConfigurators: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
61
62
|
"0x99df7330bf42d596af2e9d9836d4fc2077c574aa": "M11 Credit",
|
|
62
63
|
"0x610627d8d01a413bdd9b0a0b60070da7dd1e54ad": "Securitize",
|
|
63
64
|
"0xa770ce584adb6491a2138da6eaec33243bdcd248": "Testnet Curator"
|
|
64
|
-
},
|
|
65
|
+
}),
|
|
65
66
|
rwaFactories: [],
|
|
66
|
-
underlyingAssetTypes: {
|
|
67
|
+
underlyingAssetTypes: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
67
68
|
"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0": "ETH",
|
|
68
69
|
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": "ETH",
|
|
69
70
|
"0x18084fbA666a33d37592fA2633fD49a74DD93a88": "BTC",
|
|
70
71
|
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48": "Stable",
|
|
71
72
|
"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599": "BTC"
|
|
72
|
-
},
|
|
73
|
-
rwaTokens: [
|
|
73
|
+
}),
|
|
74
|
+
rwaTokens: new require_sdk_utils_AddressSet.AddressSet([
|
|
74
75
|
"0x17418038ecF73BA4026c4f428547BF099706F27B",
|
|
75
76
|
"0x51C2d74017390CbBd30550179A16A1c28F7210fc",
|
|
76
77
|
"0x238a700eD6165261Cf8b2e544ba797BC11e466Ba",
|
|
77
78
|
"0x7433806912Eae67919e66aea853d46Fa0aef98A8"
|
|
78
|
-
],
|
|
79
|
+
]),
|
|
80
|
+
legacyStrategyTargets: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
81
|
+
"0x1293a69e4ad4a93293a06b6303104be35bdd83af": "0x1a711a5bc48b5c1352c1882fa65dc14b5b9e829d",
|
|
82
|
+
"0x29350a3c2627fb78c7e915cd59af754edf8998c5": "0xe1d9b789da5b5375eacf66f036022b019a2af307",
|
|
83
|
+
"0x79c6c1ce5b12abcc3e407ce8c160ee1160250921": "0x02a4cceed3c400b5ba9fd22ad6ec18d8f7a3d48e",
|
|
84
|
+
"0x9a0fdf7cdab4604fc27ebeab4b3d57bd825e8ebe": "0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee",
|
|
85
|
+
"0x9fb5493deb601a0329ad8bff43cd182a61321ca7": "0x02a4cceed3c400b5ba9fd22ad6ec18d8f7a3d48e",
|
|
86
|
+
"0x68df4deeff1d9007063395cc190a486dceb05920": "0x31454faa1daa04cacf59a6bd37681da9160d092a",
|
|
87
|
+
"0x0f4e4432977bbf3962322996f1c9aefdbc62256d": "0xda06ee2dacf9245aa80072a4407debdea0d7e341",
|
|
88
|
+
"0xfc896a605da98f3df6da47beb29cb59ae382351d": "0x924d24c238db7ecae2aa3a19430239ed684bde4a",
|
|
89
|
+
"0x52b27889f67887fc9b98a59304037570e7d7e556": "0x4956b52ae2ff65d74ca2d61207523288e4528f96",
|
|
90
|
+
"0xa64d5e7567c5e8f494549dbff60c77846e059706": "0x4956b52ae2ff65d74ca2d61207523288e4528f96",
|
|
91
|
+
"0x0af1324369e3fd78325fab0cb62eea19f3e4ebf0": "0xb908c9fe885369643adb5fba4407d52bd726c72d",
|
|
92
|
+
"0x0fafa30cd35bc6a48ff2b40694d4a73d4f4bcc92": "0xb908c9fe885369643adb5fba4407d52bd726c72d"
|
|
93
|
+
}),
|
|
94
|
+
accountTargetCollaterals: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
95
|
+
"0x56631dcb1ea548d2629e82e01375090ed1f81b7e": "0x1a711a5bc48b5c1352c1882fa65dc14b5b9e829d",
|
|
96
|
+
"0x89014edc549ffa5c5b6e859b1496731bd035c247": "0x31454faa1daa04cacf59a6bd37681da9160d092a",
|
|
97
|
+
"0x3b7ab1f4fee570933b24b202de90ffda82f6cae0": "0x31454faa1daa04cacf59a6bd37681da9160d092a",
|
|
98
|
+
"0x721798d8ccf31ae75c12db82fa72b3806759cbc9": "0x31454faa1daa04cacf59a6bd37681da9160d092a",
|
|
99
|
+
"0xd7273d9594ac88f993eda9773041e621633acea0": "0x1a711a5bc48b5c1352c1882fa65dc14b5b9e829d",
|
|
100
|
+
"0x34442ca47435e90b80d835aab9737166e76d9962": "0x403cc0d2694ec2639101f32b146b90d766461ce9"
|
|
101
|
+
}),
|
|
102
|
+
sunsetPools: new require_sdk_utils_AddressSet.AddressSet([
|
|
103
|
+
"0xF791Ecc5F2472637eac9DFe3f7894C0B32C32bDf",
|
|
104
|
+
"0xC155444481854c60e7a29f4150373f479988F32D",
|
|
105
|
+
"0xF0795C47fA58d00f5F77F4D5c01F31eE891E21B4",
|
|
106
|
+
"0x119f75D5AC5739Ae49ffC46117a20654793A9b18",
|
|
107
|
+
"0xb46edf298989F0F106EDD80E4ae8f59a13531dB4",
|
|
108
|
+
"0xd98e31C67c7C21f233C37c9AC9Ae656dcb0d5d25"
|
|
109
|
+
]),
|
|
110
|
+
sunsetStrategies: new require_sdk_utils_AddressSet.AddressSet(["0x9fF97B167Dd442bd5f277098bf1154C5807D3566", "0x187C5022002d45107dB72B0b59E72111f69Bd513"]),
|
|
79
111
|
isPublic: true,
|
|
80
112
|
wellKnownToken: {
|
|
81
113
|
address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
@@ -87,7 +119,7 @@ const chains = {
|
|
|
87
119
|
Arbitrum: withPublicNode({
|
|
88
120
|
...viem_chains.arbitrum,
|
|
89
121
|
network: "Arbitrum",
|
|
90
|
-
defaultMarketConfigurators: { "0x01023850b360b88de0d0f84015bbba1eba57fe7e": "Chaos Labs" },
|
|
122
|
+
defaultMarketConfigurators: require_sdk_utils_AddressMap.AddressMap.fromRecord({ "0x01023850b360b88de0d0f84015bbba1eba57fe7e": "Chaos Labs" }),
|
|
91
123
|
rwaFactories: [],
|
|
92
124
|
isPublic: true,
|
|
93
125
|
wellKnownToken: {
|
|
@@ -100,10 +132,10 @@ const chains = {
|
|
|
100
132
|
Optimism: withPublicNode({
|
|
101
133
|
...viem_chains.optimism,
|
|
102
134
|
network: "Optimism",
|
|
103
|
-
defaultMarketConfigurators: {
|
|
135
|
+
defaultMarketConfigurators: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
104
136
|
"0x2a15969CE5320868eb609680751cF8896DD92De5": "Chaos Labs",
|
|
105
137
|
"0x9dddd1b9ce0ac8aa0c80e4ec141600b9bf0101c3": "UltraYield"
|
|
106
|
-
},
|
|
138
|
+
}),
|
|
107
139
|
rwaFactories: [],
|
|
108
140
|
isPublic: true,
|
|
109
141
|
wellKnownToken: {
|
|
@@ -116,7 +148,7 @@ const chains = {
|
|
|
116
148
|
Base: withPublicNode({
|
|
117
149
|
...viem_chains.base,
|
|
118
150
|
network: "Base",
|
|
119
|
-
defaultMarketConfigurators:
|
|
151
|
+
defaultMarketConfigurators: new require_sdk_utils_AddressMap.AddressMap(),
|
|
120
152
|
rwaFactories: [],
|
|
121
153
|
isPublic: false,
|
|
122
154
|
wellKnownToken: {
|
|
@@ -128,7 +160,7 @@ const chains = {
|
|
|
128
160
|
Sonic: withPublicNode((0, viem.defineChain)({
|
|
129
161
|
...viem_chains.sonic,
|
|
130
162
|
network: "Sonic",
|
|
131
|
-
defaultMarketConfigurators: { "0x8FFDd1F1433674516f83645a768E8900A2A5D076": "Chaos Labs" },
|
|
163
|
+
defaultMarketConfigurators: require_sdk_utils_AddressMap.AddressMap.fromRecord({ "0x8FFDd1F1433674516f83645a768E8900A2A5D076": "Chaos Labs" }),
|
|
132
164
|
rwaFactories: [],
|
|
133
165
|
isPublic: true,
|
|
134
166
|
blockExplorers: { default: {
|
|
@@ -146,7 +178,7 @@ const chains = {
|
|
|
146
178
|
MegaETH: (0, viem.defineChain)({
|
|
147
179
|
...viem_chains.megaeth,
|
|
148
180
|
network: "MegaETH",
|
|
149
|
-
defaultMarketConfigurators:
|
|
181
|
+
defaultMarketConfigurators: new require_sdk_utils_AddressMap.AddressMap(),
|
|
150
182
|
rwaFactories: [],
|
|
151
183
|
isPublic: false,
|
|
152
184
|
wellKnownToken: {
|
|
@@ -162,16 +194,35 @@ const chains = {
|
|
|
162
194
|
url: "https://monadscan.com/"
|
|
163
195
|
} },
|
|
164
196
|
network: "Monad",
|
|
165
|
-
defaultMarketConfigurators: {
|
|
197
|
+
defaultMarketConfigurators: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
166
198
|
"0x16956912813ab9a38d95730b52a8cf53e860a7c5": "Tulipa",
|
|
167
199
|
"0x7c6ee1bf9c1eb3ee55bdbdc1e8d0317aab718e0a": "UltraYield"
|
|
168
|
-
},
|
|
169
|
-
underlyingAssetTypes: {
|
|
200
|
+
}),
|
|
201
|
+
underlyingAssetTypes: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
170
202
|
"0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A": "ETH",
|
|
171
203
|
"0x754704Bc059F8C67012fEd69BC8A327a5aafb603": "Stable",
|
|
172
204
|
"0xe7cd86e13AC4309349F30B3435a9d337750fC82D": "Stable",
|
|
173
205
|
"0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a": "Stable"
|
|
174
|
-
},
|
|
206
|
+
}),
|
|
207
|
+
legacyStrategyTargets: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
208
|
+
"0xd9b000e3f14ea2dd27be07859ab3ab9e0ef62dfa": "0x1c8ee940b654bfced403f2a44c1603d5be0f50fa",
|
|
209
|
+
"0x01b3b3c03269e2fdf654676f2e57a9e325a55e51": "0x1c8ee940b654bfced403f2a44c1603d5be0f50fa"
|
|
210
|
+
}),
|
|
211
|
+
sunsetPools: new require_sdk_utils_AddressSet.AddressSet([
|
|
212
|
+
"0x09cA6b76276eC0682adb896418b99CB7E44a58A0",
|
|
213
|
+
"0x34752948B0dc28969485Df2066fFE86D5dc36689",
|
|
214
|
+
"0x164A35F31e4E0F6c45D500962a6978D2cbD5a16b"
|
|
215
|
+
]),
|
|
216
|
+
sunsetStrategies: new require_sdk_utils_AddressSet.AddressSet([
|
|
217
|
+
"0xA1F05494Dab74Eb9C352C3A042836579fE168aa7",
|
|
218
|
+
"0xb8C7D72CDD00F44390aDF6f0756AB11fd19723B5",
|
|
219
|
+
"0xE01FEeBC233ee715592D056B0a53A4F316a62d1A",
|
|
220
|
+
"0x5b5b351d70A67d18300cD89Db04089Aa37b271d2",
|
|
221
|
+
"0xb21f766c193541305C18cE146DCD3Fdf642b40eF",
|
|
222
|
+
"0x04620081bb818B8CD3996943D0A4a37Dbf296cF4",
|
|
223
|
+
"0x5452971Fc17d025a1AFFDd5F7a44CCDD1BF0524C",
|
|
224
|
+
"0x7ea06087C63568f1071c6BEA3AeB51e070ec68B9"
|
|
225
|
+
]),
|
|
175
226
|
rwaFactories: [],
|
|
176
227
|
isPublic: true,
|
|
177
228
|
wellKnownToken: {
|
|
@@ -184,7 +235,7 @@ const chains = {
|
|
|
184
235
|
Berachain: withPublicNode({
|
|
185
236
|
...viem_chains.berachain,
|
|
186
237
|
network: "Berachain",
|
|
187
|
-
defaultMarketConfigurators:
|
|
238
|
+
defaultMarketConfigurators: new require_sdk_utils_AddressMap.AddressMap(),
|
|
188
239
|
rwaFactories: [],
|
|
189
240
|
isPublic: false,
|
|
190
241
|
blockExplorers: { default: {
|
|
@@ -201,7 +252,7 @@ const chains = {
|
|
|
201
252
|
Avalanche: withPublicNode({
|
|
202
253
|
...viem_chains.avalanche,
|
|
203
254
|
network: "Avalanche",
|
|
204
|
-
defaultMarketConfigurators:
|
|
255
|
+
defaultMarketConfigurators: new require_sdk_utils_AddressMap.AddressMap(),
|
|
205
256
|
rwaFactories: [],
|
|
206
257
|
isPublic: false,
|
|
207
258
|
wellKnownToken: {
|
|
@@ -213,11 +264,11 @@ const chains = {
|
|
|
213
264
|
BNB: withPublicNode({
|
|
214
265
|
...viem_chains.bsc,
|
|
215
266
|
network: "BNB",
|
|
216
|
-
defaultMarketConfigurators: {
|
|
267
|
+
defaultMarketConfigurators: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
217
268
|
"0x19037a281025b83fa37e3264b77af523ff87a3a4": "Chaos Labs",
|
|
218
269
|
"0x92dc4ee43e9b207e16fbf3fd1a6933563c0a0d35": "Re7"
|
|
219
|
-
},
|
|
220
|
-
testMarketConfigurators:
|
|
270
|
+
}),
|
|
271
|
+
testMarketConfigurators: new require_sdk_utils_AddressMap.AddressMap(),
|
|
221
272
|
rwaFactories: [],
|
|
222
273
|
isPublic: true,
|
|
223
274
|
wellKnownToken: {
|
|
@@ -230,7 +281,7 @@ const chains = {
|
|
|
230
281
|
WorldChain: (0, viem.defineChain)({
|
|
231
282
|
...viem_chains.worldchain,
|
|
232
283
|
network: "WorldChain",
|
|
233
|
-
defaultMarketConfigurators:
|
|
284
|
+
defaultMarketConfigurators: new require_sdk_utils_AddressMap.AddressMap(),
|
|
234
285
|
rwaFactories: [],
|
|
235
286
|
isPublic: false,
|
|
236
287
|
wellKnownToken: {
|
|
@@ -242,8 +293,9 @@ const chains = {
|
|
|
242
293
|
Etherlink: (0, viem.defineChain)({
|
|
243
294
|
...viem_chains.etherlink,
|
|
244
295
|
network: "Etherlink",
|
|
245
|
-
defaultMarketConfigurators: { "0x577424f0e6f50db668cc1bc76babb87e36732291": "Re7" },
|
|
246
|
-
underlyingAssetTypes: { "0x796Ea11Fa2dD751eD01b53C372fFDB4AAa8f00F9": "Stable" },
|
|
296
|
+
defaultMarketConfigurators: require_sdk_utils_AddressMap.AddressMap.fromRecord({ "0x577424f0e6f50db668cc1bc76babb87e36732291": "Re7" }),
|
|
297
|
+
underlyingAssetTypes: require_sdk_utils_AddressMap.AddressMap.fromRecord({ "0x796Ea11Fa2dD751eD01b53C372fFDB4AAa8f00F9": "Stable" }),
|
|
298
|
+
legacyStrategyTargets: require_sdk_utils_AddressMap.AddressMap.fromRecord({ "0xf6f9bb0be5128bf6d02de00bba9c34b132c2c8ee": "0x2247b5a46bb79421a314ab0f0b67ffd11dd37ee4" }),
|
|
247
299
|
rwaFactories: [],
|
|
248
300
|
isPublic: true,
|
|
249
301
|
wellKnownToken: {
|
|
@@ -256,7 +308,7 @@ const chains = {
|
|
|
256
308
|
Hemi: (0, viem.defineChain)({
|
|
257
309
|
...viem_chains.hemi,
|
|
258
310
|
network: "Hemi",
|
|
259
|
-
defaultMarketConfigurators: { "0xc9961b8a0c763779690577f2c76962c086af2fe3": "Invariant Group" },
|
|
311
|
+
defaultMarketConfigurators: require_sdk_utils_AddressMap.AddressMap.fromRecord({ "0xc9961b8a0c763779690577f2c76962c086af2fe3": "Invariant Group" }),
|
|
260
312
|
rwaFactories: [],
|
|
261
313
|
isPublic: true,
|
|
262
314
|
wellKnownToken: {
|
|
@@ -272,7 +324,7 @@ const chains = {
|
|
|
272
324
|
Lisk: (0, viem.defineChain)({
|
|
273
325
|
...viem_chains.lisk,
|
|
274
326
|
network: "Lisk",
|
|
275
|
-
defaultMarketConfigurators: { "0x25778dbf0e56b7feb8358c4aa2f6f9e19a1c145a": "Re7" },
|
|
327
|
+
defaultMarketConfigurators: require_sdk_utils_AddressMap.AddressMap.fromRecord({ "0x25778dbf0e56b7feb8358c4aa2f6f9e19a1c145a": "Re7" }),
|
|
276
328
|
rwaFactories: [],
|
|
277
329
|
isPublic: true,
|
|
278
330
|
wellKnownToken: {
|
|
@@ -284,16 +336,23 @@ const chains = {
|
|
|
284
336
|
Plasma: (0, viem.defineChain)({
|
|
285
337
|
...viem_chains.plasma,
|
|
286
338
|
network: "Plasma",
|
|
287
|
-
defaultMarketConfigurators: {
|
|
339
|
+
defaultMarketConfigurators: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
288
340
|
"0x7a133fbd01736fd076158307c9476cc3877f1af5": "Invariant Group",
|
|
289
341
|
"0x4bce62622be621ce036691de98afcab0e41a77a3": "UltraYield",
|
|
290
342
|
"0xce1cf71a28837daaa7b92d00ca4ef2fd649c2a67": "Hyperithm",
|
|
291
343
|
"0x9655f82b585b11cee8a05576ed8efcf755cec04b": "TelosC"
|
|
292
|
-
},
|
|
293
|
-
underlyingAssetTypes: {
|
|
344
|
+
}),
|
|
345
|
+
underlyingAssetTypes: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
294
346
|
"0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb": "Stable",
|
|
295
347
|
"0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34": "Stable"
|
|
296
|
-
},
|
|
348
|
+
}),
|
|
349
|
+
sunsetPools: new require_sdk_utils_AddressSet.AddressSet([
|
|
350
|
+
"0x76309A9a56309104518847BbA321c261B7B4a43f",
|
|
351
|
+
"0x4273EEa5ffF61d8ee0C397cCcFCc8cF4B518221f",
|
|
352
|
+
"0x53E4e9b8766969c43895839CC9c673bb6bC8Ac97",
|
|
353
|
+
"0xB74760FD26400030620027DD29D19d74D514700e",
|
|
354
|
+
"0xBa21b2807fcF136F1d61F40341d6Fb8F2535615F"
|
|
355
|
+
]),
|
|
297
356
|
rwaFactories: [],
|
|
298
357
|
isPublic: true,
|
|
299
358
|
wellKnownToken: {
|
|
@@ -312,12 +371,13 @@ const chains = {
|
|
|
312
371
|
} },
|
|
313
372
|
blockTime: 200,
|
|
314
373
|
network: "Somnia",
|
|
315
|
-
defaultMarketConfigurators: { "0x1ca8b92aa7233a9f8f7ba031ac45c878141adff0": "Invariant Group" },
|
|
316
|
-
underlyingAssetTypes: {
|
|
374
|
+
defaultMarketConfigurators: require_sdk_utils_AddressMap.AddressMap.fromRecord({ "0x1ca8b92aa7233a9f8f7ba031ac45c878141adff0": "Invariant Group" }),
|
|
375
|
+
underlyingAssetTypes: require_sdk_utils_AddressMap.AddressMap.fromRecord({
|
|
317
376
|
"0x28BEc7E30E6faee657a03e19Bf1128AaD7632A00": "Stable",
|
|
318
377
|
"0x046EDe9564A72571df6F5e44d0405360c0f4dCab": "ETH"
|
|
319
|
-
},
|
|
378
|
+
}),
|
|
320
379
|
rwaFactories: [],
|
|
380
|
+
sunsetPools: new require_sdk_utils_AddressSet.AddressSet(["0xa561d6D554fB3637F590c4D73527fe19525d596b", "0x6f652fbCfC2107ef9C99456311B5650cd52D6419"]),
|
|
321
381
|
isPublic: true,
|
|
322
382
|
wellKnownToken: {
|
|
323
383
|
address: "0x67B302E35Aef5EEE8c32D934F5856869EF428330",
|
|
@@ -396,10 +456,10 @@ function isPublicNetwork(networkOrChainId) {
|
|
|
396
456
|
**/
|
|
397
457
|
function getCuratorName(marketConfigurator, network) {
|
|
398
458
|
const chainz = network ? [chains[network]] : Object.values(chains);
|
|
399
|
-
for (const c of chainz)
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
}
|
|
459
|
+
for (const c of chainz) {
|
|
460
|
+
const name = c.defaultMarketConfigurators.get(marketConfigurator) ?? c.testMarketConfigurators?.get(marketConfigurator);
|
|
461
|
+
if (name) return name;
|
|
462
|
+
}
|
|
403
463
|
}
|
|
404
464
|
/**
|
|
405
465
|
* Finds the market configurator address for a given curator on a network.
|
|
@@ -411,11 +471,8 @@ function getCuratorName(marketConfigurator, network) {
|
|
|
411
471
|
**/
|
|
412
472
|
function findCuratorMarketConfigurator(curator, network) {
|
|
413
473
|
const { defaultMarketConfigurators, testMarketConfigurators } = chains[network];
|
|
414
|
-
const
|
|
415
|
-
|
|
416
|
-
...testMarketConfigurators
|
|
417
|
-
};
|
|
418
|
-
for (const [a, c] of require_sdk_utils_mappers.TypedObjectUtils.entries(all)) if (c === curator) return a;
|
|
474
|
+
for (const [address, name] of defaultMarketConfigurators.entries()) if (name === curator) return address;
|
|
475
|
+
for (const [address, name] of testMarketConfigurators?.entries() ?? []) if (name === curator) return address;
|
|
419
476
|
}
|
|
420
477
|
/**
|
|
421
478
|
* Looks up the {@link AssetType} of a token in hardcoded classifier.
|
|
@@ -426,9 +483,7 @@ function findCuratorMarketConfigurator(curator, network) {
|
|
|
426
483
|
* @returns The asset type, or `undefined` when the token is not classified
|
|
427
484
|
**/
|
|
428
485
|
function getAssetType(token, network) {
|
|
429
|
-
|
|
430
|
-
if (!table) return;
|
|
431
|
-
for (const [a, assetType] of require_sdk_utils_mappers.TypedObjectUtils.entries(table)) if ((0, viem.isAddressEqual)(a, token)) return assetType;
|
|
486
|
+
return chains[network].underlyingAssetTypes?.get(token);
|
|
432
487
|
}
|
|
433
488
|
/**
|
|
434
489
|
* Checks whether a token represents a real-world asset, per the curated list of
|
|
@@ -438,7 +493,7 @@ function getAssetType(token, network) {
|
|
|
438
493
|
* @param network - Network the token lives on.
|
|
439
494
|
**/
|
|
440
495
|
function isRWAToken(token, network) {
|
|
441
|
-
return !!chains[network].rwaTokens?.
|
|
496
|
+
return !!chains[network].rwaTokens?.has(token);
|
|
442
497
|
}
|
|
443
498
|
/**
|
|
444
499
|
* Checks whether a pool is on the sunset list of a network.
|
|
@@ -447,7 +502,7 @@ function isRWAToken(token, network) {
|
|
|
447
502
|
* @param network - Network the pool lives on.
|
|
448
503
|
**/
|
|
449
504
|
function isSunsetPool(pool, network) {
|
|
450
|
-
return !!chains[network].sunsetPools?.
|
|
505
|
+
return !!chains[network].sunsetPools?.has(pool);
|
|
451
506
|
}
|
|
452
507
|
/**
|
|
453
508
|
* Checks whether a credit manager is on the sunset list of a network.
|
|
@@ -456,17 +511,51 @@ function isSunsetPool(pool, network) {
|
|
|
456
511
|
* @param network - Network the credit manager lives on.
|
|
457
512
|
**/
|
|
458
513
|
function isSunsetStrategy(creditManager, network) {
|
|
459
|
-
return !!chains[network].sunsetStrategies?.
|
|
514
|
+
return !!chains[network].sunsetStrategies?.has(creditManager);
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Hardcoded target collateral of a legacy credit manager, or `undefined` when
|
|
518
|
+
* the manager is not in the table and the on-chain rule should apply.
|
|
519
|
+
*
|
|
520
|
+
* @param creditManager - Credit manager address.
|
|
521
|
+
* @param network - Chain id or {@link NetworkType} label.
|
|
522
|
+
**/
|
|
523
|
+
function getLegacyStrategyTarget(creditManager, network) {
|
|
524
|
+
return getChain(network).legacyStrategyTargets?.get(creditManager);
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Hardcoded target collateral of an already-existing credit account, or
|
|
528
|
+
* `undefined` when the account is not in the table and the credit manager's
|
|
529
|
+
* target should apply.
|
|
530
|
+
*
|
|
531
|
+
* @param creditAccount - Credit account address.
|
|
532
|
+
* @param network - Chain id or {@link NetworkType} label.
|
|
533
|
+
**/
|
|
534
|
+
function getAccountTargetCollateral(creditAccount, network) {
|
|
535
|
+
return getChain(network).accountTargetCollaterals?.get(creditAccount);
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Curated display name of a token, or `undefined` when the token has none and
|
|
539
|
+
* its ticker symbol should be used instead.
|
|
540
|
+
*
|
|
541
|
+
* @param token - Token address.
|
|
542
|
+
* @param network - Chain id or {@link NetworkType} label.
|
|
543
|
+
**/
|
|
544
|
+
function getTokenPrettyName(token, network) {
|
|
545
|
+
return getChain(network).tokenPrettyNames?.get(token);
|
|
460
546
|
}
|
|
461
547
|
//#endregion
|
|
462
548
|
exports.NetworkType = NetworkType;
|
|
463
549
|
exports.SUPPORTED_NETWORKS = SUPPORTED_NETWORKS;
|
|
464
550
|
exports.chains = chains;
|
|
465
551
|
exports.findCuratorMarketConfigurator = findCuratorMarketConfigurator;
|
|
552
|
+
exports.getAccountTargetCollateral = getAccountTargetCollateral;
|
|
466
553
|
exports.getAssetType = getAssetType;
|
|
467
554
|
exports.getChain = getChain;
|
|
468
555
|
exports.getCuratorName = getCuratorName;
|
|
556
|
+
exports.getLegacyStrategyTarget = getLegacyStrategyTarget;
|
|
469
557
|
exports.getNetworkType = getNetworkType;
|
|
558
|
+
exports.getTokenPrettyName = getTokenPrettyName;
|
|
470
559
|
exports.isPublicNetwork = isPublicNetwork;
|
|
471
560
|
exports.isRWAToken = isRWAToken;
|
|
472
561
|
exports.isSunsetPool = isSunsetPool;
|
|
@@ -6,10 +6,13 @@ exports.SUPPORTED_NETWORKS = require_sdk_chain_chains.SUPPORTED_NETWORKS;
|
|
|
6
6
|
exports.chains = require_sdk_chain_chains.chains;
|
|
7
7
|
exports.detectNetwork = require_sdk_chain_detectNetwork.detectNetwork;
|
|
8
8
|
exports.findCuratorMarketConfigurator = require_sdk_chain_chains.findCuratorMarketConfigurator;
|
|
9
|
+
exports.getAccountTargetCollateral = require_sdk_chain_chains.getAccountTargetCollateral;
|
|
9
10
|
exports.getAssetType = require_sdk_chain_chains.getAssetType;
|
|
10
11
|
exports.getChain = require_sdk_chain_chains.getChain;
|
|
11
12
|
exports.getCuratorName = require_sdk_chain_chains.getCuratorName;
|
|
13
|
+
exports.getLegacyStrategyTarget = require_sdk_chain_chains.getLegacyStrategyTarget;
|
|
12
14
|
exports.getNetworkType = require_sdk_chain_chains.getNetworkType;
|
|
15
|
+
exports.getTokenPrettyName = require_sdk_chain_chains.getTokenPrettyName;
|
|
13
16
|
exports.isPublicNetwork = require_sdk_chain_chains.isPublicNetwork;
|
|
14
17
|
exports.isRWAToken = require_sdk_chain_chains.isRWAToken;
|
|
15
18
|
exports.isSunsetPool = require_sdk_chain_chains.isSunsetPool;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sdk_utils_mappers = require("../utils/mappers.js");
|
|
3
2
|
const require_sdk_chain_chains = require("../chain/chains.js");
|
|
4
3
|
require("../chain/index.js");
|
|
4
|
+
const require_sdk_utils_mappers = require("../utils/mappers.js");
|
|
5
5
|
//#region src/sdk/constants/networks.ts
|
|
6
6
|
const BLOCK_DURATION_LOCAL = {
|
|
7
7
|
Mainnet: 12050,
|
|
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_sdk_utils_mappers = require("../utils/mappers.js");
|
|
6
5
|
require("../constants/address-provider.js");
|
|
6
|
+
const require_sdk_utils_mappers = require("../utils/mappers.js");
|
|
7
7
|
require("../constants/index.js");
|
|
8
8
|
const require_sdk_base_BaseContract = require("../base/BaseContract.js");
|
|
9
9
|
require("../base/index.js");
|