pinpet-sdk 2.1.18 → 2.1.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/pinpet-sdk.cjs.js +105 -102
- package/dist/pinpet-sdk.esm.js +105 -102
- package/dist/pinpet-sdk.js +105 -102
- package/dist/pinpet-sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/idl/pinpet.json +99 -94
- package/src/modules/simulator/buy_sell_token.js +0 -5
- package/src/modules/simulator/calcLiq.js +4 -1
- package/src/modules/simulator/calc_sol_liq.js +1 -1
- package/src/utils/curve_amm.js +1 -1
- /package/src/idl/pinpet_/344/270/273/347/275/{221.json" → 221 copy.json"} +0 -0
package/dist/pinpet-sdk.cjs.js
CHANGED
|
@@ -41996,7 +41996,7 @@ class CurveAMM$8 {
|
|
|
41996
41996
|
* Maximum price for u128 (matches PRICE_CALCULATION_LIMIT in Rust)
|
|
41997
41997
|
* @type {bigint}
|
|
41998
41998
|
*/
|
|
41999
|
-
static MAX_U128_PRICE =
|
|
41999
|
+
static MAX_U128_PRICE = 70000000000000000000000000000n;
|
|
42000
42000
|
|
|
42001
42001
|
|
|
42002
42002
|
/**
|
|
@@ -46150,7 +46150,6 @@ function calcLiqTokenBuy$1(price, buyTokenAmount, orders, onceMaxOrder, passOrde
|
|
|
46150
46150
|
const initialVirtualSolDecimal = new Decimal(initialVirtualSol).div(CurveAMM$5.SOL_PRECISION_FACTOR_DECIMAL);
|
|
46151
46151
|
const initialVirtualTokenDecimal = new Decimal(initialVirtualToken).div(CurveAMM$5.TOKEN_PRECISION_FACTOR_DECIMAL);
|
|
46152
46152
|
|
|
46153
|
-
|
|
46154
46153
|
[, result.ideal_lp_sol_amount] = CurveAMM$5.buyFromPriceWithTokenOutputWithParams(
|
|
46155
46154
|
priceBigInt,
|
|
46156
46155
|
buyTokenAmountBigInt,
|
|
@@ -46165,8 +46164,12 @@ function calcLiqTokenBuy$1(price, buyTokenAmount, orders, onceMaxOrder, passOrde
|
|
|
46165
46164
|
|
|
46166
46165
|
// orders 长度为0 时要单独计算
|
|
46167
46166
|
if (orders.length === 0) {
|
|
46167
|
+
|
|
46168
|
+
|
|
46168
46169
|
const initialVirtualSolDecimal = new Decimal(initialVirtualSol).div(CurveAMM$5.SOL_PRECISION_FACTOR_DECIMAL);
|
|
46169
46170
|
const initialVirtualTokenDecimal = new Decimal(initialVirtualToken).div(CurveAMM$5.TOKEN_PRECISION_FACTOR_DECIMAL);
|
|
46171
|
+
|
|
46172
|
+
|
|
46170
46173
|
[result.free_lp_sol_amount_sum, result.free_lp_token_amount_sum] = CurveAMM$5.buyFromPriceToPriceWithParams(
|
|
46171
46174
|
BigInt(price),
|
|
46172
46175
|
CurveAMM$5.MAX_U128_PRICE,
|
|
@@ -46857,11 +46860,6 @@ async function simulateTokenBuy$1(mint, buyTokenAmount, passOrder = null, lastPr
|
|
|
46857
46860
|
throw new Error(`Failed to get curve account data: ${error.message}`);
|
|
46858
46861
|
}
|
|
46859
46862
|
|
|
46860
|
-
// console.log('simulateTokenBuy 获取的数据:');
|
|
46861
|
-
// console.log('价格:', price);
|
|
46862
|
-
// console.log('订单数量:', orders.length);
|
|
46863
|
-
// orders.forEach((order, i) => console.log(`订单${i}: start=${order.lock_lp_start_price}, end=${order.lock_lp_end_price}, sol=${order.lock_lp_sol_amount}, token=${order.lock_lp_token_amount}`));
|
|
46864
|
-
|
|
46865
46863
|
// 调用 calcLiqTokenBuy 进行流动性计算(传入动态流动池参数)
|
|
46866
46864
|
try {
|
|
46867
46865
|
const liqResult = calcLiqTokenBuy(
|
|
@@ -47405,7 +47403,7 @@ function calcLiqSolBuy$1(price, buySolAmount, orders, onceMaxOrder, passOrderID
|
|
|
47405
47403
|
? new Decimal(initialVirtualToken.toString()).div(CurveAMM$4.TOKEN_PRECISION_FACTOR_DECIMAL)
|
|
47406
47404
|
: CurveAMM$4.INITIAL_TOKEN_RESERVE_DECIMAL;
|
|
47407
47405
|
|
|
47408
|
-
console.log("calcLiqSolBuy: virtualSol,virtualToken=",virtualSol,virtualToken)
|
|
47406
|
+
//console.log("calcLiqSolBuy: virtualSol,virtualToken=",virtualSol,virtualToken)
|
|
47409
47407
|
|
|
47410
47408
|
|
|
47411
47409
|
// 3. 处理空订单情况(第一阶段)
|
|
@@ -49675,7 +49673,7 @@ class OrderUtils$2 {
|
|
|
49675
49673
|
|
|
49676
49674
|
var orderUtils = OrderUtils$2;
|
|
49677
49675
|
|
|
49678
|
-
var address = "
|
|
49676
|
+
var address = "CYdRzRacZ5kTc9Ht3U7mFhbsyxG3sZGEzC4cNf2Gjg2W";
|
|
49679
49677
|
var metadata = {
|
|
49680
49678
|
name: "pinpet",
|
|
49681
49679
|
version: "0.1.0",
|
|
@@ -52249,471 +52247,476 @@ var errors = [
|
|
|
52249
52247
|
},
|
|
52250
52248
|
{
|
|
52251
52249
|
code: 6021,
|
|
52250
|
+
name: "CloseShortImpossibleState",
|
|
52251
|
+
msg: "Close short impossible state: current_total should always be greater than remaining_close_reduced_sol_with_fee"
|
|
52252
|
+
},
|
|
52253
|
+
{
|
|
52254
|
+
code: 6022,
|
|
52252
52255
|
name: "FeeSplitCalculationOverflow",
|
|
52253
52256
|
msg: "Fee split calculation overflow"
|
|
52254
52257
|
},
|
|
52255
52258
|
{
|
|
52256
|
-
code:
|
|
52259
|
+
code: 6023,
|
|
52257
52260
|
name: "FeeAccumulationOverflow",
|
|
52258
52261
|
msg: "Fee accumulation overflow"
|
|
52259
52262
|
},
|
|
52260
52263
|
{
|
|
52261
|
-
code:
|
|
52264
|
+
code: 6024,
|
|
52262
52265
|
name: "PartnerFeeAdditionOverflow",
|
|
52263
52266
|
msg: "Partner fee addition overflow"
|
|
52264
52267
|
},
|
|
52265
52268
|
{
|
|
52266
|
-
code:
|
|
52269
|
+
code: 6025,
|
|
52267
52270
|
name: "BaseFeeAdditionOverflow",
|
|
52268
52271
|
msg: "Base fee addition overflow"
|
|
52269
52272
|
},
|
|
52270
52273
|
{
|
|
52271
|
-
code:
|
|
52274
|
+
code: 6026,
|
|
52272
52275
|
name: "PoolFeeDeductionOverflow",
|
|
52273
52276
|
msg: "Pool fee deduction overflow"
|
|
52274
52277
|
},
|
|
52275
52278
|
{
|
|
52276
|
-
code:
|
|
52279
|
+
code: 6027,
|
|
52277
52280
|
name: "FeeRandomDiscountOverflow",
|
|
52278
52281
|
msg: "Fee random discount calculation overflow"
|
|
52279
52282
|
},
|
|
52280
52283
|
{
|
|
52281
|
-
code:
|
|
52284
|
+
code: 6028,
|
|
52282
52285
|
name: "SolReserveAdditionOverflow",
|
|
52283
52286
|
msg: "SOL reserve addition overflow"
|
|
52284
52287
|
},
|
|
52285
52288
|
{
|
|
52286
|
-
code:
|
|
52289
|
+
code: 6029,
|
|
52287
52290
|
name: "SolReserveDeductionOverflow",
|
|
52288
52291
|
msg: "SOL reserve deduction overflow"
|
|
52289
52292
|
},
|
|
52290
52293
|
{
|
|
52291
|
-
code:
|
|
52294
|
+
code: 6030,
|
|
52292
52295
|
name: "TokenReserveAdditionOverflow",
|
|
52293
52296
|
msg: "Token reserve addition overflow"
|
|
52294
52297
|
},
|
|
52295
52298
|
{
|
|
52296
|
-
code:
|
|
52299
|
+
code: 6031,
|
|
52297
52300
|
name: "LamportsAdditionOverflow",
|
|
52298
52301
|
msg: "Lamports addition overflow"
|
|
52299
52302
|
},
|
|
52300
52303
|
{
|
|
52301
|
-
code:
|
|
52304
|
+
code: 6032,
|
|
52302
52305
|
name: "LamportsDeductionOverflow",
|
|
52303
52306
|
msg: "Lamports deduction overflow"
|
|
52304
52307
|
},
|
|
52305
52308
|
{
|
|
52306
|
-
code:
|
|
52309
|
+
code: 6033,
|
|
52307
52310
|
name: "DeadlineCalculationOverflow",
|
|
52308
52311
|
msg: "Deadline calculation overflow"
|
|
52309
52312
|
},
|
|
52310
52313
|
{
|
|
52311
|
-
code:
|
|
52314
|
+
code: 6034,
|
|
52312
52315
|
name: "FeeDiscountFlagOverflow",
|
|
52313
52316
|
msg: "Fee discount flag calculation overflow"
|
|
52314
52317
|
},
|
|
52315
52318
|
{
|
|
52316
|
-
code:
|
|
52319
|
+
code: 6035,
|
|
52317
52320
|
name: "Unauthorized",
|
|
52318
52321
|
msg: "Unauthorized operation"
|
|
52319
52322
|
},
|
|
52320
52323
|
{
|
|
52321
|
-
code:
|
|
52324
|
+
code: 6036,
|
|
52322
52325
|
name: "RequiredParameter",
|
|
52323
52326
|
msg: "All parameters are required during initialization"
|
|
52324
52327
|
},
|
|
52325
52328
|
{
|
|
52326
|
-
code:
|
|
52329
|
+
code: 6037,
|
|
52327
52330
|
name: "CurveCalculationError",
|
|
52328
52331
|
msg: "Curve calculation error"
|
|
52329
52332
|
},
|
|
52330
52333
|
{
|
|
52331
|
-
code:
|
|
52334
|
+
code: 6038,
|
|
52332
52335
|
name: "InitialPriceCalculationError",
|
|
52333
52336
|
msg: "Initial price calculation failed"
|
|
52334
52337
|
},
|
|
52335
52338
|
{
|
|
52336
|
-
code:
|
|
52339
|
+
code: 6039,
|
|
52337
52340
|
name: "BuyReserveRecalculationError",
|
|
52338
52341
|
msg: "Reserve recalculation failed (after buy)"
|
|
52339
52342
|
},
|
|
52340
52343
|
{
|
|
52341
|
-
code:
|
|
52344
|
+
code: 6040,
|
|
52342
52345
|
name: "SellReserveRecalculationError",
|
|
52343
52346
|
msg: "Reserve recalculation failed (after sell)"
|
|
52344
52347
|
},
|
|
52345
52348
|
{
|
|
52346
|
-
code:
|
|
52349
|
+
code: 6041,
|
|
52347
52350
|
name: "TotalAmountWithFeeError",
|
|
52348
52351
|
msg: "Total amount with fee calculation failed"
|
|
52349
52352
|
},
|
|
52350
52353
|
{
|
|
52351
|
-
code:
|
|
52354
|
+
code: 6042,
|
|
52352
52355
|
name: "AmountAfterFeeError",
|
|
52353
52356
|
msg: "Amount after fee calculation failed"
|
|
52354
52357
|
},
|
|
52355
52358
|
{
|
|
52356
|
-
code:
|
|
52359
|
+
code: 6043,
|
|
52357
52360
|
name: "BuyPriceRangeCalculationError",
|
|
52358
52361
|
msg: "Buy price range calculation failed"
|
|
52359
52362
|
},
|
|
52360
52363
|
{
|
|
52361
|
-
code:
|
|
52364
|
+
code: 6044,
|
|
52362
52365
|
name: "SellPriceRangeCalculationError",
|
|
52363
52366
|
msg: "Sell price range calculation failed"
|
|
52364
52367
|
},
|
|
52365
52368
|
{
|
|
52366
|
-
code:
|
|
52369
|
+
code: 6045,
|
|
52367
52370
|
name: "PriceAtStopLossBoundary",
|
|
52368
52371
|
msg: "Price has reached stop-loss boundary, head order must be liquidated first"
|
|
52369
52372
|
},
|
|
52370
52373
|
{
|
|
52371
|
-
code:
|
|
52374
|
+
code: 6046,
|
|
52372
52375
|
name: "RemainingRangeCalculationError",
|
|
52373
52376
|
msg: "Remaining range calculation failed"
|
|
52374
52377
|
},
|
|
52375
52378
|
{
|
|
52376
|
-
code:
|
|
52379
|
+
code: 6047,
|
|
52377
52380
|
name: "FullRangeCalculationError",
|
|
52378
52381
|
msg: "Full range calculation failed"
|
|
52379
52382
|
},
|
|
52380
52383
|
{
|
|
52381
|
-
code:
|
|
52384
|
+
code: 6048,
|
|
52382
52385
|
name: "BuyFromPriceWithTokenNoneError",
|
|
52383
52386
|
msg: "Curve function returned None: buy_from_price_with_token_output"
|
|
52384
52387
|
},
|
|
52385
52388
|
{
|
|
52386
|
-
code:
|
|
52389
|
+
code: 6049,
|
|
52387
52390
|
name: "SellFromPriceWithTokenNoneError",
|
|
52388
52391
|
msg: "Curve function returned None: sell_from_price_with_token_input"
|
|
52389
52392
|
},
|
|
52390
52393
|
{
|
|
52391
|
-
code:
|
|
52394
|
+
code: 6050,
|
|
52392
52395
|
name: "ExceedsMaxSolAmount",
|
|
52393
52396
|
msg: "Required SOL amount exceeds user-set maximum"
|
|
52394
52397
|
},
|
|
52395
52398
|
{
|
|
52396
|
-
code:
|
|
52399
|
+
code: 6051,
|
|
52397
52400
|
name: "InsufficientSolOutput",
|
|
52398
52401
|
msg: "Insufficient SOL output"
|
|
52399
52402
|
},
|
|
52400
52403
|
{
|
|
52401
|
-
code:
|
|
52404
|
+
code: 6052,
|
|
52402
52405
|
name: "InsufficientRepayment",
|
|
52403
52406
|
msg: "Insufficient proceeds to repay loan"
|
|
52404
52407
|
},
|
|
52405
52408
|
{
|
|
52406
|
-
code:
|
|
52409
|
+
code: 6053,
|
|
52407
52410
|
name: "InsufficientBorrowingReserve",
|
|
52408
52411
|
msg: "Insufficient borrowing reserve"
|
|
52409
52412
|
},
|
|
52410
52413
|
{
|
|
52411
|
-
code:
|
|
52414
|
+
code: 6054,
|
|
52412
52415
|
name: "InsufficientTokenSale",
|
|
52413
52416
|
msg: "Insufficient token sale amount"
|
|
52414
52417
|
},
|
|
52415
52418
|
{
|
|
52416
|
-
code:
|
|
52419
|
+
code: 6055,
|
|
52417
52420
|
name: "InsufficientLiquidity",
|
|
52418
52421
|
msg: "Insufficient liquidity in current order"
|
|
52419
52422
|
},
|
|
52420
52423
|
{
|
|
52421
|
-
code:
|
|
52424
|
+
code: 6056,
|
|
52422
52425
|
name: "InsufficientMarketLiquidity",
|
|
52423
52426
|
msg: "Insufficient market liquidity, cannot satisfy trade even after liquidating all stop-loss orders"
|
|
52424
52427
|
},
|
|
52425
52428
|
{
|
|
52426
|
-
code:
|
|
52429
|
+
code: 6057,
|
|
52427
52430
|
name: "TokenAmountDifferenceOutOfRange",
|
|
52428
52431
|
msg: "Token amount difference exceeds valid range in margin trade"
|
|
52429
52432
|
},
|
|
52430
52433
|
{
|
|
52431
|
-
code:
|
|
52434
|
+
code: 6058,
|
|
52432
52435
|
name: "BorrowAmountMismatch",
|
|
52433
52436
|
msg: "Borrow amount mismatch with locked tokens"
|
|
52434
52437
|
},
|
|
52435
52438
|
{
|
|
52436
|
-
code:
|
|
52439
|
+
code: 6059,
|
|
52437
52440
|
name: "CloseFeeCalculationError",
|
|
52438
52441
|
msg: "Close fee calculation error"
|
|
52439
52442
|
},
|
|
52440
52443
|
{
|
|
52441
|
-
code:
|
|
52444
|
+
code: 6060,
|
|
52442
52445
|
name: "InsufficientMargin",
|
|
52443
52446
|
msg: "Insufficient margin"
|
|
52444
52447
|
},
|
|
52445
52448
|
{
|
|
52446
|
-
code:
|
|
52449
|
+
code: 6061,
|
|
52447
52450
|
name: "InsufficientMinimumMargin",
|
|
52448
52451
|
msg: "Margin below minimum requirement"
|
|
52449
52452
|
},
|
|
52450
52453
|
{
|
|
52451
|
-
code:
|
|
52454
|
+
code: 6062,
|
|
52452
52455
|
name: "InvalidAccountOwner",
|
|
52453
52456
|
msg: "Invalid account owner"
|
|
52454
52457
|
},
|
|
52455
52458
|
{
|
|
52456
|
-
code:
|
|
52459
|
+
code: 6063,
|
|
52457
52460
|
name: "SellAmountExceedsOrderAmount",
|
|
52458
52461
|
msg: "Sell amount exceeds order's token holdings"
|
|
52459
52462
|
},
|
|
52460
52463
|
{
|
|
52461
|
-
code:
|
|
52464
|
+
code: 6064,
|
|
52462
52465
|
name: "OrderNotExpiredMustCloseByOwner",
|
|
52463
52466
|
msg: "Non-expired order must be closed by owner"
|
|
52464
52467
|
},
|
|
52465
52468
|
{
|
|
52466
|
-
code:
|
|
52469
|
+
code: 6065,
|
|
52467
52470
|
name: "SettlementAddressMustBeOwnerAddress",
|
|
52468
52471
|
msg: "Settlement address must be owner address"
|
|
52469
52472
|
},
|
|
52470
52473
|
{
|
|
52471
|
-
code:
|
|
52474
|
+
code: 6066,
|
|
52472
52475
|
name: "BuyAmountExceedsOrderAmount",
|
|
52473
52476
|
msg: "Buy amount exceeds order's token holdings"
|
|
52474
52477
|
},
|
|
52475
52478
|
{
|
|
52476
|
-
code:
|
|
52479
|
+
code: 6067,
|
|
52477
52480
|
name: "InsufficientTradeAmount",
|
|
52478
52481
|
msg: "Trade amount below minimum requirement"
|
|
52479
52482
|
},
|
|
52480
52483
|
{
|
|
52481
|
-
code:
|
|
52484
|
+
code: 6068,
|
|
52482
52485
|
name: "SolAmountTooLarge",
|
|
52483
52486
|
msg: "SOL amount exceeds maximum limit (10000000 SOL per transaction)"
|
|
52484
52487
|
},
|
|
52485
52488
|
{
|
|
52486
|
-
code:
|
|
52489
|
+
code: 6069,
|
|
52487
52490
|
name: "RemainingTokenAmountTooSmall",
|
|
52488
52491
|
msg: "Remaining token amount below minimum trade requirement"
|
|
52489
52492
|
},
|
|
52490
52493
|
{
|
|
52491
|
-
code:
|
|
52494
|
+
code: 6070,
|
|
52492
52495
|
name: "TradeCooldownNotExpired",
|
|
52493
52496
|
msg: "Trade cooldown period not expired, please try again later"
|
|
52494
52497
|
},
|
|
52495
52498
|
{
|
|
52496
|
-
code:
|
|
52499
|
+
code: 6071,
|
|
52497
52500
|
name: "ExceedApprovalAmount",
|
|
52498
52501
|
msg: "Sell amount exceeds approved amount, please call approval function first"
|
|
52499
52502
|
},
|
|
52500
52503
|
{
|
|
52501
|
-
code:
|
|
52504
|
+
code: 6072,
|
|
52502
52505
|
name: "CooldownNotInitialized",
|
|
52503
52506
|
msg: "Sell trade requires calling approval or buy function first to initialize cooldown PDA"
|
|
52504
52507
|
},
|
|
52505
52508
|
{
|
|
52506
|
-
code:
|
|
52509
|
+
code: 6073,
|
|
52507
52510
|
name: "CannotCloseCooldownWithBalance",
|
|
52508
52511
|
msg: "Cannot close cooldown PDA with non-zero token balance"
|
|
52509
52512
|
},
|
|
52510
52513
|
{
|
|
52511
|
-
code:
|
|
52514
|
+
code: 6074,
|
|
52512
52515
|
name: "PriceCalculationError",
|
|
52513
52516
|
msg: "Price calculation error"
|
|
52514
52517
|
},
|
|
52515
52518
|
{
|
|
52516
|
-
code:
|
|
52519
|
+
code: 6075,
|
|
52517
52520
|
name: "InvalidPartnerFeeRecipientAccount",
|
|
52518
52521
|
msg: "Invalid partner fee recipient account"
|
|
52519
52522
|
},
|
|
52520
52523
|
{
|
|
52521
|
-
code:
|
|
52524
|
+
code: 6076,
|
|
52522
52525
|
name: "InvalidBaseFeeRecipientAccount",
|
|
52523
52526
|
msg: "Invalid base fee recipient account"
|
|
52524
52527
|
},
|
|
52525
52528
|
{
|
|
52526
|
-
code:
|
|
52529
|
+
code: 6077,
|
|
52527
52530
|
name: "InvalidOrderbookAddress",
|
|
52528
52531
|
msg: "Orderbook address does not match curve account orderbook"
|
|
52529
52532
|
},
|
|
52530
52533
|
{
|
|
52531
|
-
code:
|
|
52534
|
+
code: 6078,
|
|
52532
52535
|
name: "InvalidFeePercentage",
|
|
52533
52536
|
msg: "Fee percentage must be between 0-100"
|
|
52534
52537
|
},
|
|
52535
52538
|
{
|
|
52536
|
-
code:
|
|
52539
|
+
code: 6079,
|
|
52537
52540
|
name: "InvalidFeeRate",
|
|
52538
52541
|
msg: "Fee rate exceeds maximum limit (10%)"
|
|
52539
52542
|
},
|
|
52540
52543
|
{
|
|
52541
|
-
code:
|
|
52544
|
+
code: 6080,
|
|
52542
52545
|
name: "InvalidCustomFeeRate",
|
|
52543
52546
|
msg: "Custom fee rate must be between 1000 (1%) and 5000 (5%)"
|
|
52544
52547
|
},
|
|
52545
52548
|
{
|
|
52546
|
-
code:
|
|
52549
|
+
code: 6081,
|
|
52547
52550
|
name: "InvalidBorrowDuration",
|
|
52548
52551
|
msg: "Borrow duration out of valid range (3-30 days)"
|
|
52549
52552
|
},
|
|
52550
52553
|
{
|
|
52551
|
-
code:
|
|
52554
|
+
code: 6082,
|
|
52552
52555
|
name: "InvalidStopLossPrice",
|
|
52553
52556
|
msg: "Stop loss price does not meet minimum interval requirement"
|
|
52554
52557
|
},
|
|
52555
52558
|
{
|
|
52556
|
-
code:
|
|
52559
|
+
code: 6083,
|
|
52557
52560
|
name: "NoProfitableFunds",
|
|
52558
52561
|
msg: "No profitable funds to transfer"
|
|
52559
52562
|
},
|
|
52560
52563
|
{
|
|
52561
|
-
code:
|
|
52564
|
+
code: 6084,
|
|
52562
52565
|
name: "InsufficientPoolFunds",
|
|
52563
52566
|
msg: "Insufficient pool funds"
|
|
52564
52567
|
},
|
|
52565
52568
|
{
|
|
52566
|
-
code:
|
|
52569
|
+
code: 6085,
|
|
52567
52570
|
name: "InsufficientPoolBalance",
|
|
52568
52571
|
msg: "Pool SOL account balance would fall below minimum required balance"
|
|
52569
52572
|
},
|
|
52570
52573
|
{
|
|
52571
|
-
code:
|
|
52574
|
+
code: 6086,
|
|
52572
52575
|
name: "OrderBookManagerOverflow",
|
|
52573
52576
|
msg: "Math operation overflow"
|
|
52574
52577
|
},
|
|
52575
52578
|
{
|
|
52576
|
-
code:
|
|
52579
|
+
code: 6087,
|
|
52577
52580
|
name: "OrderBookManagerInvalidSlotIndex",
|
|
52578
52581
|
msg: "Invalid slot index"
|
|
52579
52582
|
},
|
|
52580
52583
|
{
|
|
52581
|
-
code:
|
|
52584
|
+
code: 6088,
|
|
52582
52585
|
name: "OrderBookManagerInvalidAccountData",
|
|
52583
52586
|
msg: "Invalid account data"
|
|
52584
52587
|
},
|
|
52585
52588
|
{
|
|
52586
|
-
code:
|
|
52589
|
+
code: 6089,
|
|
52587
52590
|
name: "OrderBookManagerExceedsMaxCapacity",
|
|
52588
52591
|
msg: "New capacity exceeds maximum limit"
|
|
52589
52592
|
},
|
|
52590
52593
|
{
|
|
52591
|
-
code:
|
|
52594
|
+
code: 6090,
|
|
52592
52595
|
name: "OrderBookManagerExceedsAccountSizeLimit",
|
|
52593
52596
|
msg: "Account size exceeds 10MB limit"
|
|
52594
52597
|
},
|
|
52595
52598
|
{
|
|
52596
|
-
code:
|
|
52599
|
+
code: 6091,
|
|
52597
52600
|
name: "OrderBookManagerOrderIdMismatch",
|
|
52598
52601
|
msg: "Order ID mismatch"
|
|
52599
52602
|
},
|
|
52600
52603
|
{
|
|
52601
|
-
code:
|
|
52604
|
+
code: 6092,
|
|
52602
52605
|
name: "OrderBookManagerEmptyOrderBook",
|
|
52603
52606
|
msg: "Order book is empty"
|
|
52604
52607
|
},
|
|
52605
52608
|
{
|
|
52606
|
-
code:
|
|
52609
|
+
code: 6093,
|
|
52607
52610
|
name: "OrderBookManagerAccountNotWritable",
|
|
52608
52611
|
msg: "Account is not writable"
|
|
52609
52612
|
},
|
|
52610
52613
|
{
|
|
52611
|
-
code:
|
|
52614
|
+
code: 6094,
|
|
52612
52615
|
name: "OrderBookManagerNotRentExempt",
|
|
52613
52616
|
msg: "Account not rent-exempt"
|
|
52614
52617
|
},
|
|
52615
52618
|
{
|
|
52616
|
-
code:
|
|
52619
|
+
code: 6095,
|
|
52617
52620
|
name: "OrderBookManagerInvalidRentBalance",
|
|
52618
52621
|
msg: "Invalid rent balance"
|
|
52619
52622
|
},
|
|
52620
52623
|
{
|
|
52621
|
-
code:
|
|
52624
|
+
code: 6096,
|
|
52622
52625
|
name: "OrderBookManagerInsufficientFunds",
|
|
52623
52626
|
msg: "Insufficient funds"
|
|
52624
52627
|
},
|
|
52625
52628
|
{
|
|
52626
|
-
code:
|
|
52629
|
+
code: 6097,
|
|
52627
52630
|
name: "OrderBookManagerInvalidAccountOwner",
|
|
52628
52631
|
msg: "OrderBook account owner mismatch"
|
|
52629
52632
|
},
|
|
52630
52633
|
{
|
|
52631
|
-
code:
|
|
52634
|
+
code: 6098,
|
|
52632
52635
|
name: "OrderBookManagerDataOutOfBounds",
|
|
52633
52636
|
msg: "Data access out of bounds"
|
|
52634
52637
|
},
|
|
52635
52638
|
{
|
|
52636
|
-
code:
|
|
52639
|
+
code: 6099,
|
|
52637
52640
|
name: "NoValidInsertPosition",
|
|
52638
52641
|
msg: "Cannot find valid insert position, all candidates failed due to price range overlap"
|
|
52639
52642
|
},
|
|
52640
52643
|
{
|
|
52641
|
-
code:
|
|
52644
|
+
code: 6100,
|
|
52642
52645
|
name: "EmptyCloseInsertIndices",
|
|
52643
52646
|
msg: "close_insert_indices array cannot be empty"
|
|
52644
52647
|
},
|
|
52645
52648
|
{
|
|
52646
|
-
code:
|
|
52649
|
+
code: 6101,
|
|
52647
52650
|
name: "TooManyCloseInsertIndices",
|
|
52648
52651
|
msg: "close_insert_indices array cannot exceed 20 elements"
|
|
52649
52652
|
},
|
|
52650
52653
|
{
|
|
52651
|
-
code:
|
|
52654
|
+
code: 6102,
|
|
52652
52655
|
name: "CloseOrderNotFound",
|
|
52653
52656
|
msg: "Specified close order not found"
|
|
52654
52657
|
},
|
|
52655
52658
|
{
|
|
52656
|
-
code:
|
|
52659
|
+
code: 6103,
|
|
52657
52660
|
name: "LinkedListDeleteCountMismatch",
|
|
52658
52661
|
msg: "Linked list delete count mismatch: count inconsistent before/after deletion"
|
|
52659
52662
|
},
|
|
52660
52663
|
{
|
|
52661
|
-
code:
|
|
52664
|
+
code: 6104,
|
|
52662
52665
|
name: "NameTooLong",
|
|
52663
52666
|
msg: "Token name too long, max 32 bytes"
|
|
52664
52667
|
},
|
|
52665
52668
|
{
|
|
52666
|
-
code:
|
|
52669
|
+
code: 6105,
|
|
52667
52670
|
name: "NameEmpty",
|
|
52668
52671
|
msg: "Token name cannot be empty"
|
|
52669
52672
|
},
|
|
52670
52673
|
{
|
|
52671
|
-
code:
|
|
52674
|
+
code: 6106,
|
|
52672
52675
|
name: "SymbolTooLong",
|
|
52673
52676
|
msg: "Token symbol too long, max 10 bytes"
|
|
52674
52677
|
},
|
|
52675
52678
|
{
|
|
52676
|
-
code:
|
|
52679
|
+
code: 6107,
|
|
52677
52680
|
name: "SymbolEmpty",
|
|
52678
52681
|
msg: "Token symbol cannot be empty"
|
|
52679
52682
|
},
|
|
52680
52683
|
{
|
|
52681
|
-
code:
|
|
52684
|
+
code: 6108,
|
|
52682
52685
|
name: "UriTooLong",
|
|
52683
52686
|
msg: "URI too long, max 200 bytes"
|
|
52684
52687
|
},
|
|
52685
52688
|
{
|
|
52686
|
-
code:
|
|
52689
|
+
code: 6109,
|
|
52687
52690
|
name: "UriEmpty",
|
|
52688
52691
|
msg: "URI cannot be empty"
|
|
52689
52692
|
},
|
|
52690
52693
|
{
|
|
52691
|
-
code:
|
|
52694
|
+
code: 6110,
|
|
52692
52695
|
name: "IncompleteAdvancedPoolParams",
|
|
52693
52696
|
msg: "Incomplete advanced pool parameters: custom_lp_sol, custom_lp_token, custom_borrow_ratio, custom_borrow_duration must be provided together"
|
|
52694
52697
|
},
|
|
52695
52698
|
{
|
|
52696
|
-
code:
|
|
52699
|
+
code: 6111,
|
|
52697
52700
|
name: "InvalidInitialVirtualSol",
|
|
52698
52701
|
msg: "Initial virtual SOL out of valid range"
|
|
52699
52702
|
},
|
|
52700
52703
|
{
|
|
52701
|
-
code:
|
|
52704
|
+
code: 6112,
|
|
52702
52705
|
name: "InvalidInitialVirtualToken",
|
|
52703
52706
|
msg: "Initial virtual Token out of valid range"
|
|
52704
52707
|
},
|
|
52705
52708
|
{
|
|
52706
|
-
code:
|
|
52709
|
+
code: 6113,
|
|
52707
52710
|
name: "InvalidBorrowPoolRatio",
|
|
52708
52711
|
msg: "Borrow pool ratio out of valid range"
|
|
52709
52712
|
},
|
|
52710
52713
|
{
|
|
52711
|
-
code:
|
|
52714
|
+
code: 6114,
|
|
52712
52715
|
name: "BorrowTokenCalculationOverflow",
|
|
52713
52716
|
msg: "Borrow pool token amount calculation overflow"
|
|
52714
52717
|
},
|
|
52715
52718
|
{
|
|
52716
|
-
code:
|
|
52719
|
+
code: 6115,
|
|
52717
52720
|
name: "BorrowTokenAmountZero",
|
|
52718
52721
|
msg: "Borrow pool token amount cannot be zero"
|
|
52719
52722
|
}
|