flash-sdk 2.30.2 → 2.31.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.
@@ -4018,6 +4018,10 @@ export declare class PerpetualsClient {
4018
4018
  instructions: TransactionInstruction[];
4019
4019
  additionalSigners: Signer[];
4020
4020
  }>;
4021
+ swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN, minCollateralAmountOut: BN, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
4022
+ instructions: TransactionInstruction[];
4023
+ additionalSigners: Signer[];
4024
+ }>;
4021
4025
  removeCollateral: (collateralWithFee: BN, marketSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
4022
4026
  instructions: TransactionInstruction[];
4023
4027
  additionalSigners: Signer[];
@@ -4026,6 +4030,10 @@ export declare class PerpetualsClient {
4026
4030
  instructions: TransactionInstruction[];
4027
4031
  additionalSigners: Signer[];
4028
4032
  }>;
4033
+ removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string, minSwapAmountOut: BN, collateralDelta: BN, side: Side, poolConfig: PoolConfig, ephemeralSignerPubkey?: any) => Promise<{
4034
+ instructions: TransactionInstruction[];
4035
+ additionalSigners: Signer[];
4036
+ }>;
4029
4037
  increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, nftTradingAccount?: PublicKey, nftReferralAccount?: PublicKey, nftRebateTokenAccount?: PublicKey) => Promise<{
4030
4038
  instructions: TransactionInstruction[];
4031
4039
  additionalSigners: Signer[];
@@ -798,7 +798,7 @@ var PerpetualsClient = (function () {
798
798
  divergenceBps = price.getDivergenceFactor(emaPrice);
799
799
  }
800
800
  if (divergenceBps.gte(custodyAccount.oracle.maxDivergenceBps)) {
801
- var factorBps = (divergenceBps.mul(new anchor_1.BN(constants_1.BPS_POWER))).div(custodyAccount.oracle.maxDivergenceBps);
801
+ var factorBps = custodyAccount.oracle.maxDivergenceBps.isZero ? constants_1.BN_ZERO : (divergenceBps.mul(new anchor_1.BN(constants_1.BPS_POWER))).div(custodyAccount.oracle.maxDivergenceBps);
802
802
  var confBps = (price.confidence.muln(constants_1.BPS_POWER)).div(price.price);
803
803
  if (confBps.lt(custodyAccount.oracle.maxConfBps)) {
804
804
  var confFactor = anchor_1.BN.min(factorBps, new anchor_1.BN(50000));
@@ -1315,10 +1315,6 @@ var PerpetualsClient = (function () {
1315
1315
  collateralAmountReceived = maxWithdrawableAmount;
1316
1316
  collateralAmountRecievedUsd = collateralMinMaxPrice.min.getAssetAmountUsd(maxWithdrawableAmount, collateralCustodyAccount.decimals);
1317
1317
  }
1318
- if (discountBps.gt(constants_1.BN_ZERO)) {
1319
- var discount = collateralAmountRecievedUsd.mul(discountBps).div(new anchor_1.BN(constants_1.BPS_POWER));
1320
- collateralAmountRecievedUsd = exitFeeUsd.sub(discount);
1321
- }
1322
1318
  newPosition.collateralAmount = newPosition.collateralAmount.sub(collateralAmountReceived);
1323
1319
  newPosition.collateralUsd = collateralMinMaxPrice.min.getAssetAmountUsd(newPosition.collateralAmount, collateralCustodyAccount.decimals);
1324
1320
  var entryPrice = OraclePrice_1.OraclePrice.from({ price: newPosition.entryPrice.price, exponent: new anchor_1.BN(newPosition.entryPrice.exponent), confidence: constants_1.BN_ZERO, timestamp: constants_1.BN_ZERO });
@@ -1331,7 +1327,7 @@ var PerpetualsClient = (function () {
1331
1327
  var newLev = _this.getLeverageSync(newPosition.sizeUsd, newPosition.collateralAmount, collateralMinMaxPrice.min, collateralCustodyAccount.decimals, finalPnlUsdWithFee);
1332
1328
  return {
1333
1329
  newSizeUsd: newPosition.sizeUsd,
1334
- feeUsd: feeUsd.add(collateralAmountRecievedUsd),
1330
+ feeUsd: feeUsd,
1335
1331
  feeUsdWithDiscount: feeUsdWithDiscount.add(collateralAmountRecievedUsd),
1336
1332
  newLev: newLev,
1337
1333
  liquidationPrice: finalLiquidationPrice,
@@ -3826,6 +3822,121 @@ var PerpetualsClient = (function () {
3826
3822
  });
3827
3823
  });
3828
3824
  };
3825
+ this.swapAndAddCollateral = function (targetSymbol, inputSymbol, collateralSymbol, amountIn, minCollateralAmountOut, side, positionPubKey, poolConfig, skipBalanceChecks, ephemeralSignerPubkey) {
3826
+ if (skipBalanceChecks === void 0) { skipBalanceChecks = false; }
3827
+ if (ephemeralSignerPubkey === void 0) { ephemeralSignerPubkey = undefined; }
3828
+ return __awaiter(_this, void 0, void 0, function () {
3829
+ var publicKey, collateralCustodyConfig, targetCustodyConfig, inputCustodyConfig, wrappedSolAccount, preInstructions, instructions, postInstructions, additionalSigners, userInputTokenAccount, lamports, unWrappedSolBalance, _a, tokenAccountBalance, _b, userCollateralTokenAccount, marketAccount, instruction;
3830
+ return __generator(this, function (_c) {
3831
+ switch (_c.label) {
3832
+ case 0:
3833
+ publicKey = this.provider.wallet.publicKey;
3834
+ collateralCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(collateralSymbol).mintKey); });
3835
+ targetCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(targetSymbol).mintKey); });
3836
+ inputCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(inputSymbol).mintKey); });
3837
+ if (!collateralCustodyConfig || !targetCustodyConfig || !inputCustodyConfig) {
3838
+ throw "payTokenCustody not found";
3839
+ }
3840
+ if (inputCustodyConfig.mintKey.equals(collateralCustodyConfig.mintKey)) {
3841
+ throw "Use Simple Swap";
3842
+ }
3843
+ preInstructions = [];
3844
+ instructions = [];
3845
+ postInstructions = [];
3846
+ additionalSigners = [];
3847
+ if (!(inputSymbol == 'SOL')) return [3, 3];
3848
+ console.log("inputSymbol === SOL", inputSymbol);
3849
+ lamports = amountIn.add(new anchor_1.BN(this.minimumBalanceForRentExemptAccountLamports));
3850
+ console.log("lamports:", lamports.toNumber());
3851
+ if (!!skipBalanceChecks) return [3, 2];
3852
+ _a = anchor_1.BN.bind;
3853
+ return [4, this.provider.connection.getBalance(publicKey)];
3854
+ case 1:
3855
+ unWrappedSolBalance = new (_a.apply(anchor_1.BN, [void 0, _c.sent()]))();
3856
+ if (unWrappedSolBalance.lt(lamports)) {
3857
+ throw "Insufficient SOL Funds";
3858
+ }
3859
+ _c.label = 2;
3860
+ case 2:
3861
+ if (!ephemeralSignerPubkey) {
3862
+ wrappedSolAccount = new web3_js_1.Keypair();
3863
+ additionalSigners.push(wrappedSolAccount);
3864
+ }
3865
+ preInstructions = [
3866
+ web3_js_1.SystemProgram.createAccount({
3867
+ fromPubkey: publicKey,
3868
+ newAccountPubkey: (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey),
3869
+ lamports: lamports.toNumber(),
3870
+ space: 165,
3871
+ programId: spl_token_1.TOKEN_PROGRAM_ID,
3872
+ }),
3873
+ (0, spl_token_1.createInitializeAccount3Instruction)((ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey), spl_token_1.NATIVE_MINT, publicKey),
3874
+ ];
3875
+ postInstructions = [
3876
+ (0, spl_token_1.createCloseAccountInstruction)((ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey), publicKey, publicKey),
3877
+ ];
3878
+ return [3, 6];
3879
+ case 3:
3880
+ userInputTokenAccount = (0, spl_token_1.getAssociatedTokenAddressSync)(inputCustodyConfig.mintKey, publicKey, true);
3881
+ if (!!skipBalanceChecks) return [3, 6];
3882
+ return [4, (0, utils_1.checkIfAccountExists)(userInputTokenAccount, this.provider.connection)];
3883
+ case 4:
3884
+ if (!(_c.sent())) {
3885
+ throw "Insufficient Funds , token Account doesn't exist";
3886
+ }
3887
+ _b = anchor_1.BN.bind;
3888
+ return [4, this.provider.connection.getTokenAccountBalance(userInputTokenAccount)];
3889
+ case 5:
3890
+ tokenAccountBalance = new (_b.apply(anchor_1.BN, [void 0, (_c.sent()).value.amount]))();
3891
+ if (tokenAccountBalance.lt(amountIn)) {
3892
+ throw "Insufficient Funds need more ".concat(amountIn.sub(tokenAccountBalance), " tokens");
3893
+ }
3894
+ _c.label = 6;
3895
+ case 6:
3896
+ userCollateralTokenAccount = (0, spl_token_1.getAssociatedTokenAddressSync)(collateralCustodyConfig.mintKey, publicKey, true);
3897
+ return [4, (0, utils_1.checkIfAccountExists)(userCollateralTokenAccount, this.provider.connection)];
3898
+ case 7:
3899
+ if (!(_c.sent())) {
3900
+ preInstructions.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(publicKey, userCollateralTokenAccount, publicKey, collateralCustodyConfig.mintKey));
3901
+ }
3902
+ marketAccount = poolConfig.getMarketPk(targetCustodyConfig.custodyAccount, collateralCustodyConfig.custodyAccount, side);
3903
+ return [4, this.program.methods.swapAndAddCollateral({
3904
+ amountIn: amountIn,
3905
+ minCollateralAmountOut: minCollateralAmountOut,
3906
+ }).accounts({
3907
+ owner: publicKey,
3908
+ feePayer: publicKey,
3909
+ fundingAccount: inputSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userInputTokenAccount,
3910
+ transferAuthority: poolConfig.transferAuthority,
3911
+ perpetuals: poolConfig.perpetuals,
3912
+ pool: poolConfig.poolAddress,
3913
+ receivingCustody: inputCustodyConfig.custodyAccount,
3914
+ receivingCustodyOracleAccount: this.useExtOracleAccount ? inputCustodyConfig.extOracleAccount : inputCustodyConfig.intOracleAccount,
3915
+ receivingCustodyTokenAccount: inputCustodyConfig.tokenAccount,
3916
+ position: positionPubKey,
3917
+ market: marketAccount,
3918
+ targetCustody: targetCustodyConfig.custodyAccount,
3919
+ targetOracleAccount: this.useExtOracleAccount ? targetCustodyConfig.extOracleAccount : targetCustodyConfig.intOracleAccount,
3920
+ collateralCustody: collateralCustodyConfig.custodyAccount,
3921
+ collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
3922
+ collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
3923
+ eventAuthority: this.eventAuthority.publicKey,
3924
+ tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
3925
+ program: this.programId,
3926
+ ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY
3927
+ })
3928
+ .instruction()];
3929
+ case 8:
3930
+ instruction = _c.sent();
3931
+ instructions.push(instruction);
3932
+ return [2, {
3933
+ instructions: __spreadArray(__spreadArray(__spreadArray([], preInstructions, true), instructions, true), postInstructions, true),
3934
+ additionalSigners: additionalSigners
3935
+ }];
3936
+ }
3937
+ });
3938
+ });
3939
+ };
3829
3940
  this.removeCollateral = function (collateralWithFee, marketSymbol, collateralSymbol, side, positionPubKey, poolConfig, createUserATA, closeUsersWSOLATA, ephemeralSignerPubkey) {
3830
3941
  if (createUserATA === void 0) { createUserATA = true; }
3831
3942
  if (closeUsersWSOLATA === void 0) { closeUsersWSOLATA = false; }
@@ -4048,6 +4159,102 @@ var PerpetualsClient = (function () {
4048
4159
  });
4049
4160
  });
4050
4161
  };
4162
+ this.removeCollateralAndSwap = function (targetSymbol, collateralSymbol, outputSymbol, minSwapAmountOut, collateralDelta, side, poolConfig, ephemeralSignerPubkey) {
4163
+ if (ephemeralSignerPubkey === void 0) { ephemeralSignerPubkey = undefined; }
4164
+ return __awaiter(_this, void 0, void 0, function () {
4165
+ var publicKey, targetCustodyConfig, collateralCustodyConfig, outputCustodyConfig, wrappedSolAccount, preInstructions, instructions, postInstructions, additionalSigners, userReceivingTokenAccount, lamports, userCollateralTokenAccount, marketAccount, positionAccount, instruction;
4166
+ return __generator(this, function (_a) {
4167
+ switch (_a.label) {
4168
+ case 0:
4169
+ publicKey = this.provider.wallet.publicKey;
4170
+ targetCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(targetSymbol).mintKey); });
4171
+ collateralCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(collateralSymbol).mintKey); });
4172
+ outputCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(outputSymbol).mintKey); });
4173
+ if (outputCustodyConfig.mintKey.equals(collateralCustodyConfig.mintKey)) {
4174
+ throw "Dont use swap, just call remove collateral";
4175
+ }
4176
+ preInstructions = [];
4177
+ instructions = [];
4178
+ postInstructions = [];
4179
+ additionalSigners = [];
4180
+ if (!(outputSymbol == 'SOL')) return [3, 1];
4181
+ console.log("outputSymbol === SOL", outputSymbol);
4182
+ lamports = this.minimumBalanceForRentExemptAccountLamports;
4183
+ if (!ephemeralSignerPubkey) {
4184
+ wrappedSolAccount = new web3_js_1.Keypair();
4185
+ additionalSigners.push(wrappedSolAccount);
4186
+ }
4187
+ preInstructions = [
4188
+ web3_js_1.SystemProgram.createAccount({
4189
+ fromPubkey: publicKey,
4190
+ newAccountPubkey: (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey),
4191
+ lamports: lamports,
4192
+ space: 165,
4193
+ programId: spl_token_1.TOKEN_PROGRAM_ID,
4194
+ }),
4195
+ (0, spl_token_1.createInitializeAccount3Instruction)((ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey), spl_token_1.NATIVE_MINT, publicKey),
4196
+ ];
4197
+ postInstructions = [
4198
+ (0, spl_token_1.createCloseAccountInstruction)((ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey), publicKey, publicKey),
4199
+ ];
4200
+ return [3, 3];
4201
+ case 1:
4202
+ userReceivingTokenAccount = (0, spl_token_1.getAssociatedTokenAddressSync)(poolConfig.getTokenFromSymbol(outputSymbol).mintKey, publicKey, true);
4203
+ return [4, (0, utils_1.checkIfAccountExists)(userReceivingTokenAccount, this.provider.connection)];
4204
+ case 2:
4205
+ if (!(_a.sent())) {
4206
+ preInstructions.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(publicKey, userReceivingTokenAccount, publicKey, poolConfig.getTokenFromSymbol(outputSymbol).mintKey));
4207
+ }
4208
+ _a.label = 3;
4209
+ case 3:
4210
+ userCollateralTokenAccount = (0, spl_token_1.getAssociatedTokenAddressSync)(poolConfig.getTokenFromSymbol(collateralSymbol).mintKey, publicKey, true);
4211
+ return [4, (0, utils_1.checkIfAccountExists)(userCollateralTokenAccount, this.provider.connection)];
4212
+ case 4:
4213
+ if (!(_a.sent())) {
4214
+ preInstructions.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(publicKey, userCollateralTokenAccount, publicKey, poolConfig.getTokenFromSymbol(collateralSymbol).mintKey));
4215
+ }
4216
+ marketAccount = poolConfig.getMarketPk(targetCustodyConfig.custodyAccount, collateralCustodyConfig.custodyAccount, side);
4217
+ positionAccount = poolConfig.getPositionFromMarketPk(publicKey, marketAccount);
4218
+ return [4, this.program.methods
4219
+ .removeCollateralAndSwap({
4220
+ collateralDelta: collateralDelta,
4221
+ minSwapAmountOut: minSwapAmountOut,
4222
+ })
4223
+ .accounts({
4224
+ owner: publicKey,
4225
+ feePayer: publicKey,
4226
+ receivingAccount: outputSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userReceivingTokenAccount,
4227
+ collateralAccount: userCollateralTokenAccount,
4228
+ transferAuthority: poolConfig.transferAuthority,
4229
+ perpetuals: poolConfig.perpetuals,
4230
+ pool: poolConfig.poolAddress,
4231
+ position: positionAccount,
4232
+ market: marketAccount,
4233
+ targetCustody: targetCustodyConfig.custodyAccount,
4234
+ targetOracleAccount: this.useExtOracleAccount ? targetCustodyConfig.extOracleAccount : targetCustodyConfig.intOracleAccount,
4235
+ collateralCustody: collateralCustodyConfig.custodyAccount,
4236
+ collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
4237
+ collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
4238
+ dispensingCustody: outputCustodyConfig.custodyAccount,
4239
+ dispensingOracleAccount: this.useExtOracleAccount ? outputCustodyConfig.extOracleAccount : outputCustodyConfig.intOracleAccount,
4240
+ dispensingCustodyTokenAccount: outputCustodyConfig.tokenAccount,
4241
+ tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
4242
+ eventAuthority: this.eventAuthority.publicKey,
4243
+ program: this.programId,
4244
+ ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY
4245
+ })
4246
+ .instruction()];
4247
+ case 5:
4248
+ instruction = _a.sent();
4249
+ instructions.push(instruction);
4250
+ return [2, {
4251
+ instructions: __spreadArray(__spreadArray(__spreadArray([], preInstructions, true), instructions, true), postInstructions, true),
4252
+ additionalSigners: additionalSigners
4253
+ }];
4254
+ }
4255
+ });
4256
+ });
4257
+ };
4051
4258
  this.increaseSize = function (targetSymbol, collateralSymbol, positionPubKey, side, poolConfig, priceWithSlippage, sizeDelta, privilege, nftTradingAccount, nftReferralAccount, nftRebateTokenAccount) {
4052
4259
  if (nftTradingAccount === void 0) { nftTradingAccount = web3_js_1.PublicKey.default; }
4053
4260
  if (nftReferralAccount === void 0) { nftReferralAccount = web3_js_1.PublicKey.default; }
@@ -1472,123 +1472,6 @@
1472
1472
  }
1473
1473
  ]
1474
1474
  },
1475
- {
1476
- "programId": "FLASH6Lo6h3iasJKWDs2F8TkW2UKf3s15C8PMGuVfgBn",
1477
- "perpComposibilityProgramId": "FSWAPViR8ny5K96hezav8jynVubP2dJ2L7SbKzds2hwm",
1478
- "fbNftRewardProgramId": "FBRWDXSLysNbFQk64MQJcpkXP8e4fjezsGabV8jV7d7o",
1479
- "cluster": "mainnet-beta",
1480
- "poolName": "Test.1",
1481
- "poolAddress": "8isRqdPXU5DLhitggkw6xfyPu78W83JJ5TZYfpE36Beg",
1482
- "stakedLpTokenMint": "G79ZLZPd1wjK8dJAmGPti9D34XXo8RemnhgETFityz5",
1483
- "compoundingTokenMint": "8arwA4hCG4Jgs7WSqoV9mv7EGuSDoxQeVZ7zLt1kPCW2",
1484
- "stakedLpVault": "HaMspzihCtjULo7Jj2RksFDbnjU3YfoLg5biF1WCfiLM",
1485
- "compoundingLpVault": "EcMpHGK3xQJgDDUxnicHJDAUq812bLxWtD3KH2NCrieQ",
1486
- "metadataAccount": "F5c5aokEimuxvFUU7RwzjB2g9g95wgUqMtFdRdyti1oi",
1487
- "lpDecimals": 6,
1488
- "compoundingLpTokenSymbol": "FLP.7",
1489
- "stakedLpTokenSymbol": "sFLP.7",
1490
- "perpetuals": "7DWCtB5Z8rPiyBMKUwqyC95R9tJpbhoQhLM9LbK3Z5QZ",
1491
- "transferAuthority": "81xGAvJ27ZeRThU2JEfKAUeT4Fx6qCCd8WHZpujZbiiG",
1492
- "multisig": "3FqKnAQrvr6G6AqCAWKdqg9fVe6ceAk3A5Y1ibeQqV2V",
1493
- "addressLookupTableAddresses": [
1494
- "AUebVLw8UwN35Us2XcPQaTQejJoQ5T7ckWzxHTwN1mkM"
1495
- ],
1496
- "backupOracle": "AjAubETeBLhebBxLcErmzbavZfqF9bCxkpRAdyJtoi9G",
1497
- "nftCollectionAddress": "H4EQ8pcE7PQSQGG1WYW4hAA1nizU6ULYipHZcYk9b64u",
1498
- "rewardDistributionProgram": {
1499
- "programId": "FARNT7LL119pmy9vSkN9q1ApZESPaKHuuX5Acz1oBoME",
1500
- "transferAuthority": "E2GZM2FQmX2uGBcBpLQB3s5UhPJvM2F8BgHEkBG45xBN",
1501
- "rewardVault": "6sXyDryKp6hqV6E1jc7gbzTeWxTFUW1A6s39vzp55hLL",
1502
- "rewardMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
1503
- "rewardTokenAccount": "EhH4KEra2UfKdwRErjEFf2286BQ3BstKxfLiyYnF513h"
1504
- },
1505
- "tokens": [
1506
- {
1507
- "symbol": "USDC",
1508
- "mintKey": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
1509
- "decimals": 6,
1510
- "usdPrecision": 2,
1511
- "tokenPrecision": 4,
1512
- "isStable": true,
1513
- "isVirtual": false,
1514
- "pythTicker": "Crypto.USDC/USD",
1515
- "pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
1516
- },
1517
- {
1518
- "symbol": "TNSR",
1519
- "mintKey": "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6",
1520
- "decimals": 9,
1521
- "usdPrecision": 4,
1522
- "tokenPrecision": 4,
1523
- "isStable": false,
1524
- "isVirtual": false,
1525
- "pythTicker": "Crypto.TNSR/USD",
1526
- "pythPriceId": "05ecd4597cd48fe13d6cc3596c62af4f9675aee06e2e0b94c06d8bee2b659e05"
1527
- }
1528
- ],
1529
- "custodies": [
1530
- {
1531
- "custodyId": 0,
1532
- "custodyAccount": "8K7KATrT8wv23BDToiJo6Vw2BAnuWCRpsdPszTQcQVWG",
1533
- "tokenAccount": "GoBRUmxBeeJhi62qc3GJSJp6eHZJS2N2muqdC427z3Lg",
1534
- "symbol": "USDC",
1535
- "mintKey": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
1536
- "decimals": 6,
1537
- "usdPrecision": 2,
1538
- "tokenPrecision": 2,
1539
- "isStable": true,
1540
- "isVirtual": false,
1541
- "intOracleAddress": "GCtJxWQ57B3BJUYdWrhb3TUxzeiDUx275ZCxKkTV6G3N",
1542
- "extOracleAddress": "Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX",
1543
- "pythTicker": "Crypto.USDC/USD",
1544
- "pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
1545
- },
1546
- {
1547
- "custodyId": 1,
1548
- "custodyAccount": "FH2PJoGUWX8FrdPZRFL6X1uu39HNCNiototRYzKoSGvT",
1549
- "tokenAccount": "3bzDGCaqaNgH9JDECPd5DbdBkgrBT8pPpitqV1GurGsd",
1550
- "symbol": "TNSR",
1551
- "mintKey": "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6",
1552
- "decimals": 9,
1553
- "usdPrecision": 4,
1554
- "tokenPrecision": 4,
1555
- "isStable": false,
1556
- "isVirtual": false,
1557
- "intOracleAddress": "AH1f6CwHweibN4qybx7eu7AS1jUD2WtAG4ZXkndZKMyg",
1558
- "extOracleAddress": "9TSGDwcPQX4JpAvZbu2Wp5b68wSYkQvHCvfeBjYcCyC",
1559
- "pythTicker": "Crypto.TNSR/USD",
1560
- "pythPriceId": "05ecd4597cd48fe13d6cc3596c62af4f9675aee06e2e0b94c06d8bee2b659e05"
1561
- }
1562
- ],
1563
- "markets": [
1564
- {
1565
- "marketId": 0,
1566
- "marketAccount": "FBcbz7KLBf316xtgBsFCQ4nfa7J3Es6QXAzYdeBJJYgz",
1567
- "pool": "8isRqdPXU5DLhitggkw6xfyPu78W83JJ5TZYfpE36Beg",
1568
- "targetCustody": "FH2PJoGUWX8FrdPZRFL6X1uu39HNCNiototRYzKoSGvT",
1569
- "collateralCustody": "FH2PJoGUWX8FrdPZRFL6X1uu39HNCNiototRYzKoSGvT",
1570
- "side": "long",
1571
- "maxLev": 10,
1572
- "targetCustodyId": 1,
1573
- "collateralCustodyId": 1,
1574
- "targetMint": "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6",
1575
- "collateralMint": "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6"
1576
- },
1577
- {
1578
- "marketId": 1,
1579
- "marketAccount": "AsohBEPcsY6tyUnZWiyFDAMPZgRkboD61ZjTKnCuxXBc",
1580
- "pool": "8isRqdPXU5DLhitggkw6xfyPu78W83JJ5TZYfpE36Beg",
1581
- "targetCustody": "FH2PJoGUWX8FrdPZRFL6X1uu39HNCNiototRYzKoSGvT",
1582
- "collateralCustody": "8K7KATrT8wv23BDToiJo6Vw2BAnuWCRpsdPszTQcQVWG",
1583
- "side": "short",
1584
- "maxLev": 10,
1585
- "targetCustodyId": 1,
1586
- "collateralCustodyId": 0,
1587
- "targetMint": "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6",
1588
- "collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
1589
- }
1590
- ]
1591
- },
1592
1475
  {
1593
1476
  "programId": "FLASH6Lo6h3iasJKWDs2F8TkW2UKf3s15C8PMGuVfgBn",
1594
1477
  "perpComposibilityProgramId": "FSWAPViR8ny5K96hezav8jynVubP2dJ2L7SbKzds2hwm",
@@ -1791,17 +1674,6 @@
1791
1674
  "isVirtual": false,
1792
1675
  "pythTicker": "Crypto.ETH/USD",
1793
1676
  "pythPriceId": "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace"
1794
- },
1795
- {
1796
- "symbol": "JitoSOL",
1797
- "mintKey": "jtoSPya9XS5ESevDF1wTVsaJTGXG2Zi7PoNhZuNsaEg",
1798
- "decimals": 9,
1799
- "usdPrecision": 2,
1800
- "tokenPrecision": 4,
1801
- "isStable": false,
1802
- "isVirtual": false,
1803
- "pythTicker": "Crypto.JITOSOL/USD",
1804
- "pythPriceId": "67be9f519b95cf24338801051f9a808eff0a578ccb388db73b7f6fe1de019ffb"
1805
1677
  }
1806
1678
  ],
1807
1679
  "custodies": [
@@ -1868,22 +1740,6 @@
1868
1740
  "extOracleAddress": "42amVS4KgzR9rA28tkVYqVXjq9Qa8dcZQMbH5EYFX6XC",
1869
1741
  "pythTicker": "Crypto.ETH/USD",
1870
1742
  "pythPriceId": "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace"
1871
- },
1872
- {
1873
- "custodyId": 4,
1874
- "custodyAccount": "ATbBmmYoe8boViFtxYV2QLkX6b194sHMG54gFu9pNCWa",
1875
- "tokenAccount": "FuDjFggDYszQgBb2CT4iwy5XKcqPRfcAs6qmNNjC8Uxd",
1876
- "symbol": "JitoSOL",
1877
- "mintKey": "jtoSPya9XS5ESevDF1wTVsaJTGXG2Zi7PoNhZuNsaEg",
1878
- "decimals": 9,
1879
- "usdPrecision": 2,
1880
- "tokenPrecision": 4,
1881
- "isStable": false,
1882
- "isVirtual": false,
1883
- "intOracleAddress": "CvoTpWoqprBrzApWq5PQyxaj3neyYEMchSm1AVi43FrD",
1884
- "extOracleAddress": "AxaxyeDT8JnWERSaTKvFXvPKkEdxnamKSqpWbsSjYg1g",
1885
- "pythTicker": "Crypto.JITOSOL/USD",
1886
- "pythPriceId": "67be9f519b95cf24338801051f9a808eff0a578ccb388db73b7f6fe1de019ffb"
1887
1743
  }
1888
1744
  ],
1889
1745
  "markets": [
@@ -1964,19 +1820,6 @@
1964
1820
  "collateralCustodyId": 0,
1965
1821
  "targetMint": "BA17bkYW78GvnirtgRHcceQxZdwkhpzbvrwDU6voUXRz",
1966
1822
  "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
1967
- },
1968
- {
1969
- "marketId": 6,
1970
- "marketAccount": "BWhe2aFnpcmtLKVPWCgxeUuyKCUFKVMicnXVYK8iYyEz",
1971
- "pool": "7jA4ZSGwaBxXk5EmPKDCSc5RtZNHxyoxy22iQt3D2mH9",
1972
- "targetCustody": "8BHHyTJKvZXQkjCeigdkH7hAFcnfX5ecXwysjLnG18FT",
1973
- "collateralCustody": "ATbBmmYoe8boViFtxYV2QLkX6b194sHMG54gFu9pNCWa",
1974
- "side": "long",
1975
- "maxLev": 100,
1976
- "targetCustodyId": 1,
1977
- "collateralCustodyId": 4,
1978
- "targetMint": "So11111111111111111111111111111111111111112",
1979
- "collateralMint": "jtoSPya9XS5ESevDF1wTVsaJTGXG2Zi7PoNhZuNsaEg"
1980
1823
  }
1981
1824
  ]
1982
1825
  },