flash-sdk 2.43.0 → 2.44.1-alpha.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/CustodyAccount.d.ts +1 -1
- package/dist/MarketAccount.d.ts +4 -2
- package/dist/PerpetualsClient.d.ts +84 -58
- package/dist/PerpetualsClient.js +60 -37
- package/dist/PoolAccount.d.ts +1 -0
- package/dist/PoolConfig.json +112 -2
- package/dist/idl/perpetuals.d.ts +540 -56
- package/dist/idl/perpetuals.js +540 -56
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/PerpetualsClient.js
CHANGED
@@ -588,27 +588,34 @@ var PerpetualsClient = (function () {
|
|
588
588
|
}
|
589
589
|
});
|
590
590
|
}); };
|
591
|
-
this.removeCustody = function (poolName, tokenMint, ratios) { return __awaiter(_this, void 0, void 0, function () {
|
591
|
+
this.removeCustody = function (poolName, tokenMint, ratios, poolConfig) { return __awaiter(_this, void 0, void 0, function () {
|
592
|
+
var custodyConfig, userReceivingTokenAccount;
|
592
593
|
return __generator(this, function (_a) {
|
593
594
|
switch (_a.label) {
|
594
|
-
case 0:
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
595
|
+
case 0:
|
596
|
+
custodyConfig = poolConfig.custodies.find(function (f) { return f.mintKey.equals(tokenMint); });
|
597
|
+
userReceivingTokenAccount = (0, spl_token_1.getAssociatedTokenAddressSync)(tokenMint, this.admin, true);
|
598
|
+
return [4, this.program.methods
|
599
|
+
.removeCustody({ ratios: ratios })
|
600
|
+
.accounts({
|
601
|
+
admin: this.admin,
|
602
|
+
receivingAccount: userReceivingTokenAccount,
|
603
|
+
multisig: this.multisig.publicKey,
|
604
|
+
transferAuthority: this.authority.publicKey,
|
605
|
+
perpetuals: this.perpetuals.publicKey,
|
606
|
+
pool: this.getPoolKey(poolName),
|
607
|
+
custody: this.getCustodyKey(poolName, tokenMint),
|
608
|
+
custodyTokenAccount: this.getCustodyTokenAccountKey(poolName, tokenMint),
|
609
|
+
custodyOracleAccount: this.useExtOracleAccount ? custodyConfig.extOracleAccount : custodyConfig.intOracleAccount,
|
610
|
+
systemProgram: web3_js_1.SystemProgram.programId,
|
611
|
+
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
612
|
+
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
613
|
+
})
|
614
|
+
.rpc()
|
615
|
+
.catch(function (err) {
|
616
|
+
console.error(err);
|
617
|
+
throw err;
|
618
|
+
})];
|
612
619
|
case 1:
|
613
620
|
_a.sent();
|
614
621
|
return [2];
|
@@ -1234,8 +1241,9 @@ var PerpetualsClient = (function () {
|
|
1234
1241
|
}
|
1235
1242
|
return collateralInInputToken;
|
1236
1243
|
};
|
1237
|
-
this.getDecreaseSizeCollateralAndFeeSync = function (positionAccount, marketCorrelation, sizeDeltaUsd, keepLevSame, targetPrice, targetEmaPrice, marketConfig, targetCustodyAccount, collateralPrice, collateralEmaPrice, collateralCustodyAccount, currentTimestamp, side, poolConfig, discountBps) {
|
1244
|
+
this.getDecreaseSizeCollateralAndFeeSync = function (positionAccount, marketCorrelation, sizeDeltaUsd, keepLevSame, targetPrice, targetEmaPrice, marketConfig, targetCustodyAccount, collateralPrice, collateralEmaPrice, collateralCustodyAccount, currentTimestamp, side, poolConfig, discountBps, debugLogs) {
|
1238
1245
|
if (discountBps === void 0) { discountBps = constants_1.BN_ZERO; }
|
1246
|
+
if (debugLogs === void 0) { debugLogs = false; }
|
1239
1247
|
if (!marketConfig.marketAccount.equals(positionAccount.market)) {
|
1240
1248
|
throw new Error("marketCustodyAccount mismatch");
|
1241
1249
|
}
|
@@ -1272,6 +1280,9 @@ var PerpetualsClient = (function () {
|
|
1272
1280
|
var liabilityUsd = newPnl.lossUsd.add(totalFeesUsd);
|
1273
1281
|
var assetsUsd = newPnl.profitUsd.add(currentCollateralUsd);
|
1274
1282
|
var closeAmount, feesAmount;
|
1283
|
+
if (debugLogs) {
|
1284
|
+
console.log("assetsUsd.sub(liabilityUsd):", collateralCustodyAccount.decimals, assetsUsd.toString(), liabilityUsd.toString(), assetsUsd.sub(liabilityUsd).toString());
|
1285
|
+
}
|
1275
1286
|
if (assetsUsd.gte(liabilityUsd)) {
|
1276
1287
|
closeAmount = collateralMinMaxPrice.max.getTokenAmount(assetsUsd.sub(liabilityUsd), collateralCustodyAccount.decimals);
|
1277
1288
|
feesAmount = collateralMinMaxPrice.min.getTokenAmount(totalFeesUsd, collateralCustodyAccount.decimals);
|
@@ -1306,11 +1317,18 @@ var PerpetualsClient = (function () {
|
|
1306
1317
|
var collateralAmountReceived = closeAmount;
|
1307
1318
|
var collateralAmountRecievedUsd = collateralMinMaxPrice.min.getAssetAmountUsd(collateralAmountReceived, collateralCustodyAccount.decimals);
|
1308
1319
|
var maxWithdrawableAmount = _this.getMaxWithdrawableAmountSyncInternal(newPosition, targetPrice, targetEmaPrice, targetCustodyAccount, collateralPrice, collateralEmaPrice, collateralCustodyAccount, currentTimestamp, poolConfig, closeAmount);
|
1320
|
+
if (debugLogs) {
|
1321
|
+
console.log("maxWithdrawableAmount ", maxWithdrawableAmount.toString(), keepLevSame);
|
1322
|
+
console.log("collateralAmountReceived ", collateralAmountReceived.toString(), keepLevSame);
|
1323
|
+
}
|
1309
1324
|
if (collateralAmountReceived.lt(constants_1.BN_ZERO)) {
|
1310
1325
|
collateralAmountReceived = constants_1.BN_ZERO;
|
1311
1326
|
collateralAmountRecievedUsd = constants_1.BN_ZERO;
|
1312
1327
|
}
|
1313
1328
|
else if (collateralAmountReceived.gt(maxWithdrawableAmount)) {
|
1329
|
+
if (debugLogs) {
|
1330
|
+
console.log("exceeding to redicing maxWithdrawableAmount ", maxWithdrawableAmount.toString(), collateralAmountReceived.toString());
|
1331
|
+
}
|
1314
1332
|
collateralAmountReceived = maxWithdrawableAmount;
|
1315
1333
|
collateralAmountRecievedUsd = collateralMinMaxPrice.min.getAssetAmountUsd(maxWithdrawableAmount, collateralCustodyAccount.decimals);
|
1316
1334
|
}
|
@@ -1998,8 +2016,8 @@ var PerpetualsClient = (function () {
|
|
1998
2016
|
throw Error("incorrect markets");
|
1999
2017
|
}
|
2000
2018
|
var position = markets[index].getCollectivePosition();
|
2001
|
-
var collectivePnl = _this.getPnlSync(position, tokenPrices[markets[index].
|
2002
|
-
var collateralMinMaxPrice = _this.getMinAndMaxOraclePriceSync(tokenPrices[markets[index].
|
2019
|
+
var collectivePnl = _this.getPnlSync(position, tokenPrices[markets[index].targetCustodyUid], tokenEmaPrices[markets[index].targetCustodyUid], custodies[markets[index].targetCustodyUid], tokenPrices[markets[index].collateralCustodyUid], tokenEmaPrices[markets[index].collateralCustodyUid], custodies[markets[index].collateralCustodyUid], currentTime, custodies[markets[index].targetCustodyUid].pricing.delaySeconds, poolConfig);
|
2020
|
+
var collateralMinMaxPrice = _this.getMinAndMaxOraclePriceSync(tokenPrices[markets[index].collateralCustodyUid], tokenEmaPrices[markets[index].collateralCustodyUid], custodies[markets[index].collateralCustodyUid]);
|
2003
2021
|
var collectiveCollateralUsd = collateralMinMaxPrice.min.getAssetAmountUsd(position.collateralAmount, position.collateralDecimals);
|
2004
2022
|
var collectiveLossUsd = anchor_1.BN.min(collectivePnl.lossUsd, collectiveCollateralUsd);
|
2005
2023
|
poolEquityUsd = (poolEquityUsd.add(collectiveLossUsd)).sub(collectivePnl.profitUsd);
|
@@ -6049,11 +6067,11 @@ var PerpetualsClient = (function () {
|
|
6049
6067
|
});
|
6050
6068
|
});
|
6051
6069
|
};
|
6052
|
-
this.placeLimitOrder = function (targetSymbol, collateralSymbol, reserveSymbol, side, limitPrice, reserveAmount, sizeAmount, stopLossPrice, takeProfitPrice,
|
6070
|
+
this.placeLimitOrder = function (targetSymbol, collateralSymbol, reserveSymbol, receiveSymbol, side, limitPrice, reserveAmount, sizeAmount, stopLossPrice, takeProfitPrice, poolConfig, skipBalanceChecks, ephemeralSignerPubkey) {
|
6053
6071
|
if (skipBalanceChecks === void 0) { skipBalanceChecks = false; }
|
6054
6072
|
if (ephemeralSignerPubkey === void 0) { ephemeralSignerPubkey = undefined; }
|
6055
6073
|
return __awaiter(_this, void 0, void 0, function () {
|
6056
|
-
var publicKey, targetCustodyConfig, reserveCustodyConfig, collateralCustodyConfig, marketAccount, userReserveTokenAccount, wrappedSolAccount, preInstructions, instructions, postInstructions, additionalSigners, accCreationLamports, lamports, unWrappedSolBalance, _a, tokenAccountBalance, _b, positionAccount, orderAccount, placeLimitOrder, err_40;
|
6074
|
+
var publicKey, targetCustodyConfig, reserveCustodyConfig, collateralCustodyConfig, receiveCustodyConfig, marketAccount, userReserveTokenAccount, wrappedSolAccount, preInstructions, instructions, postInstructions, additionalSigners, accCreationLamports, lamports, unWrappedSolBalance, _a, tokenAccountBalance, _b, positionAccount, orderAccount, placeLimitOrder, err_40;
|
6057
6075
|
return __generator(this, function (_c) {
|
6058
6076
|
switch (_c.label) {
|
6059
6077
|
case 0:
|
@@ -6061,6 +6079,7 @@ var PerpetualsClient = (function () {
|
|
6061
6079
|
targetCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(targetSymbol).mintKey); });
|
6062
6080
|
reserveCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(reserveSymbol).mintKey); });
|
6063
6081
|
collateralCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(collateralSymbol).mintKey); });
|
6082
|
+
receiveCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(receiveSymbol).mintKey); });
|
6064
6083
|
marketAccount = poolConfig.getMarketPk(targetCustodyConfig.custodyAccount, collateralCustodyConfig.custodyAccount, side);
|
6065
6084
|
return [4, (0, spl_token_1.getAssociatedTokenAddress)(poolConfig.getTokenFromSymbol(reserveSymbol).mintKey, publicKey)];
|
6066
6085
|
case 1:
|
@@ -6128,8 +6147,7 @@ var PerpetualsClient = (function () {
|
|
6128
6147
|
reserveAmount: reserveAmount,
|
6129
6148
|
sizeAmount: sizeAmount,
|
6130
6149
|
stopLossPrice: stopLossPrice,
|
6131
|
-
takeProfitPrice: takeProfitPrice
|
6132
|
-
receiveCustodyId: receiveCustodyId
|
6150
|
+
takeProfitPrice: takeProfitPrice
|
6133
6151
|
})
|
6134
6152
|
.accounts({
|
6135
6153
|
owner: publicKey,
|
@@ -6145,6 +6163,7 @@ var PerpetualsClient = (function () {
|
|
6145
6163
|
reserveCustody: reserveCustodyConfig.custodyAccount,
|
6146
6164
|
reserveOracleAccount: this.useExtOracleAccount ? reserveCustodyConfig.extOracleAccount : reserveCustodyConfig.intOracleAccount,
|
6147
6165
|
reserveCustodyTokenAccount: reserveCustodyConfig.tokenAccount,
|
6166
|
+
receiveCustody: receiveCustodyConfig.custodyAccount,
|
6148
6167
|
systemProgram: web3_js_1.SystemProgram.programId,
|
6149
6168
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
6150
6169
|
eventAuthority: this.eventAuthority.publicKey,
|
@@ -6168,11 +6187,11 @@ var PerpetualsClient = (function () {
|
|
6168
6187
|
});
|
6169
6188
|
});
|
6170
6189
|
};
|
6171
|
-
this.editLimitOrder = function (targetSymbol, collateralSymbol, reserveSymbol, side, orderId, limitPrice, sizeAmount, stopLossPrice, takeProfitPrice,
|
6190
|
+
this.editLimitOrder = function (targetSymbol, collateralSymbol, reserveSymbol, receiveSymbol, side, orderId, limitPrice, sizeAmount, stopLossPrice, takeProfitPrice, poolConfig, createUserATA, ephemeralSignerPubkey) {
|
6172
6191
|
if (createUserATA === void 0) { createUserATA = true; }
|
6173
6192
|
if (ephemeralSignerPubkey === void 0) { ephemeralSignerPubkey = undefined; }
|
6174
6193
|
return __awaiter(_this, void 0, void 0, function () {
|
6175
|
-
var publicKey, targetCustodyConfig, reserveCustodyConfig, collateralCustodyConfig, marketAccount, preInstructions, instructions, postInstructions, additionalSigners, wrappedSolAccount, userReceivingTokenAccount, lamports, _a, positionAccount, orderAccount, editLimitOrder, err_41;
|
6194
|
+
var publicKey, targetCustodyConfig, reserveCustodyConfig, collateralCustodyConfig, receiveCustodyConfig, marketAccount, preInstructions, instructions, postInstructions, additionalSigners, wrappedSolAccount, userReceivingTokenAccount, lamports, _a, positionAccount, orderAccount, editLimitOrder, err_41;
|
6176
6195
|
return __generator(this, function (_b) {
|
6177
6196
|
switch (_b.label) {
|
6178
6197
|
case 0:
|
@@ -6180,6 +6199,7 @@ var PerpetualsClient = (function () {
|
|
6180
6199
|
targetCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(targetSymbol).mintKey); });
|
6181
6200
|
reserveCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(reserveSymbol).mintKey); });
|
6182
6201
|
collateralCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(collateralSymbol).mintKey); });
|
6202
|
+
receiveCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(receiveSymbol).mintKey); });
|
6183
6203
|
marketAccount = poolConfig.getMarketPk(targetCustodyConfig.custodyAccount, collateralCustodyConfig.custodyAccount, side);
|
6184
6204
|
preInstructions = [];
|
6185
6205
|
instructions = [];
|
@@ -6230,12 +6250,12 @@ var PerpetualsClient = (function () {
|
|
6230
6250
|
limitPrice: limitPrice,
|
6231
6251
|
sizeAmount: sizeAmount,
|
6232
6252
|
stopLossPrice: stopLossPrice,
|
6233
|
-
takeProfitPrice: takeProfitPrice
|
6234
|
-
receiveCustodyId: receiveCustodyId
|
6253
|
+
takeProfitPrice: takeProfitPrice
|
6235
6254
|
})
|
6236
6255
|
.accounts({
|
6237
6256
|
owner: publicKey,
|
6238
6257
|
feePayer: publicKey,
|
6258
|
+
receivingAccount: reserveSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userReceivingTokenAccount,
|
6239
6259
|
transferAuthority: poolConfig.transferAuthority,
|
6240
6260
|
perpetuals: poolConfig.perpetuals,
|
6241
6261
|
pool: poolConfig.poolAddress,
|
@@ -6247,7 +6267,7 @@ var PerpetualsClient = (function () {
|
|
6247
6267
|
reserveCustody: reserveCustodyConfig.custodyAccount,
|
6248
6268
|
reserveOracleAccount: this.useExtOracleAccount ? reserveCustodyConfig.extOracleAccount : reserveCustodyConfig.intOracleAccount,
|
6249
6269
|
reserveCustodyTokenAccount: reserveCustodyConfig.tokenAccount,
|
6250
|
-
|
6270
|
+
receiveCustody: receiveCustodyConfig.custodyAccount,
|
6251
6271
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
6252
6272
|
eventAuthority: this.eventAuthority.publicKey,
|
6253
6273
|
program: this.programId,
|
@@ -6403,14 +6423,15 @@ var PerpetualsClient = (function () {
|
|
6403
6423
|
});
|
6404
6424
|
});
|
6405
6425
|
};
|
6406
|
-
this.placeTriggerOrder = function (targetSymbol, collateralSymbol, side, triggerPrice, deltaSizeAmount, isStopLoss,
|
6407
|
-
var publicKey, targetCustodyConfig, collateralCustodyConfig, marketAccount, preInstructions, instructions, postInstructions, additionalSigners, positionAccount, orderAccount, placeTriggerOrder, err_44;
|
6426
|
+
this.placeTriggerOrder = function (targetSymbol, collateralSymbol, receiveSymbol, side, triggerPrice, deltaSizeAmount, isStopLoss, poolConfig) { return __awaiter(_this, void 0, void 0, function () {
|
6427
|
+
var publicKey, targetCustodyConfig, collateralCustodyConfig, receivingCustodyConfig, marketAccount, preInstructions, instructions, postInstructions, additionalSigners, positionAccount, orderAccount, placeTriggerOrder, err_44;
|
6408
6428
|
return __generator(this, function (_a) {
|
6409
6429
|
switch (_a.label) {
|
6410
6430
|
case 0:
|
6411
6431
|
publicKey = this.provider.wallet.publicKey;
|
6412
6432
|
targetCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(targetSymbol).mintKey); });
|
6413
6433
|
collateralCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(collateralSymbol).mintKey); });
|
6434
|
+
receivingCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(receiveSymbol).mintKey); });
|
6414
6435
|
marketAccount = poolConfig.getMarketPk(targetCustodyConfig.custodyAccount, collateralCustodyConfig.custodyAccount, side);
|
6415
6436
|
preInstructions = [];
|
6416
6437
|
instructions = [];
|
@@ -6425,8 +6446,7 @@ var PerpetualsClient = (function () {
|
|
6425
6446
|
.placeTriggerOrder({
|
6426
6447
|
triggerPrice: triggerPrice,
|
6427
6448
|
deltaSizeAmount: deltaSizeAmount,
|
6428
|
-
isStopLoss: isStopLoss
|
6429
|
-
receiveCustodyId: receiveCustodyId
|
6449
|
+
isStopLoss: isStopLoss
|
6430
6450
|
})
|
6431
6451
|
.accounts({
|
6432
6452
|
owner: publicKey,
|
@@ -6440,6 +6460,7 @@ var PerpetualsClient = (function () {
|
|
6440
6460
|
targetOracleAccount: this.useExtOracleAccount ? targetCustodyConfig.extOracleAccount : targetCustodyConfig.intOracleAccount,
|
6441
6461
|
collateralCustody: collateralCustodyConfig.custodyAccount,
|
6442
6462
|
collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
|
6463
|
+
receiveCustody: receivingCustodyConfig.custodyAccount,
|
6443
6464
|
systemProgram: web3_js_1.SystemProgram.programId,
|
6444
6465
|
eventAuthority: this.eventAuthority.publicKey,
|
6445
6466
|
program: this.programId,
|
@@ -6461,14 +6482,15 @@ var PerpetualsClient = (function () {
|
|
6461
6482
|
}
|
6462
6483
|
});
|
6463
6484
|
}); };
|
6464
|
-
this.editTriggerOrder = function (targetSymbol, collateralSymbol, side, orderId, triggerPrice, deltaSizeAmount, isStopLoss, poolConfig) { return __awaiter(_this, void 0, void 0, function () {
|
6465
|
-
var publicKey, targetCustodyConfig, collateralCustodyConfig, marketAccount, preInstructions, instructions, postInstructions, additionalSigners, positionAccount, orderAccount, editTriggerOrder, err_45;
|
6485
|
+
this.editTriggerOrder = function (targetSymbol, collateralSymbol, receiveSymbol, side, orderId, triggerPrice, deltaSizeAmount, isStopLoss, poolConfig) { return __awaiter(_this, void 0, void 0, function () {
|
6486
|
+
var publicKey, targetCustodyConfig, collateralCustodyConfig, receivingCustodyConfig, marketAccount, preInstructions, instructions, postInstructions, additionalSigners, positionAccount, orderAccount, editTriggerOrder, err_45;
|
6466
6487
|
return __generator(this, function (_a) {
|
6467
6488
|
switch (_a.label) {
|
6468
6489
|
case 0:
|
6469
6490
|
publicKey = this.provider.wallet.publicKey;
|
6470
6491
|
targetCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(targetSymbol).mintKey); });
|
6471
6492
|
collateralCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(collateralSymbol).mintKey); });
|
6493
|
+
receivingCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(receiveSymbol).mintKey); });
|
6472
6494
|
marketAccount = poolConfig.getMarketPk(targetCustodyConfig.custodyAccount, collateralCustodyConfig.custodyAccount, side);
|
6473
6495
|
preInstructions = [];
|
6474
6496
|
instructions = [];
|
@@ -6497,6 +6519,7 @@ var PerpetualsClient = (function () {
|
|
6497
6519
|
targetOracleAccount: this.useExtOracleAccount ? targetCustodyConfig.extOracleAccount : targetCustodyConfig.intOracleAccount,
|
6498
6520
|
collateralCustody: collateralCustodyConfig.custodyAccount,
|
6499
6521
|
collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
|
6522
|
+
receiveCustody: receivingCustodyConfig.custodyAccount,
|
6500
6523
|
eventAuthority: this.eventAuthority.publicKey,
|
6501
6524
|
program: this.programId,
|
6502
6525
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY
|
package/dist/PoolAccount.d.ts
CHANGED
package/dist/PoolConfig.json
CHANGED
@@ -1505,6 +1505,17 @@
|
|
1505
1505
|
"isVirtual": false,
|
1506
1506
|
"pythTicker": "Crypto.TRUMP/USD",
|
1507
1507
|
"pythPriceId": "0x879551021853eec7a7dc827578e8e69da7e4fa8148339aa0d3d5296405be4b1a"
|
1508
|
+
},
|
1509
|
+
{
|
1510
|
+
"symbol": "FARTCOIN",
|
1511
|
+
"mintKey": "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump",
|
1512
|
+
"decimals": 6,
|
1513
|
+
"usdPrecision": 4,
|
1514
|
+
"tokenPrecision": 4,
|
1515
|
+
"isStable": false,
|
1516
|
+
"isVirtual": false,
|
1517
|
+
"pythTicker": "Crypto.FARTCOIN/USD",
|
1518
|
+
"pythPriceId": "58cd29ef0e714c5affc44f269b2c1899a52da4169d7acc147b9da692e6953608"
|
1508
1519
|
}
|
1509
1520
|
],
|
1510
1521
|
"custodies": [
|
@@ -1539,6 +1550,22 @@
|
|
1539
1550
|
"extOracleAddress": "9vNb2tQoZ8bB4vzMbQLWViGwNaDJVtct13AGgno1wazp",
|
1540
1551
|
"pythTicker": "Crypto.TRUMP/USD",
|
1541
1552
|
"pythPriceId": "0x879551021853eec7a7dc827578e8e69da7e4fa8148339aa0d3d5296405be4b1a"
|
1553
|
+
},
|
1554
|
+
{
|
1555
|
+
"custodyId": 2,
|
1556
|
+
"custodyAccount": "EHzgXgb2azBXG9bgPT2GEPfe6FtyQwiJtPxMUwny4WFe",
|
1557
|
+
"tokenAccount": "ERtCuHUe8L4WFefMTR7T5dSndszikuF7db9EbisF5Gyi",
|
1558
|
+
"symbol": "FARTCOIN",
|
1559
|
+
"mintKey": "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump",
|
1560
|
+
"decimals": 6,
|
1561
|
+
"usdPrecision": 4,
|
1562
|
+
"tokenPrecision": 4,
|
1563
|
+
"isStable": false,
|
1564
|
+
"isVirtual": false,
|
1565
|
+
"intOracleAddress": "CXUxUV4tsf7sYnX52KrKDdkskyGGHXGkQgDHXf2fk2UW",
|
1566
|
+
"extOracleAddress": "2t8eUbYKjidMs3uSeYM9jXM9uudYZwGkSeTB4TKjmvnC",
|
1567
|
+
"pythTicker": "Crypto.FARTCOIN/USD",
|
1568
|
+
"pythPriceId": "58cd29ef0e714c5affc44f269b2c1899a52da4169d7acc147b9da692e6953608"
|
1542
1569
|
}
|
1543
1570
|
],
|
1544
1571
|
"markets": [
|
@@ -1569,6 +1596,34 @@
|
|
1569
1596
|
"collateralCustodyId": 0,
|
1570
1597
|
"targetMint": "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
|
1571
1598
|
"collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
|
1599
|
+
},
|
1600
|
+
{
|
1601
|
+
"marketId": 2,
|
1602
|
+
"marketAccount": "9PYLfK5KFQVKptGjZdUGWW3hs24g3TMcYAS3B73k3BDi",
|
1603
|
+
"marketCorrelation": true,
|
1604
|
+
"pool": "Crk3yzGpPCt9thXmV9wCkBM9nBq8EHhBct71ArkKY9wA",
|
1605
|
+
"targetCustody": "EHzgXgb2azBXG9bgPT2GEPfe6FtyQwiJtPxMUwny4WFe",
|
1606
|
+
"collateralCustody": "EHzgXgb2azBXG9bgPT2GEPfe6FtyQwiJtPxMUwny4WFe",
|
1607
|
+
"side": "long",
|
1608
|
+
"maxLev": 5,
|
1609
|
+
"targetCustodyId": 2,
|
1610
|
+
"collateralCustodyId": 2,
|
1611
|
+
"targetMint": "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump",
|
1612
|
+
"collateralMint": "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump"
|
1613
|
+
},
|
1614
|
+
{
|
1615
|
+
"marketId": 3,
|
1616
|
+
"marketAccount": "Cgf9B7zfxFxtamBMgDsg879fHaXGcoxX5a9wpcSbTUnF",
|
1617
|
+
"marketCorrelation": false,
|
1618
|
+
"pool": "Crk3yzGpPCt9thXmV9wCkBM9nBq8EHhBct71ArkKY9wA",
|
1619
|
+
"targetCustody": "EHzgXgb2azBXG9bgPT2GEPfe6FtyQwiJtPxMUwny4WFe",
|
1620
|
+
"collateralCustody": "B1b3WnCbwrQC8yk6o5rVLGGJFD7BdQBLyaWsRw4Lqgp2",
|
1621
|
+
"side": "short",
|
1622
|
+
"maxLev": 5,
|
1623
|
+
"targetCustodyId": 2,
|
1624
|
+
"collateralCustodyId": 0,
|
1625
|
+
"targetMint": "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump",
|
1626
|
+
"collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
|
1572
1627
|
}
|
1573
1628
|
]
|
1574
1629
|
},
|
@@ -3193,6 +3248,17 @@
|
|
3193
3248
|
"isVirtual": false,
|
3194
3249
|
"pythTicker": "Crypto.TRUMP/USD",
|
3195
3250
|
"pythPriceId": "0x879551021853eec7a7dc827578e8e69da7e4fa8148339aa0d3d5296405be4b1a"
|
3251
|
+
},
|
3252
|
+
{
|
3253
|
+
"symbol": "FARTCOIN",
|
3254
|
+
"mintKey": "fartpRHniUMJ2dG3AFkFcmvDHptBSqBbttYwE3hKv5t",
|
3255
|
+
"decimals": 6,
|
3256
|
+
"usdPrecision": 4,
|
3257
|
+
"tokenPrecision": 4,
|
3258
|
+
"isStable": false,
|
3259
|
+
"isVirtual": false,
|
3260
|
+
"pythTicker": "Crypto.FARTCOIN/USD",
|
3261
|
+
"pythPriceId": "58cd29ef0e714c5affc44f269b2c1899a52da4169d7acc147b9da692e6953608"
|
3196
3262
|
}
|
3197
3263
|
],
|
3198
3264
|
"custodies": [
|
@@ -3227,6 +3293,22 @@
|
|
3227
3293
|
"extOracleAddress": "9vNb2tQoZ8bB4vzMbQLWViGwNaDJVtct13AGgno1wazp",
|
3228
3294
|
"pythTicker": "Crypto.TRUMP/USD",
|
3229
3295
|
"pythPriceId": "0x879551021853eec7a7dc827578e8e69da7e4fa8148339aa0d3d5296405be4b1a"
|
3296
|
+
},
|
3297
|
+
{
|
3298
|
+
"custodyId": 2,
|
3299
|
+
"custodyAccount": "EbH7fBbcTojR5P8kPDEFeUnFRGr5SXKWaavqtCgpH9G4",
|
3300
|
+
"tokenAccount": "422tzHNrMwXNXwU6L9PSYrhJAN93gubGM78r5es5V1jg",
|
3301
|
+
"symbol": "FARTCOIN",
|
3302
|
+
"mintKey": "fartpRHniUMJ2dG3AFkFcmvDHptBSqBbttYwE3hKv5t",
|
3303
|
+
"decimals": 6,
|
3304
|
+
"usdPrecision": 4,
|
3305
|
+
"tokenPrecision": 4,
|
3306
|
+
"isStable": false,
|
3307
|
+
"isVirtual": false,
|
3308
|
+
"intOracleAddress": "97WpDbJGCpjSQmWsP7ao5CF7kesyyQ4MTk54tWoaP4bD",
|
3309
|
+
"extOracleAddress": "2t8eUbYKjidMs3uSeYM9jXM9uudYZwGkSeTB4TKjmvnC",
|
3310
|
+
"pythTicker": "Crypto.FARTCOIN/USD",
|
3311
|
+
"pythPriceId": "58cd29ef0e714c5affc44f269b2c1899a52da4169d7acc147b9da692e6953608"
|
3230
3312
|
}
|
3231
3313
|
],
|
3232
3314
|
"markets": [
|
@@ -3234,7 +3316,7 @@
|
|
3234
3316
|
"marketId": 0,
|
3235
3317
|
"marketAccount": "CZBZsoRS8zyoysWqQoQGQct12srenVvKdqG5cyFhyRJN",
|
3236
3318
|
"marketCorrelation": true,
|
3237
|
-
"pool": "
|
3319
|
+
"pool": "GJMj6ZeK8JYvwYNfurMKf6sEYZLkonqvYzXowcS6TL5D",
|
3238
3320
|
"targetCustody": "2dLnRMbXfMx8DnGb6CbM3BrLv4F78SWLx7uWRTZPTZ1y",
|
3239
3321
|
"collateralCustody": "2dLnRMbXfMx8DnGb6CbM3BrLv4F78SWLx7uWRTZPTZ1y",
|
3240
3322
|
"side": "long",
|
@@ -3248,7 +3330,7 @@
|
|
3248
3330
|
"marketId": 1,
|
3249
3331
|
"marketAccount": "E2f2k4bMv6g4usjt9zAz43CudykXWGwjG8s6nYtJF8Yy",
|
3250
3332
|
"marketCorrelation": false,
|
3251
|
-
"pool": "
|
3333
|
+
"pool": "GJMj6ZeK8JYvwYNfurMKf6sEYZLkonqvYzXowcS6TL5D",
|
3252
3334
|
"targetCustody": "2dLnRMbXfMx8DnGb6CbM3BrLv4F78SWLx7uWRTZPTZ1y",
|
3253
3335
|
"collateralCustody": "FheNnJ2RmuVCJFvHbhADFHwfQwnCX9nMhdsay1hxSmkv",
|
3254
3336
|
"side": "short",
|
@@ -3257,6 +3339,34 @@
|
|
3257
3339
|
"collateralCustodyId": 0,
|
3258
3340
|
"targetMint": "trmpE3o2TJpkvszv7hZvFw72ynYYfyoVJXjJajfK5VH",
|
3259
3341
|
"collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
|
3342
|
+
},
|
3343
|
+
{
|
3344
|
+
"marketId": 2,
|
3345
|
+
"marketAccount": "B1ZSHUD97mU8DPG4LeWx7QcN4wV6KkTKNmv9hXU2Qb95",
|
3346
|
+
"marketCorrelation": true,
|
3347
|
+
"pool": "GJMj6ZeK8JYvwYNfurMKf6sEYZLkonqvYzXowcS6TL5D",
|
3348
|
+
"targetCustody": "EbH7fBbcTojR5P8kPDEFeUnFRGr5SXKWaavqtCgpH9G4",
|
3349
|
+
"collateralCustody": "EbH7fBbcTojR5P8kPDEFeUnFRGr5SXKWaavqtCgpH9G4",
|
3350
|
+
"side": "long",
|
3351
|
+
"maxLev": 5,
|
3352
|
+
"targetCustodyId": 2,
|
3353
|
+
"collateralCustodyId": 2,
|
3354
|
+
"targetMint": "fartpRHniUMJ2dG3AFkFcmvDHptBSqBbttYwE3hKv5t",
|
3355
|
+
"collateralMint": "fartpRHniUMJ2dG3AFkFcmvDHptBSqBbttYwE3hKv5t"
|
3356
|
+
},
|
3357
|
+
{
|
3358
|
+
"marketId": 3,
|
3359
|
+
"marketAccount": "8zyghWdrtfKA8YAb78zibWdrUqByURiFihipodg3R5x8",
|
3360
|
+
"marketCorrelation": false,
|
3361
|
+
"pool": "GJMj6ZeK8JYvwYNfurMKf6sEYZLkonqvYzXowcS6TL5D",
|
3362
|
+
"targetCustody": "EbH7fBbcTojR5P8kPDEFeUnFRGr5SXKWaavqtCgpH9G4",
|
3363
|
+
"collateralCustody": "FheNnJ2RmuVCJFvHbhADFHwfQwnCX9nMhdsay1hxSmkv",
|
3364
|
+
"side": "short",
|
3365
|
+
"maxLev": 5,
|
3366
|
+
"targetCustodyId": 2,
|
3367
|
+
"collateralCustodyId": 0,
|
3368
|
+
"targetMint": "fartpRHniUMJ2dG3AFkFcmvDHptBSqBbttYwE3hKv5t",
|
3369
|
+
"collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
|
3260
3370
|
}
|
3261
3371
|
]
|
3262
3372
|
}
|