@gainsnetwork/sdk 1.0.6-rc4 → 1.1.0-rc1

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.
Files changed (75) hide show
  1. package/lib/backend/globalTrades/index.js +10 -10
  2. package/lib/backend/tradingVariables/backend.types.d.ts +11 -4
  3. package/lib/backend/tradingVariables/converter.d.ts +7 -3
  4. package/lib/backend/tradingVariables/converter.js +70 -63
  5. package/lib/backend/tradingVariables/index.js +11 -7
  6. package/lib/backend/tradingVariables/types.d.ts +4 -2
  7. package/lib/contracts/addresses.js +1 -4
  8. package/lib/contracts/index.d.ts +1 -1
  9. package/lib/contracts/index.js +3 -3
  10. package/lib/contracts/types/generated/GNSMultiCollatDiamond.d.ts +627 -305
  11. package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.js +1949 -257
  12. package/lib/contracts/types/generated/factories/GToken__factory.d.ts +0 -7
  13. package/lib/contracts/types/generated/factories/GToken__factory.js +0 -4
  14. package/lib/contracts/utils/borrowingFees.js +20 -9
  15. package/lib/contracts/utils/openTrades.js +20 -11
  16. package/lib/contracts/utils/pairs.d.ts +13 -2
  17. package/lib/contracts/utils/pairs.js +89 -21
  18. package/lib/index.d.ts +1 -0
  19. package/lib/index.js +1 -0
  20. package/lib/markets/forex.js +1 -1
  21. package/lib/markets/leverage/builder.js +2 -2
  22. package/lib/markets/price/index.d.ts +0 -1
  23. package/lib/markets/price/index.js +0 -1
  24. package/lib/markets/price/types.d.ts +0 -27
  25. package/lib/pricing/depthBands/converter.d.ts +65 -0
  26. package/lib/pricing/depthBands/converter.js +155 -0
  27. package/lib/pricing/depthBands/decoder.d.ts +32 -0
  28. package/lib/pricing/depthBands/decoder.js +109 -0
  29. package/lib/pricing/depthBands/encoder.d.ts +19 -0
  30. package/lib/pricing/depthBands/encoder.js +105 -0
  31. package/lib/pricing/depthBands/index.d.ts +8 -0
  32. package/lib/pricing/depthBands/index.js +26 -0
  33. package/lib/pricing/depthBands/types.d.ts +49 -0
  34. package/lib/pricing/depthBands/types.js +10 -0
  35. package/lib/pricing/depthBands/validator.d.ts +22 -0
  36. package/lib/pricing/depthBands/validator.js +113 -0
  37. package/lib/pricing/depthBands.d.ts +39 -0
  38. package/lib/pricing/depthBands.js +92 -0
  39. package/lib/pricing/index.d.ts +4 -0
  40. package/lib/pricing/index.js +20 -0
  41. package/lib/trade/fees/borrowing/builder.js +3 -2
  42. package/lib/trade/fees/borrowing/converter.js +1 -5
  43. package/lib/trade/fees/borrowing/index.js +5 -5
  44. package/lib/trade/fees/borrowingV2/builder.js +4 -3
  45. package/lib/trade/fees/borrowingV2/converter.js +1 -1
  46. package/lib/trade/fees/borrowingV2/fetcher.js +32 -26
  47. package/lib/trade/fees/borrowingV2/index.js +3 -3
  48. package/lib/trade/fees/converter.js +22 -22
  49. package/lib/trade/fees/fundingFees/builder.js +7 -6
  50. package/lib/trade/fees/fundingFees/converter.js +1 -1
  51. package/lib/trade/fees/fundingFees/fetcher.js +25 -16
  52. package/lib/trade/fees/fundingFees/index.js +3 -2
  53. package/lib/trade/fees/tiers/index.js +2 -1
  54. package/lib/trade/fees/trading/index.js +3 -5
  55. package/lib/trade/liquidation/builder.js +3 -6
  56. package/lib/trade/liquidation/index.js +6 -4
  57. package/lib/trade/oiWindows.js +2 -1
  58. package/lib/trade/pnl/builder.js +2 -1
  59. package/lib/trade/pnl/converter.js +1 -1
  60. package/lib/trade/pnl/index.js +7 -4
  61. package/lib/trade/priceImpact/close/builder.js +2 -1
  62. package/lib/trade/priceImpact/close/index.js +1 -4
  63. package/lib/trade/priceImpact/cumulVol/builder.js +11 -18
  64. package/lib/trade/priceImpact/cumulVol/converter.d.ts +63 -0
  65. package/lib/trade/priceImpact/cumulVol/converter.js +97 -1
  66. package/lib/trade/priceImpact/cumulVol/index.d.ts +3 -0
  67. package/lib/trade/priceImpact/cumulVol/index.js +123 -25
  68. package/lib/trade/priceImpact/cumulVol/types.d.ts +11 -0
  69. package/lib/trade/priceImpact/cumulVol/types.js +2 -0
  70. package/lib/trade/priceImpact/open/builder.js +2 -1
  71. package/lib/trade/priceImpact/open/index.js +1 -4
  72. package/lib/trade/priceImpact/skew/builder.js +3 -2
  73. package/lib/trade/priceImpact/skew/converter.js +1 -1
  74. package/lib/trade/priceImpact/skew/fetcher.js +33 -24
  75. package/package.json +2 -2
@@ -502,6 +502,20 @@ const _abi = [
502
502
  type: "function",
503
503
  signature: "0xc4d66de8",
504
504
  },
505
+ {
506
+ inputs: [
507
+ {
508
+ internalType: "address",
509
+ name: "_govEmergencyTimelock",
510
+ type: "address",
511
+ },
512
+ ],
513
+ name: "initializeGovEmergencyTimelock",
514
+ outputs: [],
515
+ stateMutability: "nonpayable",
516
+ type: "function",
517
+ signature: "0x52b3aaca",
518
+ },
505
519
  {
506
520
  inputs: [
507
521
  {
@@ -1132,6 +1146,31 @@ const _abi = [
1132
1146
  type: "function",
1133
1147
  signature: "0x678b3fb0",
1134
1148
  },
1149
+ {
1150
+ inputs: [
1151
+ {
1152
+ internalType: "uint16",
1153
+ name: "_pairIndex",
1154
+ type: "uint16",
1155
+ },
1156
+ {
1157
+ internalType: "bool",
1158
+ name: "_isCounterTrade",
1159
+ type: "bool",
1160
+ },
1161
+ ],
1162
+ name: "getEffectiveTotalPositionSizeFeeP",
1163
+ outputs: [
1164
+ {
1165
+ internalType: "uint256",
1166
+ name: "",
1167
+ type: "uint256",
1168
+ },
1169
+ ],
1170
+ stateMutability: "view",
1171
+ type: "function",
1172
+ signature: "0xace26965",
1173
+ },
1135
1174
  {
1136
1175
  inputs: [],
1137
1176
  name: "getGlobalTradeFeeParams",
@@ -3681,6 +3720,21 @@ const _abi = [
3681
3720
  type: "function",
3682
3721
  signature: "0xfed8a190",
3683
3722
  },
3723
+ {
3724
+ inputs: [],
3725
+ name: "DepthBandsAboveMax",
3726
+ type: "error",
3727
+ },
3728
+ {
3729
+ inputs: [],
3730
+ name: "DepthBandsIncomplete",
3731
+ type: "error",
3732
+ },
3733
+ {
3734
+ inputs: [],
3735
+ name: "WrongDepthBandsOrder",
3736
+ type: "error",
3737
+ },
3684
3738
  {
3685
3739
  inputs: [],
3686
3740
  name: "WrongWindowsCount",
@@ -3711,6 +3765,26 @@ const _abi = [
3711
3765
  type: "event",
3712
3766
  signature: "0x2742ec28d0252b4477106a77a10b04e1c1ecd2b568c7168d56c3a3154d3a3122",
3713
3767
  },
3768
+ {
3769
+ anonymous: false,
3770
+ inputs: [
3771
+ {
3772
+ indexed: false,
3773
+ internalType: "uint256",
3774
+ name: "slot1",
3775
+ type: "uint256",
3776
+ },
3777
+ {
3778
+ indexed: false,
3779
+ internalType: "uint256",
3780
+ name: "slot2",
3781
+ type: "uint256",
3782
+ },
3783
+ ],
3784
+ name: "DepthBandsMappingUpdated",
3785
+ type: "event",
3786
+ signature: "0x22391293f5705268ac47df15d88a7704e1267eff228801ac480dbe5ecf5ea3ef",
3787
+ },
3714
3788
  {
3715
3789
  anonymous: false,
3716
3790
  inputs: [
@@ -3837,6 +3911,44 @@ const _abi = [
3837
3911
  type: "event",
3838
3912
  signature: "0xbe433d32d9112c2fcf91407f28314200753b05ef3e9c85b8a0e9d135e77a6c29",
3839
3913
  },
3914
+ {
3915
+ anonymous: false,
3916
+ inputs: [
3917
+ {
3918
+ indexed: true,
3919
+ internalType: "uint256",
3920
+ name: "pairIndex",
3921
+ type: "uint256",
3922
+ },
3923
+ {
3924
+ indexed: false,
3925
+ internalType: "uint256",
3926
+ name: "aboveSlot1",
3927
+ type: "uint256",
3928
+ },
3929
+ {
3930
+ indexed: false,
3931
+ internalType: "uint256",
3932
+ name: "aboveSlot2",
3933
+ type: "uint256",
3934
+ },
3935
+ {
3936
+ indexed: false,
3937
+ internalType: "uint256",
3938
+ name: "belowSlot1",
3939
+ type: "uint256",
3940
+ },
3941
+ {
3942
+ indexed: false,
3943
+ internalType: "uint256",
3944
+ name: "belowSlot2",
3945
+ type: "uint256",
3946
+ },
3947
+ ],
3948
+ name: "PairDepthBandsUpdated",
3949
+ type: "event",
3950
+ signature: "0x7a9ee81b0015d0b7824d14757416905ea9ace5b9ad54dc08cb426cd0ae3dff9f",
3951
+ },
3840
3952
  {
3841
3953
  anonymous: false,
3842
3954
  inputs: [
@@ -4196,6 +4308,39 @@ const _abi = [
4196
4308
  type: "function",
4197
4309
  signature: "0x81688f7b",
4198
4310
  },
4311
+ {
4312
+ inputs: [],
4313
+ name: "getDepthBandsMapping",
4314
+ outputs: [
4315
+ {
4316
+ internalType: "uint256",
4317
+ name: "slot1",
4318
+ type: "uint256",
4319
+ },
4320
+ {
4321
+ internalType: "uint256",
4322
+ name: "slot2",
4323
+ type: "uint256",
4324
+ },
4325
+ ],
4326
+ stateMutability: "view",
4327
+ type: "function",
4328
+ signature: "0xd40e0d20",
4329
+ },
4330
+ {
4331
+ inputs: [],
4332
+ name: "getDepthBandsMappingDecoded",
4333
+ outputs: [
4334
+ {
4335
+ internalType: "uint16[]",
4336
+ name: "bands",
4337
+ type: "uint16[]",
4338
+ },
4339
+ ],
4340
+ stateMutability: "view",
4341
+ type: "function",
4342
+ signature: "0x9615d82a",
4343
+ },
4199
4344
  {
4200
4345
  inputs: [],
4201
4346
  name: "getNegPnlCumulVolMultiplier",
@@ -4328,66 +4473,156 @@ const _abi = [
4328
4473
  {
4329
4474
  inputs: [
4330
4475
  {
4331
- internalType: "uint256",
4332
- name: "_pairIndex",
4333
- type: "uint256",
4476
+ internalType: "uint256[]",
4477
+ name: "_indices",
4478
+ type: "uint256[]",
4334
4479
  },
4335
4480
  ],
4336
- name: "getPairDepth",
4481
+ name: "getPairDepthBands",
4337
4482
  outputs: [
4338
4483
  {
4339
4484
  components: [
4340
4485
  {
4341
- internalType: "uint128",
4342
- name: "onePercentDepthAboveUsd",
4343
- type: "uint128",
4486
+ internalType: "uint256",
4487
+ name: "aboveSlot1",
4488
+ type: "uint256",
4344
4489
  },
4345
4490
  {
4346
- internalType: "uint128",
4347
- name: "onePercentDepthBelowUsd",
4348
- type: "uint128",
4491
+ internalType: "uint256",
4492
+ name: "aboveSlot2",
4493
+ type: "uint256",
4494
+ },
4495
+ {
4496
+ internalType: "uint256",
4497
+ name: "belowSlot1",
4498
+ type: "uint256",
4499
+ },
4500
+ {
4501
+ internalType: "uint256",
4502
+ name: "belowSlot2",
4503
+ type: "uint256",
4349
4504
  },
4350
4505
  ],
4351
- internalType: "struct IPriceImpact.PairDepth",
4506
+ internalType: "struct IPriceImpact.PairDepthBands[]",
4352
4507
  name: "",
4353
- type: "tuple",
4508
+ type: "tuple[]",
4354
4509
  },
4355
4510
  ],
4356
4511
  stateMutability: "view",
4357
4512
  type: "function",
4358
- signature: "0x375bb2bb",
4513
+ signature: "0x42105561",
4359
4514
  },
4360
4515
  {
4361
4516
  inputs: [
4362
4517
  {
4363
- internalType: "uint256[]",
4364
- name: "_indices",
4365
- type: "uint256[]",
4518
+ internalType: "uint256",
4519
+ name: "_pairIndex",
4520
+ type: "uint256",
4366
4521
  },
4367
4522
  ],
4368
- name: "getPairDepths",
4523
+ name: "getPairDepthBands",
4369
4524
  outputs: [
4370
4525
  {
4371
4526
  components: [
4372
4527
  {
4373
- internalType: "uint128",
4374
- name: "onePercentDepthAboveUsd",
4375
- type: "uint128",
4528
+ internalType: "uint256",
4529
+ name: "aboveSlot1",
4530
+ type: "uint256",
4376
4531
  },
4377
4532
  {
4378
- internalType: "uint128",
4379
- name: "onePercentDepthBelowUsd",
4380
- type: "uint128",
4533
+ internalType: "uint256",
4534
+ name: "aboveSlot2",
4535
+ type: "uint256",
4536
+ },
4537
+ {
4538
+ internalType: "uint256",
4539
+ name: "belowSlot1",
4540
+ type: "uint256",
4541
+ },
4542
+ {
4543
+ internalType: "uint256",
4544
+ name: "belowSlot2",
4545
+ type: "uint256",
4381
4546
  },
4382
4547
  ],
4383
- internalType: "struct IPriceImpact.PairDepth[]",
4548
+ internalType: "struct IPriceImpact.PairDepthBands",
4384
4549
  name: "",
4385
- type: "tuple[]",
4550
+ type: "tuple",
4551
+ },
4552
+ ],
4553
+ stateMutability: "view",
4554
+ type: "function",
4555
+ signature: "0xc693e1be",
4556
+ },
4557
+ {
4558
+ inputs: [
4559
+ {
4560
+ internalType: "uint256",
4561
+ name: "_pairIndex",
4562
+ type: "uint256",
4563
+ },
4564
+ ],
4565
+ name: "getPairDepthBandsDecoded",
4566
+ outputs: [
4567
+ {
4568
+ internalType: "uint256",
4569
+ name: "totalDepthAboveUsd",
4570
+ type: "uint256",
4571
+ },
4572
+ {
4573
+ internalType: "uint256",
4574
+ name: "totalDepthBelowUsd",
4575
+ type: "uint256",
4576
+ },
4577
+ {
4578
+ internalType: "uint16[]",
4579
+ name: "bandsAbove",
4580
+ type: "uint16[]",
4581
+ },
4582
+ {
4583
+ internalType: "uint16[]",
4584
+ name: "bandsBelow",
4585
+ type: "uint16[]",
4586
+ },
4587
+ ],
4588
+ stateMutability: "view",
4589
+ type: "function",
4590
+ signature: "0x2b363e71",
4591
+ },
4592
+ {
4593
+ inputs: [
4594
+ {
4595
+ internalType: "uint256[]",
4596
+ name: "_indices",
4597
+ type: "uint256[]",
4598
+ },
4599
+ ],
4600
+ name: "getPairDepthBandsDecoded",
4601
+ outputs: [
4602
+ {
4603
+ internalType: "uint256[]",
4604
+ name: "totalDepthAboveUsd",
4605
+ type: "uint256[]",
4606
+ },
4607
+ {
4608
+ internalType: "uint256[]",
4609
+ name: "totalDepthBelowUsd",
4610
+ type: "uint256[]",
4611
+ },
4612
+ {
4613
+ internalType: "uint16[][]",
4614
+ name: "bandsAbove",
4615
+ type: "uint16[][]",
4616
+ },
4617
+ {
4618
+ internalType: "uint16[][]",
4619
+ name: "bandsBelow",
4620
+ type: "uint16[][]",
4386
4621
  },
4387
4622
  ],
4388
4623
  stateMutability: "view",
4389
4624
  type: "function",
4390
- signature: "0x0d569f27",
4625
+ signature: "0x8c6a54d8",
4391
4626
  },
4392
4627
  {
4393
4628
  inputs: [
@@ -4816,6 +5051,25 @@ const _abi = [
4816
5051
  type: "function",
4817
5052
  signature: "0x5a1449ab",
4818
5053
  },
5054
+ {
5055
+ inputs: [
5056
+ {
5057
+ internalType: "uint256",
5058
+ name: "_slot1",
5059
+ type: "uint256",
5060
+ },
5061
+ {
5062
+ internalType: "uint256",
5063
+ name: "_slot2",
5064
+ type: "uint256",
5065
+ },
5066
+ ],
5067
+ name: "initializeDepthBandsMapping",
5068
+ outputs: [],
5069
+ stateMutability: "nonpayable",
5070
+ type: "function",
5071
+ signature: "0xbb8f07af",
5072
+ },
4819
5073
  {
4820
5074
  inputs: [
4821
5075
  {
@@ -4897,6 +5151,25 @@ const _abi = [
4897
5151
  type: "function",
4898
5152
  signature: "0xa7d518fc",
4899
5153
  },
5154
+ {
5155
+ inputs: [
5156
+ {
5157
+ internalType: "uint256",
5158
+ name: "_slot1",
5159
+ type: "uint256",
5160
+ },
5161
+ {
5162
+ internalType: "uint256",
5163
+ name: "_slot2",
5164
+ type: "uint256",
5165
+ },
5166
+ ],
5167
+ name: "setDepthBandsMapping",
5168
+ outputs: [],
5169
+ stateMutability: "nonpayable",
5170
+ type: "function",
5171
+ signature: "0x7e8462f7",
5172
+ },
4900
5173
  {
4901
5174
  inputs: [
4902
5175
  {
@@ -4957,21 +5230,38 @@ const _abi = [
4957
5230
  type: "uint256[]",
4958
5231
  },
4959
5232
  {
4960
- internalType: "uint128[]",
4961
- name: "_depthsAboveUsd",
4962
- type: "uint128[]",
4963
- },
4964
- {
4965
- internalType: "uint128[]",
4966
- name: "_depthsBelowUsd",
4967
- type: "uint128[]",
4968
- },
4969
- ],
4970
- name: "setPairDepths",
5233
+ components: [
5234
+ {
5235
+ internalType: "uint256",
5236
+ name: "aboveSlot1",
5237
+ type: "uint256",
5238
+ },
5239
+ {
5240
+ internalType: "uint256",
5241
+ name: "aboveSlot2",
5242
+ type: "uint256",
5243
+ },
5244
+ {
5245
+ internalType: "uint256",
5246
+ name: "belowSlot1",
5247
+ type: "uint256",
5248
+ },
5249
+ {
5250
+ internalType: "uint256",
5251
+ name: "belowSlot2",
5252
+ type: "uint256",
5253
+ },
5254
+ ],
5255
+ internalType: "struct IPriceImpact.PairDepthBands[]",
5256
+ name: "_depthBands",
5257
+ type: "tuple[]",
5258
+ },
5259
+ ],
5260
+ name: "setPairDepthBands",
4971
5261
  outputs: [],
4972
5262
  stateMutability: "nonpayable",
4973
5263
  type: "function",
4974
- signature: "0x6474b399",
5264
+ signature: "0x88be5e4f",
4975
5265
  },
4976
5266
  {
4977
5267
  inputs: [
@@ -6964,6 +7254,36 @@ const _abi = [
6964
7254
  type: "function",
6965
7255
  signature: "0x78a70ec6",
6966
7256
  },
7257
+ {
7258
+ inputs: [
7259
+ {
7260
+ internalType: "address",
7261
+ name: "_trader",
7262
+ type: "address",
7263
+ },
7264
+ {
7265
+ internalType: "uint32",
7266
+ name: "_index",
7267
+ type: "uint32",
7268
+ },
7269
+ {
7270
+ internalType: "enum ITradingStorage.PendingOrderType",
7271
+ name: "_orderType",
7272
+ type: "uint8",
7273
+ },
7274
+ ],
7275
+ name: "getLookbackFromBlock",
7276
+ outputs: [
7277
+ {
7278
+ internalType: "uint32",
7279
+ name: "",
7280
+ type: "uint32",
7281
+ },
7282
+ ],
7283
+ stateMutability: "view",
7284
+ type: "function",
7285
+ signature: "0x2b7d6e9d",
7286
+ },
6967
7287
  {
6968
7288
  inputs: [
6969
7289
  {
@@ -8631,6 +8951,102 @@ const _abi = [
8631
8951
  type: "function",
8632
8952
  signature: "0xb78f4b36",
8633
8953
  },
8954
+ {
8955
+ inputs: [
8956
+ {
8957
+ components: [
8958
+ {
8959
+ internalType: "address",
8960
+ name: "user",
8961
+ type: "address",
8962
+ },
8963
+ {
8964
+ internalType: "uint32",
8965
+ name: "index",
8966
+ type: "uint32",
8967
+ },
8968
+ {
8969
+ internalType: "uint16",
8970
+ name: "pairIndex",
8971
+ type: "uint16",
8972
+ },
8973
+ {
8974
+ internalType: "uint24",
8975
+ name: "leverage",
8976
+ type: "uint24",
8977
+ },
8978
+ {
8979
+ internalType: "bool",
8980
+ name: "long",
8981
+ type: "bool",
8982
+ },
8983
+ {
8984
+ internalType: "bool",
8985
+ name: "isOpen",
8986
+ type: "bool",
8987
+ },
8988
+ {
8989
+ internalType: "uint8",
8990
+ name: "collateralIndex",
8991
+ type: "uint8",
8992
+ },
8993
+ {
8994
+ internalType: "enum ITradingStorage.TradeType",
8995
+ name: "tradeType",
8996
+ type: "uint8",
8997
+ },
8998
+ {
8999
+ internalType: "uint120",
9000
+ name: "collateralAmount",
9001
+ type: "uint120",
9002
+ },
9003
+ {
9004
+ internalType: "uint64",
9005
+ name: "openPrice",
9006
+ type: "uint64",
9007
+ },
9008
+ {
9009
+ internalType: "uint64",
9010
+ name: "tp",
9011
+ type: "uint64",
9012
+ },
9013
+ {
9014
+ internalType: "uint64",
9015
+ name: "sl",
9016
+ type: "uint64",
9017
+ },
9018
+ {
9019
+ internalType: "bool",
9020
+ name: "isCounterTrade",
9021
+ type: "bool",
9022
+ },
9023
+ {
9024
+ internalType: "uint160",
9025
+ name: "positionSizeToken",
9026
+ type: "uint160",
9027
+ },
9028
+ {
9029
+ internalType: "uint24",
9030
+ name: "__placeholder",
9031
+ type: "uint24",
9032
+ },
9033
+ ],
9034
+ internalType: "struct ITradingStorage.Trade",
9035
+ name: "_trade",
9036
+ type: "tuple",
9037
+ },
9038
+ {
9039
+ internalType: "enum ITradingStorage.PendingOrderType",
9040
+ name: "_orderType",
9041
+ type: "uint8",
9042
+ },
9043
+ ],
9044
+ name: "validateOpenTradeOrder",
9045
+ outputs: [],
9046
+ stateMutability: "pure",
9047
+ type: "function",
9048
+ signature: "0x63f58b1a",
9049
+ },
8634
9050
  {
8635
9051
  inputs: [],
8636
9052
  name: "NoPendingTriggerRewards",
@@ -8911,6 +9327,11 @@ const _abi = [
8911
9327
  name: "WaitTimeout",
8912
9328
  type: "error",
8913
9329
  },
9330
+ {
9331
+ inputs: [],
9332
+ name: "WrongFromBlock",
9333
+ type: "error",
9334
+ },
8914
9335
  {
8915
9336
  inputs: [],
8916
9337
  name: "WrongLeverage",
@@ -9607,7 +10028,7 @@ const _abi = [
9607
10028
  },
9608
10029
  {
9609
10030
  internalType: "int256",
9610
- name: "existingNetPnlCollateral",
10031
+ name: "partialNetPnlCollateral",
9611
10032
  type: "int256",
9612
10033
  },
9613
10034
  {
@@ -10550,6 +10971,89 @@ const _abi = [
10550
10971
  type: "function",
10551
10972
  signature: "0xeb9359aa",
10552
10973
  },
10974
+ {
10975
+ inputs: [
10976
+ {
10977
+ internalType: "uint256",
10978
+ name: "_packed",
10979
+ type: "uint256",
10980
+ },
10981
+ {
10982
+ components: [
10983
+ {
10984
+ internalType: "uint8",
10985
+ name: "signerId",
10986
+ type: "uint8",
10987
+ },
10988
+ {
10989
+ internalType: "uint32",
10990
+ name: "expiryTs",
10991
+ type: "uint32",
10992
+ },
10993
+ {
10994
+ internalType: "bool",
10995
+ name: "isLookback",
10996
+ type: "bool",
10997
+ },
10998
+ {
10999
+ internalType: "uint32",
11000
+ name: "fromBlock",
11001
+ type: "uint32",
11002
+ },
11003
+ {
11004
+ internalType: "bytes",
11005
+ name: "signature",
11006
+ type: "bytes",
11007
+ },
11008
+ {
11009
+ internalType: "uint16[]",
11010
+ name: "pairIndices",
11011
+ type: "uint16[]",
11012
+ },
11013
+ {
11014
+ components: [
11015
+ {
11016
+ internalType: "uint56",
11017
+ name: "open",
11018
+ type: "uint56",
11019
+ },
11020
+ {
11021
+ internalType: "uint56",
11022
+ name: "high",
11023
+ type: "uint56",
11024
+ },
11025
+ {
11026
+ internalType: "uint56",
11027
+ name: "low",
11028
+ type: "uint56",
11029
+ },
11030
+ {
11031
+ internalType: "uint56",
11032
+ name: "current",
11033
+ type: "uint56",
11034
+ },
11035
+ {
11036
+ internalType: "uint32",
11037
+ name: "ts",
11038
+ type: "uint32",
11039
+ },
11040
+ ],
11041
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
11042
+ name: "prices",
11043
+ type: "tuple[]",
11044
+ },
11045
+ ],
11046
+ internalType: "struct IPriceAggregator.SignedPairPrices[]",
11047
+ name: "_signedPairPrices",
11048
+ type: "tuple[]",
11049
+ },
11050
+ ],
11051
+ name: "triggerOrderWithSignatures",
11052
+ outputs: [],
11053
+ stateMutability: "nonpayable",
11054
+ type: "function",
11055
+ signature: "0xc7e2b2a9",
11056
+ },
10553
11057
  {
10554
11058
  inputs: [
10555
11059
  {
@@ -12027,64 +12531,354 @@ const _abi = [
12027
12531
  name: "_a",
12028
12532
  type: "tuple",
12029
12533
  },
12030
- ],
12031
- name: "executeTriggerOpenOrderCallback",
12032
- outputs: [],
12033
- stateMutability: "nonpayable",
12034
- type: "function",
12035
- signature: "0x5578478f",
12036
- },
12037
- {
12038
- inputs: [
12039
- {
12040
- internalType: "uint8",
12041
- name: "_collateralIndex",
12042
- type: "uint8",
12043
- },
12044
- ],
12045
- name: "getPendingGovFeesCollateral",
12046
- outputs: [
12047
- {
12048
- internalType: "uint256",
12049
- name: "",
12050
- type: "uint256",
12051
- },
12052
- ],
12053
- stateMutability: "view",
12054
- type: "function",
12055
- signature: "0x2c6fe6d1",
12056
- },
12057
- {
12058
- inputs: [],
12059
- name: "getVaultClosingFeeP",
12060
- outputs: [
12061
- {
12062
- internalType: "uint8",
12063
- name: "",
12064
- type: "uint8",
12065
- },
12066
- ],
12067
- stateMutability: "view",
12068
- type: "function",
12069
- signature: "0xa5b26e46",
12070
- },
12071
- {
12072
- inputs: [
12073
12534
  {
12074
12535
  components: [
12075
12536
  {
12076
- components: [
12077
- {
12078
- internalType: "address",
12079
- name: "user",
12080
- type: "address",
12081
- },
12082
- {
12083
- internalType: "uint32",
12084
- name: "index",
12085
- type: "uint32",
12086
- },
12087
- ],
12537
+ internalType: "address",
12538
+ name: "user",
12539
+ type: "address",
12540
+ },
12541
+ {
12542
+ internalType: "uint32",
12543
+ name: "index",
12544
+ type: "uint32",
12545
+ },
12546
+ {
12547
+ internalType: "uint16",
12548
+ name: "pairIndex",
12549
+ type: "uint16",
12550
+ },
12551
+ {
12552
+ internalType: "uint24",
12553
+ name: "leverage",
12554
+ type: "uint24",
12555
+ },
12556
+ {
12557
+ internalType: "bool",
12558
+ name: "long",
12559
+ type: "bool",
12560
+ },
12561
+ {
12562
+ internalType: "bool",
12563
+ name: "isOpen",
12564
+ type: "bool",
12565
+ },
12566
+ {
12567
+ internalType: "uint8",
12568
+ name: "collateralIndex",
12569
+ type: "uint8",
12570
+ },
12571
+ {
12572
+ internalType: "enum ITradingStorage.TradeType",
12573
+ name: "tradeType",
12574
+ type: "uint8",
12575
+ },
12576
+ {
12577
+ internalType: "uint120",
12578
+ name: "collateralAmount",
12579
+ type: "uint120",
12580
+ },
12581
+ {
12582
+ internalType: "uint64",
12583
+ name: "openPrice",
12584
+ type: "uint64",
12585
+ },
12586
+ {
12587
+ internalType: "uint64",
12588
+ name: "tp",
12589
+ type: "uint64",
12590
+ },
12591
+ {
12592
+ internalType: "uint64",
12593
+ name: "sl",
12594
+ type: "uint64",
12595
+ },
12596
+ {
12597
+ internalType: "bool",
12598
+ name: "isCounterTrade",
12599
+ type: "bool",
12600
+ },
12601
+ {
12602
+ internalType: "uint160",
12603
+ name: "positionSizeToken",
12604
+ type: "uint160",
12605
+ },
12606
+ {
12607
+ internalType: "uint24",
12608
+ name: "__placeholder",
12609
+ type: "uint24",
12610
+ },
12611
+ ],
12612
+ internalType: "struct ITradingStorage.Trade",
12613
+ name: "_trade",
12614
+ type: "tuple",
12615
+ },
12616
+ {
12617
+ internalType: "enum ITradingStorage.PendingOrderType",
12618
+ name: "_orderType",
12619
+ type: "uint8",
12620
+ },
12621
+ {
12622
+ internalType: "address",
12623
+ name: "_initiator",
12624
+ type: "address",
12625
+ },
12626
+ ],
12627
+ name: "executeTriggerCloseOrderCallbackDirect",
12628
+ outputs: [],
12629
+ stateMutability: "nonpayable",
12630
+ type: "function",
12631
+ signature: "0x33575269",
12632
+ },
12633
+ {
12634
+ inputs: [
12635
+ {
12636
+ components: [
12637
+ {
12638
+ components: [
12639
+ {
12640
+ internalType: "address",
12641
+ name: "user",
12642
+ type: "address",
12643
+ },
12644
+ {
12645
+ internalType: "uint32",
12646
+ name: "index",
12647
+ type: "uint32",
12648
+ },
12649
+ ],
12650
+ internalType: "struct ITradingStorage.Id",
12651
+ name: "orderId",
12652
+ type: "tuple",
12653
+ },
12654
+ {
12655
+ internalType: "uint64",
12656
+ name: "open",
12657
+ type: "uint64",
12658
+ },
12659
+ {
12660
+ internalType: "uint64",
12661
+ name: "high",
12662
+ type: "uint64",
12663
+ },
12664
+ {
12665
+ internalType: "uint64",
12666
+ name: "low",
12667
+ type: "uint64",
12668
+ },
12669
+ {
12670
+ internalType: "uint64",
12671
+ name: "current",
12672
+ type: "uint64",
12673
+ },
12674
+ ],
12675
+ internalType: "struct ITradingCallbacks.AggregatorAnswer",
12676
+ name: "_a",
12677
+ type: "tuple",
12678
+ },
12679
+ ],
12680
+ name: "executeTriggerOpenOrderCallback",
12681
+ outputs: [],
12682
+ stateMutability: "nonpayable",
12683
+ type: "function",
12684
+ signature: "0x5578478f",
12685
+ },
12686
+ {
12687
+ inputs: [
12688
+ {
12689
+ components: [
12690
+ {
12691
+ components: [
12692
+ {
12693
+ internalType: "address",
12694
+ name: "user",
12695
+ type: "address",
12696
+ },
12697
+ {
12698
+ internalType: "uint32",
12699
+ name: "index",
12700
+ type: "uint32",
12701
+ },
12702
+ ],
12703
+ internalType: "struct ITradingStorage.Id",
12704
+ name: "orderId",
12705
+ type: "tuple",
12706
+ },
12707
+ {
12708
+ internalType: "uint64",
12709
+ name: "open",
12710
+ type: "uint64",
12711
+ },
12712
+ {
12713
+ internalType: "uint64",
12714
+ name: "high",
12715
+ type: "uint64",
12716
+ },
12717
+ {
12718
+ internalType: "uint64",
12719
+ name: "low",
12720
+ type: "uint64",
12721
+ },
12722
+ {
12723
+ internalType: "uint64",
12724
+ name: "current",
12725
+ type: "uint64",
12726
+ },
12727
+ ],
12728
+ internalType: "struct ITradingCallbacks.AggregatorAnswer",
12729
+ name: "_a",
12730
+ type: "tuple",
12731
+ },
12732
+ {
12733
+ components: [
12734
+ {
12735
+ internalType: "address",
12736
+ name: "user",
12737
+ type: "address",
12738
+ },
12739
+ {
12740
+ internalType: "uint32",
12741
+ name: "index",
12742
+ type: "uint32",
12743
+ },
12744
+ {
12745
+ internalType: "uint16",
12746
+ name: "pairIndex",
12747
+ type: "uint16",
12748
+ },
12749
+ {
12750
+ internalType: "uint24",
12751
+ name: "leverage",
12752
+ type: "uint24",
12753
+ },
12754
+ {
12755
+ internalType: "bool",
12756
+ name: "long",
12757
+ type: "bool",
12758
+ },
12759
+ {
12760
+ internalType: "bool",
12761
+ name: "isOpen",
12762
+ type: "bool",
12763
+ },
12764
+ {
12765
+ internalType: "uint8",
12766
+ name: "collateralIndex",
12767
+ type: "uint8",
12768
+ },
12769
+ {
12770
+ internalType: "enum ITradingStorage.TradeType",
12771
+ name: "tradeType",
12772
+ type: "uint8",
12773
+ },
12774
+ {
12775
+ internalType: "uint120",
12776
+ name: "collateralAmount",
12777
+ type: "uint120",
12778
+ },
12779
+ {
12780
+ internalType: "uint64",
12781
+ name: "openPrice",
12782
+ type: "uint64",
12783
+ },
12784
+ {
12785
+ internalType: "uint64",
12786
+ name: "tp",
12787
+ type: "uint64",
12788
+ },
12789
+ {
12790
+ internalType: "uint64",
12791
+ name: "sl",
12792
+ type: "uint64",
12793
+ },
12794
+ {
12795
+ internalType: "bool",
12796
+ name: "isCounterTrade",
12797
+ type: "bool",
12798
+ },
12799
+ {
12800
+ internalType: "uint160",
12801
+ name: "positionSizeToken",
12802
+ type: "uint160",
12803
+ },
12804
+ {
12805
+ internalType: "uint24",
12806
+ name: "__placeholder",
12807
+ type: "uint24",
12808
+ },
12809
+ ],
12810
+ internalType: "struct ITradingStorage.Trade",
12811
+ name: "_trade",
12812
+ type: "tuple",
12813
+ },
12814
+ {
12815
+ internalType: "enum ITradingStorage.PendingOrderType",
12816
+ name: "_orderType",
12817
+ type: "uint8",
12818
+ },
12819
+ {
12820
+ internalType: "address",
12821
+ name: "_initiator",
12822
+ type: "address",
12823
+ },
12824
+ ],
12825
+ name: "executeTriggerOpenOrderCallbackDirect",
12826
+ outputs: [],
12827
+ stateMutability: "nonpayable",
12828
+ type: "function",
12829
+ signature: "0x9d7ef759",
12830
+ },
12831
+ {
12832
+ inputs: [
12833
+ {
12834
+ internalType: "uint8",
12835
+ name: "_collateralIndex",
12836
+ type: "uint8",
12837
+ },
12838
+ ],
12839
+ name: "getPendingGovFeesCollateral",
12840
+ outputs: [
12841
+ {
12842
+ internalType: "uint256",
12843
+ name: "",
12844
+ type: "uint256",
12845
+ },
12846
+ ],
12847
+ stateMutability: "view",
12848
+ type: "function",
12849
+ signature: "0x2c6fe6d1",
12850
+ },
12851
+ {
12852
+ inputs: [],
12853
+ name: "getVaultClosingFeeP",
12854
+ outputs: [
12855
+ {
12856
+ internalType: "uint8",
12857
+ name: "",
12858
+ type: "uint8",
12859
+ },
12860
+ ],
12861
+ stateMutability: "view",
12862
+ type: "function",
12863
+ signature: "0xa5b26e46",
12864
+ },
12865
+ {
12866
+ inputs: [
12867
+ {
12868
+ components: [
12869
+ {
12870
+ components: [
12871
+ {
12872
+ internalType: "address",
12873
+ name: "user",
12874
+ type: "address",
12875
+ },
12876
+ {
12877
+ internalType: "uint32",
12878
+ name: "index",
12879
+ type: "uint32",
12880
+ },
12881
+ ],
12088
12882
  internalType: "struct ITradingStorage.Id",
12089
12883
  name: "orderId",
12090
12884
  type: "tuple",
@@ -14345,11 +15139,6 @@ const _abi = [
14345
15139
  name: "leverage",
14346
15140
  type: "uint256",
14347
15141
  },
14348
- {
14349
- internalType: "uint256",
14350
- name: "openPrice",
14351
- type: "uint256",
14352
- },
14353
15142
  {
14354
15143
  internalType: "uint256",
14355
15144
  name: "currentPairPrice",
@@ -14371,7 +15160,7 @@ const _abi = [
14371
15160
  ],
14372
15161
  stateMutability: "view",
14373
15162
  type: "function",
14374
- signature: "0x2f020075",
15163
+ signature: "0x19e31460",
14375
15164
  },
14376
15165
  {
14377
15166
  inputs: [
@@ -14567,45 +15356,6 @@ const _abi = [
14567
15356
  type: "function",
14568
15357
  signature: "0x1a733ea0",
14569
15358
  },
14570
- {
14571
- inputs: [
14572
- {
14573
- internalType: "uint8",
14574
- name: "_collateralIndex",
14575
- type: "uint8",
14576
- },
14577
- {
14578
- internalType: "address",
14579
- name: "_trader",
14580
- type: "address",
14581
- },
14582
- {
14583
- internalType: "uint16",
14584
- name: "_pairIndex",
14585
- type: "uint16",
14586
- },
14587
- {
14588
- internalType: "uint32",
14589
- name: "_index",
14590
- type: "uint32",
14591
- },
14592
- {
14593
- internalType: "bool",
14594
- name: "_long",
14595
- type: "bool",
14596
- },
14597
- {
14598
- internalType: "uint256",
14599
- name: "_currentPairPrice",
14600
- type: "uint256",
14601
- },
14602
- ],
14603
- name: "resetTradeBorrowingFees",
14604
- outputs: [],
14605
- stateMutability: "nonpayable",
14606
- type: "function",
14607
- signature: "0x2e47dc6a",
14608
- },
14609
15359
  {
14610
15360
  inputs: [
14611
15361
  {
@@ -14789,12 +15539,81 @@ const _abi = [
14789
15539
  name: "_value",
14790
15540
  type: "tuple",
14791
15541
  },
15542
+ {
15543
+ components: [
15544
+ {
15545
+ internalType: "uint8",
15546
+ name: "signerId",
15547
+ type: "uint8",
15548
+ },
15549
+ {
15550
+ internalType: "uint32",
15551
+ name: "expiryTs",
15552
+ type: "uint32",
15553
+ },
15554
+ {
15555
+ internalType: "bool",
15556
+ name: "isLookback",
15557
+ type: "bool",
15558
+ },
15559
+ {
15560
+ internalType: "uint32",
15561
+ name: "fromBlock",
15562
+ type: "uint32",
15563
+ },
15564
+ {
15565
+ internalType: "bytes",
15566
+ name: "signature",
15567
+ type: "bytes",
15568
+ },
15569
+ {
15570
+ internalType: "uint16[]",
15571
+ name: "pairIndices",
15572
+ type: "uint16[]",
15573
+ },
15574
+ {
15575
+ components: [
15576
+ {
15577
+ internalType: "uint56",
15578
+ name: "open",
15579
+ type: "uint56",
15580
+ },
15581
+ {
15582
+ internalType: "uint56",
15583
+ name: "high",
15584
+ type: "uint56",
15585
+ },
15586
+ {
15587
+ internalType: "uint56",
15588
+ name: "low",
15589
+ type: "uint56",
15590
+ },
15591
+ {
15592
+ internalType: "uint56",
15593
+ name: "current",
15594
+ type: "uint56",
15595
+ },
15596
+ {
15597
+ internalType: "uint32",
15598
+ name: "ts",
15599
+ type: "uint32",
15600
+ },
15601
+ ],
15602
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
15603
+ name: "prices",
15604
+ type: "tuple[]",
15605
+ },
15606
+ ],
15607
+ internalType: "struct IPriceAggregator.SignedPairPrices[]",
15608
+ name: "_signedPairPrices",
15609
+ type: "tuple[]",
15610
+ },
14792
15611
  ],
14793
15612
  name: "setBorrowingPairParams",
14794
15613
  outputs: [],
14795
15614
  stateMutability: "nonpayable",
14796
15615
  type: "function",
14797
- signature: "0x33b516cf",
15616
+ signature: "0x3f85355a",
14798
15617
  },
14799
15618
  {
14800
15619
  inputs: [
@@ -14835,12 +15654,81 @@ const _abi = [
14835
15654
  name: "_values",
14836
15655
  type: "tuple[]",
14837
15656
  },
15657
+ {
15658
+ components: [
15659
+ {
15660
+ internalType: "uint8",
15661
+ name: "signerId",
15662
+ type: "uint8",
15663
+ },
15664
+ {
15665
+ internalType: "uint32",
15666
+ name: "expiryTs",
15667
+ type: "uint32",
15668
+ },
15669
+ {
15670
+ internalType: "bool",
15671
+ name: "isLookback",
15672
+ type: "bool",
15673
+ },
15674
+ {
15675
+ internalType: "uint32",
15676
+ name: "fromBlock",
15677
+ type: "uint32",
15678
+ },
15679
+ {
15680
+ internalType: "bytes",
15681
+ name: "signature",
15682
+ type: "bytes",
15683
+ },
15684
+ {
15685
+ internalType: "uint16[]",
15686
+ name: "pairIndices",
15687
+ type: "uint16[]",
15688
+ },
15689
+ {
15690
+ components: [
15691
+ {
15692
+ internalType: "uint56",
15693
+ name: "open",
15694
+ type: "uint56",
15695
+ },
15696
+ {
15697
+ internalType: "uint56",
15698
+ name: "high",
15699
+ type: "uint56",
15700
+ },
15701
+ {
15702
+ internalType: "uint56",
15703
+ name: "low",
15704
+ type: "uint56",
15705
+ },
15706
+ {
15707
+ internalType: "uint56",
15708
+ name: "current",
15709
+ type: "uint56",
15710
+ },
15711
+ {
15712
+ internalType: "uint32",
15713
+ name: "ts",
15714
+ type: "uint32",
15715
+ },
15716
+ ],
15717
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
15718
+ name: "prices",
15719
+ type: "tuple[]",
15720
+ },
15721
+ ],
15722
+ internalType: "struct IPriceAggregator.SignedPairPrices[]",
15723
+ name: "_signedPairPrices",
15724
+ type: "tuple[]",
15725
+ },
14838
15726
  ],
14839
15727
  name: "setBorrowingPairParamsArray",
14840
15728
  outputs: [],
14841
15729
  stateMutability: "nonpayable",
14842
15730
  type: "function",
14843
- signature: "0xeb1802f8",
15731
+ signature: "0xd4b813f2",
14844
15732
  },
14845
15733
  {
14846
15734
  inputs: [
@@ -14911,21 +15799,76 @@ const _abi = [
14911
15799
  type: "function",
14912
15800
  signature: "0x801c7961",
14913
15801
  },
15802
+ {
15803
+ inputs: [],
15804
+ name: "DuplicateOrUnsortedPairIndices",
15805
+ type: "error",
15806
+ },
15807
+ {
15808
+ inputs: [],
15809
+ name: "ExpiryTooFar",
15810
+ type: "error",
15811
+ },
15812
+ {
15813
+ inputs: [],
15814
+ name: "FromBlockMismatch",
15815
+ type: "error",
15816
+ },
14914
15817
  {
14915
15818
  inputs: [],
14916
15819
  name: "InvalidCandle",
14917
15820
  type: "error",
14918
15821
  },
15822
+ {
15823
+ inputs: [],
15824
+ name: "InvalidCurrentPrice",
15825
+ type: "error",
15826
+ },
15827
+ {
15828
+ inputs: [],
15829
+ name: "InvalidExpiryTimestamp",
15830
+ type: "error",
15831
+ },
14919
15832
  {
14920
15833
  inputs: [],
14921
15834
  name: "InvalidPoolType",
14922
15835
  type: "error",
14923
15836
  },
15837
+ {
15838
+ inputs: [],
15839
+ name: "InvalidSignature",
15840
+ type: "error",
15841
+ },
15842
+ {
15843
+ inputs: [],
15844
+ name: "LookbackMismatch",
15845
+ type: "error",
15846
+ },
15847
+ {
15848
+ inputs: [],
15849
+ name: "MinAnswersNotReached",
15850
+ type: "error",
15851
+ },
14924
15852
  {
14925
15853
  inputs: [],
14926
15854
  name: "OracleAlreadyListed",
14927
15855
  type: "error",
14928
15856
  },
15857
+ {
15858
+ inputs: [],
15859
+ name: "PairAndCurrentPriceLengthMismatch",
15860
+ type: "error",
15861
+ },
15862
+ {
15863
+ inputs: [],
15864
+ name: "PairIndexMismatchBetweenSigners",
15865
+ type: "error",
15866
+ },
15867
+ {
15868
+ inputs: [],
15869
+ name: "PairLengthMismatchBetweenSigners",
15870
+ type: "error",
15871
+ },
14929
15872
  {
14930
15873
  inputs: [],
14931
15874
  name: "RequestAlreadyPending",
@@ -14946,6 +15889,16 @@ const _abi = [
14946
15889
  name: "WrongCollateralUsdDecimals",
14947
15890
  type: "error",
14948
15891
  },
15892
+ {
15893
+ inputs: [],
15894
+ name: "WrongSignaturesCount",
15895
+ type: "error",
15896
+ },
15897
+ {
15898
+ inputs: [],
15899
+ name: "WrongSignerIdOrder",
15900
+ type: "error",
15901
+ },
14949
15902
  {
14950
15903
  anonymous: false,
14951
15904
  inputs: [
@@ -15231,20 +16184,6 @@ const _abi = [
15231
16184
  type: "event",
15232
16185
  signature: "0x36f00e7308d970ca7446a252b7a1dd9c9cb50ea4559b602e595fc53967ac9dd9",
15233
16186
  },
15234
- {
15235
- anonymous: false,
15236
- inputs: [
15237
- {
15238
- indexed: false,
15239
- internalType: "bytes32",
15240
- name: "jobId",
15241
- type: "bytes32",
15242
- },
15243
- ],
15244
- name: "ParamUpdateJobIdUpdated",
15245
- type: "event",
15246
- signature: "0x47b440e213065ce71d2660828d52a17e40915af406469be6b9af861a9465427b",
15247
- },
15248
16187
  {
15249
16188
  anonymous: false,
15250
16189
  inputs: [
@@ -15561,6 +16500,104 @@ const _abi = [
15561
16500
  type: "event",
15562
16501
  signature: "0xb388bf2f3f0bb2fde6ffeb60ae5f6ade4679631a026ce552771baebbb0ddb682",
15563
16502
  },
16503
+ {
16504
+ anonymous: false,
16505
+ inputs: [
16506
+ {
16507
+ indexed: true,
16508
+ internalType: "uint16",
16509
+ name: "pairIndex",
16510
+ type: "uint16",
16511
+ },
16512
+ {
16513
+ indexed: false,
16514
+ internalType: "bool",
16515
+ name: "isLookback",
16516
+ type: "bool",
16517
+ },
16518
+ {
16519
+ indexed: false,
16520
+ internalType: "uint32",
16521
+ name: "fromBlock",
16522
+ type: "uint32",
16523
+ },
16524
+ {
16525
+ indexed: false,
16526
+ internalType: "bool",
16527
+ name: "minFilteredAnswersReached",
16528
+ type: "bool",
16529
+ },
16530
+ {
16531
+ components: [
16532
+ {
16533
+ internalType: "uint56",
16534
+ name: "open",
16535
+ type: "uint56",
16536
+ },
16537
+ {
16538
+ internalType: "uint56",
16539
+ name: "high",
16540
+ type: "uint56",
16541
+ },
16542
+ {
16543
+ internalType: "uint56",
16544
+ name: "low",
16545
+ type: "uint56",
16546
+ },
16547
+ {
16548
+ internalType: "uint56",
16549
+ name: "current",
16550
+ type: "uint56",
16551
+ },
16552
+ {
16553
+ internalType: "uint32",
16554
+ name: "ts",
16555
+ type: "uint32",
16556
+ },
16557
+ ],
16558
+ indexed: false,
16559
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
16560
+ name: "unfilteredAnswers",
16561
+ type: "tuple[]",
16562
+ },
16563
+ {
16564
+ components: [
16565
+ {
16566
+ internalType: "uint56",
16567
+ name: "open",
16568
+ type: "uint56",
16569
+ },
16570
+ {
16571
+ internalType: "uint56",
16572
+ name: "high",
16573
+ type: "uint56",
16574
+ },
16575
+ {
16576
+ internalType: "uint56",
16577
+ name: "low",
16578
+ type: "uint56",
16579
+ },
16580
+ {
16581
+ internalType: "uint56",
16582
+ name: "current",
16583
+ type: "uint56",
16584
+ },
16585
+ {
16586
+ internalType: "uint32",
16587
+ name: "ts",
16588
+ type: "uint32",
16589
+ },
16590
+ ],
16591
+ indexed: false,
16592
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
16593
+ name: "filteredAnswers",
16594
+ type: "tuple[]",
16595
+ },
16596
+ ],
16597
+ name: "SignedPricesReceived",
16598
+ type: "event",
16599
+ signature: "0x86de8981b0d1c326788b6cf0a05a146dad3a99f57d2df4af213f32de34ce8bf4",
16600
+ },
15564
16601
  {
15565
16602
  anonymous: false,
15566
16603
  inputs: [
@@ -15656,6 +16693,14 @@ const _abi = [
15656
16693
  type: "function",
15657
16694
  signature: "0x6f37d263",
15658
16695
  },
16696
+ {
16697
+ inputs: [],
16698
+ name: "cleanUpSignedPairPrices",
16699
+ outputs: [],
16700
+ stateMutability: "nonpayable",
16701
+ type: "function",
16702
+ signature: "0x1c302ec1",
16703
+ },
15659
16704
  {
15660
16705
  inputs: [
15661
16706
  {
@@ -15836,6 +16881,31 @@ const _abi = [
15836
16881
  type: "function",
15837
16882
  signature: "0xa91fa361",
15838
16883
  },
16884
+ {
16885
+ inputs: [
16886
+ {
16887
+ internalType: "uint8",
16888
+ name: "_collateralIndex",
16889
+ type: "uint8",
16890
+ },
16891
+ {
16892
+ internalType: "uint256",
16893
+ name: "_gnsPriceCollateral",
16894
+ type: "uint256",
16895
+ },
16896
+ ],
16897
+ name: "getGnsPriceUsd",
16898
+ outputs: [
16899
+ {
16900
+ internalType: "uint256",
16901
+ name: "",
16902
+ type: "uint256",
16903
+ },
16904
+ ],
16905
+ stateMutability: "view",
16906
+ type: "function",
16907
+ signature: "0x6e27030b",
16908
+ },
15839
16909
  {
15840
16910
  inputs: [
15841
16911
  {
@@ -16043,18 +17113,110 @@ const _abi = [
16043
17113
  signature: "0x40884c52",
16044
17114
  },
16045
17115
  {
16046
- inputs: [],
16047
- name: "getParamUpdateJobId",
17116
+ inputs: [
17117
+ {
17118
+ internalType: "uint16",
17119
+ name: "_pairIndex",
17120
+ type: "uint16",
17121
+ },
17122
+ ],
17123
+ name: "getPairSignedMedianTemporary",
16048
17124
  outputs: [
16049
17125
  {
16050
- internalType: "bytes32",
17126
+ components: [
17127
+ {
17128
+ components: [
17129
+ {
17130
+ internalType: "address",
17131
+ name: "user",
17132
+ type: "address",
17133
+ },
17134
+ {
17135
+ internalType: "uint32",
17136
+ name: "index",
17137
+ type: "uint32",
17138
+ },
17139
+ ],
17140
+ internalType: "struct ITradingStorage.Id",
17141
+ name: "orderId",
17142
+ type: "tuple",
17143
+ },
17144
+ {
17145
+ internalType: "uint64",
17146
+ name: "open",
17147
+ type: "uint64",
17148
+ },
17149
+ {
17150
+ internalType: "uint64",
17151
+ name: "high",
17152
+ type: "uint64",
17153
+ },
17154
+ {
17155
+ internalType: "uint64",
17156
+ name: "low",
17157
+ type: "uint64",
17158
+ },
17159
+ {
17160
+ internalType: "uint64",
17161
+ name: "current",
17162
+ type: "uint64",
17163
+ },
17164
+ ],
17165
+ internalType: "struct ITradingCallbacks.AggregatorAnswer",
17166
+ name: "",
17167
+ type: "tuple",
17168
+ },
17169
+ ],
17170
+ stateMutability: "view",
17171
+ type: "function",
17172
+ signature: "0xed5becb6",
17173
+ },
17174
+ {
17175
+ inputs: [
17176
+ {
17177
+ internalType: "uint16",
17178
+ name: "_pairIndex",
17179
+ type: "uint16",
17180
+ },
17181
+ ],
17182
+ name: "getPairSignedOrderAnswersTemporary",
17183
+ outputs: [
17184
+ {
17185
+ components: [
17186
+ {
17187
+ internalType: "uint56",
17188
+ name: "open",
17189
+ type: "uint56",
17190
+ },
17191
+ {
17192
+ internalType: "uint56",
17193
+ name: "high",
17194
+ type: "uint56",
17195
+ },
17196
+ {
17197
+ internalType: "uint56",
17198
+ name: "low",
17199
+ type: "uint56",
17200
+ },
17201
+ {
17202
+ internalType: "uint56",
17203
+ name: "current",
17204
+ type: "uint56",
17205
+ },
17206
+ {
17207
+ internalType: "uint32",
17208
+ name: "ts",
17209
+ type: "uint32",
17210
+ },
17211
+ ],
17212
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
16051
17213
  name: "",
16052
- type: "bytes32",
17214
+ type: "tuple[]",
16053
17215
  },
16054
17216
  ],
16055
17217
  stateMutability: "view",
16056
17218
  type: "function",
16057
- signature: "0xc4296c90",
17219
+ signature: "0x4ed0ed84",
16058
17220
  },
16059
17221
  {
16060
17222
  inputs: [
@@ -16379,6 +17541,20 @@ const _abi = [
16379
17541
  type: "function",
16380
17542
  signature: "0x3fad1834",
16381
17543
  },
17544
+ {
17545
+ inputs: [],
17546
+ name: "getSignedPairIndicesTemporary",
17547
+ outputs: [
17548
+ {
17549
+ internalType: "uint16[]",
17550
+ name: "",
17551
+ type: "uint16[]",
17552
+ },
17553
+ ],
17554
+ stateMutability: "view",
17555
+ type: "function",
17556
+ signature: "0x988fcc05",
17557
+ },
16382
17558
  {
16383
17559
  inputs: [],
16384
17560
  name: "getTwapInterval",
@@ -16451,20 +17627,6 @@ const _abi = [
16451
17627
  type: "function",
16452
17628
  signature: "0x94db9ef7",
16453
17629
  },
16454
- {
16455
- inputs: [
16456
- {
16457
- internalType: "bytes32",
16458
- name: "_jobId",
16459
- type: "bytes32",
16460
- },
16461
- ],
16462
- name: "initializeParamUpdateJobId",
16463
- outputs: [],
16464
- stateMutability: "nonpayable",
16465
- type: "function",
16466
- signature: "0x299e40a4",
16467
- },
16468
17630
  {
16469
17631
  inputs: [
16470
17632
  {
@@ -16634,20 +17796,6 @@ const _abi = [
16634
17796
  type: "function",
16635
17797
  signature: "0xaa564b10",
16636
17798
  },
16637
- {
16638
- inputs: [
16639
- {
16640
- internalType: "bytes32",
16641
- name: "_jobId",
16642
- type: "bytes32",
16643
- },
16644
- ],
16645
- name: "setParamUpdateJobId",
16646
- outputs: [],
16647
- stateMutability: "nonpayable",
16648
- type: "function",
16649
- signature: "0x989f7ceb",
16650
- },
16651
17799
  {
16652
17800
  inputs: [
16653
17801
  {
@@ -16740,6 +17888,89 @@ const _abi = [
16740
17888
  type: "function",
16741
17889
  signature: "0xb166a495",
16742
17890
  },
17891
+ {
17892
+ inputs: [
17893
+ {
17894
+ components: [
17895
+ {
17896
+ internalType: "uint8",
17897
+ name: "signerId",
17898
+ type: "uint8",
17899
+ },
17900
+ {
17901
+ internalType: "uint32",
17902
+ name: "expiryTs",
17903
+ type: "uint32",
17904
+ },
17905
+ {
17906
+ internalType: "bool",
17907
+ name: "isLookback",
17908
+ type: "bool",
17909
+ },
17910
+ {
17911
+ internalType: "uint32",
17912
+ name: "fromBlock",
17913
+ type: "uint32",
17914
+ },
17915
+ {
17916
+ internalType: "bytes",
17917
+ name: "signature",
17918
+ type: "bytes",
17919
+ },
17920
+ {
17921
+ internalType: "uint16[]",
17922
+ name: "pairIndices",
17923
+ type: "uint16[]",
17924
+ },
17925
+ {
17926
+ components: [
17927
+ {
17928
+ internalType: "uint56",
17929
+ name: "open",
17930
+ type: "uint56",
17931
+ },
17932
+ {
17933
+ internalType: "uint56",
17934
+ name: "high",
17935
+ type: "uint56",
17936
+ },
17937
+ {
17938
+ internalType: "uint56",
17939
+ name: "low",
17940
+ type: "uint56",
17941
+ },
17942
+ {
17943
+ internalType: "uint56",
17944
+ name: "current",
17945
+ type: "uint56",
17946
+ },
17947
+ {
17948
+ internalType: "uint32",
17949
+ name: "ts",
17950
+ type: "uint32",
17951
+ },
17952
+ ],
17953
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
17954
+ name: "prices",
17955
+ type: "tuple[]",
17956
+ },
17957
+ ],
17958
+ internalType: "struct IPriceAggregator.SignedPairPrices[]",
17959
+ name: "_signedPairPrices",
17960
+ type: "tuple[]",
17961
+ },
17962
+ {
17963
+ internalType: "bool",
17964
+ name: "_isLookback",
17965
+ type: "bool",
17966
+ },
17967
+ ],
17968
+ name: "validateSignedPairPrices",
17969
+ outputs: [],
17970
+ stateMutability: "nonpayable",
17971
+ type: "function",
17972
+ signature: "0x73b0d136",
17973
+ },
16743
17974
  {
16744
17975
  inputs: [],
16745
17976
  name: "InvalidShareSum",
@@ -18806,53 +20037,36 @@ const _abi = [
18806
20037
  {
18807
20038
  components: [
18808
20039
  {
18809
- components: [
18810
- {
18811
- internalType: "address",
18812
- name: "user",
18813
- type: "address",
18814
- },
18815
- {
18816
- internalType: "uint32",
18817
- name: "index",
18818
- type: "uint32",
18819
- },
18820
- ],
18821
- internalType: "struct ITradingStorage.Id",
18822
- name: "orderId",
18823
- type: "tuple",
18824
- },
18825
- {
18826
- internalType: "uint64",
18827
- name: "open",
18828
- type: "uint64",
20040
+ internalType: "uint8",
20041
+ name: "collateralIndex",
20042
+ type: "uint8",
18829
20043
  },
18830
20044
  {
18831
- internalType: "uint64",
18832
- name: "high",
18833
- type: "uint64",
20045
+ internalType: "uint16",
20046
+ name: "pairIndex",
20047
+ type: "uint16",
18834
20048
  },
18835
20049
  {
18836
- internalType: "uint64",
18837
- name: "low",
18838
- type: "uint64",
20050
+ internalType: "enum IFundingFees.ParamUpdateType",
20051
+ name: "updateType",
20052
+ type: "uint8",
18839
20053
  },
18840
20054
  {
18841
- internalType: "uint64",
18842
- name: "current",
18843
- type: "uint64",
20055
+ internalType: "uint224",
20056
+ name: "newValue",
20057
+ type: "uint224",
18844
20058
  },
18845
20059
  ],
18846
- internalType: "struct ITradingCallbacks.AggregatorAnswer",
18847
- name: "_answer",
20060
+ internalType: "struct IFundingFees.PendingParamUpdate",
20061
+ name: "_paramUpdate",
18848
20062
  type: "tuple",
18849
20063
  },
18850
20064
  ],
18851
- name: "pendingParamUpdateCallback",
20065
+ name: "paramUpdateCallbackWithSignedPrices",
18852
20066
  outputs: [],
18853
20067
  stateMutability: "nonpayable",
18854
20068
  type: "function",
18855
- signature: "0x5246b961",
20069
+ signature: "0x002c68df",
18856
20070
  },
18857
20071
  {
18858
20072
  inputs: [
@@ -18937,35 +20151,6 @@ const _abi = [
18937
20151
  type: "function",
18938
20152
  signature: "0xfd84264d",
18939
20153
  },
18940
- {
18941
- inputs: [
18942
- {
18943
- internalType: "uint8",
18944
- name: "_collateralIndex",
18945
- type: "uint8",
18946
- },
18947
- {
18948
- internalType: "uint16",
18949
- name: "_pairIndex",
18950
- type: "uint16",
18951
- },
18952
- {
18953
- internalType: "enum IFundingFees.ParamUpdateType",
18954
- name: "_updateType",
18955
- type: "uint8",
18956
- },
18957
- {
18958
- internalType: "uint224",
18959
- name: "_newValue",
18960
- type: "uint224",
18961
- },
18962
- ],
18963
- name: "requestParamUpdate",
18964
- outputs: [],
18965
- stateMutability: "nonpayable",
18966
- type: "function",
18967
- signature: "0x41f84f2b",
18968
- },
18969
20154
  {
18970
20155
  inputs: [
18971
20156
  {
@@ -18983,12 +20168,81 @@ const _abi = [
18983
20168
  name: "_absoluteRatePerSecondCap",
18984
20169
  type: "uint24[]",
18985
20170
  },
20171
+ {
20172
+ components: [
20173
+ {
20174
+ internalType: "uint8",
20175
+ name: "signerId",
20176
+ type: "uint8",
20177
+ },
20178
+ {
20179
+ internalType: "uint32",
20180
+ name: "expiryTs",
20181
+ type: "uint32",
20182
+ },
20183
+ {
20184
+ internalType: "bool",
20185
+ name: "isLookback",
20186
+ type: "bool",
20187
+ },
20188
+ {
20189
+ internalType: "uint32",
20190
+ name: "fromBlock",
20191
+ type: "uint32",
20192
+ },
20193
+ {
20194
+ internalType: "bytes",
20195
+ name: "signature",
20196
+ type: "bytes",
20197
+ },
20198
+ {
20199
+ internalType: "uint16[]",
20200
+ name: "pairIndices",
20201
+ type: "uint16[]",
20202
+ },
20203
+ {
20204
+ components: [
20205
+ {
20206
+ internalType: "uint56",
20207
+ name: "open",
20208
+ type: "uint56",
20209
+ },
20210
+ {
20211
+ internalType: "uint56",
20212
+ name: "high",
20213
+ type: "uint56",
20214
+ },
20215
+ {
20216
+ internalType: "uint56",
20217
+ name: "low",
20218
+ type: "uint56",
20219
+ },
20220
+ {
20221
+ internalType: "uint56",
20222
+ name: "current",
20223
+ type: "uint56",
20224
+ },
20225
+ {
20226
+ internalType: "uint32",
20227
+ name: "ts",
20228
+ type: "uint32",
20229
+ },
20230
+ ],
20231
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
20232
+ name: "prices",
20233
+ type: "tuple[]",
20234
+ },
20235
+ ],
20236
+ internalType: "struct IPriceAggregator.SignedPairPrices[]",
20237
+ name: "_signedPairPrices",
20238
+ type: "tuple[]",
20239
+ },
18986
20240
  ],
18987
20241
  name: "setAbsoluteRatePerSecondCap",
18988
20242
  outputs: [],
18989
20243
  stateMutability: "nonpayable",
18990
20244
  type: "function",
18991
- signature: "0x1cff93a8",
20245
+ signature: "0x48b5a760",
18992
20246
  },
18993
20247
  {
18994
20248
  inputs: [
@@ -19007,12 +20261,81 @@ const _abi = [
19007
20261
  name: "_absoluteVelocityPerYearCap",
19008
20262
  type: "uint24[]",
19009
20263
  },
20264
+ {
20265
+ components: [
20266
+ {
20267
+ internalType: "uint8",
20268
+ name: "signerId",
20269
+ type: "uint8",
20270
+ },
20271
+ {
20272
+ internalType: "uint32",
20273
+ name: "expiryTs",
20274
+ type: "uint32",
20275
+ },
20276
+ {
20277
+ internalType: "bool",
20278
+ name: "isLookback",
20279
+ type: "bool",
20280
+ },
20281
+ {
20282
+ internalType: "uint32",
20283
+ name: "fromBlock",
20284
+ type: "uint32",
20285
+ },
20286
+ {
20287
+ internalType: "bytes",
20288
+ name: "signature",
20289
+ type: "bytes",
20290
+ },
20291
+ {
20292
+ internalType: "uint16[]",
20293
+ name: "pairIndices",
20294
+ type: "uint16[]",
20295
+ },
20296
+ {
20297
+ components: [
20298
+ {
20299
+ internalType: "uint56",
20300
+ name: "open",
20301
+ type: "uint56",
20302
+ },
20303
+ {
20304
+ internalType: "uint56",
20305
+ name: "high",
20306
+ type: "uint56",
20307
+ },
20308
+ {
20309
+ internalType: "uint56",
20310
+ name: "low",
20311
+ type: "uint56",
20312
+ },
20313
+ {
20314
+ internalType: "uint56",
20315
+ name: "current",
20316
+ type: "uint56",
20317
+ },
20318
+ {
20319
+ internalType: "uint32",
20320
+ name: "ts",
20321
+ type: "uint32",
20322
+ },
20323
+ ],
20324
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
20325
+ name: "prices",
20326
+ type: "tuple[]",
20327
+ },
20328
+ ],
20329
+ internalType: "struct IPriceAggregator.SignedPairPrices[]",
20330
+ name: "_signedPairPrices",
20331
+ type: "tuple[]",
20332
+ },
19010
20333
  ],
19011
20334
  name: "setAbsoluteVelocityPerYearCap",
19012
20335
  outputs: [],
19013
20336
  stateMutability: "nonpayable",
19014
20337
  type: "function",
19015
- signature: "0x96ebeace",
20338
+ signature: "0xfacfee17",
19016
20339
  },
19017
20340
  {
19018
20341
  inputs: [
@@ -19031,12 +20354,81 @@ const _abi = [
19031
20354
  name: "_aprMultiplierEnabled",
19032
20355
  type: "bool[]",
19033
20356
  },
20357
+ {
20358
+ components: [
20359
+ {
20360
+ internalType: "uint8",
20361
+ name: "signerId",
20362
+ type: "uint8",
20363
+ },
20364
+ {
20365
+ internalType: "uint32",
20366
+ name: "expiryTs",
20367
+ type: "uint32",
20368
+ },
20369
+ {
20370
+ internalType: "bool",
20371
+ name: "isLookback",
20372
+ type: "bool",
20373
+ },
20374
+ {
20375
+ internalType: "uint32",
20376
+ name: "fromBlock",
20377
+ type: "uint32",
20378
+ },
20379
+ {
20380
+ internalType: "bytes",
20381
+ name: "signature",
20382
+ type: "bytes",
20383
+ },
20384
+ {
20385
+ internalType: "uint16[]",
20386
+ name: "pairIndices",
20387
+ type: "uint16[]",
20388
+ },
20389
+ {
20390
+ components: [
20391
+ {
20392
+ internalType: "uint56",
20393
+ name: "open",
20394
+ type: "uint56",
20395
+ },
20396
+ {
20397
+ internalType: "uint56",
20398
+ name: "high",
20399
+ type: "uint56",
20400
+ },
20401
+ {
20402
+ internalType: "uint56",
20403
+ name: "low",
20404
+ type: "uint56",
20405
+ },
20406
+ {
20407
+ internalType: "uint56",
20408
+ name: "current",
20409
+ type: "uint56",
20410
+ },
20411
+ {
20412
+ internalType: "uint32",
20413
+ name: "ts",
20414
+ type: "uint32",
20415
+ },
20416
+ ],
20417
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
20418
+ name: "prices",
20419
+ type: "tuple[]",
20420
+ },
20421
+ ],
20422
+ internalType: "struct IPriceAggregator.SignedPairPrices[]",
20423
+ name: "_signedPairPrices",
20424
+ type: "tuple[]",
20425
+ },
19034
20426
  ],
19035
20427
  name: "setAprMultiplierEnabled",
19036
20428
  outputs: [],
19037
20429
  stateMutability: "nonpayable",
19038
20430
  type: "function",
19039
- signature: "0xe8cf0b70",
20431
+ signature: "0x6d00c93e",
19040
20432
  },
19041
20433
  {
19042
20434
  inputs: [
@@ -19055,12 +20447,81 @@ const _abi = [
19055
20447
  name: "_borrowingRatePerSecondP",
19056
20448
  type: "uint24[]",
19057
20449
  },
20450
+ {
20451
+ components: [
20452
+ {
20453
+ internalType: "uint8",
20454
+ name: "signerId",
20455
+ type: "uint8",
20456
+ },
20457
+ {
20458
+ internalType: "uint32",
20459
+ name: "expiryTs",
20460
+ type: "uint32",
20461
+ },
20462
+ {
20463
+ internalType: "bool",
20464
+ name: "isLookback",
20465
+ type: "bool",
20466
+ },
20467
+ {
20468
+ internalType: "uint32",
20469
+ name: "fromBlock",
20470
+ type: "uint32",
20471
+ },
20472
+ {
20473
+ internalType: "bytes",
20474
+ name: "signature",
20475
+ type: "bytes",
20476
+ },
20477
+ {
20478
+ internalType: "uint16[]",
20479
+ name: "pairIndices",
20480
+ type: "uint16[]",
20481
+ },
20482
+ {
20483
+ components: [
20484
+ {
20485
+ internalType: "uint56",
20486
+ name: "open",
20487
+ type: "uint56",
20488
+ },
20489
+ {
20490
+ internalType: "uint56",
20491
+ name: "high",
20492
+ type: "uint56",
20493
+ },
20494
+ {
20495
+ internalType: "uint56",
20496
+ name: "low",
20497
+ type: "uint56",
20498
+ },
20499
+ {
20500
+ internalType: "uint56",
20501
+ name: "current",
20502
+ type: "uint56",
20503
+ },
20504
+ {
20505
+ internalType: "uint32",
20506
+ name: "ts",
20507
+ type: "uint32",
20508
+ },
20509
+ ],
20510
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
20511
+ name: "prices",
20512
+ type: "tuple[]",
20513
+ },
20514
+ ],
20515
+ internalType: "struct IPriceAggregator.SignedPairPrices[]",
20516
+ name: "_signedPairPrices",
20517
+ type: "tuple[]",
20518
+ },
19058
20519
  ],
19059
20520
  name: "setBorrowingRatePerSecondP",
19060
20521
  outputs: [],
19061
20522
  stateMutability: "nonpayable",
19062
20523
  type: "function",
19063
- signature: "0xdbb69ab4",
20524
+ signature: "0x559f5276",
19064
20525
  },
19065
20526
  {
19066
20527
  inputs: [
@@ -19079,12 +20540,81 @@ const _abi = [
19079
20540
  name: "_fundingFeesEnabled",
19080
20541
  type: "bool[]",
19081
20542
  },
20543
+ {
20544
+ components: [
20545
+ {
20546
+ internalType: "uint8",
20547
+ name: "signerId",
20548
+ type: "uint8",
20549
+ },
20550
+ {
20551
+ internalType: "uint32",
20552
+ name: "expiryTs",
20553
+ type: "uint32",
20554
+ },
20555
+ {
20556
+ internalType: "bool",
20557
+ name: "isLookback",
20558
+ type: "bool",
20559
+ },
20560
+ {
20561
+ internalType: "uint32",
20562
+ name: "fromBlock",
20563
+ type: "uint32",
20564
+ },
20565
+ {
20566
+ internalType: "bytes",
20567
+ name: "signature",
20568
+ type: "bytes",
20569
+ },
20570
+ {
20571
+ internalType: "uint16[]",
20572
+ name: "pairIndices",
20573
+ type: "uint16[]",
20574
+ },
20575
+ {
20576
+ components: [
20577
+ {
20578
+ internalType: "uint56",
20579
+ name: "open",
20580
+ type: "uint56",
20581
+ },
20582
+ {
20583
+ internalType: "uint56",
20584
+ name: "high",
20585
+ type: "uint56",
20586
+ },
20587
+ {
20588
+ internalType: "uint56",
20589
+ name: "low",
20590
+ type: "uint56",
20591
+ },
20592
+ {
20593
+ internalType: "uint56",
20594
+ name: "current",
20595
+ type: "uint56",
20596
+ },
20597
+ {
20598
+ internalType: "uint32",
20599
+ name: "ts",
20600
+ type: "uint32",
20601
+ },
20602
+ ],
20603
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
20604
+ name: "prices",
20605
+ type: "tuple[]",
20606
+ },
20607
+ ],
20608
+ internalType: "struct IPriceAggregator.SignedPairPrices[]",
20609
+ name: "_signedPairPrices",
20610
+ type: "tuple[]",
20611
+ },
19082
20612
  ],
19083
20613
  name: "setFundingFeesEnabled",
19084
20614
  outputs: [],
19085
20615
  stateMutability: "nonpayable",
19086
20616
  type: "function",
19087
- signature: "0x7b4ee84d",
20617
+ signature: "0x2fe09970",
19088
20618
  },
19089
20619
  {
19090
20620
  inputs: [
@@ -19127,12 +20657,81 @@ const _abi = [
19127
20657
  name: "_skewCoefficientPerYear",
19128
20658
  type: "uint112[]",
19129
20659
  },
20660
+ {
20661
+ components: [
20662
+ {
20663
+ internalType: "uint8",
20664
+ name: "signerId",
20665
+ type: "uint8",
20666
+ },
20667
+ {
20668
+ internalType: "uint32",
20669
+ name: "expiryTs",
20670
+ type: "uint32",
20671
+ },
20672
+ {
20673
+ internalType: "bool",
20674
+ name: "isLookback",
20675
+ type: "bool",
20676
+ },
20677
+ {
20678
+ internalType: "uint32",
20679
+ name: "fromBlock",
20680
+ type: "uint32",
20681
+ },
20682
+ {
20683
+ internalType: "bytes",
20684
+ name: "signature",
20685
+ type: "bytes",
20686
+ },
20687
+ {
20688
+ internalType: "uint16[]",
20689
+ name: "pairIndices",
20690
+ type: "uint16[]",
20691
+ },
20692
+ {
20693
+ components: [
20694
+ {
20695
+ internalType: "uint56",
20696
+ name: "open",
20697
+ type: "uint56",
20698
+ },
20699
+ {
20700
+ internalType: "uint56",
20701
+ name: "high",
20702
+ type: "uint56",
20703
+ },
20704
+ {
20705
+ internalType: "uint56",
20706
+ name: "low",
20707
+ type: "uint56",
20708
+ },
20709
+ {
20710
+ internalType: "uint56",
20711
+ name: "current",
20712
+ type: "uint56",
20713
+ },
20714
+ {
20715
+ internalType: "uint32",
20716
+ name: "ts",
20717
+ type: "uint32",
20718
+ },
20719
+ ],
20720
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
20721
+ name: "prices",
20722
+ type: "tuple[]",
20723
+ },
20724
+ ],
20725
+ internalType: "struct IPriceAggregator.SignedPairPrices[]",
20726
+ name: "_signedPairPrices",
20727
+ type: "tuple[]",
20728
+ },
19130
20729
  ],
19131
20730
  name: "setSkewCoefficientPerYear",
19132
20731
  outputs: [],
19133
20732
  stateMutability: "nonpayable",
19134
20733
  type: "function",
19135
- signature: "0xb6fa94a3",
20734
+ signature: "0xaeaca82a",
19136
20735
  },
19137
20736
  {
19138
20737
  inputs: [
@@ -19151,12 +20750,81 @@ const _abi = [
19151
20750
  name: "_thetaThresholdUsd",
19152
20751
  type: "uint32[]",
19153
20752
  },
20753
+ {
20754
+ components: [
20755
+ {
20756
+ internalType: "uint8",
20757
+ name: "signerId",
20758
+ type: "uint8",
20759
+ },
20760
+ {
20761
+ internalType: "uint32",
20762
+ name: "expiryTs",
20763
+ type: "uint32",
20764
+ },
20765
+ {
20766
+ internalType: "bool",
20767
+ name: "isLookback",
20768
+ type: "bool",
20769
+ },
20770
+ {
20771
+ internalType: "uint32",
20772
+ name: "fromBlock",
20773
+ type: "uint32",
20774
+ },
20775
+ {
20776
+ internalType: "bytes",
20777
+ name: "signature",
20778
+ type: "bytes",
20779
+ },
20780
+ {
20781
+ internalType: "uint16[]",
20782
+ name: "pairIndices",
20783
+ type: "uint16[]",
20784
+ },
20785
+ {
20786
+ components: [
20787
+ {
20788
+ internalType: "uint56",
20789
+ name: "open",
20790
+ type: "uint56",
20791
+ },
20792
+ {
20793
+ internalType: "uint56",
20794
+ name: "high",
20795
+ type: "uint56",
20796
+ },
20797
+ {
20798
+ internalType: "uint56",
20799
+ name: "low",
20800
+ type: "uint56",
20801
+ },
20802
+ {
20803
+ internalType: "uint56",
20804
+ name: "current",
20805
+ type: "uint56",
20806
+ },
20807
+ {
20808
+ internalType: "uint32",
20809
+ name: "ts",
20810
+ type: "uint32",
20811
+ },
20812
+ ],
20813
+ internalType: "struct IPriceAggregator.OrderAnswer[]",
20814
+ name: "prices",
20815
+ type: "tuple[]",
20816
+ },
20817
+ ],
20818
+ internalType: "struct IPriceAggregator.SignedPairPrices[]",
20819
+ name: "_signedPairPrices",
20820
+ type: "tuple[]",
20821
+ },
19154
20822
  ],
19155
20823
  name: "setThetaThresholdUsd",
19156
20824
  outputs: [],
19157
20825
  stateMutability: "nonpayable",
19158
20826
  type: "function",
19159
- signature: "0x3adcbe28",
20827
+ signature: "0x6916451e",
19160
20828
  },
19161
20829
  {
19162
20830
  inputs: [
@@ -19293,6 +20961,30 @@ const _abi = [
19293
20961
  type: "function",
19294
20962
  signature: "0x2e4f2b16",
19295
20963
  },
20964
+ {
20965
+ inputs: [
20966
+ {
20967
+ internalType: "address",
20968
+ name: "_trader",
20969
+ type: "address",
20970
+ },
20971
+ {
20972
+ internalType: "uint32",
20973
+ name: "_index",
20974
+ type: "uint32",
20975
+ },
20976
+ {
20977
+ internalType: "uint256",
20978
+ name: "_deltaCollateral",
20979
+ type: "uint256",
20980
+ },
20981
+ ],
20982
+ name: "storeUiRealizedTradingFeesCollateral",
20983
+ outputs: [],
20984
+ stateMutability: "nonpayable",
20985
+ type: "function",
20986
+ signature: "0x24f84e39",
20987
+ },
19296
20988
  {
19297
20989
  inputs: [
19298
20990
  {