@gainsnetwork/sdk 0.2.8-rc2 → 0.2.9-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 (40) hide show
  1. package/lib/constants.d.ts +1 -0
  2. package/lib/constants.js +3 -2
  3. package/lib/contracts/types/generated/GFarmTradingStorageV5.d.ts +1911 -0
  4. package/lib/contracts/types/generated/GFarmTradingStorageV5.js +2 -0
  5. package/lib/contracts/types/generated/GNSBorrowingFees.d.ts +1067 -0
  6. package/lib/contracts/types/generated/GNSBorrowingFees.js +2 -0
  7. package/lib/contracts/types/generated/GNSMultiCollatDiamond.d.ts +892 -412
  8. package/lib/contracts/types/generated/GNSNftRewardsV6.d.ts +533 -0
  9. package/lib/contracts/types/generated/GNSNftRewardsV6.js +2 -0
  10. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.d.ts +613 -0
  11. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.js +2 -0
  12. package/lib/contracts/types/generated/GNSTrading.d.ts +758 -0
  13. package/lib/contracts/types/generated/GNSTrading.js +2 -0
  14. package/lib/contracts/types/generated/GNSTradingCallbacks.d.ts +875 -0
  15. package/lib/contracts/types/generated/GNSTradingCallbacks.js +2 -0
  16. package/lib/contracts/types/generated/GNSTradingStorage.d.ts +1387 -0
  17. package/lib/contracts/types/generated/GNSTradingStorage.js +2 -0
  18. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.d.ts +83 -0
  19. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.js +2691 -0
  20. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.d.ts +124 -0
  21. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.js +1784 -0
  22. package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.d.ts +0 -94
  23. package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.js +2190 -912
  24. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.d.ts +100 -0
  25. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.js +1116 -0
  26. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.d.ts +100 -0
  27. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.js +1003 -0
  28. package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.d.ts +113 -0
  29. package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.js +1428 -0
  30. package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.d.ts +96 -0
  31. package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.js +2241 -0
  32. package/lib/contracts/types/generated/factories/GNSTrading__factory.d.ts +95 -0
  33. package/lib/contracts/types/generated/factories/GNSTrading__factory.js +1071 -0
  34. package/lib/contracts/utils/openTrades.js +11 -2
  35. package/lib/contracts/utils/pairs.d.ts +1 -0
  36. package/lib/contracts/utils/pairs.js +18 -1
  37. package/lib/trade/spread.d.ts +8 -1
  38. package/lib/trade/spread.js +23 -6
  39. package/lib/trade/types.d.ts +10 -1
  40. package/package.json +1 -1
@@ -57,6 +57,11 @@ const _abi = [
57
57
  name: "InitializationFunctionReverted",
58
58
  type: "error",
59
59
  },
60
+ {
61
+ inputs: [],
62
+ name: "InsufficientBalance",
63
+ type: "error",
64
+ },
60
65
  {
61
66
  inputs: [],
62
67
  name: "InvalidAddresses",
@@ -315,7 +320,6 @@ const _abi = [
315
320
  ],
316
321
  stateMutability: "view",
317
322
  type: "function",
318
- constant: true,
319
323
  signature: "0xcdffacc6",
320
324
  },
321
325
  {
@@ -330,7 +334,6 @@ const _abi = [
330
334
  ],
331
335
  stateMutability: "view",
332
336
  type: "function",
333
- constant: true,
334
337
  signature: "0x52ef6b2c",
335
338
  },
336
339
  {
@@ -351,7 +354,6 @@ const _abi = [
351
354
  ],
352
355
  stateMutability: "view",
353
356
  type: "function",
354
- constant: true,
355
357
  signature: "0xadfca15e",
356
358
  },
357
359
  {
@@ -378,7 +380,6 @@ const _abi = [
378
380
  ],
379
381
  stateMutability: "view",
380
382
  type: "function",
381
- constant: true,
382
383
  signature: "0x7a0ed627",
383
384
  },
384
385
  {
@@ -405,7 +406,6 @@ const _abi = [
405
406
  ],
406
407
  stateMutability: "view",
407
408
  type: "function",
408
- constant: true,
409
409
  signature: "0xa39fac12",
410
410
  },
411
411
  {
@@ -431,7 +431,6 @@ const _abi = [
431
431
  ],
432
432
  stateMutability: "view",
433
433
  type: "function",
434
- constant: true,
435
434
  signature: "0x95a8c58d",
436
435
  },
437
436
  {
@@ -472,6 +471,16 @@ const _abi = [
472
471
  type: "function",
473
472
  signature: "0x101e6503",
474
473
  },
474
+ {
475
+ inputs: [],
476
+ name: "EndLeverageTooHigh",
477
+ type: "error",
478
+ },
479
+ {
480
+ inputs: [],
481
+ name: "EndLiqThresholdTooLow",
482
+ type: "error",
483
+ },
475
484
  {
476
485
  inputs: [],
477
486
  name: "FeeNotListed",
@@ -482,6 +491,11 @@ const _abi = [
482
491
  name: "GroupNotListed",
483
492
  type: "error",
484
493
  },
494
+ {
495
+ inputs: [],
496
+ name: "MaxLiqSpreadPTooHigh",
497
+ type: "error",
498
+ },
485
499
  {
486
500
  inputs: [],
487
501
  name: "PairAlreadyListed",
@@ -492,6 +506,16 @@ const _abi = [
492
506
  name: "PairNotListed",
493
507
  type: "error",
494
508
  },
509
+ {
510
+ inputs: [],
511
+ name: "StartLeverageTooLow",
512
+ type: "error",
513
+ },
514
+ {
515
+ inputs: [],
516
+ name: "StartLiqThresholdTooHigh",
517
+ type: "error",
518
+ },
495
519
  {
496
520
  inputs: [],
497
521
  name: "WrongFees",
@@ -502,6 +526,16 @@ const _abi = [
502
526
  name: "WrongLeverages",
503
527
  type: "error",
504
528
  },
529
+ {
530
+ inputs: [],
531
+ name: "WrongLiqParamsLeverages",
532
+ type: "error",
533
+ },
534
+ {
535
+ inputs: [],
536
+ name: "WrongLiqParamsThresholds",
537
+ type: "error",
538
+ },
505
539
  {
506
540
  anonymous: false,
507
541
  inputs: [
@@ -556,6 +590,53 @@ const _abi = [
556
590
  type: "event",
557
591
  signature: "0xaf17de8e82beccc440012117a600dc37e26925225d0f1ee192fc107eb3dcbca4",
558
592
  },
593
+ {
594
+ anonymous: false,
595
+ inputs: [
596
+ {
597
+ indexed: false,
598
+ internalType: "uint256",
599
+ name: "index",
600
+ type: "uint256",
601
+ },
602
+ {
603
+ components: [
604
+ {
605
+ internalType: "uint40",
606
+ name: "maxLiqSpreadP",
607
+ type: "uint40",
608
+ },
609
+ {
610
+ internalType: "uint64",
611
+ name: "startLiqThresholdP",
612
+ type: "uint64",
613
+ },
614
+ {
615
+ internalType: "uint64",
616
+ name: "endLiqThresholdP",
617
+ type: "uint64",
618
+ },
619
+ {
620
+ internalType: "uint24",
621
+ name: "startLeverage",
622
+ type: "uint24",
623
+ },
624
+ {
625
+ internalType: "uint24",
626
+ name: "endLeverage",
627
+ type: "uint24",
628
+ },
629
+ ],
630
+ indexed: false,
631
+ internalType: "struct IPairsStorage.GroupLiquidationParams",
632
+ name: "params",
633
+ type: "tuple",
634
+ },
635
+ ],
636
+ name: "GroupLiquidationParamsUpdated",
637
+ type: "event",
638
+ signature: "0x52bf41e4c95a813ed559a6c8bd01fa75e1ef80e29720fae8a1c1691bce4519aa",
639
+ },
559
640
  {
560
641
  anonymous: false,
561
642
  inputs: [
@@ -830,7 +911,6 @@ const _abi = [
830
911
  ],
831
912
  stateMutability: "view",
832
913
  type: "function",
833
- constant: true,
834
914
  signature: "0x4acc79ed",
835
915
  },
836
916
  {
@@ -845,7 +925,6 @@ const _abi = [
845
925
  ],
846
926
  stateMutability: "view",
847
927
  type: "function",
848
- constant: true,
849
928
  signature: "0x658de48a",
850
929
  },
851
930
  {
@@ -860,9 +939,102 @@ const _abi = [
860
939
  ],
861
940
  stateMutability: "view",
862
941
  type: "function",
863
- constant: true,
864
942
  signature: "0x678b3fb0",
865
943
  },
944
+ {
945
+ inputs: [
946
+ {
947
+ internalType: "uint256",
948
+ name: "_groupIndex",
949
+ type: "uint256",
950
+ },
951
+ ],
952
+ name: "getGroupLiquidationParams",
953
+ outputs: [
954
+ {
955
+ components: [
956
+ {
957
+ internalType: "uint40",
958
+ name: "maxLiqSpreadP",
959
+ type: "uint40",
960
+ },
961
+ {
962
+ internalType: "uint64",
963
+ name: "startLiqThresholdP",
964
+ type: "uint64",
965
+ },
966
+ {
967
+ internalType: "uint64",
968
+ name: "endLiqThresholdP",
969
+ type: "uint64",
970
+ },
971
+ {
972
+ internalType: "uint24",
973
+ name: "startLeverage",
974
+ type: "uint24",
975
+ },
976
+ {
977
+ internalType: "uint24",
978
+ name: "endLeverage",
979
+ type: "uint24",
980
+ },
981
+ ],
982
+ internalType: "struct IPairsStorage.GroupLiquidationParams",
983
+ name: "",
984
+ type: "tuple",
985
+ },
986
+ ],
987
+ stateMutability: "view",
988
+ type: "function",
989
+ signature: "0x3572929c",
990
+ },
991
+ {
992
+ inputs: [
993
+ {
994
+ internalType: "uint256",
995
+ name: "_pairIndex",
996
+ type: "uint256",
997
+ },
998
+ ],
999
+ name: "getPairLiquidationParams",
1000
+ outputs: [
1001
+ {
1002
+ components: [
1003
+ {
1004
+ internalType: "uint40",
1005
+ name: "maxLiqSpreadP",
1006
+ type: "uint40",
1007
+ },
1008
+ {
1009
+ internalType: "uint64",
1010
+ name: "startLiqThresholdP",
1011
+ type: "uint64",
1012
+ },
1013
+ {
1014
+ internalType: "uint64",
1015
+ name: "endLiqThresholdP",
1016
+ type: "uint64",
1017
+ },
1018
+ {
1019
+ internalType: "uint24",
1020
+ name: "startLeverage",
1021
+ type: "uint24",
1022
+ },
1023
+ {
1024
+ internalType: "uint24",
1025
+ name: "endLeverage",
1026
+ type: "uint24",
1027
+ },
1028
+ ],
1029
+ internalType: "struct IPairsStorage.GroupLiquidationParams",
1030
+ name: "",
1031
+ type: "tuple",
1032
+ },
1033
+ ],
1034
+ stateMutability: "view",
1035
+ type: "function",
1036
+ signature: "0x6633ced6",
1037
+ },
866
1038
  {
867
1039
  inputs: [
868
1040
  {
@@ -903,7 +1075,6 @@ const _abi = [
903
1075
  ],
904
1076
  stateMutability: "view",
905
1077
  type: "function",
906
- constant: true,
907
1078
  signature: "0x96324bd4",
908
1079
  },
909
1080
  {
@@ -918,9 +1089,49 @@ const _abi = [
918
1089
  ],
919
1090
  stateMutability: "view",
920
1091
  type: "function",
921
- constant: true,
922
1092
  signature: "0x885e2750",
923
1093
  },
1094
+ {
1095
+ inputs: [
1096
+ {
1097
+ components: [
1098
+ {
1099
+ internalType: "uint40",
1100
+ name: "maxLiqSpreadP",
1101
+ type: "uint40",
1102
+ },
1103
+ {
1104
+ internalType: "uint64",
1105
+ name: "startLiqThresholdP",
1106
+ type: "uint64",
1107
+ },
1108
+ {
1109
+ internalType: "uint64",
1110
+ name: "endLiqThresholdP",
1111
+ type: "uint64",
1112
+ },
1113
+ {
1114
+ internalType: "uint24",
1115
+ name: "startLeverage",
1116
+ type: "uint24",
1117
+ },
1118
+ {
1119
+ internalType: "uint24",
1120
+ name: "endLeverage",
1121
+ type: "uint24",
1122
+ },
1123
+ ],
1124
+ internalType: "struct IPairsStorage.GroupLiquidationParams[]",
1125
+ name: "_groupLiquidationParams",
1126
+ type: "tuple[]",
1127
+ },
1128
+ ],
1129
+ name: "initializeGroupLiquidationParams",
1130
+ outputs: [],
1131
+ stateMutability: "nonpayable",
1132
+ type: "function",
1133
+ signature: "0xda13028a",
1134
+ },
924
1135
  {
925
1136
  inputs: [
926
1137
  {
@@ -939,7 +1150,6 @@ const _abi = [
939
1150
  ],
940
1151
  stateMutability: "view",
941
1152
  type: "function",
942
- constant: true,
943
1153
  signature: "0x281b7ead",
944
1154
  },
945
1155
  {
@@ -965,7 +1175,6 @@ const _abi = [
965
1175
  ],
966
1176
  stateMutability: "view",
967
1177
  type: "function",
968
- constant: true,
969
1178
  signature: "0x1628bfeb",
970
1179
  },
971
1180
  {
@@ -986,7 +1195,6 @@ const _abi = [
986
1195
  ],
987
1196
  stateMutability: "view",
988
1197
  type: "function",
989
- constant: true,
990
1198
  signature: "0x836a341a",
991
1199
  },
992
1200
  {
@@ -1007,7 +1215,6 @@ const _abi = [
1007
1215
  ],
1008
1216
  stateMutability: "view",
1009
1217
  type: "function",
1010
- constant: true,
1011
1218
  signature: "0x24a96865",
1012
1219
  },
1013
1220
  {
@@ -1033,7 +1240,6 @@ const _abi = [
1033
1240
  ],
1034
1241
  stateMutability: "view",
1035
1242
  type: "function",
1036
- constant: true,
1037
1243
  signature: "0x302f81fc",
1038
1244
  },
1039
1245
  {
@@ -1054,9 +1260,28 @@ const _abi = [
1054
1260
  ],
1055
1261
  stateMutability: "view",
1056
1262
  type: "function",
1057
- constant: true,
1058
1263
  signature: "0x281b693c",
1059
1264
  },
1265
+ {
1266
+ inputs: [
1267
+ {
1268
+ internalType: "uint256",
1269
+ name: "_pairIndex",
1270
+ type: "uint256",
1271
+ },
1272
+ ],
1273
+ name: "pairMinFeeUsd",
1274
+ outputs: [
1275
+ {
1276
+ internalType: "uint256",
1277
+ name: "",
1278
+ type: "uint256",
1279
+ },
1280
+ ],
1281
+ stateMutability: "view",
1282
+ type: "function",
1283
+ signature: "0x8078bfbe",
1284
+ },
1060
1285
  {
1061
1286
  inputs: [
1062
1287
  {
@@ -1075,7 +1300,6 @@ const _abi = [
1075
1300
  ],
1076
1301
  stateMutability: "view",
1077
1302
  type: "function",
1078
- constant: true,
1079
1303
  signature: "0x59a992d0",
1080
1304
  },
1081
1305
  {
@@ -1096,7 +1320,6 @@ const _abi = [
1096
1320
  ],
1097
1321
  stateMutability: "view",
1098
1322
  type: "function",
1099
- constant: true,
1100
1323
  signature: "0x5e26ff4e",
1101
1324
  },
1102
1325
  {
@@ -1117,7 +1340,6 @@ const _abi = [
1117
1340
  ],
1118
1341
  stateMutability: "view",
1119
1342
  type: "function",
1120
- constant: true,
1121
1343
  signature: "0x8251135b",
1122
1344
  },
1123
1345
  {
@@ -1138,7 +1360,6 @@ const _abi = [
1138
1360
  ],
1139
1361
  stateMutability: "view",
1140
1362
  type: "function",
1141
- constant: true,
1142
1363
  signature: "0xf7acbabd",
1143
1364
  },
1144
1365
  {
@@ -1159,7 +1380,6 @@ const _abi = [
1159
1380
  ],
1160
1381
  stateMutability: "view",
1161
1382
  type: "function",
1162
- constant: true,
1163
1383
  signature: "0xa1d54e9b",
1164
1384
  },
1165
1385
  {
@@ -1180,7 +1400,6 @@ const _abi = [
1180
1400
  ],
1181
1401
  stateMutability: "view",
1182
1402
  type: "function",
1183
- constant: true,
1184
1403
  signature: "0xe74aff72",
1185
1404
  },
1186
1405
  {
@@ -1255,7 +1474,6 @@ const _abi = [
1255
1474
  ],
1256
1475
  stateMutability: "view",
1257
1476
  type: "function",
1258
- constant: true,
1259
1477
  signature: "0xb91ac788",
1260
1478
  },
1261
1479
  {
@@ -1394,7 +1612,6 @@ const _abi = [
1394
1612
  ],
1395
1613
  stateMutability: "view",
1396
1614
  type: "function",
1397
- constant: true,
1398
1615
  signature: "0x9567dccf",
1399
1616
  },
1400
1617
  {
@@ -1409,9 +1626,54 @@ const _abi = [
1409
1626
  ],
1410
1627
  stateMutability: "view",
1411
1628
  type: "function",
1412
- constant: true,
1413
1629
  signature: "0xb81b2b71",
1414
1630
  },
1631
+ {
1632
+ inputs: [
1633
+ {
1634
+ internalType: "uint256",
1635
+ name: "_groupIndex",
1636
+ type: "uint256",
1637
+ },
1638
+ {
1639
+ components: [
1640
+ {
1641
+ internalType: "uint40",
1642
+ name: "maxLiqSpreadP",
1643
+ type: "uint40",
1644
+ },
1645
+ {
1646
+ internalType: "uint64",
1647
+ name: "startLiqThresholdP",
1648
+ type: "uint64",
1649
+ },
1650
+ {
1651
+ internalType: "uint64",
1652
+ name: "endLiqThresholdP",
1653
+ type: "uint64",
1654
+ },
1655
+ {
1656
+ internalType: "uint24",
1657
+ name: "startLeverage",
1658
+ type: "uint24",
1659
+ },
1660
+ {
1661
+ internalType: "uint24",
1662
+ name: "endLeverage",
1663
+ type: "uint24",
1664
+ },
1665
+ ],
1666
+ internalType: "struct IPairsStorage.GroupLiquidationParams",
1667
+ name: "_params",
1668
+ type: "tuple",
1669
+ },
1670
+ ],
1671
+ name: "setGroupLiquidationParams",
1672
+ outputs: [],
1673
+ stateMutability: "nonpayable",
1674
+ type: "function",
1675
+ signature: "0x8eb657f6",
1676
+ },
1415
1677
  {
1416
1678
  inputs: [
1417
1679
  {
@@ -1971,7 +2233,6 @@ const _abi = [
1971
2233
  ],
1972
2234
  stateMutability: "view",
1973
2235
  type: "function",
1974
- constant: true,
1975
2236
  signature: "0x92e67406",
1976
2237
  },
1977
2238
  {
@@ -1986,7 +2247,6 @@ const _abi = [
1986
2247
  ],
1987
2248
  stateMutability: "view",
1988
2249
  type: "function",
1989
- constant: true,
1990
2250
  signature: "0x97436b5f",
1991
2251
  },
1992
2252
  {
@@ -2001,7 +2261,6 @@ const _abi = [
2001
2261
  ],
2002
2262
  stateMutability: "view",
2003
2263
  type: "function",
2004
- constant: true,
2005
2264
  signature: "0x06350917",
2006
2265
  },
2007
2266
  {
@@ -2016,7 +2275,6 @@ const _abi = [
2016
2275
  ],
2017
2276
  stateMutability: "view",
2018
2277
  type: "function",
2019
- constant: true,
2020
2278
  signature: "0x843b9e5d",
2021
2279
  },
2022
2280
  {
@@ -2031,7 +2289,6 @@ const _abi = [
2031
2289
  ],
2032
2290
  stateMutability: "view",
2033
2291
  type: "function",
2034
- constant: true,
2035
2292
  signature: "0x71159fd1",
2036
2293
  },
2037
2294
  {
@@ -2089,7 +2346,6 @@ const _abi = [
2089
2346
  ],
2090
2347
  stateMutability: "view",
2091
2348
  type: "function",
2092
- constant: true,
2093
2349
  signature: "0xcbe0f32e",
2094
2350
  },
2095
2351
  {
@@ -2115,7 +2371,6 @@ const _abi = [
2115
2371
  ],
2116
2372
  stateMutability: "view",
2117
2373
  type: "function",
2118
- constant: true,
2119
2374
  signature: "0x4e583b31",
2120
2375
  },
2121
2376
  {
@@ -2136,7 +2391,6 @@ const _abi = [
2136
2391
  ],
2137
2392
  stateMutability: "view",
2138
2393
  type: "function",
2139
- constant: true,
2140
2394
  signature: "0xa73a3e35",
2141
2395
  },
2142
2396
  {
@@ -2157,7 +2411,6 @@ const _abi = [
2157
2411
  ],
2158
2412
  stateMutability: "view",
2159
2413
  type: "function",
2160
- constant: true,
2161
2414
  signature: "0x036787e5",
2162
2415
  },
2163
2416
  {
@@ -2178,7 +2431,6 @@ const _abi = [
2178
2431
  ],
2179
2432
  stateMutability: "view",
2180
2433
  type: "function",
2181
- constant: true,
2182
2434
  signature: "0x46dbf572",
2183
2435
  },
2184
2436
  {
@@ -2199,7 +2451,6 @@ const _abi = [
2199
2451
  ],
2200
2452
  stateMutability: "view",
2201
2453
  type: "function",
2202
- constant: true,
2203
2454
  signature: "0x32a7b732",
2204
2455
  },
2205
2456
  {
@@ -2583,7 +2834,6 @@ const _abi = [
2583
2834
  ],
2584
2835
  stateMutability: "view",
2585
2836
  type: "function",
2586
- constant: true,
2587
2837
  signature: "0x4f09a236",
2588
2838
  },
2589
2839
  {
@@ -2616,7 +2866,6 @@ const _abi = [
2616
2866
  ],
2617
2867
  stateMutability: "view",
2618
2868
  type: "function",
2619
- constant: true,
2620
2869
  signature: "0xeccea3e2",
2621
2870
  },
2622
2871
  {
@@ -2631,7 +2880,6 @@ const _abi = [
2631
2880
  ],
2632
2881
  stateMutability: "view",
2633
2882
  type: "function",
2634
- constant: true,
2635
2883
  signature: "0xa89db8e5",
2636
2884
  },
2637
2885
  {
@@ -2669,7 +2917,6 @@ const _abi = [
2669
2917
  ],
2670
2918
  stateMutability: "view",
2671
2919
  type: "function",
2672
- constant: true,
2673
2920
  signature: "0x794d8520",
2674
2921
  },
2675
2922
  {
@@ -2702,7 +2949,6 @@ const _abi = [
2702
2949
  ],
2703
2950
  stateMutability: "view",
2704
2951
  type: "function",
2705
- constant: true,
2706
2952
  signature: "0xacbaaf33",
2707
2953
  },
2708
2954
  {
@@ -2723,7 +2969,6 @@ const _abi = [
2723
2969
  ],
2724
2970
  stateMutability: "view",
2725
2971
  type: "function",
2726
- constant: true,
2727
2972
  signature: "0x31ca4887",
2728
2973
  },
2729
2974
  {
@@ -2966,6 +3211,16 @@ const _abi = [
2966
3211
  inputs: [
2967
3212
  {
2968
3213
  components: [
3214
+ {
3215
+ internalType: "address",
3216
+ name: "trader",
3217
+ type: "address",
3218
+ },
3219
+ {
3220
+ internalType: "uint32",
3221
+ name: "index",
3222
+ type: "uint32",
3223
+ },
2969
3224
  {
2970
3225
  internalType: "uint48",
2971
3226
  name: "windowsDuration",
@@ -2997,10 +3252,16 @@ const _abi = [
2997
3252
  name: "oiWindowUpdate",
2998
3253
  type: "tuple",
2999
3254
  },
3255
+ {
3256
+ indexed: false,
3257
+ internalType: "bool",
3258
+ name: "isPartial",
3259
+ type: "bool",
3260
+ },
3000
3261
  ],
3001
3262
  name: "PriceImpactOpenInterestAdded",
3002
3263
  type: "event",
3003
- signature: "0xb8b5cf1c4a93075d32b38049f7ad65e6608d90f232123dd65d55a5ed06988cb5",
3264
+ signature: "0x4ad96f03f62012d64f1a3676413b5a73b13a99eebe005158b124403e3c3ab70d",
3004
3265
  },
3005
3266
  {
3006
3267
  anonymous: false,
@@ -3008,9 +3269,19 @@ const _abi = [
3008
3269
  {
3009
3270
  components: [
3010
3271
  {
3011
- internalType: "uint48",
3012
- name: "windowsDuration",
3013
- type: "uint48",
3272
+ internalType: "address",
3273
+ name: "trader",
3274
+ type: "address",
3275
+ },
3276
+ {
3277
+ internalType: "uint32",
3278
+ name: "index",
3279
+ type: "uint32",
3280
+ },
3281
+ {
3282
+ internalType: "uint48",
3283
+ name: "windowsDuration",
3284
+ type: "uint48",
3014
3285
  },
3015
3286
  {
3016
3287
  internalType: "uint256",
@@ -3047,7 +3318,7 @@ const _abi = [
3047
3318
  ],
3048
3319
  name: "PriceImpactOpenInterestRemoved",
3049
3320
  type: "event",
3050
- signature: "0xde1fe3df38229b603f1a7a96f1ac6159116b2a48dada12998a226039786f7ca6",
3321
+ signature: "0x02c87303d6313dfe4cd344c2850cf9b343c7b2baa78546cec5892065611b0181",
3051
3322
  },
3052
3323
  {
3053
3324
  anonymous: false,
@@ -3078,28 +3349,62 @@ const _abi = [
3078
3349
  signature: "0x5c4b755bc1cf4bae3a95cfc185b1e390e2289a97933671d8a098a4131b020664",
3079
3350
  },
3080
3351
  {
3352
+ anonymous: false,
3353
+ inputs: [
3354
+ {
3355
+ indexed: false,
3356
+ internalType: "uint24",
3357
+ name: "protectionCloseFactorBlocks",
3358
+ type: "uint24",
3359
+ },
3360
+ ],
3361
+ name: "ProtectionCloseFactorBlocksUpdated",
3362
+ type: "event",
3363
+ signature: "0xbb1ab3cb7b05f44cea93ff3a0ea17c517fa0a0c1a6aab8d78b996128d2b0199f",
3364
+ },
3365
+ {
3366
+ anonymous: false,
3081
3367
  inputs: [
3082
3368
  {
3369
+ indexed: true,
3083
3370
  internalType: "uint256",
3084
- name: "_openInterestUsd",
3371
+ name: "pairIndex",
3085
3372
  type: "uint256",
3086
3373
  },
3087
3374
  {
3375
+ indexed: false,
3088
3376
  internalType: "uint256",
3089
- name: "_pairIndex",
3377
+ name: "protectionCloseFactor",
3090
3378
  type: "uint256",
3091
3379
  },
3380
+ ],
3381
+ name: "ProtectionCloseFactorUpdated",
3382
+ type: "event",
3383
+ signature: "0x91702eff4d91af5aaa0a65e6c7cd5893e9e354b77f408789116e6f18054bb611",
3384
+ },
3385
+ {
3386
+ inputs: [
3092
3387
  {
3093
- internalType: "bool",
3094
- name: "_long",
3095
- type: "bool",
3388
+ internalType: "address",
3389
+ name: "_trader",
3390
+ type: "address",
3391
+ },
3392
+ {
3393
+ internalType: "uint32",
3394
+ name: "_index",
3395
+ type: "uint32",
3396
+ },
3397
+ {
3398
+ internalType: "uint256",
3399
+ name: "_oiDeltaCollateral",
3400
+ type: "uint256",
3096
3401
  },
3097
3402
  ],
3098
3403
  name: "addPriceImpactOpenInterest",
3099
3404
  outputs: [],
3100
3405
  stateMutability: "nonpayable",
3101
3406
  type: "function",
3102
- signature: "0x96839490",
3407
+ signature: "0x4c8a7602",
3103
3408
  },
3104
3409
  {
3105
3410
  inputs: [
@@ -3141,7 +3446,6 @@ const _abi = [
3141
3446
  ],
3142
3447
  stateMutability: "view",
3143
3448
  type: "function",
3144
- constant: true,
3145
3449
  signature: "0x823ef2ac",
3146
3450
  },
3147
3451
  {
@@ -3184,7 +3488,6 @@ const _abi = [
3184
3488
  ],
3185
3489
  stateMutability: "view",
3186
3490
  type: "function",
3187
- constant: true,
3188
3491
  signature: "0x0d12f7cb",
3189
3492
  },
3190
3493
  {
@@ -3216,7 +3519,6 @@ const _abi = [
3216
3519
  ],
3217
3520
  stateMutability: "view",
3218
3521
  type: "function",
3219
- constant: true,
3220
3522
  signature: "0xb56df676",
3221
3523
  },
3222
3524
  {
@@ -3249,7 +3551,6 @@ const _abi = [
3249
3551
  ],
3250
3552
  stateMutability: "view",
3251
3553
  type: "function",
3252
- constant: true,
3253
3554
  signature: "0x375bb2bb",
3254
3555
  },
3255
3556
  {
@@ -3282,7 +3583,6 @@ const _abi = [
3282
3583
  ],
3283
3584
  stateMutability: "view",
3284
3585
  type: "function",
3285
- constant: true,
3286
3586
  signature: "0x0d569f27",
3287
3587
  },
3288
3588
  {
@@ -3308,14 +3608,72 @@ const _abi = [
3308
3608
  ],
3309
3609
  stateMutability: "view",
3310
3610
  type: "function",
3311
- constant: true,
3312
3611
  signature: "0xb6d92b02",
3313
3612
  },
3613
+ {
3614
+ inputs: [],
3615
+ name: "getProtectionCloseFactorBlocks",
3616
+ outputs: [
3617
+ {
3618
+ internalType: "uint24",
3619
+ name: "",
3620
+ type: "uint24",
3621
+ },
3622
+ ],
3623
+ stateMutability: "view",
3624
+ type: "function",
3625
+ signature: "0xa7059886",
3626
+ },
3627
+ {
3628
+ inputs: [
3629
+ {
3630
+ internalType: "uint256[]",
3631
+ name: "_indices",
3632
+ type: "uint256[]",
3633
+ },
3634
+ ],
3635
+ name: "getProtectionCloseFactors",
3636
+ outputs: [
3637
+ {
3638
+ internalType: "uint256[]",
3639
+ name: "",
3640
+ type: "uint256[]",
3641
+ },
3642
+ ],
3643
+ stateMutability: "view",
3644
+ type: "function",
3645
+ signature: "0xf33fc605",
3646
+ },
3647
+ {
3648
+ inputs: [
3649
+ {
3650
+ internalType: "address",
3651
+ name: "_trader",
3652
+ type: "address",
3653
+ },
3654
+ {
3655
+ internalType: "uint32",
3656
+ name: "_index",
3657
+ type: "uint32",
3658
+ },
3659
+ ],
3660
+ name: "getTradeLastWindowOiUsd",
3661
+ outputs: [
3662
+ {
3663
+ internalType: "uint128",
3664
+ name: "",
3665
+ type: "uint128",
3666
+ },
3667
+ ],
3668
+ stateMutability: "view",
3669
+ type: "function",
3670
+ signature: "0x273064f2",
3671
+ },
3314
3672
  {
3315
3673
  inputs: [
3316
3674
  {
3317
3675
  internalType: "uint256",
3318
- name: "_openPrice",
3676
+ name: "_marketPrice",
3319
3677
  type: "uint256",
3320
3678
  },
3321
3679
  {
@@ -3333,6 +3691,21 @@ const _abi = [
3333
3691
  name: "_tradeOpenInterestUsd",
3334
3692
  type: "uint256",
3335
3693
  },
3694
+ {
3695
+ internalType: "bool",
3696
+ name: "_isPnlPositive",
3697
+ type: "bool",
3698
+ },
3699
+ {
3700
+ internalType: "bool",
3701
+ name: "_open",
3702
+ type: "bool",
3703
+ },
3704
+ {
3705
+ internalType: "uint256",
3706
+ name: "_createdBlock",
3707
+ type: "uint256",
3708
+ },
3336
3709
  ],
3337
3710
  name: "getTradePriceImpact",
3338
3711
  outputs: [
@@ -3349,8 +3722,44 @@ const _abi = [
3349
3722
  ],
3350
3723
  stateMutability: "view",
3351
3724
  type: "function",
3352
- constant: true,
3353
- signature: "0x7ea95f32",
3725
+ signature: "0x31d20230",
3726
+ },
3727
+ {
3728
+ inputs: [
3729
+ {
3730
+ internalType: "address",
3731
+ name: "_trader",
3732
+ type: "address",
3733
+ },
3734
+ {
3735
+ internalType: "uint32",
3736
+ name: "_index",
3737
+ type: "uint32",
3738
+ },
3739
+ ],
3740
+ name: "getTradePriceImpactInfo",
3741
+ outputs: [
3742
+ {
3743
+ components: [
3744
+ {
3745
+ internalType: "uint128",
3746
+ name: "lastWindowOiUsd",
3747
+ type: "uint128",
3748
+ },
3749
+ {
3750
+ internalType: "uint128",
3751
+ name: "__placeholder",
3752
+ type: "uint128",
3753
+ },
3754
+ ],
3755
+ internalType: "struct IPriceImpact.TradePriceImpactInfo",
3756
+ name: "",
3757
+ type: "tuple",
3758
+ },
3759
+ ],
3760
+ stateMutability: "view",
3761
+ type: "function",
3762
+ signature: "0xc3248367",
3354
3763
  },
3355
3764
  {
3356
3765
  inputs: [
@@ -3374,31 +3783,40 @@ const _abi = [
3374
3783
  {
3375
3784
  inputs: [
3376
3785
  {
3377
- internalType: "uint256",
3378
- name: "_openInterestUsd",
3379
- type: "uint256",
3786
+ internalType: "uint24",
3787
+ name: "_protectionCloseFactorBlocks",
3788
+ type: "uint24",
3380
3789
  },
3790
+ ],
3791
+ name: "initializeProtectionCloseFactorBlocks",
3792
+ outputs: [],
3793
+ stateMutability: "nonpayable",
3794
+ type: "function",
3795
+ signature: "0x0420f323",
3796
+ },
3797
+ {
3798
+ inputs: [
3381
3799
  {
3382
- internalType: "uint256",
3383
- name: "_pairIndex",
3384
- type: "uint256",
3800
+ internalType: "address",
3801
+ name: "_trader",
3802
+ type: "address",
3385
3803
  },
3386
3804
  {
3387
- internalType: "bool",
3388
- name: "_long",
3389
- type: "bool",
3805
+ internalType: "uint32",
3806
+ name: "_index",
3807
+ type: "uint32",
3390
3808
  },
3391
3809
  {
3392
- internalType: "uint48",
3393
- name: "_addTs",
3394
- type: "uint48",
3810
+ internalType: "uint256",
3811
+ name: "_oiDeltaCollateral",
3812
+ type: "uint256",
3395
3813
  },
3396
3814
  ],
3397
3815
  name: "removePriceImpactOpenInterest",
3398
3816
  outputs: [],
3399
3817
  stateMutability: "nonpayable",
3400
3818
  type: "function",
3401
- signature: "0xd01c9202",
3819
+ signature: "0x2f29a9e8",
3402
3820
  },
3403
3821
  {
3404
3822
  inputs: [
@@ -3453,33 +3871,56 @@ const _abi = [
3453
3871
  signature: "0x39b0fc82",
3454
3872
  },
3455
3873
  {
3456
- inputs: [],
3457
- name: "CollateralAlreadyActive",
3458
- type: "error",
3874
+ inputs: [
3875
+ {
3876
+ internalType: "uint24",
3877
+ name: "_protectionCloseFactorBlocks",
3878
+ type: "uint24",
3879
+ },
3880
+ ],
3881
+ name: "setProtectionCloseFactorBlocks",
3882
+ outputs: [],
3883
+ stateMutability: "nonpayable",
3884
+ type: "function",
3885
+ signature: "0xb63280b2",
3459
3886
  },
3460
3887
  {
3461
- inputs: [],
3462
- name: "CollateralAlreadyDisabled",
3463
- type: "error",
3888
+ inputs: [
3889
+ {
3890
+ internalType: "uint16[]",
3891
+ name: "_pairIndices",
3892
+ type: "uint16[]",
3893
+ },
3894
+ {
3895
+ internalType: "uint256[]",
3896
+ name: "_protectionCloseFactors",
3897
+ type: "uint256[]",
3898
+ },
3899
+ ],
3900
+ name: "setProtectionCloseFactors",
3901
+ outputs: [],
3902
+ stateMutability: "nonpayable",
3903
+ type: "function",
3904
+ signature: "0x928ca2f0",
3464
3905
  },
3465
3906
  {
3466
3907
  inputs: [],
3467
- name: "MaxSlippageZero",
3908
+ name: "CollateralAlreadyActive",
3468
3909
  type: "error",
3469
3910
  },
3470
3911
  {
3471
3912
  inputs: [],
3472
- name: "MissingCollaterals",
3913
+ name: "CollateralAlreadyDisabled",
3473
3914
  type: "error",
3474
3915
  },
3475
3916
  {
3476
3917
  inputs: [],
3477
- name: "NoSl",
3918
+ name: "MaxSlippageZero",
3478
3919
  type: "error",
3479
3920
  },
3480
3921
  {
3481
3922
  inputs: [],
3482
- name: "NoTp",
3923
+ name: "MissingCollaterals",
3483
3924
  type: "error",
3484
3925
  },
3485
3926
  {
@@ -3871,6 +4312,30 @@ const _abi = [
3871
4312
  name: "tradeId",
3872
4313
  type: "tuple",
3873
4314
  },
4315
+ {
4316
+ indexed: false,
4317
+ internalType: "uint120",
4318
+ name: "collateralAmount",
4319
+ type: "uint120",
4320
+ },
4321
+ {
4322
+ indexed: false,
4323
+ internalType: "uint24",
4324
+ name: "leverage",
4325
+ type: "uint24",
4326
+ },
4327
+ {
4328
+ indexed: false,
4329
+ internalType: "uint64",
4330
+ name: "openPrice",
4331
+ type: "uint64",
4332
+ },
4333
+ {
4334
+ indexed: false,
4335
+ internalType: "uint64",
4336
+ name: "newTp",
4337
+ type: "uint64",
4338
+ },
3874
4339
  {
3875
4340
  indexed: false,
3876
4341
  internalType: "uint64",
@@ -3878,9 +4343,9 @@ const _abi = [
3878
4343
  type: "uint64",
3879
4344
  },
3880
4345
  ],
3881
- name: "TradeSlUpdated",
4346
+ name: "TradePositionUpdated",
3882
4347
  type: "event",
3883
- signature: "0x38f5d5d40d9c4a41aa03d21461f1b07aa6b4ef035fb9d21f02d53a82c712a002",
4348
+ signature: "0x39ede689b34cc36c8cf85698a4e83530eb6a29a07a57f0bfc3d02bfaca44edb5",
3884
4349
  },
3885
4350
  {
3886
4351
  anonymous: false,
@@ -3897,27 +4362,59 @@ const _abi = [
3897
4362
  name: "index",
3898
4363
  type: "uint32",
3899
4364
  },
3900
- {
3901
- internalType: "uint16",
3902
- name: "pairIndex",
3903
- type: "uint16",
3904
- },
3905
- {
3906
- internalType: "uint24",
3907
- name: "leverage",
3908
- type: "uint24",
3909
- },
3910
- {
3911
- internalType: "bool",
3912
- name: "long",
3913
- type: "bool",
3914
- },
3915
- {
3916
- internalType: "bool",
3917
- name: "isOpen",
3918
- type: "bool",
3919
- },
3920
- {
4365
+ ],
4366
+ indexed: false,
4367
+ internalType: "struct ITradingStorage.Id",
4368
+ name: "tradeId",
4369
+ type: "tuple",
4370
+ },
4371
+ {
4372
+ indexed: false,
4373
+ internalType: "uint64",
4374
+ name: "newSl",
4375
+ type: "uint64",
4376
+ },
4377
+ ],
4378
+ name: "TradeSlUpdated",
4379
+ type: "event",
4380
+ signature: "0x38f5d5d40d9c4a41aa03d21461f1b07aa6b4ef035fb9d21f02d53a82c712a002",
4381
+ },
4382
+ {
4383
+ anonymous: false,
4384
+ inputs: [
4385
+ {
4386
+ components: [
4387
+ {
4388
+ internalType: "address",
4389
+ name: "user",
4390
+ type: "address",
4391
+ },
4392
+ {
4393
+ internalType: "uint32",
4394
+ name: "index",
4395
+ type: "uint32",
4396
+ },
4397
+ {
4398
+ internalType: "uint16",
4399
+ name: "pairIndex",
4400
+ type: "uint16",
4401
+ },
4402
+ {
4403
+ internalType: "uint24",
4404
+ name: "leverage",
4405
+ type: "uint24",
4406
+ },
4407
+ {
4408
+ internalType: "bool",
4409
+ name: "long",
4410
+ type: "bool",
4411
+ },
4412
+ {
4413
+ internalType: "bool",
4414
+ name: "isOpen",
4415
+ type: "bool",
4416
+ },
4417
+ {
3921
4418
  internalType: "uint8",
3922
4419
  name: "collateralIndex",
3923
4420
  type: "uint8",
@@ -4001,10 +4498,43 @@ const _abi = [
4001
4498
  name: "tradeInfo",
4002
4499
  type: "tuple",
4003
4500
  },
4501
+ {
4502
+ components: [
4503
+ {
4504
+ internalType: "uint40",
4505
+ name: "maxLiqSpreadP",
4506
+ type: "uint40",
4507
+ },
4508
+ {
4509
+ internalType: "uint64",
4510
+ name: "startLiqThresholdP",
4511
+ type: "uint64",
4512
+ },
4513
+ {
4514
+ internalType: "uint64",
4515
+ name: "endLiqThresholdP",
4516
+ type: "uint64",
4517
+ },
4518
+ {
4519
+ internalType: "uint24",
4520
+ name: "startLeverage",
4521
+ type: "uint24",
4522
+ },
4523
+ {
4524
+ internalType: "uint24",
4525
+ name: "endLeverage",
4526
+ type: "uint24",
4527
+ },
4528
+ ],
4529
+ indexed: false,
4530
+ internalType: "struct IPairsStorage.GroupLiquidationParams",
4531
+ name: "liquidationParams",
4532
+ type: "tuple",
4533
+ },
4004
4534
  ],
4005
4535
  name: "TradeStored",
4006
4536
  type: "event",
4007
- signature: "0xc7bc74b68a1f77466e2402a7ce12e5b172bdeef942334e0df67d522309257b90",
4537
+ signature: "0x68a5f29b49e875ed9fb6226960bdeb3ba45320ae3d7521d3689d6f97638fbe0c",
4008
4538
  },
4009
4539
  {
4010
4540
  anonymous: false,
@@ -4250,7 +4780,6 @@ const _abi = [
4250
4780
  ],
4251
4781
  stateMutability: "view",
4252
4782
  type: "function",
4253
- constant: true,
4254
4783
  signature: "0x2d11445f",
4255
4784
  },
4256
4785
  {
@@ -4313,7 +4842,6 @@ const _abi = [
4313
4842
  ],
4314
4843
  stateMutability: "view",
4315
4844
  type: "function",
4316
- constant: true,
4317
4845
  signature: "0xeb50287f",
4318
4846
  },
4319
4847
  {
@@ -4406,9 +4934,60 @@ const _abi = [
4406
4934
  ],
4407
4935
  stateMutability: "view",
4408
4936
  type: "function",
4409
- constant: true,
4410
4937
  signature: "0xdffd8a1f",
4411
4938
  },
4939
+ {
4940
+ inputs: [
4941
+ {
4942
+ internalType: "uint256",
4943
+ name: "_offset",
4944
+ type: "uint256",
4945
+ },
4946
+ {
4947
+ internalType: "uint256",
4948
+ name: "_limit",
4949
+ type: "uint256",
4950
+ },
4951
+ ],
4952
+ name: "getAllTradesLiquidationParams",
4953
+ outputs: [
4954
+ {
4955
+ components: [
4956
+ {
4957
+ internalType: "uint40",
4958
+ name: "maxLiqSpreadP",
4959
+ type: "uint40",
4960
+ },
4961
+ {
4962
+ internalType: "uint64",
4963
+ name: "startLiqThresholdP",
4964
+ type: "uint64",
4965
+ },
4966
+ {
4967
+ internalType: "uint64",
4968
+ name: "endLiqThresholdP",
4969
+ type: "uint64",
4970
+ },
4971
+ {
4972
+ internalType: "uint24",
4973
+ name: "startLeverage",
4974
+ type: "uint24",
4975
+ },
4976
+ {
4977
+ internalType: "uint24",
4978
+ name: "endLeverage",
4979
+ type: "uint24",
4980
+ },
4981
+ ],
4982
+ internalType: "struct IPairsStorage.GroupLiquidationParams[]",
4983
+ name: "",
4984
+ type: "tuple[]",
4985
+ },
4986
+ ],
4987
+ stateMutability: "view",
4988
+ type: "function",
4989
+ signature: "0xc2b96e65",
4990
+ },
4412
4991
  {
4413
4992
  inputs: [
4414
4993
  {
@@ -4454,7 +5033,6 @@ const _abi = [
4454
5033
  ],
4455
5034
  stateMutability: "view",
4456
5035
  type: "function",
4457
- constant: true,
4458
5036
  signature: "0xbb33a55b",
4459
5037
  },
4460
5038
  {
@@ -4475,7 +5053,6 @@ const _abi = [
4475
5053
  ],
4476
5054
  stateMutability: "view",
4477
5055
  type: "function",
4478
- constant: true,
4479
5056
  signature: "0x5c3ed7c3",
4480
5057
  },
4481
5058
  {
@@ -4517,7 +5094,6 @@ const _abi = [
4517
5094
  ],
4518
5095
  stateMutability: "view",
4519
5096
  type: "function",
4520
- constant: true,
4521
5097
  signature: "0x78b92636",
4522
5098
  },
4523
5099
  {
@@ -4532,7 +5108,6 @@ const _abi = [
4532
5108
  ],
4533
5109
  stateMutability: "view",
4534
5110
  type: "function",
4535
- constant: true,
4536
5111
  signature: "0xa3e15d09",
4537
5112
  },
4538
5113
  {
@@ -4575,7 +5150,6 @@ const _abi = [
4575
5150
  ],
4576
5151
  stateMutability: "view",
4577
5152
  type: "function",
4578
- constant: true,
4579
5153
  signature: "0x0212f0d6",
4580
5154
  },
4581
5155
  {
@@ -4596,30 +5170,8 @@ const _abi = [
4596
5170
  ],
4597
5171
  stateMutability: "view",
4598
5172
  type: "function",
4599
- constant: true,
4600
5173
  signature: "0x6a0aff41",
4601
5174
  },
4602
- {
4603
- inputs: [
4604
- {
4605
- internalType: "enum ITradingStorage.TradeType",
4606
- name: "_tradeType",
4607
- type: "uint8",
4608
- },
4609
- ],
4610
- name: "getPendingOpenOrderType",
4611
- outputs: [
4612
- {
4613
- internalType: "enum ITradingStorage.PendingOrderType",
4614
- name: "",
4615
- type: "uint8",
4616
- },
4617
- ],
4618
- stateMutability: "pure",
4619
- type: "function",
4620
- constant: true,
4621
- signature: "0xc8157967",
4622
- },
4623
5175
  {
4624
5176
  inputs: [
4625
5177
  {
@@ -4754,7 +5306,6 @@ const _abi = [
4754
5306
  ],
4755
5307
  stateMutability: "view",
4756
5308
  type: "function",
4757
- constant: true,
4758
5309
  signature: "0xc6e729bb",
4759
5310
  },
4760
5311
  {
@@ -4879,45 +5430,8 @@ const _abi = [
4879
5430
  ],
4880
5431
  stateMutability: "view",
4881
5432
  type: "function",
4882
- constant: true,
4883
5433
  signature: "0x4c73cb25",
4884
5434
  },
4885
- {
4886
- inputs: [
4887
- {
4888
- internalType: "uint64",
4889
- name: "_openPrice",
4890
- type: "uint64",
4891
- },
4892
- {
4893
- internalType: "uint64",
4894
- name: "_currentPrice",
4895
- type: "uint64",
4896
- },
4897
- {
4898
- internalType: "bool",
4899
- name: "_long",
4900
- type: "bool",
4901
- },
4902
- {
4903
- internalType: "uint24",
4904
- name: "_leverage",
4905
- type: "uint24",
4906
- },
4907
- ],
4908
- name: "getPnlPercent",
4909
- outputs: [
4910
- {
4911
- internalType: "int256",
4912
- name: "",
4913
- type: "int256",
4914
- },
4915
- ],
4916
- stateMutability: "pure",
4917
- type: "function",
4918
- constant: true,
4919
- signature: "0xb19962e5",
4920
- },
4921
5435
  {
4922
5436
  inputs: [
4923
5437
  {
@@ -5008,7 +5522,6 @@ const _abi = [
5008
5522
  ],
5009
5523
  stateMutability: "view",
5010
5524
  type: "function",
5011
- constant: true,
5012
5525
  signature: "0x15878e07",
5013
5526
  },
5014
5527
  {
@@ -5071,7 +5584,6 @@ const _abi = [
5071
5584
  ],
5072
5585
  stateMutability: "view",
5073
5586
  type: "function",
5074
- constant: true,
5075
5587
  signature: "0x75cd812d",
5076
5588
  },
5077
5589
  {
@@ -5129,9 +5641,60 @@ const _abi = [
5129
5641
  ],
5130
5642
  stateMutability: "view",
5131
5643
  type: "function",
5132
- constant: true,
5133
5644
  signature: "0x0d1e3c94",
5134
5645
  },
5646
+ {
5647
+ inputs: [
5648
+ {
5649
+ internalType: "address",
5650
+ name: "_trader",
5651
+ type: "address",
5652
+ },
5653
+ {
5654
+ internalType: "uint32",
5655
+ name: "_index",
5656
+ type: "uint32",
5657
+ },
5658
+ ],
5659
+ name: "getTradeLiquidationParams",
5660
+ outputs: [
5661
+ {
5662
+ components: [
5663
+ {
5664
+ internalType: "uint40",
5665
+ name: "maxLiqSpreadP",
5666
+ type: "uint40",
5667
+ },
5668
+ {
5669
+ internalType: "uint64",
5670
+ name: "startLiqThresholdP",
5671
+ type: "uint64",
5672
+ },
5673
+ {
5674
+ internalType: "uint64",
5675
+ name: "endLiqThresholdP",
5676
+ type: "uint64",
5677
+ },
5678
+ {
5679
+ internalType: "uint24",
5680
+ name: "startLeverage",
5681
+ type: "uint24",
5682
+ },
5683
+ {
5684
+ internalType: "uint24",
5685
+ name: "endLeverage",
5686
+ type: "uint24",
5687
+ },
5688
+ ],
5689
+ internalType: "struct IPairsStorage.GroupLiquidationParams",
5690
+ name: "",
5691
+ type: "tuple",
5692
+ },
5693
+ ],
5694
+ stateMutability: "view",
5695
+ type: "function",
5696
+ signature: "0x28dc892f",
5697
+ },
5135
5698
  {
5136
5699
  inputs: [
5137
5700
  {
@@ -5167,7 +5730,6 @@ const _abi = [
5167
5730
  ],
5168
5731
  stateMutability: "view",
5169
5732
  type: "function",
5170
- constant: true,
5171
5733
  signature: "0x067e84dd",
5172
5734
  },
5173
5735
  {
@@ -5188,7 +5750,6 @@ const _abi = [
5188
5750
  ],
5189
5751
  stateMutability: "view",
5190
5752
  type: "function",
5191
- constant: true,
5192
5753
  signature: "0xbed8d2da",
5193
5754
  },
5194
5755
  {
@@ -5214,7 +5775,6 @@ const _abi = [
5214
5775
  ],
5215
5776
  stateMutability: "view",
5216
5777
  type: "function",
5217
- constant: true,
5218
5778
  signature: "0x0e503724",
5219
5779
  },
5220
5780
  {
@@ -5302,9 +5862,55 @@ const _abi = [
5302
5862
  ],
5303
5863
  stateMutability: "view",
5304
5864
  type: "function",
5305
- constant: true,
5306
5865
  signature: "0x4bfad7c0",
5307
5866
  },
5867
+ {
5868
+ inputs: [
5869
+ {
5870
+ internalType: "address",
5871
+ name: "_trader",
5872
+ type: "address",
5873
+ },
5874
+ ],
5875
+ name: "getTradesLiquidationParams",
5876
+ outputs: [
5877
+ {
5878
+ components: [
5879
+ {
5880
+ internalType: "uint40",
5881
+ name: "maxLiqSpreadP",
5882
+ type: "uint40",
5883
+ },
5884
+ {
5885
+ internalType: "uint64",
5886
+ name: "startLiqThresholdP",
5887
+ type: "uint64",
5888
+ },
5889
+ {
5890
+ internalType: "uint64",
5891
+ name: "endLiqThresholdP",
5892
+ type: "uint64",
5893
+ },
5894
+ {
5895
+ internalType: "uint24",
5896
+ name: "startLeverage",
5897
+ type: "uint24",
5898
+ },
5899
+ {
5900
+ internalType: "uint24",
5901
+ name: "endLeverage",
5902
+ type: "uint24",
5903
+ },
5904
+ ],
5905
+ internalType: "struct IPairsStorage.GroupLiquidationParams[]",
5906
+ name: "",
5907
+ type: "tuple[]",
5908
+ },
5909
+ ],
5910
+ stateMutability: "view",
5911
+ type: "function",
5912
+ signature: "0xf7746f3c",
5913
+ },
5308
5914
  {
5309
5915
  inputs: [],
5310
5916
  name: "getTradingActivated",
@@ -5317,7 +5923,6 @@ const _abi = [
5317
5923
  ],
5318
5924
  stateMutability: "view",
5319
5925
  type: "function",
5320
- constant: true,
5321
5926
  signature: "0x4115c122",
5322
5927
  },
5323
5928
  {
@@ -5367,7 +5972,6 @@ const _abi = [
5367
5972
  ],
5368
5973
  stateMutability: "view",
5369
5974
  type: "function",
5370
- constant: true,
5371
5975
  signature: "0x4d140218",
5372
5976
  },
5373
5977
  {
@@ -5388,7 +5992,6 @@ const _abi = [
5388
5992
  ],
5389
5993
  stateMutability: "view",
5390
5994
  type: "function",
5391
- constant: true,
5392
5995
  signature: "0x1d2ffb42",
5393
5996
  },
5394
5997
  {
@@ -5945,10 +6548,51 @@ const _abi = [
5945
6548
  type: "tuple",
5946
6549
  },
5947
6550
  {
5948
- internalType: "uint64",
5949
- name: "_newSl",
5950
- type: "uint64",
5951
- },
6551
+ internalType: "uint120",
6552
+ name: "_collateralAmount",
6553
+ type: "uint120",
6554
+ },
6555
+ {
6556
+ internalType: "uint24",
6557
+ name: "_leverage",
6558
+ type: "uint24",
6559
+ },
6560
+ {
6561
+ internalType: "uint64",
6562
+ name: "_openPrice",
6563
+ type: "uint64",
6564
+ },
6565
+ ],
6566
+ name: "updateTradePosition",
6567
+ outputs: [],
6568
+ stateMutability: "nonpayable",
6569
+ type: "function",
6570
+ signature: "0x7281d8f8",
6571
+ },
6572
+ {
6573
+ inputs: [
6574
+ {
6575
+ components: [
6576
+ {
6577
+ internalType: "address",
6578
+ name: "user",
6579
+ type: "address",
6580
+ },
6581
+ {
6582
+ internalType: "uint32",
6583
+ name: "index",
6584
+ type: "uint32",
6585
+ },
6586
+ ],
6587
+ internalType: "struct ITradingStorage.Id",
6588
+ name: "_tradeId",
6589
+ type: "tuple",
6590
+ },
6591
+ {
6592
+ internalType: "uint64",
6593
+ name: "_newSl",
6594
+ type: "uint64",
6595
+ },
5952
6596
  ],
5953
6597
  name: "updateTradeSl",
5954
6598
  outputs: [],
@@ -6111,7 +6755,6 @@ const _abi = [
6111
6755
  ],
6112
6756
  stateMutability: "view",
6113
6757
  type: "function",
6114
- constant: true,
6115
6758
  signature: "0x9fd0bdad",
6116
6759
  },
6117
6760
  {
@@ -6126,7 +6769,6 @@ const _abi = [
6126
6769
  ],
6127
6770
  stateMutability: "view",
6128
6771
  type: "function",
6129
- constant: true,
6130
6772
  signature: "0x1187f9bd",
6131
6773
  },
6132
6774
  {
@@ -6147,7 +6789,6 @@ const _abi = [
6147
6789
  ],
6148
6790
  stateMutability: "view",
6149
6791
  type: "function",
6150
- constant: true,
6151
6792
  signature: "0x8765f772",
6152
6793
  },
6153
6794
  {
@@ -6180,37 +6821,58 @@ const _abi = [
6180
6821
  },
6181
6822
  {
6182
6823
  inputs: [],
6183
- name: "AboveGroupMaxOi",
6824
+ name: "AboveExposureLimits",
6184
6825
  type: "error",
6185
6826
  },
6186
6827
  {
6187
6828
  inputs: [],
6188
- name: "AbovePairMaxOi",
6829
+ name: "AlreadyBeingMarketClosed",
6189
6830
  type: "error",
6190
6831
  },
6191
6832
  {
6192
6833
  inputs: [],
6193
- name: "AlreadyBeingMarketClosed",
6834
+ name: "CollateralNotActive",
6835
+ type: "error",
6836
+ },
6837
+ {
6838
+ inputs: [
6839
+ {
6840
+ internalType: "enum ITradingStorage.PendingOrderType",
6841
+ name: "",
6842
+ type: "uint8",
6843
+ },
6844
+ ],
6845
+ name: "ConflictingPendingOrder",
6194
6846
  type: "error",
6195
6847
  },
6196
6848
  {
6197
6849
  inputs: [],
6198
- name: "BelowMinPositionSizeUsd",
6850
+ name: "DelegateNotApproved",
6199
6851
  type: "error",
6200
6852
  },
6201
6853
  {
6202
6854
  inputs: [],
6203
- name: "CollateralNotActive",
6855
+ name: "DelegatedActionNotAllowed",
6204
6856
  type: "error",
6205
6857
  },
6206
6858
  {
6207
6859
  inputs: [],
6208
- name: "DelegateNotApproved",
6860
+ name: "InsufficientCollateral",
6209
6861
  type: "error",
6210
6862
  },
6211
6863
  {
6212
6864
  inputs: [],
6213
- name: "DelegatedActionNotAllowed",
6865
+ name: "InvalidDecreasePositionSizeInput",
6866
+ type: "error",
6867
+ },
6868
+ {
6869
+ inputs: [],
6870
+ name: "InvalidIncreasePositionSizeInput",
6871
+ type: "error",
6872
+ },
6873
+ {
6874
+ inputs: [],
6875
+ name: "NewPositionSizeSmaller",
6214
6876
  type: "error",
6215
6877
  },
6216
6878
  {
@@ -6218,6 +6880,16 @@ const _abi = [
6218
6880
  name: "NoOrder",
6219
6881
  type: "error",
6220
6882
  },
6883
+ {
6884
+ inputs: [],
6885
+ name: "NoSl",
6886
+ type: "error",
6887
+ },
6888
+ {
6889
+ inputs: [],
6890
+ name: "NoTp",
6891
+ type: "error",
6892
+ },
6221
6893
  {
6222
6894
  inputs: [],
6223
6895
  name: "NoTrade",
@@ -6351,6 +7023,164 @@ const _abi = [
6351
7023
  type: "event",
6352
7024
  signature: "0x051ed9aeed13c97b879c0dd2b13c76171e2760abe3d62bca140dc70b39bd86f1",
6353
7025
  },
7026
+ {
7027
+ anonymous: false,
7028
+ inputs: [
7029
+ {
7030
+ components: [
7031
+ {
7032
+ internalType: "address",
7033
+ name: "user",
7034
+ type: "address",
7035
+ },
7036
+ {
7037
+ internalType: "uint32",
7038
+ name: "index",
7039
+ type: "uint32",
7040
+ },
7041
+ ],
7042
+ indexed: false,
7043
+ internalType: "struct ITradingStorage.Id",
7044
+ name: "orderId",
7045
+ type: "tuple",
7046
+ },
7047
+ {
7048
+ indexed: false,
7049
+ internalType: "bool",
7050
+ name: "isIncrease",
7051
+ type: "bool",
7052
+ },
7053
+ {
7054
+ indexed: false,
7055
+ internalType: "enum ITradingCallbacks.CancelReason",
7056
+ name: "cancelReason",
7057
+ type: "uint8",
7058
+ },
7059
+ {
7060
+ indexed: true,
7061
+ internalType: "uint8",
7062
+ name: "collateralIndex",
7063
+ type: "uint8",
7064
+ },
7065
+ {
7066
+ indexed: true,
7067
+ internalType: "address",
7068
+ name: "trader",
7069
+ type: "address",
7070
+ },
7071
+ {
7072
+ indexed: true,
7073
+ internalType: "uint256",
7074
+ name: "pairIndex",
7075
+ type: "uint256",
7076
+ },
7077
+ {
7078
+ indexed: false,
7079
+ internalType: "uint256",
7080
+ name: "index",
7081
+ type: "uint256",
7082
+ },
7083
+ {
7084
+ indexed: false,
7085
+ internalType: "uint256",
7086
+ name: "marketPrice",
7087
+ type: "uint256",
7088
+ },
7089
+ {
7090
+ indexed: false,
7091
+ internalType: "uint256",
7092
+ name: "collateralDelta",
7093
+ type: "uint256",
7094
+ },
7095
+ {
7096
+ components: [
7097
+ {
7098
+ internalType: "uint256",
7099
+ name: "newLeverage",
7100
+ type: "uint256",
7101
+ },
7102
+ {
7103
+ internalType: "uint256",
7104
+ name: "newCollateralAmount",
7105
+ type: "uint256",
7106
+ },
7107
+ {
7108
+ internalType: "uint256",
7109
+ name: "liqPrice",
7110
+ type: "uint256",
7111
+ },
7112
+ {
7113
+ internalType: "uint256",
7114
+ name: "govFeeCollateral",
7115
+ type: "uint256",
7116
+ },
7117
+ ],
7118
+ indexed: false,
7119
+ internalType: "struct IUpdateLeverage.UpdateLeverageValues",
7120
+ name: "values",
7121
+ type: "tuple",
7122
+ },
7123
+ ],
7124
+ name: "LeverageUpdateExecuted",
7125
+ type: "event",
7126
+ signature: "0xd377bf540561d2182d611090b46189834f8bb72f02121dc896866c06e02e6655",
7127
+ },
7128
+ {
7129
+ anonymous: false,
7130
+ inputs: [
7131
+ {
7132
+ components: [
7133
+ {
7134
+ internalType: "address",
7135
+ name: "user",
7136
+ type: "address",
7137
+ },
7138
+ {
7139
+ internalType: "uint32",
7140
+ name: "index",
7141
+ type: "uint32",
7142
+ },
7143
+ ],
7144
+ indexed: false,
7145
+ internalType: "struct ITradingStorage.Id",
7146
+ name: "orderId",
7147
+ type: "tuple",
7148
+ },
7149
+ {
7150
+ indexed: true,
7151
+ internalType: "address",
7152
+ name: "trader",
7153
+ type: "address",
7154
+ },
7155
+ {
7156
+ indexed: true,
7157
+ internalType: "uint256",
7158
+ name: "pairIndex",
7159
+ type: "uint256",
7160
+ },
7161
+ {
7162
+ indexed: false,
7163
+ internalType: "uint256",
7164
+ name: "index",
7165
+ type: "uint256",
7166
+ },
7167
+ {
7168
+ indexed: false,
7169
+ internalType: "bool",
7170
+ name: "isIncrease",
7171
+ type: "bool",
7172
+ },
7173
+ {
7174
+ indexed: false,
7175
+ internalType: "uint256",
7176
+ name: "newLeverage",
7177
+ type: "uint256",
7178
+ },
7179
+ ],
7180
+ name: "LeverageUpdateInitiated",
7181
+ type: "event",
7182
+ signature: "0xf4181f0fa2e1d3cda20bb810e0427d87916eb5dac8c73a7f779ae13e55ec578f",
7183
+ },
6354
7184
  {
6355
7185
  anonymous: false,
6356
7186
  inputs: [
@@ -6552,6 +7382,18 @@ const _abi = [
6552
7382
  name: "orderId",
6553
7383
  type: "tuple",
6554
7384
  },
7385
+ {
7386
+ indexed: false,
7387
+ internalType: "enum ITradingCallbacks.CancelReason",
7388
+ name: "cancelReason",
7389
+ type: "uint8",
7390
+ },
7391
+ {
7392
+ indexed: true,
7393
+ internalType: "uint8",
7394
+ name: "collateralIndex",
7395
+ type: "uint8",
7396
+ },
6555
7397
  {
6556
7398
  indexed: true,
6557
7399
  internalType: "address",
@@ -6560,50 +7402,275 @@ const _abi = [
6560
7402
  },
6561
7403
  {
6562
7404
  indexed: true,
6563
- internalType: "uint16",
7405
+ internalType: "uint256",
6564
7406
  name: "pairIndex",
6565
- type: "uint16",
7407
+ type: "uint256",
7408
+ },
7409
+ {
7410
+ indexed: false,
7411
+ internalType: "uint256",
7412
+ name: "index",
7413
+ type: "uint256",
6566
7414
  },
6567
7415
  {
6568
7416
  indexed: false,
6569
7417
  internalType: "bool",
6570
- name: "byPassesLinkCost",
7418
+ name: "long",
6571
7419
  type: "bool",
6572
7420
  },
6573
- ],
6574
- name: "TriggerOrderInitiated",
6575
- type: "event",
6576
- signature: "0x1472b674eddef9a7145c9353c62f5c03cfcf54556c14c3a0ebbf394da6e0c9ea",
6577
- },
6578
- {
6579
- inputs: [
6580
7421
  {
6581
- internalType: "uint32",
6582
- name: "_index",
6583
- type: "uint32",
7422
+ indexed: false,
7423
+ internalType: "uint256",
7424
+ name: "marketPrice",
7425
+ type: "uint256",
7426
+ },
7427
+ {
7428
+ indexed: false,
7429
+ internalType: "uint256",
7430
+ name: "collateralPriceUsd",
7431
+ type: "uint256",
7432
+ },
7433
+ {
7434
+ indexed: false,
7435
+ internalType: "uint256",
7436
+ name: "collateralDelta",
7437
+ type: "uint256",
7438
+ },
7439
+ {
7440
+ indexed: false,
7441
+ internalType: "uint256",
7442
+ name: "leverageDelta",
7443
+ type: "uint256",
7444
+ },
7445
+ {
7446
+ components: [
7447
+ {
7448
+ internalType: "uint256",
7449
+ name: "positionSizeCollateralDelta",
7450
+ type: "uint256",
7451
+ },
7452
+ {
7453
+ internalType: "uint256",
7454
+ name: "existingPositionSizeCollateral",
7455
+ type: "uint256",
7456
+ },
7457
+ {
7458
+ internalType: "uint256",
7459
+ name: "existingLiqPrice",
7460
+ type: "uint256",
7461
+ },
7462
+ {
7463
+ internalType: "uint256",
7464
+ name: "priceAfterImpact",
7465
+ type: "uint256",
7466
+ },
7467
+ {
7468
+ internalType: "int256",
7469
+ name: "existingPnlCollateral",
7470
+ type: "int256",
7471
+ },
7472
+ {
7473
+ internalType: "uint256",
7474
+ name: "borrowingFeeCollateral",
7475
+ type: "uint256",
7476
+ },
7477
+ {
7478
+ internalType: "uint256",
7479
+ name: "vaultFeeCollateral",
7480
+ type: "uint256",
7481
+ },
7482
+ {
7483
+ internalType: "uint256",
7484
+ name: "gnsStakingFeeCollateral",
7485
+ type: "uint256",
7486
+ },
7487
+ {
7488
+ internalType: "int256",
7489
+ name: "availableCollateralInDiamond",
7490
+ type: "int256",
7491
+ },
7492
+ {
7493
+ internalType: "int256",
7494
+ name: "collateralSentToTrader",
7495
+ type: "int256",
7496
+ },
7497
+ {
7498
+ internalType: "uint120",
7499
+ name: "newCollateralAmount",
7500
+ type: "uint120",
7501
+ },
7502
+ {
7503
+ internalType: "uint24",
7504
+ name: "newLeverage",
7505
+ type: "uint24",
7506
+ },
7507
+ ],
7508
+ indexed: false,
7509
+ internalType: "struct IUpdatePositionSize.DecreasePositionSizeValues",
7510
+ name: "values",
7511
+ type: "tuple",
6584
7512
  },
6585
7513
  ],
6586
- name: "cancelOpenOrder",
6587
- outputs: [],
6588
- stateMutability: "nonpayable",
6589
- type: "function",
6590
- signature: "0x85886333",
7514
+ name: "PositionSizeDecreaseExecuted",
7515
+ type: "event",
7516
+ signature: "0xe74b50af866d7f8e3577bc959bf73a2690841f0abce22ab0cfb1b1c84122a7d7",
6591
7517
  },
6592
7518
  {
7519
+ anonymous: false,
6593
7520
  inputs: [
6594
7521
  {
6595
- internalType: "uint32",
6596
- name: "_index",
6597
- type: "uint32",
7522
+ components: [
7523
+ {
7524
+ internalType: "address",
7525
+ name: "user",
7526
+ type: "address",
7527
+ },
7528
+ {
7529
+ internalType: "uint32",
7530
+ name: "index",
7531
+ type: "uint32",
7532
+ },
7533
+ ],
7534
+ indexed: false,
7535
+ internalType: "struct ITradingStorage.Id",
7536
+ name: "orderId",
7537
+ type: "tuple",
7538
+ },
7539
+ {
7540
+ indexed: false,
7541
+ internalType: "enum ITradingCallbacks.CancelReason",
7542
+ name: "cancelReason",
7543
+ type: "uint8",
7544
+ },
7545
+ {
7546
+ indexed: true,
7547
+ internalType: "uint8",
7548
+ name: "collateralIndex",
7549
+ type: "uint8",
7550
+ },
7551
+ {
7552
+ indexed: true,
7553
+ internalType: "address",
7554
+ name: "trader",
7555
+ type: "address",
7556
+ },
7557
+ {
7558
+ indexed: true,
7559
+ internalType: "uint256",
7560
+ name: "pairIndex",
7561
+ type: "uint256",
7562
+ },
7563
+ {
7564
+ indexed: false,
7565
+ internalType: "uint256",
7566
+ name: "index",
7567
+ type: "uint256",
7568
+ },
7569
+ {
7570
+ indexed: false,
7571
+ internalType: "bool",
7572
+ name: "long",
7573
+ type: "bool",
7574
+ },
7575
+ {
7576
+ indexed: false,
7577
+ internalType: "uint256",
7578
+ name: "marketPrice",
7579
+ type: "uint256",
7580
+ },
7581
+ {
7582
+ indexed: false,
7583
+ internalType: "uint256",
7584
+ name: "collateralPriceUsd",
7585
+ type: "uint256",
7586
+ },
7587
+ {
7588
+ indexed: false,
7589
+ internalType: "uint256",
7590
+ name: "collateralDelta",
7591
+ type: "uint256",
7592
+ },
7593
+ {
7594
+ indexed: false,
7595
+ internalType: "uint256",
7596
+ name: "leverageDelta",
7597
+ type: "uint256",
7598
+ },
7599
+ {
7600
+ components: [
7601
+ {
7602
+ internalType: "uint256",
7603
+ name: "positionSizeCollateralDelta",
7604
+ type: "uint256",
7605
+ },
7606
+ {
7607
+ internalType: "uint256",
7608
+ name: "existingPositionSizeCollateral",
7609
+ type: "uint256",
7610
+ },
7611
+ {
7612
+ internalType: "uint256",
7613
+ name: "newPositionSizeCollateral",
7614
+ type: "uint256",
7615
+ },
7616
+ {
7617
+ internalType: "uint256",
7618
+ name: "newCollateralAmount",
7619
+ type: "uint256",
7620
+ },
7621
+ {
7622
+ internalType: "uint256",
7623
+ name: "newLeverage",
7624
+ type: "uint256",
7625
+ },
7626
+ {
7627
+ internalType: "uint256",
7628
+ name: "priceAfterImpact",
7629
+ type: "uint256",
7630
+ },
7631
+ {
7632
+ internalType: "int256",
7633
+ name: "existingPnlCollateral",
7634
+ type: "int256",
7635
+ },
7636
+ {
7637
+ internalType: "uint256",
7638
+ name: "newOpenPrice",
7639
+ type: "uint256",
7640
+ },
7641
+ {
7642
+ internalType: "uint256",
7643
+ name: "borrowingFeeCollateral",
7644
+ type: "uint256",
7645
+ },
7646
+ {
7647
+ internalType: "uint256",
7648
+ name: "openingFeesCollateral",
7649
+ type: "uint256",
7650
+ },
7651
+ {
7652
+ internalType: "uint256",
7653
+ name: "existingLiqPrice",
7654
+ type: "uint256",
7655
+ },
7656
+ {
7657
+ internalType: "uint256",
7658
+ name: "newLiqPrice",
7659
+ type: "uint256",
7660
+ },
7661
+ ],
7662
+ indexed: false,
7663
+ internalType: "struct IUpdatePositionSize.IncreasePositionSizeValues",
7664
+ name: "values",
7665
+ type: "tuple",
6598
7666
  },
6599
7667
  ],
6600
- name: "closeTradeMarket",
6601
- outputs: [],
6602
- stateMutability: "nonpayable",
6603
- type: "function",
6604
- signature: "0xbdb340cd",
7668
+ name: "PositionSizeIncreaseExecuted",
7669
+ type: "event",
7670
+ signature: "0xf09a9c949c4bd4cbe75b424bea11c683c3ae55e7cdb8321c3ec37e01af72c8d5",
6605
7671
  },
6606
7672
  {
7673
+ anonymous: false,
6607
7674
  inputs: [
6608
7675
  {
6609
7676
  components: [
@@ -6618,16 +7685,161 @@ const _abi = [
6618
7685
  type: "uint32",
6619
7686
  },
6620
7687
  ],
7688
+ indexed: false,
6621
7689
  internalType: "struct ITradingStorage.Id",
6622
- name: "_orderId",
7690
+ name: "orderId",
7691
+ type: "tuple",
7692
+ },
7693
+ {
7694
+ indexed: true,
7695
+ internalType: "address",
7696
+ name: "trader",
7697
+ type: "address",
7698
+ },
7699
+ {
7700
+ indexed: true,
7701
+ internalType: "uint256",
7702
+ name: "pairIndex",
7703
+ type: "uint256",
7704
+ },
7705
+ {
7706
+ indexed: false,
7707
+ internalType: "uint256",
7708
+ name: "index",
7709
+ type: "uint256",
7710
+ },
7711
+ {
7712
+ indexed: false,
7713
+ internalType: "bool",
7714
+ name: "isIncrease",
7715
+ type: "bool",
7716
+ },
7717
+ {
7718
+ indexed: false,
7719
+ internalType: "uint256",
7720
+ name: "collateralDelta",
7721
+ type: "uint256",
7722
+ },
7723
+ {
7724
+ indexed: false,
7725
+ internalType: "uint256",
7726
+ name: "leverageDelta",
7727
+ type: "uint256",
7728
+ },
7729
+ ],
7730
+ name: "PositionSizeUpdateInitiated",
7731
+ type: "event",
7732
+ signature: "0xef86ff293bce1d37f4b09f9c27b48f752d86a9fde1109f1bd8b806e05e7bada5",
7733
+ },
7734
+ {
7735
+ anonymous: false,
7736
+ inputs: [
7737
+ {
7738
+ components: [
7739
+ {
7740
+ internalType: "address",
7741
+ name: "user",
7742
+ type: "address",
7743
+ },
7744
+ {
7745
+ internalType: "uint32",
7746
+ name: "index",
7747
+ type: "uint32",
7748
+ },
7749
+ ],
7750
+ indexed: false,
7751
+ internalType: "struct ITradingStorage.Id",
7752
+ name: "orderId",
6623
7753
  type: "tuple",
6624
7754
  },
7755
+ {
7756
+ indexed: true,
7757
+ internalType: "address",
7758
+ name: "trader",
7759
+ type: "address",
7760
+ },
7761
+ {
7762
+ indexed: true,
7763
+ internalType: "uint16",
7764
+ name: "pairIndex",
7765
+ type: "uint16",
7766
+ },
7767
+ {
7768
+ indexed: false,
7769
+ internalType: "bool",
7770
+ name: "byPassesLinkCost",
7771
+ type: "bool",
7772
+ },
7773
+ ],
7774
+ name: "TriggerOrderInitiated",
7775
+ type: "event",
7776
+ signature: "0x1472b674eddef9a7145c9353c62f5c03cfcf54556c14c3a0ebbf394da6e0c9ea",
7777
+ },
7778
+ {
7779
+ inputs: [
7780
+ {
7781
+ internalType: "uint32",
7782
+ name: "_index",
7783
+ type: "uint32",
7784
+ },
7785
+ ],
7786
+ name: "cancelOpenOrder",
7787
+ outputs: [],
7788
+ stateMutability: "nonpayable",
7789
+ type: "function",
7790
+ signature: "0x85886333",
7791
+ },
7792
+ {
7793
+ inputs: [
7794
+ {
7795
+ internalType: "uint32",
7796
+ name: "_orderIndex",
7797
+ type: "uint32",
7798
+ },
7799
+ ],
7800
+ name: "cancelOrderAfterTimeout",
7801
+ outputs: [],
7802
+ stateMutability: "nonpayable",
7803
+ type: "function",
7804
+ signature: "0xb6919540",
7805
+ },
7806
+ {
7807
+ inputs: [
7808
+ {
7809
+ internalType: "uint32",
7810
+ name: "_index",
7811
+ type: "uint32",
7812
+ },
7813
+ ],
7814
+ name: "closeTradeMarket",
7815
+ outputs: [],
7816
+ stateMutability: "nonpayable",
7817
+ type: "function",
7818
+ signature: "0xbdb340cd",
7819
+ },
7820
+ {
7821
+ inputs: [
7822
+ {
7823
+ internalType: "uint32",
7824
+ name: "_index",
7825
+ type: "uint32",
7826
+ },
7827
+ {
7828
+ internalType: "uint120",
7829
+ name: "_collateralDelta",
7830
+ type: "uint120",
7831
+ },
7832
+ {
7833
+ internalType: "uint24",
7834
+ name: "_leverageDelta",
7835
+ type: "uint24",
7836
+ },
6625
7837
  ],
6626
- name: "closeTradeMarketTimeout",
7838
+ name: "decreasePositionSize",
6627
7839
  outputs: [],
6628
7840
  stateMutability: "nonpayable",
6629
7841
  type: "function",
6630
- signature: "0x03537a5f",
7842
+ signature: "0x69f6bde1",
6631
7843
  },
6632
7844
  {
6633
7845
  inputs: [
@@ -6672,7 +7884,6 @@ const _abi = [
6672
7884
  ],
6673
7885
  stateMutability: "view",
6674
7886
  type: "function",
6675
- constant: true,
6676
7887
  signature: "0x85898e08",
6677
7888
  },
6678
7889
  {
@@ -6687,7 +7898,6 @@ const _abi = [
6687
7898
  ],
6688
7899
  stateMutability: "view",
6689
7900
  type: "function",
6690
- constant: true,
6691
7901
  signature: "0xa4bdee80",
6692
7902
  },
6693
7903
  {
@@ -6708,7 +7918,6 @@ const _abi = [
6708
7918
  ],
6709
7919
  stateMutability: "view",
6710
7920
  type: "function",
6711
- constant: true,
6712
7921
  signature: "0x4aac6480",
6713
7922
  },
6714
7923
  {
@@ -6723,9 +7932,42 @@ const _abi = [
6723
7932
  ],
6724
7933
  stateMutability: "view",
6725
7934
  type: "function",
6726
- constant: true,
6727
7935
  signature: "0x1d9478b6",
6728
7936
  },
7937
+ {
7938
+ inputs: [
7939
+ {
7940
+ internalType: "uint32",
7941
+ name: "_index",
7942
+ type: "uint32",
7943
+ },
7944
+ {
7945
+ internalType: "uint120",
7946
+ name: "_collateralDelta",
7947
+ type: "uint120",
7948
+ },
7949
+ {
7950
+ internalType: "uint24",
7951
+ name: "_leverageDelta",
7952
+ type: "uint24",
7953
+ },
7954
+ {
7955
+ internalType: "uint64",
7956
+ name: "_expectedPrice",
7957
+ type: "uint64",
7958
+ },
7959
+ {
7960
+ internalType: "uint16",
7961
+ name: "_maxSlippageP",
7962
+ type: "uint16",
7963
+ },
7964
+ ],
7965
+ name: "increasePositionSize",
7966
+ outputs: [],
7967
+ stateMutability: "nonpayable",
7968
+ type: "function",
7969
+ signature: "0x24058ad3",
7970
+ },
6729
7971
  {
6730
7972
  inputs: [
6731
7973
  {
@@ -6763,7 +8005,6 @@ const _abi = [
6763
8005
  ],
6764
8006
  stateMutability: "view",
6765
8007
  type: "function",
6766
- constant: true,
6767
8008
  signature: "0x84e93347",
6768
8009
  },
6769
8010
  {
@@ -6857,32 +8098,6 @@ const _abi = [
6857
8098
  type: "function",
6858
8099
  signature: "0x4465c3e4",
6859
8100
  },
6860
- {
6861
- inputs: [
6862
- {
6863
- components: [
6864
- {
6865
- internalType: "address",
6866
- name: "user",
6867
- type: "address",
6868
- },
6869
- {
6870
- internalType: "uint32",
6871
- name: "index",
6872
- type: "uint32",
6873
- },
6874
- ],
6875
- internalType: "struct ITradingStorage.Id",
6876
- name: "_orderId",
6877
- type: "tuple",
6878
- },
6879
- ],
6880
- name: "openTradeMarketTimeout",
6881
- outputs: [],
6882
- stateMutability: "nonpayable",
6883
- type: "function",
6884
- signature: "0x0cff665e",
6885
- },
6886
8101
  {
6887
8102
  inputs: [
6888
8103
  {
@@ -6972,7 +8187,6 @@ const _abi = [
6972
8187
  outputs: [],
6973
8188
  stateMutability: "payable",
6974
8189
  type: "function",
6975
- payable: true,
6976
8190
  signature: "0x080e83e1",
6977
8191
  },
6978
8192
  {
@@ -7030,6 +8244,25 @@ const _abi = [
7030
8244
  type: "function",
7031
8245
  signature: "0x9bf1584e",
7032
8246
  },
8247
+ {
8248
+ inputs: [
8249
+ {
8250
+ internalType: "uint32",
8251
+ name: "_index",
8252
+ type: "uint32",
8253
+ },
8254
+ {
8255
+ internalType: "uint24",
8256
+ name: "_newLeverage",
8257
+ type: "uint24",
8258
+ },
8259
+ ],
8260
+ name: "updateLeverage",
8261
+ outputs: [],
8262
+ stateMutability: "nonpayable",
8263
+ type: "function",
8264
+ signature: "0x0bce9aaa",
8265
+ },
7033
8266
  {
7034
8267
  inputs: [
7035
8268
  {
@@ -7679,60 +8912,118 @@ const _abi = [
7679
8912
  type: "address",
7680
8913
  },
7681
8914
  {
7682
- internalType: "uint32",
7683
- name: "index",
7684
- type: "uint32",
8915
+ internalType: "uint32",
8916
+ name: "index",
8917
+ type: "uint32",
8918
+ },
8919
+ ],
8920
+ indexed: false,
8921
+ internalType: "struct ITradingStorage.Id",
8922
+ name: "orderId",
8923
+ type: "tuple",
8924
+ },
8925
+ {
8926
+ indexed: true,
8927
+ internalType: "address",
8928
+ name: "triggerCaller",
8929
+ type: "address",
8930
+ },
8931
+ {
8932
+ indexed: false,
8933
+ internalType: "enum ITradingStorage.PendingOrderType",
8934
+ name: "orderType",
8935
+ type: "uint8",
8936
+ },
8937
+ {
8938
+ indexed: false,
8939
+ internalType: "enum ITradingCallbacks.CancelReason",
8940
+ name: "cancelReason",
8941
+ type: "uint8",
8942
+ },
8943
+ ],
8944
+ name: "TriggerOrderCanceled",
8945
+ type: "event",
8946
+ signature: "0x0766d5a97748cddd280198f717da563fe9aad4d38e5bd546fe56d04fbc68a3cd",
8947
+ },
8948
+ {
8949
+ anonymous: false,
8950
+ inputs: [
8951
+ {
8952
+ indexed: false,
8953
+ internalType: "uint8",
8954
+ name: "valueP",
8955
+ type: "uint8",
8956
+ },
8957
+ ],
8958
+ name: "VaultClosingFeePUpdated",
8959
+ type: "event",
8960
+ signature: "0x1be5a8e0282c1b895f845900a8efe7585790659f1b4f062f17000e2712dd8601",
8961
+ },
8962
+ {
8963
+ inputs: [],
8964
+ name: "claimPendingGovFees",
8965
+ outputs: [],
8966
+ stateMutability: "nonpayable",
8967
+ type: "function",
8968
+ signature: "0x36c3dba2",
8969
+ },
8970
+ {
8971
+ inputs: [
8972
+ {
8973
+ components: [
8974
+ {
8975
+ components: [
8976
+ {
8977
+ internalType: "address",
8978
+ name: "user",
8979
+ type: "address",
8980
+ },
8981
+ {
8982
+ internalType: "uint32",
8983
+ name: "index",
8984
+ type: "uint32",
8985
+ },
8986
+ ],
8987
+ internalType: "struct ITradingStorage.Id",
8988
+ name: "orderId",
8989
+ type: "tuple",
8990
+ },
8991
+ {
8992
+ internalType: "uint256",
8993
+ name: "spreadP",
8994
+ type: "uint256",
8995
+ },
8996
+ {
8997
+ internalType: "uint64",
8998
+ name: "price",
8999
+ type: "uint64",
9000
+ },
9001
+ {
9002
+ internalType: "uint64",
9003
+ name: "open",
9004
+ type: "uint64",
9005
+ },
9006
+ {
9007
+ internalType: "uint64",
9008
+ name: "high",
9009
+ type: "uint64",
9010
+ },
9011
+ {
9012
+ internalType: "uint64",
9013
+ name: "low",
9014
+ type: "uint64",
7685
9015
  },
7686
9016
  ],
7687
- indexed: false,
7688
- internalType: "struct ITradingStorage.Id",
7689
- name: "orderId",
9017
+ internalType: "struct ITradingCallbacks.AggregatorAnswer",
9018
+ name: "_a",
7690
9019
  type: "tuple",
7691
9020
  },
7692
- {
7693
- indexed: true,
7694
- internalType: "address",
7695
- name: "triggerCaller",
7696
- type: "address",
7697
- },
7698
- {
7699
- indexed: false,
7700
- internalType: "enum ITradingStorage.PendingOrderType",
7701
- name: "orderType",
7702
- type: "uint8",
7703
- },
7704
- {
7705
- indexed: false,
7706
- internalType: "enum ITradingCallbacks.CancelReason",
7707
- name: "cancelReason",
7708
- type: "uint8",
7709
- },
7710
- ],
7711
- name: "TriggerOrderCanceled",
7712
- type: "event",
7713
- signature: "0x0766d5a97748cddd280198f717da563fe9aad4d38e5bd546fe56d04fbc68a3cd",
7714
- },
7715
- {
7716
- anonymous: false,
7717
- inputs: [
7718
- {
7719
- indexed: false,
7720
- internalType: "uint8",
7721
- name: "valueP",
7722
- type: "uint8",
7723
- },
7724
9021
  ],
7725
- name: "VaultClosingFeePUpdated",
7726
- type: "event",
7727
- signature: "0x1be5a8e0282c1b895f845900a8efe7585790659f1b4f062f17000e2712dd8601",
7728
- },
7729
- {
7730
- inputs: [],
7731
- name: "claimPendingGovFees",
9022
+ name: "closeTradeMarketCallback",
7732
9023
  outputs: [],
7733
9024
  stateMutability: "nonpayable",
7734
9025
  type: "function",
7735
- signature: "0x36c3dba2",
9026
+ signature: "0x4b0b5629",
7736
9027
  },
7737
9028
  {
7738
9029
  inputs: [
@@ -7786,11 +9077,11 @@ const _abi = [
7786
9077
  type: "tuple",
7787
9078
  },
7788
9079
  ],
7789
- name: "closeTradeMarketCallback",
9080
+ name: "decreasePositionSizeMarketCallback",
7790
9081
  outputs: [],
7791
9082
  stateMutability: "nonpayable",
7792
9083
  type: "function",
7793
- signature: "0x4b0b5629",
9084
+ signature: "0xe1d88718",
7794
9085
  },
7795
9086
  {
7796
9087
  inputs: [
@@ -7926,7 +9217,6 @@ const _abi = [
7926
9217
  ],
7927
9218
  stateMutability: "view",
7928
9219
  type: "function",
7929
- constant: true,
7930
9220
  signature: "0x2c6fe6d1",
7931
9221
  },
7932
9222
  {
@@ -7941,9 +9231,66 @@ const _abi = [
7941
9231
  ],
7942
9232
  stateMutability: "view",
7943
9233
  type: "function",
7944
- constant: true,
7945
9234
  signature: "0xa5b26e46",
7946
9235
  },
9236
+ {
9237
+ inputs: [
9238
+ {
9239
+ components: [
9240
+ {
9241
+ components: [
9242
+ {
9243
+ internalType: "address",
9244
+ name: "user",
9245
+ type: "address",
9246
+ },
9247
+ {
9248
+ internalType: "uint32",
9249
+ name: "index",
9250
+ type: "uint32",
9251
+ },
9252
+ ],
9253
+ internalType: "struct ITradingStorage.Id",
9254
+ name: "orderId",
9255
+ type: "tuple",
9256
+ },
9257
+ {
9258
+ internalType: "uint256",
9259
+ name: "spreadP",
9260
+ type: "uint256",
9261
+ },
9262
+ {
9263
+ internalType: "uint64",
9264
+ name: "price",
9265
+ type: "uint64",
9266
+ },
9267
+ {
9268
+ internalType: "uint64",
9269
+ name: "open",
9270
+ type: "uint64",
9271
+ },
9272
+ {
9273
+ internalType: "uint64",
9274
+ name: "high",
9275
+ type: "uint64",
9276
+ },
9277
+ {
9278
+ internalType: "uint64",
9279
+ name: "low",
9280
+ type: "uint64",
9281
+ },
9282
+ ],
9283
+ internalType: "struct ITradingCallbacks.AggregatorAnswer",
9284
+ name: "_a",
9285
+ type: "tuple",
9286
+ },
9287
+ ],
9288
+ name: "increasePositionSizeMarketCallback",
9289
+ outputs: [],
9290
+ stateMutability: "nonpayable",
9291
+ type: "function",
9292
+ signature: "0x10d8e754",
9293
+ },
7947
9294
  {
7948
9295
  inputs: [
7949
9296
  {
@@ -8016,6 +9363,64 @@ const _abi = [
8016
9363
  type: "function",
8017
9364
  signature: "0x13ebc2c6",
8018
9365
  },
9366
+ {
9367
+ inputs: [
9368
+ {
9369
+ components: [
9370
+ {
9371
+ components: [
9372
+ {
9373
+ internalType: "address",
9374
+ name: "user",
9375
+ type: "address",
9376
+ },
9377
+ {
9378
+ internalType: "uint32",
9379
+ name: "index",
9380
+ type: "uint32",
9381
+ },
9382
+ ],
9383
+ internalType: "struct ITradingStorage.Id",
9384
+ name: "orderId",
9385
+ type: "tuple",
9386
+ },
9387
+ {
9388
+ internalType: "uint256",
9389
+ name: "spreadP",
9390
+ type: "uint256",
9391
+ },
9392
+ {
9393
+ internalType: "uint64",
9394
+ name: "price",
9395
+ type: "uint64",
9396
+ },
9397
+ {
9398
+ internalType: "uint64",
9399
+ name: "open",
9400
+ type: "uint64",
9401
+ },
9402
+ {
9403
+ internalType: "uint64",
9404
+ name: "high",
9405
+ type: "uint64",
9406
+ },
9407
+ {
9408
+ internalType: "uint64",
9409
+ name: "low",
9410
+ type: "uint64",
9411
+ },
9412
+ ],
9413
+ internalType: "struct ITradingCallbacks.AggregatorAnswer",
9414
+ name: "_a",
9415
+ type: "tuple",
9416
+ },
9417
+ ],
9418
+ name: "updateLeverageCallback",
9419
+ outputs: [],
9420
+ stateMutability: "nonpayable",
9421
+ type: "function",
9422
+ signature: "0x92dd2940",
9423
+ },
8019
9424
  {
8020
9425
  inputs: [
8021
9426
  {
@@ -8193,6 +9598,12 @@ const _abi = [
8193
9598
  name: "index",
8194
9599
  type: "uint32",
8195
9600
  },
9601
+ {
9602
+ indexed: false,
9603
+ internalType: "bool",
9604
+ name: "long",
9605
+ type: "bool",
9606
+ },
8196
9607
  {
8197
9608
  indexed: false,
8198
9609
  internalType: "uint64",
@@ -8208,7 +9619,7 @@ const _abi = [
8208
9619
  ],
8209
9620
  name: "BorrowingInitialAccFeesStored",
8210
9621
  type: "event",
8211
- signature: "0x0630d8200c5131fd33e89f6e386588553026397795e46cfc6736e4af82f4e6d9",
9622
+ signature: "0x49a2b4d58db9411e83e598fad88462d2474d8f9aae8a9ba41acdfde33f4f3751",
8212
9623
  },
8213
9624
  {
8214
9625
  anonymous: false,
@@ -8548,7 +9959,6 @@ const _abi = [
8548
9959
  ],
8549
9960
  stateMutability: "view",
8550
9961
  type: "function",
8551
- constant: true,
8552
9962
  signature: "0x48da5b38",
8553
9963
  },
8554
9964
  {
@@ -8601,7 +10011,6 @@ const _abi = [
8601
10011
  ],
8602
10012
  stateMutability: "view",
8603
10013
  type: "function",
8604
- constant: true,
8605
10014
  signature: "0xfff24740",
8606
10015
  },
8607
10016
  {
@@ -8649,7 +10058,6 @@ const _abi = [
8649
10058
  ],
8650
10059
  stateMutability: "view",
8651
10060
  type: "function",
8652
- constant: true,
8653
10061
  signature: "0x13a9baae",
8654
10062
  },
8655
10063
  {
@@ -8690,7 +10098,6 @@ const _abi = [
8690
10098
  ],
8691
10099
  stateMutability: "view",
8692
10100
  type: "function",
8693
- constant: true,
8694
10101
  signature: "0xd2b9099a",
8695
10102
  },
8696
10103
  {
@@ -8770,7 +10177,6 @@ const _abi = [
8770
10177
  ],
8771
10178
  stateMutability: "view",
8772
10179
  type: "function",
8773
- constant: true,
8774
10180
  signature: "0xfbbf9740",
8775
10181
  },
8776
10182
  {
@@ -8823,7 +10229,6 @@ const _abi = [
8823
10229
  ],
8824
10230
  stateMutability: "view",
8825
10231
  type: "function",
8826
- constant: true,
8827
10232
  signature: "0xab6192ed",
8828
10233
  },
8829
10234
  {
@@ -8876,7 +10281,6 @@ const _abi = [
8876
10281
  ],
8877
10282
  stateMutability: "view",
8878
10283
  type: "function",
8879
- constant: true,
8880
10284
  signature: "0x5d5bf24d",
8881
10285
  },
8882
10286
  {
@@ -8902,7 +10306,6 @@ const _abi = [
8902
10306
  ],
8903
10307
  stateMutability: "view",
8904
10308
  type: "function",
8905
- constant: true,
8906
10309
  signature: "0xe6a6633f",
8907
10310
  },
8908
10311
  {
@@ -8975,7 +10378,6 @@ const _abi = [
8975
10378
  ],
8976
10379
  stateMutability: "view",
8977
10380
  type: "function",
8978
- constant: true,
8979
10381
  signature: "0xfd03e048",
8980
10382
  },
8981
10383
  {
@@ -9023,7 +10425,6 @@ const _abi = [
9023
10425
  ],
9024
10426
  stateMutability: "view",
9025
10427
  type: "function",
9026
- constant: true,
9027
10428
  signature: "0x0077b57e",
9028
10429
  },
9029
10430
  {
@@ -9064,7 +10465,6 @@ const _abi = [
9064
10465
  ],
9065
10466
  stateMutability: "view",
9066
10467
  type: "function",
9067
- constant: true,
9068
10468
  signature: "0x0c7be6ca",
9069
10469
  },
9070
10470
  {
@@ -9090,7 +10490,6 @@ const _abi = [
9090
10490
  ],
9091
10491
  stateMutability: "view",
9092
10492
  type: "function",
9093
- constant: true,
9094
10493
  signature: "0x5667b5c0",
9095
10494
  },
9096
10495
  {
@@ -9116,7 +10515,6 @@ const _abi = [
9116
10515
  ],
9117
10516
  stateMutability: "view",
9118
10517
  type: "function",
9119
- constant: true,
9120
10518
  signature: "0x274d1278",
9121
10519
  },
9122
10520
  {
@@ -9147,7 +10545,6 @@ const _abi = [
9147
10545
  ],
9148
10546
  stateMutability: "view",
9149
10547
  type: "function",
9150
- constant: true,
9151
10548
  signature: "0xeb2ea3a2",
9152
10549
  },
9153
10550
  {
@@ -9178,7 +10575,6 @@ const _abi = [
9178
10575
  ],
9179
10576
  stateMutability: "view",
9180
10577
  type: "function",
9181
- constant: true,
9182
10578
  signature: "0xf6f7c948",
9183
10579
  },
9184
10580
  {
@@ -9236,7 +10632,6 @@ const _abi = [
9236
10632
  ],
9237
10633
  stateMutability: "view",
9238
10634
  type: "function",
9239
- constant: true,
9240
10635
  signature: "0x0804db93",
9241
10636
  },
9242
10637
  {
@@ -9279,9 +10674,14 @@ const _abi = [
9279
10674
  type: "uint256",
9280
10675
  },
9281
10676
  {
9282
- internalType: "uint24",
10677
+ internalType: "uint256",
9283
10678
  name: "leverage",
9284
- type: "uint24",
10679
+ type: "uint256",
10680
+ },
10681
+ {
10682
+ internalType: "bool",
10683
+ name: "useBorrowingFees",
10684
+ type: "bool",
9285
10685
  },
9286
10686
  ],
9287
10687
  internalType: "struct IBorrowingFees.LiqPriceInput",
@@ -9299,8 +10699,7 @@ const _abi = [
9299
10699
  ],
9300
10700
  stateMutability: "view",
9301
10701
  type: "function",
9302
- constant: true,
9303
- signature: "0x30b3c31f",
10702
+ signature: "0xea122fd8",
9304
10703
  },
9305
10704
  {
9306
10705
  inputs: [
@@ -9346,6 +10745,40 @@ const _abi = [
9346
10745
  type: "function",
9347
10746
  signature: "0xfc79e929",
9348
10747
  },
10748
+ {
10749
+ inputs: [
10750
+ {
10751
+ internalType: "uint8",
10752
+ name: "_collateralIndex",
10753
+ type: "uint8",
10754
+ },
10755
+ {
10756
+ internalType: "address",
10757
+ name: "_trader",
10758
+ type: "address",
10759
+ },
10760
+ {
10761
+ internalType: "uint16",
10762
+ name: "_pairIndex",
10763
+ type: "uint16",
10764
+ },
10765
+ {
10766
+ internalType: "uint32",
10767
+ name: "_index",
10768
+ type: "uint32",
10769
+ },
10770
+ {
10771
+ internalType: "bool",
10772
+ name: "_long",
10773
+ type: "bool",
10774
+ },
10775
+ ],
10776
+ name: "resetTradeBorrowingFees",
10777
+ outputs: [],
10778
+ stateMutability: "nonpayable",
10779
+ type: "function",
10780
+ signature: "0x4fa72788",
10781
+ },
9349
10782
  {
9350
10783
  inputs: [
9351
10784
  {
@@ -9553,7 +10986,6 @@ const _abi = [
9553
10986
  ],
9554
10987
  stateMutability: "view",
9555
10988
  type: "function",
9556
- constant: true,
9557
10989
  signature: "0x801c7961",
9558
10990
  },
9559
10991
  {
@@ -9561,6 +10993,11 @@ const _abi = [
9561
10993
  name: "InvalidCandle",
9562
10994
  type: "error",
9563
10995
  },
10996
+ {
10997
+ inputs: [],
10998
+ name: "InvalidPoolType",
10999
+ type: "error",
11000
+ },
9564
11001
  {
9565
11002
  inputs: [],
9566
11003
  name: "OracleAlreadyListed",
@@ -9631,7 +11068,7 @@ const _abi = [
9631
11068
  {
9632
11069
  components: [
9633
11070
  {
9634
- internalType: "contract IUniswapV3Pool",
11071
+ internalType: "contract ILiquidityPool",
9635
11072
  name: "pool",
9636
11073
  type: "address",
9637
11074
  },
@@ -9641,20 +11078,25 @@ const _abi = [
9641
11078
  type: "bool",
9642
11079
  },
9643
11080
  {
9644
- internalType: "uint88",
11081
+ internalType: "enum IPriceAggregator.PoolType",
11082
+ name: "poolType",
11083
+ type: "uint8",
11084
+ },
11085
+ {
11086
+ internalType: "uint80",
9645
11087
  name: "__placeholder",
9646
- type: "uint88",
11088
+ type: "uint80",
9647
11089
  },
9648
11090
  ],
9649
11091
  indexed: false,
9650
- internalType: "struct IPriceAggregator.UniV3PoolInfo",
11092
+ internalType: "struct IPriceAggregator.LiquidityPoolInfo",
9651
11093
  name: "newValue",
9652
11094
  type: "tuple",
9653
11095
  },
9654
11096
  ],
9655
- name: "CollateralGnsUniV3PoolUpdated",
11097
+ name: "CollateralGnsLiquidityPoolUpdated",
9656
11098
  type: "event",
9657
- signature: "0x1edbae8d78eb52b7442e21be32c837a2c2521fd9d806d1f469f2c9e8f469ab75",
11099
+ signature: "0x99c41cee576e40e5483818b59dcfd6e36841e5f9a9557e09779e0b4541f9de0e",
9658
11100
  },
9659
11101
  {
9660
11102
  anonymous: false,
@@ -9917,11 +11359,23 @@ const _abi = [
9917
11359
  anonymous: false,
9918
11360
  inputs: [
9919
11361
  {
9920
- indexed: false,
11362
+ indexed: true,
9921
11363
  internalType: "uint8",
9922
11364
  name: "collateralIndex",
9923
11365
  type: "uint8",
9924
11366
  },
11367
+ {
11368
+ indexed: true,
11369
+ internalType: "address",
11370
+ name: "trader",
11371
+ type: "address",
11372
+ },
11373
+ {
11374
+ indexed: true,
11375
+ internalType: "uint256",
11376
+ name: "pairIndex",
11377
+ type: "uint256",
11378
+ },
9925
11379
  {
9926
11380
  components: [
9927
11381
  {
@@ -9941,28 +11395,28 @@ const _abi = [
9941
11395
  type: "tuple",
9942
11396
  },
9943
11397
  {
9944
- indexed: true,
11398
+ indexed: false,
9945
11399
  internalType: "enum ITradingStorage.PendingOrderType",
9946
11400
  name: "orderType",
9947
11401
  type: "uint8",
9948
11402
  },
9949
11403
  {
9950
- indexed: true,
11404
+ indexed: false,
9951
11405
  internalType: "uint256",
9952
- name: "pairIndex",
11406
+ name: "fromBlock",
9953
11407
  type: "uint256",
9954
11408
  },
9955
11409
  {
9956
- indexed: true,
9957
- internalType: "bytes32",
9958
- name: "job",
9959
- type: "bytes32",
11410
+ indexed: false,
11411
+ internalType: "bool",
11412
+ name: "isLookback",
11413
+ type: "bool",
9960
11414
  },
9961
11415
  {
9962
- indexed: false,
9963
- internalType: "uint256",
9964
- name: "nodesCount",
9965
- type: "uint256",
11416
+ indexed: false,
11417
+ internalType: "bytes32",
11418
+ name: "job",
11419
+ type: "bytes32",
9966
11420
  },
9967
11421
  {
9968
11422
  indexed: false,
@@ -9973,19 +11427,13 @@ const _abi = [
9973
11427
  {
9974
11428
  indexed: false,
9975
11429
  internalType: "uint256",
9976
- name: "fromBlock",
11430
+ name: "nodesCount",
9977
11431
  type: "uint256",
9978
11432
  },
9979
- {
9980
- indexed: false,
9981
- internalType: "bool",
9982
- name: "isLookback",
9983
- type: "bool",
9984
- },
9985
11433
  ],
9986
11434
  name: "PriceRequested",
9987
11435
  type: "event",
9988
- signature: "0xff0844642ee620558da9bd3e51a00e4e70e563b544dd6ef6529fd4068eea8dc9",
11436
+ signature: "0x64ef5f525ba1978b433275b3e10998a2fac9ccad2c78aa723bb841fe527beb3b",
9989
11437
  },
9990
11438
  {
9991
11439
  anonymous: false,
@@ -10118,7 +11566,6 @@ const _abi = [
10118
11566
  ],
10119
11567
  stateMutability: "view",
10120
11568
  type: "function",
10121
- constant: true,
10122
11569
  signature: "0x165d35e1",
10123
11570
  },
10124
11571
  {
@@ -10144,7 +11591,6 @@ const _abi = [
10144
11591
  ],
10145
11592
  stateMutability: "view",
10146
11593
  type: "function",
10147
- constant: true,
10148
11594
  signature: "0x36f6def7",
10149
11595
  },
10150
11596
  {
@@ -10155,12 +11601,12 @@ const _abi = [
10155
11601
  type: "uint8",
10156
11602
  },
10157
11603
  ],
10158
- name: "getCollateralGnsUniV3Pool",
11604
+ name: "getCollateralGnsLiquidityPool",
10159
11605
  outputs: [
10160
11606
  {
10161
11607
  components: [
10162
11608
  {
10163
- internalType: "contract IUniswapV3Pool",
11609
+ internalType: "contract ILiquidityPool",
10164
11610
  name: "pool",
10165
11611
  type: "address",
10166
11612
  },
@@ -10170,20 +11616,24 @@ const _abi = [
10170
11616
  type: "bool",
10171
11617
  },
10172
11618
  {
10173
- internalType: "uint88",
11619
+ internalType: "enum IPriceAggregator.PoolType",
11620
+ name: "poolType",
11621
+ type: "uint8",
11622
+ },
11623
+ {
11624
+ internalType: "uint80",
10174
11625
  name: "__placeholder",
10175
- type: "uint88",
11626
+ type: "uint80",
10176
11627
  },
10177
11628
  ],
10178
- internalType: "struct IPriceAggregator.UniV3PoolInfo",
11629
+ internalType: "struct IPriceAggregator.LiquidityPoolInfo",
10179
11630
  name: "",
10180
11631
  type: "tuple",
10181
11632
  },
10182
11633
  ],
10183
11634
  stateMutability: "view",
10184
11635
  type: "function",
10185
- constant: true,
10186
- signature: "0xd1d80eb8",
11636
+ signature: "0x6a43c9ad",
10187
11637
  },
10188
11638
  {
10189
11639
  inputs: [
@@ -10203,7 +11653,6 @@ const _abi = [
10203
11653
  ],
10204
11654
  stateMutability: "view",
10205
11655
  type: "function",
10206
- constant: true,
10207
11656
  signature: "0xbbb4e3f9",
10208
11657
  },
10209
11658
  {
@@ -10224,7 +11673,6 @@ const _abi = [
10224
11673
  ],
10225
11674
  stateMutability: "view",
10226
11675
  type: "function",
10227
- constant: true,
10228
11676
  signature: "0x9641c1f5",
10229
11677
  },
10230
11678
  {
@@ -10245,7 +11693,6 @@ const _abi = [
10245
11693
  ],
10246
11694
  stateMutability: "view",
10247
11695
  type: "function",
10248
- constant: true,
10249
11696
  signature: "0x1de109d2",
10250
11697
  },
10251
11698
  {
@@ -10266,7 +11713,6 @@ const _abi = [
10266
11713
  ],
10267
11714
  stateMutability: "view",
10268
11715
  type: "function",
10269
- constant: true,
10270
11716
  signature: "0xa91fa361",
10271
11717
  },
10272
11718
  {
@@ -10287,7 +11733,6 @@ const _abi = [
10287
11733
  ],
10288
11734
  stateMutability: "view",
10289
11735
  type: "function",
10290
- constant: true,
10291
11736
  signature: "0x891e656c",
10292
11737
  },
10293
11738
  {
@@ -10302,7 +11747,6 @@ const _abi = [
10302
11747
  ],
10303
11748
  stateMutability: "view",
10304
11749
  type: "function",
10305
- constant: true,
10306
11750
  signature: "0xf4b0664d",
10307
11751
  },
10308
11752
  {
@@ -10312,6 +11756,11 @@ const _abi = [
10312
11756
  name: "_collateralIndex",
10313
11757
  type: "uint8",
10314
11758
  },
11759
+ {
11760
+ internalType: "address",
11761
+ name: "_trader",
11762
+ type: "address",
11763
+ },
10315
11764
  {
10316
11765
  internalType: "uint16",
10317
11766
  name: "_pairIndex",
@@ -10333,8 +11782,7 @@ const _abi = [
10333
11782
  ],
10334
11783
  stateMutability: "view",
10335
11784
  type: "function",
10336
- constant: true,
10337
- signature: "0x9cf0cc0e",
11785
+ signature: "0xde38f77c",
10338
11786
  },
10339
11787
  {
10340
11788
  inputs: [],
@@ -10348,7 +11796,6 @@ const _abi = [
10348
11796
  ],
10349
11797
  stateMutability: "view",
10350
11798
  type: "function",
10351
- constant: true,
10352
11799
  signature: "0xb144bbf0",
10353
11800
  },
10354
11801
  {
@@ -10363,7 +11810,6 @@ const _abi = [
10363
11810
  ],
10364
11811
  stateMutability: "view",
10365
11812
  type: "function",
10366
- constant: true,
10367
11813
  signature: "0x8e667ac8",
10368
11814
  },
10369
11815
  {
@@ -10378,7 +11824,6 @@ const _abi = [
10378
11824
  ],
10379
11825
  stateMutability: "view",
10380
11826
  type: "function",
10381
- constant: true,
10382
11827
  signature: "0x69b53230",
10383
11828
  },
10384
11829
  {
@@ -10399,7 +11844,6 @@ const _abi = [
10399
11844
  ],
10400
11845
  stateMutability: "view",
10401
11846
  type: "function",
10402
- constant: true,
10403
11847
  signature: "0x10a9de60",
10404
11848
  },
10405
11849
  {
@@ -10414,7 +11858,6 @@ const _abi = [
10414
11858
  ],
10415
11859
  stateMutability: "view",
10416
11860
  type: "function",
10417
- constant: true,
10418
11861
  signature: "0x40884c52",
10419
11862
  },
10420
11863
  {
@@ -10435,7 +11878,6 @@ const _abi = [
10435
11878
  ],
10436
11879
  stateMutability: "view",
10437
11880
  type: "function",
10438
- constant: true,
10439
11881
  signature: "0x88b12d55",
10440
11882
  },
10441
11883
  {
@@ -10445,6 +11887,11 @@ const _abi = [
10445
11887
  name: "_collateralIndex",
10446
11888
  type: "uint8",
10447
11889
  },
11890
+ {
11891
+ internalType: "address",
11892
+ name: "_trader",
11893
+ type: "address",
11894
+ },
10448
11895
  {
10449
11896
  internalType: "uint16",
10450
11897
  name: "_pairIndex",
@@ -10487,7 +11934,7 @@ const _abi = [
10487
11934
  outputs: [],
10488
11935
  stateMutability: "nonpayable",
10489
11936
  type: "function",
10490
- signature: "0xf51d0dc0",
11937
+ signature: "0x10d86d65",
10491
11938
  },
10492
11939
  {
10493
11940
  inputs: [
@@ -10539,7 +11986,6 @@ const _abi = [
10539
11986
  ],
10540
11987
  stateMutability: "view",
10541
11988
  type: "function",
10542
- constant: true,
10543
11989
  signature: "0x7d0fcd1e",
10544
11990
  },
10545
11991
  {
@@ -10594,656 +12040,389 @@ const _abi = [
10594
12040
  ],
10595
12041
  stateMutability: "view",
10596
12042
  type: "function",
10597
- constant: true,
10598
- signature: "0x9f62038f",
10599
- },
10600
- {
10601
- inputs: [],
10602
- name: "getRequestCount",
10603
- outputs: [
10604
- {
10605
- internalType: "uint256",
10606
- name: "",
10607
- type: "uint256",
10608
- },
10609
- ],
10610
- stateMutability: "view",
10611
- type: "function",
10612
- constant: true,
10613
- signature: "0x3fad1834",
10614
- },
10615
- {
10616
- inputs: [],
10617
- name: "getTwapInterval",
10618
- outputs: [
10619
- {
10620
- internalType: "uint24",
10621
- name: "",
10622
- type: "uint24",
10623
- },
10624
- ],
10625
- stateMutability: "view",
10626
- type: "function",
10627
- constant: true,
10628
- signature: "0x3e742e3b",
10629
- },
10630
- {
10631
- inputs: [
10632
- {
10633
- internalType: "uint8",
10634
- name: "_collateralIndex",
10635
- type: "uint8",
10636
- },
10637
- {
10638
- internalType: "uint256",
10639
- name: "_collateralValue",
10640
- type: "uint256",
10641
- },
10642
- ],
10643
- name: "getUsdNormalizedValue",
10644
- outputs: [
10645
- {
10646
- internalType: "uint256",
10647
- name: "",
10648
- type: "uint256",
10649
- },
10650
- ],
10651
- stateMutability: "view",
10652
- type: "function",
10653
- constant: true,
10654
- signature: "0xbbad411a",
10655
- },
10656
- {
10657
- inputs: [
10658
- {
10659
- internalType: "address",
10660
- name: "_linkToken",
10661
- type: "address",
10662
- },
10663
- {
10664
- internalType: "contract IChainlinkFeed",
10665
- name: "_linkUsdPriceFeed",
10666
- type: "address",
10667
- },
10668
- {
10669
- internalType: "uint24",
10670
- name: "_twapInterval",
10671
- type: "uint24",
10672
- },
10673
- {
10674
- internalType: "uint8",
10675
- name: "_minAnswers",
10676
- type: "uint8",
10677
- },
10678
- {
10679
- internalType: "address[]",
10680
- name: "_nodes",
10681
- type: "address[]",
10682
- },
10683
- {
10684
- internalType: "bytes32[2]",
10685
- name: "_jobIds",
10686
- type: "bytes32[2]",
10687
- },
10688
- {
10689
- internalType: "uint8[]",
10690
- name: "_collateralIndices",
10691
- type: "uint8[]",
10692
- },
10693
- {
10694
- internalType: "contract IUniswapV3Pool[]",
10695
- name: "_gnsCollateralUniV3Pools",
10696
- type: "address[]",
10697
- },
10698
- {
10699
- internalType: "contract IChainlinkFeed[]",
10700
- name: "_collateralUsdPriceFeeds",
10701
- type: "address[]",
10702
- },
10703
- ],
10704
- name: "initializePriceAggregator",
10705
- outputs: [],
10706
- stateMutability: "nonpayable",
10707
- type: "function",
10708
- signature: "0x488b411a",
10709
- },
10710
- {
10711
- inputs: [
10712
- {
10713
- internalType: "uint256",
10714
- name: "_index",
10715
- type: "uint256",
10716
- },
10717
- ],
10718
- name: "removeOracle",
10719
- outputs: [],
10720
- stateMutability: "nonpayable",
10721
- type: "function",
10722
- signature: "0x80935dbf",
10723
- },
10724
- {
10725
- inputs: [
10726
- {
10727
- internalType: "uint256",
10728
- name: "_index",
10729
- type: "uint256",
10730
- },
10731
- {
10732
- internalType: "address",
10733
- name: "_a",
10734
- type: "address",
10735
- },
10736
- ],
10737
- name: "replaceOracle",
10738
- outputs: [],
10739
- stateMutability: "nonpayable",
10740
- type: "function",
10741
- signature: "0x25e589cd",
10742
- },
10743
- {
10744
- inputs: [
10745
- {
10746
- internalType: "bytes32",
10747
- name: "_jobId",
10748
- type: "bytes32",
10749
- },
10750
- ],
10751
- name: "setLimitJobId",
10752
- outputs: [],
10753
- stateMutability: "nonpayable",
10754
- type: "function",
10755
- signature: "0xe0bb91c2",
10756
- },
10757
- {
10758
- inputs: [
10759
- {
10760
- internalType: "bytes32",
10761
- name: "_jobId",
10762
- type: "bytes32",
10763
- },
10764
- ],
10765
- name: "setMarketJobId",
10766
- outputs: [],
10767
- stateMutability: "nonpayable",
10768
- type: "function",
10769
- signature: "0x85f276b8",
10770
- },
10771
- {
10772
- inputs: [
10773
- {
10774
- internalType: "uint8",
10775
- name: "_collateralIndex",
10776
- type: "uint8",
10777
- },
10778
- {
10779
- internalType: "contract IUniswapV3Pool",
10780
- name: "_uniV3Pool",
10781
- type: "address",
10782
- },
10783
- ],
10784
- name: "updateCollateralGnsUniV3Pool",
10785
- outputs: [],
10786
- stateMutability: "nonpayable",
10787
- type: "function",
10788
- signature: "0xea06d1bd",
10789
- },
10790
- {
10791
- inputs: [
10792
- {
10793
- internalType: "uint8",
10794
- name: "_collateralIndex",
10795
- type: "uint8",
10796
- },
10797
- {
10798
- internalType: "contract IChainlinkFeed",
10799
- name: "_value",
10800
- type: "address",
10801
- },
10802
- ],
10803
- name: "updateCollateralUsdPriceFeed",
10804
- outputs: [],
10805
- stateMutability: "nonpayable",
10806
- type: "function",
10807
- signature: "0xc07d2844",
10808
- },
10809
- {
10810
- inputs: [
10811
- {
10812
- internalType: "contract IChainlinkFeed",
10813
- name: "_value",
10814
- type: "address",
10815
- },
10816
- ],
10817
- name: "updateLinkUsdPriceFeed",
10818
- outputs: [],
10819
- stateMutability: "nonpayable",
10820
- type: "function",
10821
- signature: "0x5beda778",
10822
- },
10823
- {
10824
- inputs: [
10825
- {
10826
- internalType: "uint8",
10827
- name: "_value",
10828
- type: "uint8",
10829
- },
10830
- ],
10831
- name: "updateMinAnswers",
10832
- outputs: [],
10833
- stateMutability: "nonpayable",
10834
- type: "function",
10835
- signature: "0x44eb8ba6",
12043
+ signature: "0x9f62038f",
10836
12044
  },
10837
12045
  {
10838
- inputs: [
12046
+ inputs: [],
12047
+ name: "getRequestCount",
12048
+ outputs: [
10839
12049
  {
10840
- internalType: "uint24",
10841
- name: "_twapInterval",
10842
- type: "uint24",
12050
+ internalType: "uint256",
12051
+ name: "",
12052
+ type: "uint256",
10843
12053
  },
10844
12054
  ],
10845
- name: "updateTwapInterval",
10846
- outputs: [],
10847
- stateMutability: "nonpayable",
12055
+ stateMutability: "view",
10848
12056
  type: "function",
10849
- signature: "0xb166a495",
10850
- },
10851
- {
10852
- inputs: [],
10853
- name: "Incomplete",
10854
- type: "error",
10855
- },
10856
- {
10857
- inputs: [],
10858
- name: "InvalidCollateral",
10859
- type: "error",
10860
- },
10861
- {
10862
- inputs: [],
10863
- name: "InvalidMaxIndex",
10864
- type: "error",
10865
- },
10866
- {
10867
- inputs: [],
10868
- name: "StateAlreadyCopied",
10869
- type: "error",
10870
- },
10871
- {
10872
- inputs: [],
10873
- name: "TradingNotPaused",
10874
- type: "error",
12057
+ signature: "0x3fad1834",
10875
12058
  },
10876
12059
  {
10877
12060
  inputs: [],
10878
- name: "UnknownChain",
10879
- type: "error",
10880
- },
10881
- {
10882
- anonymous: false,
10883
- inputs: [
10884
- {
10885
- indexed: false,
10886
- internalType: "uint8",
10887
- name: "collateralIndex",
10888
- type: "uint8",
10889
- },
12061
+ name: "getTwapInterval",
12062
+ outputs: [
10890
12063
  {
10891
- indexed: false,
10892
- internalType: "uint16",
10893
- name: "groupsCount",
10894
- type: "uint16",
12064
+ internalType: "uint24",
12065
+ name: "",
12066
+ type: "uint24",
10895
12067
  },
10896
12068
  ],
10897
- name: "BorrowingFeesGroupsCopied",
10898
- type: "event",
10899
- signature: "0x1b43c788d4b7cc12f87bcc2d82bb79af4e020b6ce5873073dd03aeeb260f9193",
12069
+ stateMutability: "view",
12070
+ type: "function",
12071
+ signature: "0x3e742e3b",
10900
12072
  },
10901
12073
  {
10902
- anonymous: false,
10903
12074
  inputs: [
10904
12075
  {
10905
- indexed: false,
10906
12076
  internalType: "uint8",
10907
- name: "collateralIndex",
12077
+ name: "_collateralIndex",
10908
12078
  type: "uint8",
10909
12079
  },
10910
12080
  {
10911
- indexed: false,
10912
12081
  internalType: "uint256",
10913
- name: "pairsCount",
12082
+ name: "_collateralValue",
10914
12083
  type: "uint256",
10915
12084
  },
10916
12085
  ],
10917
- name: "BorrowingFeesPairOisCopied",
10918
- type: "event",
10919
- signature: "0x8140b9f8c050d5c619189c1086a0b71e37f7a64570832aa99630e213bc573db3",
10920
- },
10921
- {
10922
- anonymous: false,
10923
- inputs: [
10924
- {
10925
- indexed: false,
10926
- internalType: "uint8",
10927
- name: "collateralIndex",
10928
- type: "uint8",
10929
- },
12086
+ name: "getUsdNormalizedValue",
12087
+ outputs: [
10930
12088
  {
10931
- indexed: false,
10932
12089
  internalType: "uint256",
10933
- name: "pairsCount",
12090
+ name: "",
10934
12091
  type: "uint256",
10935
12092
  },
10936
12093
  ],
10937
- name: "BorrowingFeesPairsCopied",
10938
- type: "event",
10939
- signature: "0x8d288d49f0d1e6f6c794cbf2878b79d58f15aea64cba568a9eb161f220ce4e9c",
12094
+ stateMutability: "view",
12095
+ type: "function",
12096
+ signature: "0xbbad411a",
10940
12097
  },
10941
12098
  {
10942
- anonymous: false,
10943
12099
  inputs: [
10944
12100
  {
10945
- indexed: false,
10946
- internalType: "uint8",
10947
- name: "collateralIndex",
10948
- type: "uint8",
12101
+ internalType: "address",
12102
+ name: "_linkToken",
12103
+ type: "address",
10949
12104
  },
10950
12105
  {
10951
- indexed: false,
10952
- internalType: "uint256",
10953
- name: "balance",
10954
- type: "uint256",
12106
+ internalType: "contract IChainlinkFeed",
12107
+ name: "_linkUsdPriceFeed",
12108
+ type: "address",
10955
12109
  },
10956
12110
  {
10957
- indexed: false,
10958
- internalType: "uint256",
10959
- name: "govFees",
10960
- type: "uint256",
12111
+ internalType: "uint24",
12112
+ name: "_twapInterval",
12113
+ type: "uint24",
10961
12114
  },
10962
- ],
10963
- name: "CollateralTransferred",
10964
- type: "event",
10965
- signature: "0x9c480fe4b458d282b357cd084719069ad52a0f61b3cad1a5404cad84275df95d",
10966
- },
10967
- {
10968
- anonymous: false,
10969
- inputs: [
10970
12115
  {
10971
- indexed: false,
10972
12116
  internalType: "uint8",
10973
- name: "collateralIndex",
12117
+ name: "_minAnswers",
10974
12118
  type: "uint8",
10975
12119
  },
10976
12120
  {
10977
- indexed: false,
10978
- internalType: "address",
10979
- name: "trader",
10980
- type: "address",
10981
- },
10982
- {
10983
- indexed: false,
10984
- internalType: "uint256",
10985
- name: "pairIndex",
10986
- type: "uint256",
12121
+ internalType: "address[]",
12122
+ name: "_nodes",
12123
+ type: "address[]",
10987
12124
  },
10988
12125
  {
10989
- indexed: false,
10990
- internalType: "uint256",
10991
- name: "index",
10992
- type: "uint256",
12126
+ internalType: "bytes32[2]",
12127
+ name: "_jobIds",
12128
+ type: "bytes32[2]",
10993
12129
  },
10994
- ],
10995
- name: "LegacyLimitOrderSkipped",
10996
- type: "event",
10997
- signature: "0xe2db30bf307122de186fe744495a674e475b322106bcd2258de1ec674a72204f",
10998
- },
10999
- {
11000
- anonymous: false,
11001
- inputs: [
11002
12130
  {
11003
- indexed: false,
11004
- internalType: "uint8",
11005
- name: "collateralIndex",
11006
- type: "uint8",
12131
+ internalType: "uint8[]",
12132
+ name: "_collateralIndices",
12133
+ type: "uint8[]",
11007
12134
  },
11008
12135
  {
11009
- indexed: false,
11010
- internalType: "uint256",
11011
- name: "fromIndex",
11012
- type: "uint256",
12136
+ components: [
12137
+ {
12138
+ internalType: "contract ILiquidityPool",
12139
+ name: "pool",
12140
+ type: "address",
12141
+ },
12142
+ {
12143
+ internalType: "enum IPriceAggregator.PoolType",
12144
+ name: "poolType",
12145
+ type: "uint8",
12146
+ },
12147
+ ],
12148
+ internalType: "struct IPriceAggregator.LiquidityPoolInput[]",
12149
+ name: "_gnsCollateralLiquidityPools",
12150
+ type: "tuple[]",
11013
12151
  },
11014
12152
  {
11015
- indexed: false,
11016
- internalType: "uint256",
11017
- name: "toIndex",
11018
- type: "uint256",
12153
+ internalType: "contract IChainlinkFeed[]",
12154
+ name: "_collateralUsdPriceFeeds",
12155
+ type: "address[]",
11019
12156
  },
11020
12157
  ],
11021
- name: "LimitsCopied",
11022
- type: "event",
11023
- signature: "0x964a4bb7d7d1ffdcfef28a704276aaaf213b8f4661869e1da12a78f7aafb7ece",
12158
+ name: "initializePriceAggregator",
12159
+ outputs: [],
12160
+ stateMutability: "nonpayable",
12161
+ type: "function",
12162
+ signature: "0xf1dd8b66",
11024
12163
  },
11025
12164
  {
11026
- anonymous: false,
11027
12165
  inputs: [
11028
12166
  {
11029
- indexed: false,
11030
- internalType: "uint8",
11031
- name: "collateralIndex",
11032
- type: "uint8",
12167
+ internalType: "uint256",
12168
+ name: "_index",
12169
+ type: "uint256",
11033
12170
  },
11034
12171
  ],
11035
- name: "MarkedAsDone",
11036
- type: "event",
11037
- signature: "0x3fc951e21ca09685afb9ddb09ddc070bcc0a4df5a83e30e9d89c8d8dfae44e9b",
12172
+ name: "removeOracle",
12173
+ outputs: [],
12174
+ stateMutability: "nonpayable",
12175
+ type: "function",
12176
+ signature: "0x80935dbf",
11038
12177
  },
11039
12178
  {
11040
- anonymous: false,
11041
12179
  inputs: [
11042
12180
  {
11043
- indexed: false,
11044
- internalType: "uint8",
11045
- name: "collateralIndex",
11046
- type: "uint8",
11047
- },
11048
- {
11049
- indexed: false,
11050
12181
  internalType: "uint256",
11051
- name: "pairIndex",
12182
+ name: "_index",
11052
12183
  type: "uint256",
11053
12184
  },
11054
12185
  {
11055
- indexed: false,
11056
- internalType: "uint256",
11057
- name: "tradersCount",
11058
- type: "uint256",
12186
+ internalType: "address",
12187
+ name: "_a",
12188
+ type: "address",
11059
12189
  },
11060
12190
  ],
11061
- name: "PairTradesCopied",
11062
- type: "event",
11063
- signature: "0x7b6ebdacba0b68936d0a6c968dcb4b94361854c8bbbb9cbf7c4089b21309e1ac",
12191
+ name: "replaceOracle",
12192
+ outputs: [],
12193
+ stateMutability: "nonpayable",
12194
+ type: "function",
12195
+ signature: "0x25e589cd",
11064
12196
  },
11065
12197
  {
11066
- anonymous: false,
11067
12198
  inputs: [
11068
12199
  {
11069
- indexed: false,
11070
- internalType: "uint8",
11071
- name: "collateralIndex",
11072
- type: "uint8",
11073
- },
11074
- {
11075
- indexed: false,
11076
- internalType: "address",
11077
- name: "trader",
11078
- type: "address",
11079
- },
11080
- {
11081
- indexed: false,
11082
- internalType: "uint256",
11083
- name: "pairIndex",
11084
- type: "uint256",
11085
- },
11086
- {
11087
- indexed: false,
11088
- internalType: "uint256",
11089
- name: "prevIndex",
11090
- type: "uint256",
12200
+ internalType: "bytes32",
12201
+ name: "_jobId",
12202
+ type: "bytes32",
11091
12203
  },
12204
+ ],
12205
+ name: "setLimitJobId",
12206
+ outputs: [],
12207
+ stateMutability: "nonpayable",
12208
+ type: "function",
12209
+ signature: "0xe0bb91c2",
12210
+ },
12211
+ {
12212
+ inputs: [
11092
12213
  {
11093
- indexed: false,
11094
- internalType: "uint256",
11095
- name: "newIndex",
11096
- type: "uint256",
12214
+ internalType: "bytes32",
12215
+ name: "_jobId",
12216
+ type: "bytes32",
11097
12217
  },
11098
12218
  ],
11099
- name: "TradeCopied",
11100
- type: "event",
11101
- signature: "0x9a2e687f2e96cb6af8f2dc868ea2def2f6e7ceae23735aae78c25c8ab0c8a81b",
12219
+ name: "setMarketJobId",
12220
+ outputs: [],
12221
+ stateMutability: "nonpayable",
12222
+ type: "function",
12223
+ signature: "0x85f276b8",
11102
12224
  },
11103
12225
  {
11104
- anonymous: false,
11105
12226
  inputs: [
11106
12227
  {
11107
- indexed: false,
11108
12228
  internalType: "uint8",
11109
- name: "collateralIndex",
12229
+ name: "_collateralIndex",
11110
12230
  type: "uint8",
11111
12231
  },
11112
12232
  {
11113
- indexed: false,
11114
- internalType: "uint256",
11115
- name: "tradersCount",
11116
- type: "uint256",
12233
+ components: [
12234
+ {
12235
+ internalType: "contract ILiquidityPool",
12236
+ name: "pool",
12237
+ type: "address",
12238
+ },
12239
+ {
12240
+ internalType: "enum IPriceAggregator.PoolType",
12241
+ name: "poolType",
12242
+ type: "uint8",
12243
+ },
12244
+ ],
12245
+ internalType: "struct IPriceAggregator.LiquidityPoolInput",
12246
+ name: "_liquidityPoolInput",
12247
+ type: "tuple",
11117
12248
  },
11118
12249
  ],
11119
- name: "TraderDelegationsCopied",
11120
- type: "event",
11121
- signature: "0x0b9649501e0355375bdfcd349c799126512858a0791e564ebadee948941c799d",
12250
+ name: "updateCollateralGnsLiquidityPool",
12251
+ outputs: [],
12252
+ stateMutability: "nonpayable",
12253
+ type: "function",
12254
+ signature: "0x2caa6f8a",
11122
12255
  },
11123
12256
  {
11124
- anonymous: false,
11125
12257
  inputs: [
11126
12258
  {
11127
- indexed: false,
11128
12259
  internalType: "uint8",
11129
- name: "collateralIndex",
12260
+ name: "_collateralIndex",
11130
12261
  type: "uint8",
11131
12262
  },
11132
12263
  {
11133
- indexed: false,
11134
- internalType: "uint16",
11135
- name: "fromPairIndex",
11136
- type: "uint16",
11137
- },
11138
- {
11139
- indexed: false,
11140
- internalType: "uint16",
11141
- name: "toPairIndex",
11142
- type: "uint16",
12264
+ internalType: "contract IChainlinkFeed",
12265
+ name: "_value",
12266
+ type: "address",
11143
12267
  },
11144
12268
  ],
11145
- name: "TradesCopied",
11146
- type: "event",
11147
- signature: "0xbed7a2543d6e2b6b127e58a1c8224d7e8e2b05db57afeaafdcd3bf5e98a25c5b",
12269
+ name: "updateCollateralUsdPriceFeed",
12270
+ outputs: [],
12271
+ stateMutability: "nonpayable",
12272
+ type: "function",
12273
+ signature: "0xc07d2844",
11148
12274
  },
11149
12275
  {
11150
12276
  inputs: [
11151
12277
  {
11152
- internalType: "uint8",
11153
- name: "_collateralIndex",
11154
- type: "uint8",
11155
- },
11156
- {
11157
- internalType: "address[]",
11158
- name: "_traders",
11159
- type: "address[]",
12278
+ internalType: "contract IChainlinkFeed",
12279
+ name: "_value",
12280
+ type: "address",
11160
12281
  },
11161
12282
  ],
11162
- name: "copyAllState",
12283
+ name: "updateLinkUsdPriceFeed",
11163
12284
  outputs: [],
11164
12285
  stateMutability: "nonpayable",
11165
12286
  type: "function",
11166
- signature: "0x16d6761c",
12287
+ signature: "0x5beda778",
11167
12288
  },
11168
12289
  {
11169
12290
  inputs: [
11170
12291
  {
11171
12292
  internalType: "uint8",
11172
- name: "_collateralIndex",
12293
+ name: "_value",
11173
12294
  type: "uint8",
11174
12295
  },
11175
12296
  ],
11176
- name: "copyBorrowingFeesGroups",
12297
+ name: "updateMinAnswers",
11177
12298
  outputs: [],
11178
12299
  stateMutability: "nonpayable",
11179
12300
  type: "function",
11180
- signature: "0xbb28454e",
12301
+ signature: "0x44eb8ba6",
11181
12302
  },
11182
12303
  {
11183
12304
  inputs: [
11184
12305
  {
11185
- internalType: "uint8",
11186
- name: "_collateralIndex",
11187
- type: "uint8",
12306
+ internalType: "uint24",
12307
+ name: "_twapInterval",
12308
+ type: "uint24",
11188
12309
  },
11189
12310
  ],
11190
- name: "copyBorrowingFeesPairs",
12311
+ name: "updateTwapInterval",
11191
12312
  outputs: [],
11192
12313
  stateMutability: "nonpayable",
11193
12314
  type: "function",
11194
- signature: "0xf1234caa",
12315
+ signature: "0xb166a495",
12316
+ },
12317
+ {
12318
+ inputs: [],
12319
+ name: "InvalidShareSum",
12320
+ type: "error",
11195
12321
  },
11196
12322
  {
12323
+ anonymous: false,
11197
12324
  inputs: [
11198
12325
  {
12326
+ indexed: true,
11199
12327
  internalType: "uint8",
11200
- name: "_collateralIndex",
12328
+ name: "collateralIndex",
11201
12329
  type: "uint8",
11202
12330
  },
11203
12331
  {
12332
+ indexed: false,
11204
12333
  internalType: "uint256",
11205
- name: "_maxIndex",
12334
+ name: "balanceCollateral",
11206
12335
  type: "uint256",
11207
12336
  },
11208
12337
  ],
11209
- name: "copyLimits",
11210
- outputs: [],
11211
- stateMutability: "nonpayable",
11212
- type: "function",
11213
- signature: "0xa2da5cba",
12338
+ name: "OtcBalanceUpdated",
12339
+ type: "event",
12340
+ signature: "0x8d9467a44ee925421a7b8bcb0b7a92c4adc261c218b290e799b14630ac940b2a",
11214
12341
  },
11215
12342
  {
12343
+ anonymous: false,
11216
12344
  inputs: [
11217
12345
  {
11218
- internalType: "uint8",
11219
- name: "_collateralIndex",
11220
- type: "uint8",
12346
+ components: [
12347
+ {
12348
+ internalType: "address",
12349
+ name: "gnsTreasury",
12350
+ type: "address",
12351
+ },
12352
+ {
12353
+ internalType: "uint64",
12354
+ name: "treasuryShareP",
12355
+ type: "uint64",
12356
+ },
12357
+ {
12358
+ internalType: "uint64",
12359
+ name: "stakingShareP",
12360
+ type: "uint64",
12361
+ },
12362
+ {
12363
+ internalType: "uint64",
12364
+ name: "burnShareP",
12365
+ type: "uint64",
12366
+ },
12367
+ {
12368
+ internalType: "uint64",
12369
+ name: "premiumP",
12370
+ type: "uint64",
12371
+ },
12372
+ ],
12373
+ indexed: false,
12374
+ internalType: "struct IOtc.OtcConfig",
12375
+ name: "config",
12376
+ type: "tuple",
11221
12377
  },
11222
12378
  ],
11223
- name: "copyPairOis",
11224
- outputs: [],
11225
- stateMutability: "nonpayable",
11226
- type: "function",
11227
- signature: "0xb9fa5364",
12379
+ name: "OtcConfigUpdated",
12380
+ type: "event",
12381
+ signature: "0x8b0fa5246ac429f9dd5a918b5407b1c7d0d2e21903d0a690b811e97cdb1fff80",
11228
12382
  },
11229
12383
  {
12384
+ anonymous: false,
11230
12385
  inputs: [
11231
12386
  {
12387
+ indexed: true,
11232
12388
  internalType: "uint8",
11233
- name: "_collateralIndex",
12389
+ name: "collateralIndex",
11234
12390
  type: "uint8",
11235
12391
  },
11236
12392
  {
11237
- internalType: "address[]",
11238
- name: "_traders",
11239
- type: "address[]",
12393
+ indexed: false,
12394
+ internalType: "uint256",
12395
+ name: "collateralAmount",
12396
+ type: "uint256",
12397
+ },
12398
+ {
12399
+ indexed: false,
12400
+ internalType: "uint256",
12401
+ name: "gnsPriceCollateral",
12402
+ type: "uint256",
12403
+ },
12404
+ {
12405
+ indexed: false,
12406
+ internalType: "uint256",
12407
+ name: "treasuryAmountGns",
12408
+ type: "uint256",
12409
+ },
12410
+ {
12411
+ indexed: false,
12412
+ internalType: "uint256",
12413
+ name: "stakingAmountGns",
12414
+ type: "uint256",
12415
+ },
12416
+ {
12417
+ indexed: false,
12418
+ internalType: "uint256",
12419
+ name: "burnAmountGns",
12420
+ type: "uint256",
11240
12421
  },
11241
12422
  ],
11242
- name: "copyTraderDelegations",
11243
- outputs: [],
11244
- stateMutability: "nonpayable",
11245
- type: "function",
11246
- signature: "0x2041cb92",
12423
+ name: "OtcExecuted",
12424
+ type: "event",
12425
+ signature: "0x946f4776eb5a3c4119694bcd42c3ac90e75160db79b8009a9e7748ed7599d110",
11247
12426
  },
11248
12427
  {
11249
12428
  inputs: [
@@ -11253,16 +12432,16 @@ const _abi = [
11253
12432
  type: "uint8",
11254
12433
  },
11255
12434
  {
11256
- internalType: "uint16",
11257
- name: "_maxPairIndex",
11258
- type: "uint16",
12435
+ internalType: "uint256",
12436
+ name: "_collateralAmount",
12437
+ type: "uint256",
11259
12438
  },
11260
12439
  ],
11261
- name: "copyTrades",
12440
+ name: "addOtcCollateralBalance",
11262
12441
  outputs: [],
11263
12442
  stateMutability: "nonpayable",
11264
12443
  type: "function",
11265
- signature: "0xf3828168",
12444
+ signature: "0x11d8818d",
11266
12445
  },
11267
12446
  {
11268
12447
  inputs: [
@@ -11271,23 +12450,59 @@ const _abi = [
11271
12450
  name: "_collateralIndex",
11272
12451
  type: "uint8",
11273
12452
  },
12453
+ ],
12454
+ name: "getOtcBalance",
12455
+ outputs: [
11274
12456
  {
11275
- internalType: "enum ITradingStateCopy.COPY_STAGE",
11276
- name: "_stage",
11277
- type: "uint8",
12457
+ internalType: "uint256",
12458
+ name: "",
12459
+ type: "uint256",
11278
12460
  },
11279
12461
  ],
11280
- name: "getCollateralStageState",
12462
+ stateMutability: "view",
12463
+ type: "function",
12464
+ signature: "0x2b08f467",
12465
+ },
12466
+ {
12467
+ inputs: [],
12468
+ name: "getOtcConfig",
11281
12469
  outputs: [
11282
12470
  {
11283
- internalType: "bool",
12471
+ components: [
12472
+ {
12473
+ internalType: "address",
12474
+ name: "gnsTreasury",
12475
+ type: "address",
12476
+ },
12477
+ {
12478
+ internalType: "uint64",
12479
+ name: "treasuryShareP",
12480
+ type: "uint64",
12481
+ },
12482
+ {
12483
+ internalType: "uint64",
12484
+ name: "stakingShareP",
12485
+ type: "uint64",
12486
+ },
12487
+ {
12488
+ internalType: "uint64",
12489
+ name: "burnShareP",
12490
+ type: "uint64",
12491
+ },
12492
+ {
12493
+ internalType: "uint64",
12494
+ name: "premiumP",
12495
+ type: "uint64",
12496
+ },
12497
+ ],
12498
+ internalType: "struct IOtc.OtcConfig",
11284
12499
  name: "",
11285
- type: "bool",
12500
+ type: "tuple",
11286
12501
  },
11287
12502
  ],
11288
12503
  stateMutability: "view",
11289
12504
  type: "function",
11290
- signature: "0x3298c266",
12505
+ signature: "0xb79de3b3",
11291
12506
  },
11292
12507
  {
11293
12508
  inputs: [
@@ -11297,27 +12512,58 @@ const _abi = [
11297
12512
  type: "uint8",
11298
12513
  },
11299
12514
  ],
11300
- name: "getCollateralState",
12515
+ name: "getOtcRate",
11301
12516
  outputs: [
11302
- {
11303
- internalType: "enum ITradingStateCopy.COPY_STATE",
11304
- name: "",
11305
- type: "uint8",
11306
- },
11307
12517
  {
11308
12518
  internalType: "uint256",
11309
12519
  name: "",
11310
12520
  type: "uint256",
11311
12521
  },
12522
+ ],
12523
+ stateMutability: "view",
12524
+ type: "function",
12525
+ signature: "0xa98113e0",
12526
+ },
12527
+ {
12528
+ inputs: [
11312
12529
  {
11313
- internalType: "uint16",
11314
- name: "",
11315
- type: "uint16",
12530
+ components: [
12531
+ {
12532
+ internalType: "address",
12533
+ name: "gnsTreasury",
12534
+ type: "address",
12535
+ },
12536
+ {
12537
+ internalType: "uint64",
12538
+ name: "treasuryShareP",
12539
+ type: "uint64",
12540
+ },
12541
+ {
12542
+ internalType: "uint64",
12543
+ name: "stakingShareP",
12544
+ type: "uint64",
12545
+ },
12546
+ {
12547
+ internalType: "uint64",
12548
+ name: "burnShareP",
12549
+ type: "uint64",
12550
+ },
12551
+ {
12552
+ internalType: "uint64",
12553
+ name: "premiumP",
12554
+ type: "uint64",
12555
+ },
12556
+ ],
12557
+ internalType: "struct IOtc.OtcConfig",
12558
+ name: "_config",
12559
+ type: "tuple",
11316
12560
  },
11317
12561
  ],
11318
- stateMutability: "view",
12562
+ name: "initializeOtc",
12563
+ outputs: [],
12564
+ stateMutability: "nonpayable",
11319
12565
  type: "function",
11320
- signature: "0xcf4bb1a9",
12566
+ signature: "0x92c02720",
11321
12567
  },
11322
12568
  {
11323
12569
  inputs: [
@@ -11326,26 +12572,58 @@ const _abi = [
11326
12572
  name: "_collateralIndex",
11327
12573
  type: "uint8",
11328
12574
  },
12575
+ {
12576
+ internalType: "uint256",
12577
+ name: "_collateralAmount",
12578
+ type: "uint256",
12579
+ },
11329
12580
  ],
11330
- name: "markAsDone",
12581
+ name: "sellGnsForCollateral",
11331
12582
  outputs: [],
11332
12583
  stateMutability: "nonpayable",
11333
12584
  type: "function",
11334
- signature: "0xd7a5d283",
12585
+ signature: "0x2b381b1e",
11335
12586
  },
11336
12587
  {
11337
12588
  inputs: [
11338
12589
  {
11339
- internalType: "uint8",
11340
- name: "_collateralIndex",
11341
- type: "uint8",
12590
+ components: [
12591
+ {
12592
+ internalType: "address",
12593
+ name: "gnsTreasury",
12594
+ type: "address",
12595
+ },
12596
+ {
12597
+ internalType: "uint64",
12598
+ name: "treasuryShareP",
12599
+ type: "uint64",
12600
+ },
12601
+ {
12602
+ internalType: "uint64",
12603
+ name: "stakingShareP",
12604
+ type: "uint64",
12605
+ },
12606
+ {
12607
+ internalType: "uint64",
12608
+ name: "burnShareP",
12609
+ type: "uint64",
12610
+ },
12611
+ {
12612
+ internalType: "uint64",
12613
+ name: "premiumP",
12614
+ type: "uint64",
12615
+ },
12616
+ ],
12617
+ internalType: "struct IOtc.OtcConfig",
12618
+ name: "_config",
12619
+ type: "tuple",
11342
12620
  },
11343
12621
  ],
11344
- name: "transferBalance",
12622
+ name: "updateOtcConfig",
11345
12623
  outputs: [],
11346
12624
  stateMutability: "nonpayable",
11347
12625
  type: "function",
11348
- signature: "0xf01162c3",
12626
+ signature: "0xc4999547",
11349
12627
  },
11350
12628
  ];
11351
12629
  class GNSMultiCollatDiamond__factory {