@gainsnetwork/sdk 0.2.56-rc1 → 0.2.56-rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/constants.d.ts +4 -0
- package/lib/constants.js +6 -1
- package/lib/contracts/types/generated/GNSMultiCollatDiamond.d.ts +327 -7
- package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.js +508 -3
- package/lib/contracts/utils/borrowingFees.js +3 -1
- package/lib/contracts/utils/pairs.js +4 -0
- package/lib/trade/fees/borrowing/converter.d.ts +5 -3
- package/lib/trade/fees/borrowing/converter.js +8 -3
- package/lib/trade/fees/borrowing/index.d.ts +9 -4
- package/lib/trade/fees/borrowing/index.js +53 -11
- package/lib/trade/fees/borrowing/types.d.ts +5 -0
- package/lib/trade/types.d.ts +5 -1
- package/lib/trade/types.js +4 -0
- package/package.json +1 -1
- package/lib/contracts/types/generated/GFarmTradingStorageV5.d.ts +0 -1911
- package/lib/contracts/types/generated/GFarmTradingStorageV5.js +0 -2
- package/lib/contracts/types/generated/GNSBorrowingFees.d.ts +0 -1067
- package/lib/contracts/types/generated/GNSBorrowingFees.js +0 -2
- package/lib/contracts/types/generated/GNSNftRewardsV6.d.ts +0 -533
- package/lib/contracts/types/generated/GNSNftRewardsV6.js +0 -2
- package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.d.ts +0 -613
- package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.js +0 -2
- package/lib/contracts/types/generated/GNSTrading.d.ts +0 -758
- package/lib/contracts/types/generated/GNSTrading.js +0 -2
- package/lib/contracts/types/generated/GNSTradingCallbacks.d.ts +0 -875
- package/lib/contracts/types/generated/GNSTradingCallbacks.js +0 -2
- package/lib/contracts/types/generated/GNSTradingStorage.d.ts +0 -1387
- package/lib/contracts/types/generated/GNSTradingStorage.js +0 -2
- package/lib/contracts/types/generated/GTokenV6_3_2.d.ts +0 -1838
- package/lib/contracts/types/generated/GTokenV6_3_2.js +0 -2
- package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.d.ts +0 -83
- package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.js +0 -2691
- package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.d.ts +0 -124
- package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.js +0 -1784
- package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.d.ts +0 -100
- package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.js +0 -1116
- package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.d.ts +0 -100
- package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.js +0 -1003
- package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.d.ts +0 -113
- package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.js +0 -1428
- package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.d.ts +0 -96
- package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.js +0 -2241
- package/lib/contracts/types/generated/factories/GNSTrading__factory.d.ts +0 -95
- package/lib/contracts/types/generated/factories/GNSTrading__factory.js +0 -1071
- package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.d.ts +0 -110
- package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.js +0 -2682
- package/lib/contracts/utils/openLimitOrders.d.ts +0 -8
- package/lib/contracts/utils/openLimitOrders.js +0 -88
- package/lib/trade/openLimitOrder.d.ts +0 -2
- package/lib/trade/openLimitOrder.js +0 -23
|
@@ -62,6 +62,11 @@ const _abi = [
|
|
|
62
62
|
name: "InsufficientBalance",
|
|
63
63
|
type: "error",
|
|
64
64
|
},
|
|
65
|
+
{
|
|
66
|
+
inputs: [],
|
|
67
|
+
name: "InvalidAddress",
|
|
68
|
+
type: "error",
|
|
69
|
+
},
|
|
65
70
|
{
|
|
66
71
|
inputs: [],
|
|
67
72
|
name: "InvalidAddresses",
|
|
@@ -7907,6 +7912,11 @@ const _abi = [
|
|
|
7907
7912
|
name: "PriceZero",
|
|
7908
7913
|
type: "error",
|
|
7909
7914
|
},
|
|
7915
|
+
{
|
|
7916
|
+
inputs: [],
|
|
7917
|
+
name: "ReentrancyGuardReentrantCall",
|
|
7918
|
+
type: "error",
|
|
7919
|
+
},
|
|
7910
7920
|
{
|
|
7911
7921
|
inputs: [],
|
|
7912
7922
|
name: "WaitTimeout",
|
|
@@ -8610,6 +8620,11 @@ const _abi = [
|
|
|
8610
8620
|
name: "existingPnlCollateral",
|
|
8611
8621
|
type: "int256",
|
|
8612
8622
|
},
|
|
8623
|
+
{
|
|
8624
|
+
internalType: "uint256",
|
|
8625
|
+
name: "oldPosSizePlusPnlCollateral",
|
|
8626
|
+
type: "uint256",
|
|
8627
|
+
},
|
|
8613
8628
|
{
|
|
8614
8629
|
internalType: "uint256",
|
|
8615
8630
|
name: "newOpenPrice",
|
|
@@ -8644,7 +8659,7 @@ const _abi = [
|
|
|
8644
8659
|
],
|
|
8645
8660
|
name: "PositionSizeIncreaseExecuted",
|
|
8646
8661
|
type: "event",
|
|
8647
|
-
signature: "
|
|
8662
|
+
signature: "0x4627b6cfd38b837edb1d42b0c6c92e6ba06fded47652e32ce388fcaf3d513477",
|
|
8648
8663
|
},
|
|
8649
8664
|
{
|
|
8650
8665
|
anonymous: false,
|
|
@@ -8955,6 +8970,40 @@ const _abi = [
|
|
|
8955
8970
|
type: "function",
|
|
8956
8971
|
signature: "0x24058ad3",
|
|
8957
8972
|
},
|
|
8973
|
+
{
|
|
8974
|
+
inputs: [
|
|
8975
|
+
{
|
|
8976
|
+
internalType: "uint32",
|
|
8977
|
+
name: "_index",
|
|
8978
|
+
type: "uint32",
|
|
8979
|
+
},
|
|
8980
|
+
{
|
|
8981
|
+
internalType: "uint120",
|
|
8982
|
+
name: "_collateralDelta",
|
|
8983
|
+
type: "uint120",
|
|
8984
|
+
},
|
|
8985
|
+
{
|
|
8986
|
+
internalType: "uint24",
|
|
8987
|
+
name: "_leverageDelta",
|
|
8988
|
+
type: "uint24",
|
|
8989
|
+
},
|
|
8990
|
+
{
|
|
8991
|
+
internalType: "uint64",
|
|
8992
|
+
name: "_expectedPrice",
|
|
8993
|
+
type: "uint64",
|
|
8994
|
+
},
|
|
8995
|
+
{
|
|
8996
|
+
internalType: "uint16",
|
|
8997
|
+
name: "_maxSlippageP",
|
|
8998
|
+
type: "uint16",
|
|
8999
|
+
},
|
|
9000
|
+
],
|
|
9001
|
+
name: "increasePositionSizeNative",
|
|
9002
|
+
outputs: [],
|
|
9003
|
+
stateMutability: "payable",
|
|
9004
|
+
type: "function",
|
|
9005
|
+
signature: "0x731104ba",
|
|
9006
|
+
},
|
|
8958
9007
|
{
|
|
8959
9008
|
inputs: [
|
|
8960
9009
|
{
|
|
@@ -9250,6 +9299,25 @@ const _abi = [
|
|
|
9250
9299
|
type: "function",
|
|
9251
9300
|
signature: "0x0bce9aaa",
|
|
9252
9301
|
},
|
|
9302
|
+
{
|
|
9303
|
+
inputs: [
|
|
9304
|
+
{
|
|
9305
|
+
internalType: "uint32",
|
|
9306
|
+
name: "_index",
|
|
9307
|
+
type: "uint32",
|
|
9308
|
+
},
|
|
9309
|
+
{
|
|
9310
|
+
internalType: "uint24",
|
|
9311
|
+
name: "_newLeverage",
|
|
9312
|
+
type: "uint24",
|
|
9313
|
+
},
|
|
9314
|
+
],
|
|
9315
|
+
name: "updateLeverageNative",
|
|
9316
|
+
outputs: [],
|
|
9317
|
+
stateMutability: "payable",
|
|
9318
|
+
type: "function",
|
|
9319
|
+
signature: "0x0065efc8",
|
|
9320
|
+
},
|
|
9253
9321
|
{
|
|
9254
9322
|
inputs: [
|
|
9255
9323
|
{
|
|
@@ -10901,6 +10969,26 @@ const _abi = [
|
|
|
10901
10969
|
name: "BorrowingZeroGroup",
|
|
10902
10970
|
type: "error",
|
|
10903
10971
|
},
|
|
10972
|
+
{
|
|
10973
|
+
anonymous: false,
|
|
10974
|
+
inputs: [
|
|
10975
|
+
{
|
|
10976
|
+
indexed: false,
|
|
10977
|
+
internalType: "uint32",
|
|
10978
|
+
name: "minP",
|
|
10979
|
+
type: "uint32",
|
|
10980
|
+
},
|
|
10981
|
+
{
|
|
10982
|
+
indexed: false,
|
|
10983
|
+
internalType: "uint32",
|
|
10984
|
+
name: "maxP",
|
|
10985
|
+
type: "uint32",
|
|
10986
|
+
},
|
|
10987
|
+
],
|
|
10988
|
+
name: "BorrowingFeePerBlockCapUpdated",
|
|
10989
|
+
type: "event",
|
|
10990
|
+
signature: "0xca38800286190b44d87a61aaf551868afbd46f1f76ed5b145e4e975e446a2964",
|
|
10991
|
+
},
|
|
10904
10992
|
{
|
|
10905
10993
|
anonymous: false,
|
|
10906
10994
|
inputs: [
|
|
@@ -11115,6 +11203,38 @@ const _abi = [
|
|
|
11115
11203
|
type: "event",
|
|
11116
11204
|
signature: "0x12515cf8712ede0f0e48dd7513c14f22f116a6b3f95bd493da7511cf7dcbadd7",
|
|
11117
11205
|
},
|
|
11206
|
+
{
|
|
11207
|
+
anonymous: false,
|
|
11208
|
+
inputs: [
|
|
11209
|
+
{
|
|
11210
|
+
indexed: true,
|
|
11211
|
+
internalType: "uint8",
|
|
11212
|
+
name: "collateralIndex",
|
|
11213
|
+
type: "uint8",
|
|
11214
|
+
},
|
|
11215
|
+
{
|
|
11216
|
+
indexed: true,
|
|
11217
|
+
internalType: "uint16",
|
|
11218
|
+
name: "pairIndex",
|
|
11219
|
+
type: "uint16",
|
|
11220
|
+
},
|
|
11221
|
+
{
|
|
11222
|
+
indexed: false,
|
|
11223
|
+
internalType: "uint32",
|
|
11224
|
+
name: "minP",
|
|
11225
|
+
type: "uint32",
|
|
11226
|
+
},
|
|
11227
|
+
{
|
|
11228
|
+
indexed: false,
|
|
11229
|
+
internalType: "uint32",
|
|
11230
|
+
name: "maxP",
|
|
11231
|
+
type: "uint32",
|
|
11232
|
+
},
|
|
11233
|
+
],
|
|
11234
|
+
name: "BorrowingPairFeePerBlockCapUpdated",
|
|
11235
|
+
type: "event",
|
|
11236
|
+
signature: "0xf5413841beaa3a78d74ab0e0e7528e0f5d357a193b9f600eb87c8746475109f6",
|
|
11237
|
+
},
|
|
11118
11238
|
{
|
|
11119
11239
|
anonymous: false,
|
|
11120
11240
|
inputs: [
|
|
@@ -11417,6 +11537,32 @@ const _abi = [
|
|
|
11417
11537
|
type: "function",
|
|
11418
11538
|
signature: "0x48da5b38",
|
|
11419
11539
|
},
|
|
11540
|
+
{
|
|
11541
|
+
inputs: [],
|
|
11542
|
+
name: "getBorrowingFeePerBlockCap",
|
|
11543
|
+
outputs: [
|
|
11544
|
+
{
|
|
11545
|
+
components: [
|
|
11546
|
+
{
|
|
11547
|
+
internalType: "uint32",
|
|
11548
|
+
name: "minP",
|
|
11549
|
+
type: "uint32",
|
|
11550
|
+
},
|
|
11551
|
+
{
|
|
11552
|
+
internalType: "uint32",
|
|
11553
|
+
name: "maxP",
|
|
11554
|
+
type: "uint32",
|
|
11555
|
+
},
|
|
11556
|
+
],
|
|
11557
|
+
internalType: "struct IBorrowingFees.BorrowingFeePerBlockCap",
|
|
11558
|
+
name: "",
|
|
11559
|
+
type: "tuple",
|
|
11560
|
+
},
|
|
11561
|
+
],
|
|
11562
|
+
stateMutability: "view",
|
|
11563
|
+
type: "function",
|
|
11564
|
+
signature: "0x06c01bef",
|
|
11565
|
+
},
|
|
11420
11566
|
{
|
|
11421
11567
|
inputs: [
|
|
11422
11568
|
{
|
|
@@ -11548,7 +11694,12 @@ const _abi = [
|
|
|
11548
11694
|
},
|
|
11549
11695
|
{
|
|
11550
11696
|
internalType: "uint64",
|
|
11551
|
-
name: "
|
|
11697
|
+
name: "groupAccFeeLongDelta",
|
|
11698
|
+
type: "uint64",
|
|
11699
|
+
},
|
|
11700
|
+
{
|
|
11701
|
+
internalType: "uint64",
|
|
11702
|
+
name: "groupAccFeeShortDelta",
|
|
11552
11703
|
type: "uint64",
|
|
11553
11704
|
},
|
|
11554
11705
|
],
|
|
@@ -11739,6 +11890,80 @@ const _abi = [
|
|
|
11739
11890
|
type: "function",
|
|
11740
11891
|
signature: "0x5d5bf24d",
|
|
11741
11892
|
},
|
|
11893
|
+
{
|
|
11894
|
+
inputs: [
|
|
11895
|
+
{
|
|
11896
|
+
internalType: "uint8",
|
|
11897
|
+
name: "_collateralIndex",
|
|
11898
|
+
type: "uint8",
|
|
11899
|
+
},
|
|
11900
|
+
{
|
|
11901
|
+
internalType: "uint16",
|
|
11902
|
+
name: "_pairIndex",
|
|
11903
|
+
type: "uint16",
|
|
11904
|
+
},
|
|
11905
|
+
],
|
|
11906
|
+
name: "getBorrowingPairFeePerBlockCap",
|
|
11907
|
+
outputs: [
|
|
11908
|
+
{
|
|
11909
|
+
components: [
|
|
11910
|
+
{
|
|
11911
|
+
internalType: "uint32",
|
|
11912
|
+
name: "minP",
|
|
11913
|
+
type: "uint32",
|
|
11914
|
+
},
|
|
11915
|
+
{
|
|
11916
|
+
internalType: "uint32",
|
|
11917
|
+
name: "maxP",
|
|
11918
|
+
type: "uint32",
|
|
11919
|
+
},
|
|
11920
|
+
],
|
|
11921
|
+
internalType: "struct IBorrowingFees.BorrowingFeePerBlockCap",
|
|
11922
|
+
name: "",
|
|
11923
|
+
type: "tuple",
|
|
11924
|
+
},
|
|
11925
|
+
],
|
|
11926
|
+
stateMutability: "view",
|
|
11927
|
+
type: "function",
|
|
11928
|
+
signature: "0x7bdbfe5a",
|
|
11929
|
+
},
|
|
11930
|
+
{
|
|
11931
|
+
inputs: [
|
|
11932
|
+
{
|
|
11933
|
+
internalType: "uint8",
|
|
11934
|
+
name: "_collateralIndex",
|
|
11935
|
+
type: "uint8",
|
|
11936
|
+
},
|
|
11937
|
+
{
|
|
11938
|
+
internalType: "uint16[]",
|
|
11939
|
+
name: "_indices",
|
|
11940
|
+
type: "uint16[]",
|
|
11941
|
+
},
|
|
11942
|
+
],
|
|
11943
|
+
name: "getBorrowingPairFeePerBlockCaps",
|
|
11944
|
+
outputs: [
|
|
11945
|
+
{
|
|
11946
|
+
components: [
|
|
11947
|
+
{
|
|
11948
|
+
internalType: "uint32",
|
|
11949
|
+
name: "minP",
|
|
11950
|
+
type: "uint32",
|
|
11951
|
+
},
|
|
11952
|
+
{
|
|
11953
|
+
internalType: "uint32",
|
|
11954
|
+
name: "maxP",
|
|
11955
|
+
type: "uint32",
|
|
11956
|
+
},
|
|
11957
|
+
],
|
|
11958
|
+
internalType: "struct IBorrowingFees.BorrowingFeePerBlockCap[]",
|
|
11959
|
+
name: "",
|
|
11960
|
+
type: "tuple[]",
|
|
11961
|
+
},
|
|
11962
|
+
],
|
|
11963
|
+
stateMutability: "view",
|
|
11964
|
+
type: "function",
|
|
11965
|
+
signature: "0x0a67b9a3",
|
|
11966
|
+
},
|
|
11742
11967
|
{
|
|
11743
11968
|
inputs: [
|
|
11744
11969
|
{
|
|
@@ -11915,7 +12140,12 @@ const _abi = [
|
|
|
11915
12140
|
},
|
|
11916
12141
|
{
|
|
11917
12142
|
internalType: "uint64",
|
|
11918
|
-
name: "
|
|
12143
|
+
name: "pairAccFeeLongDelta",
|
|
12144
|
+
type: "uint64",
|
|
12145
|
+
},
|
|
12146
|
+
{
|
|
12147
|
+
internalType: "uint64",
|
|
12148
|
+
name: "pairAccFeeShortDelta",
|
|
11919
12149
|
type: "uint64",
|
|
11920
12150
|
},
|
|
11921
12151
|
],
|
|
@@ -12233,6 +12463,32 @@ const _abi = [
|
|
|
12233
12463
|
type: "function",
|
|
12234
12464
|
signature: "0xfc79e929",
|
|
12235
12465
|
},
|
|
12466
|
+
{
|
|
12467
|
+
inputs: [
|
|
12468
|
+
{
|
|
12469
|
+
components: [
|
|
12470
|
+
{
|
|
12471
|
+
internalType: "uint32",
|
|
12472
|
+
name: "minP",
|
|
12473
|
+
type: "uint32",
|
|
12474
|
+
},
|
|
12475
|
+
{
|
|
12476
|
+
internalType: "uint32",
|
|
12477
|
+
name: "maxP",
|
|
12478
|
+
type: "uint32",
|
|
12479
|
+
},
|
|
12480
|
+
],
|
|
12481
|
+
internalType: "struct IBorrowingFees.BorrowingFeePerBlockCap",
|
|
12482
|
+
name: "_feePerBlockCap",
|
|
12483
|
+
type: "tuple",
|
|
12484
|
+
},
|
|
12485
|
+
],
|
|
12486
|
+
name: "initializeBorrowingFeePerBlockCap",
|
|
12487
|
+
outputs: [],
|
|
12488
|
+
stateMutability: "nonpayable",
|
|
12489
|
+
type: "function",
|
|
12490
|
+
signature: "0x1a733ea0",
|
|
12491
|
+
},
|
|
12236
12492
|
{
|
|
12237
12493
|
inputs: [
|
|
12238
12494
|
{
|
|
@@ -12267,6 +12523,32 @@ const _abi = [
|
|
|
12267
12523
|
type: "function",
|
|
12268
12524
|
signature: "0x4fa72788",
|
|
12269
12525
|
},
|
|
12526
|
+
{
|
|
12527
|
+
inputs: [
|
|
12528
|
+
{
|
|
12529
|
+
components: [
|
|
12530
|
+
{
|
|
12531
|
+
internalType: "uint32",
|
|
12532
|
+
name: "minP",
|
|
12533
|
+
type: "uint32",
|
|
12534
|
+
},
|
|
12535
|
+
{
|
|
12536
|
+
internalType: "uint32",
|
|
12537
|
+
name: "maxP",
|
|
12538
|
+
type: "uint32",
|
|
12539
|
+
},
|
|
12540
|
+
],
|
|
12541
|
+
internalType: "struct IBorrowingFees.BorrowingFeePerBlockCap",
|
|
12542
|
+
name: "_feePerBlockCap",
|
|
12543
|
+
type: "tuple",
|
|
12544
|
+
},
|
|
12545
|
+
],
|
|
12546
|
+
name: "setBorrowingFeePerBlockCap",
|
|
12547
|
+
outputs: [],
|
|
12548
|
+
stateMutability: "nonpayable",
|
|
12549
|
+
type: "function",
|
|
12550
|
+
signature: "0x197b65a5",
|
|
12551
|
+
},
|
|
12270
12552
|
{
|
|
12271
12553
|
inputs: [
|
|
12272
12554
|
{
|
|
@@ -12349,6 +12631,42 @@ const _abi = [
|
|
|
12349
12631
|
type: "function",
|
|
12350
12632
|
signature: "0x02c4e7c1",
|
|
12351
12633
|
},
|
|
12634
|
+
{
|
|
12635
|
+
inputs: [
|
|
12636
|
+
{
|
|
12637
|
+
internalType: "uint8",
|
|
12638
|
+
name: "_collateralIndex",
|
|
12639
|
+
type: "uint8",
|
|
12640
|
+
},
|
|
12641
|
+
{
|
|
12642
|
+
internalType: "uint16[]",
|
|
12643
|
+
name: "_indices",
|
|
12644
|
+
type: "uint16[]",
|
|
12645
|
+
},
|
|
12646
|
+
{
|
|
12647
|
+
components: [
|
|
12648
|
+
{
|
|
12649
|
+
internalType: "uint32",
|
|
12650
|
+
name: "minP",
|
|
12651
|
+
type: "uint32",
|
|
12652
|
+
},
|
|
12653
|
+
{
|
|
12654
|
+
internalType: "uint32",
|
|
12655
|
+
name: "maxP",
|
|
12656
|
+
type: "uint32",
|
|
12657
|
+
},
|
|
12658
|
+
],
|
|
12659
|
+
internalType: "struct IBorrowingFees.BorrowingFeePerBlockCap[]",
|
|
12660
|
+
name: "_values",
|
|
12661
|
+
type: "tuple[]",
|
|
12662
|
+
},
|
|
12663
|
+
],
|
|
12664
|
+
name: "setBorrowingPairFeePerBlockCapArray",
|
|
12665
|
+
outputs: [],
|
|
12666
|
+
stateMutability: "nonpayable",
|
|
12667
|
+
type: "function",
|
|
12668
|
+
signature: "0x92748a7d",
|
|
12669
|
+
},
|
|
12352
12670
|
{
|
|
12353
12671
|
inputs: [
|
|
12354
12672
|
{
|
|
@@ -12593,6 +12911,20 @@ const _abi = [
|
|
|
12593
12911
|
type: "event",
|
|
12594
12912
|
signature: "0x764c19c693af0da42ec6c6bed68a2dd1a2fa93d24785fcfce58ffa29ae313606",
|
|
12595
12913
|
},
|
|
12914
|
+
{
|
|
12915
|
+
anonymous: false,
|
|
12916
|
+
inputs: [
|
|
12917
|
+
{
|
|
12918
|
+
indexed: false,
|
|
12919
|
+
internalType: "uint8",
|
|
12920
|
+
name: "limitJobCount",
|
|
12921
|
+
type: "uint8",
|
|
12922
|
+
},
|
|
12923
|
+
],
|
|
12924
|
+
name: "LimitJobCountUpdated",
|
|
12925
|
+
type: "event",
|
|
12926
|
+
signature: "0xe3fd233ab0f657acfa4eec07f6b1d79a510c3eef274d27d305c7fc47695a1e7f",
|
|
12927
|
+
},
|
|
12596
12928
|
{
|
|
12597
12929
|
anonymous: false,
|
|
12598
12930
|
inputs: [
|
|
@@ -13202,6 +13534,20 @@ const _abi = [
|
|
|
13202
13534
|
type: "function",
|
|
13203
13535
|
signature: "0x891e656c",
|
|
13204
13536
|
},
|
|
13537
|
+
{
|
|
13538
|
+
inputs: [],
|
|
13539
|
+
name: "getLimitJobCount",
|
|
13540
|
+
outputs: [
|
|
13541
|
+
{
|
|
13542
|
+
internalType: "uint8",
|
|
13543
|
+
name: "",
|
|
13544
|
+
type: "uint8",
|
|
13545
|
+
},
|
|
13546
|
+
],
|
|
13547
|
+
stateMutability: "view",
|
|
13548
|
+
type: "function",
|
|
13549
|
+
signature: "0x75d097a7",
|
|
13550
|
+
},
|
|
13205
13551
|
{
|
|
13206
13552
|
inputs: [],
|
|
13207
13553
|
name: "getLimitJobId",
|
|
@@ -13216,6 +13562,20 @@ const _abi = [
|
|
|
13216
13562
|
type: "function",
|
|
13217
13563
|
signature: "0xf4b0664d",
|
|
13218
13564
|
},
|
|
13565
|
+
{
|
|
13566
|
+
inputs: [],
|
|
13567
|
+
name: "getLimitJobIndex",
|
|
13568
|
+
outputs: [
|
|
13569
|
+
{
|
|
13570
|
+
internalType: "uint88",
|
|
13571
|
+
name: "",
|
|
13572
|
+
type: "uint88",
|
|
13573
|
+
},
|
|
13574
|
+
],
|
|
13575
|
+
stateMutability: "view",
|
|
13576
|
+
type: "function",
|
|
13577
|
+
signature: "0xdb461060",
|
|
13578
|
+
},
|
|
13219
13579
|
{
|
|
13220
13580
|
inputs: [
|
|
13221
13581
|
{
|
|
@@ -13574,6 +13934,20 @@ const _abi = [
|
|
|
13574
13934
|
type: "function",
|
|
13575
13935
|
signature: "0xbbad411a",
|
|
13576
13936
|
},
|
|
13937
|
+
{
|
|
13938
|
+
inputs: [
|
|
13939
|
+
{
|
|
13940
|
+
internalType: "uint8",
|
|
13941
|
+
name: "_limitJobCount",
|
|
13942
|
+
type: "uint8",
|
|
13943
|
+
},
|
|
13944
|
+
],
|
|
13945
|
+
name: "initializeLimitJobCount",
|
|
13946
|
+
outputs: [],
|
|
13947
|
+
stateMutability: "nonpayable",
|
|
13948
|
+
type: "function",
|
|
13949
|
+
signature: "0xc386f31b",
|
|
13950
|
+
},
|
|
13577
13951
|
{
|
|
13578
13952
|
inputs: [
|
|
13579
13953
|
{
|
|
@@ -13673,6 +14047,20 @@ const _abi = [
|
|
|
13673
14047
|
type: "function",
|
|
13674
14048
|
signature: "0x25e589cd",
|
|
13675
14049
|
},
|
|
14050
|
+
{
|
|
14051
|
+
inputs: [
|
|
14052
|
+
{
|
|
14053
|
+
internalType: "uint8",
|
|
14054
|
+
name: "_limitJobCount",
|
|
14055
|
+
type: "uint8",
|
|
14056
|
+
},
|
|
14057
|
+
],
|
|
14058
|
+
name: "setLimitJobCount",
|
|
14059
|
+
outputs: [],
|
|
14060
|
+
stateMutability: "nonpayable",
|
|
14061
|
+
type: "function",
|
|
14062
|
+
signature: "0x19a891e4",
|
|
14063
|
+
},
|
|
13676
14064
|
{
|
|
13677
14065
|
inputs: [
|
|
13678
14066
|
{
|
|
@@ -14124,6 +14512,123 @@ const _abi = [
|
|
|
14124
14512
|
type: "function",
|
|
14125
14513
|
signature: "0xac9650d8",
|
|
14126
14514
|
},
|
|
14515
|
+
{
|
|
14516
|
+
anonymous: false,
|
|
14517
|
+
inputs: [
|
|
14518
|
+
{
|
|
14519
|
+
indexed: false,
|
|
14520
|
+
internalType: "bool",
|
|
14521
|
+
name: "enabled",
|
|
14522
|
+
type: "bool",
|
|
14523
|
+
},
|
|
14524
|
+
],
|
|
14525
|
+
name: "NativeTransferEnabledUpdated",
|
|
14526
|
+
type: "event",
|
|
14527
|
+
signature: "0x2cc920a9e8bbfc19b048a3db4be815c4211e93faa33e0b1e97def344aac8aaa3",
|
|
14528
|
+
},
|
|
14529
|
+
{
|
|
14530
|
+
anonymous: false,
|
|
14531
|
+
inputs: [
|
|
14532
|
+
{
|
|
14533
|
+
indexed: false,
|
|
14534
|
+
internalType: "uint16",
|
|
14535
|
+
name: "newLimit",
|
|
14536
|
+
type: "uint16",
|
|
14537
|
+
},
|
|
14538
|
+
],
|
|
14539
|
+
name: "NativeTransferGasLimitUpdated",
|
|
14540
|
+
type: "event",
|
|
14541
|
+
signature: "0xfbfcf05095de3956a64c56736502dd8e0280a6050ab0de536ce23c8725b61408",
|
|
14542
|
+
},
|
|
14543
|
+
{
|
|
14544
|
+
inputs: [],
|
|
14545
|
+
name: "getNativeTransferEnabled",
|
|
14546
|
+
outputs: [
|
|
14547
|
+
{
|
|
14548
|
+
internalType: "bool",
|
|
14549
|
+
name: "",
|
|
14550
|
+
type: "bool",
|
|
14551
|
+
},
|
|
14552
|
+
],
|
|
14553
|
+
stateMutability: "view",
|
|
14554
|
+
type: "function",
|
|
14555
|
+
signature: "0x3bfab75c",
|
|
14556
|
+
},
|
|
14557
|
+
{
|
|
14558
|
+
inputs: [],
|
|
14559
|
+
name: "getNativeTransferGasLimit",
|
|
14560
|
+
outputs: [
|
|
14561
|
+
{
|
|
14562
|
+
internalType: "uint16",
|
|
14563
|
+
name: "",
|
|
14564
|
+
type: "uint16",
|
|
14565
|
+
},
|
|
14566
|
+
],
|
|
14567
|
+
stateMutability: "view",
|
|
14568
|
+
type: "function",
|
|
14569
|
+
signature: "0x7a5c9d1e",
|
|
14570
|
+
},
|
|
14571
|
+
{
|
|
14572
|
+
inputs: [],
|
|
14573
|
+
name: "getReentrancyLock",
|
|
14574
|
+
outputs: [
|
|
14575
|
+
{
|
|
14576
|
+
internalType: "uint256",
|
|
14577
|
+
name: "",
|
|
14578
|
+
type: "uint256",
|
|
14579
|
+
},
|
|
14580
|
+
],
|
|
14581
|
+
stateMutability: "view",
|
|
14582
|
+
type: "function",
|
|
14583
|
+
signature: "0x40ee2847",
|
|
14584
|
+
},
|
|
14585
|
+
{
|
|
14586
|
+
inputs: [
|
|
14587
|
+
{
|
|
14588
|
+
internalType: "uint16",
|
|
14589
|
+
name: "_nativeTransferGasLimit",
|
|
14590
|
+
type: "uint16",
|
|
14591
|
+
},
|
|
14592
|
+
{
|
|
14593
|
+
internalType: "bool",
|
|
14594
|
+
name: "_nativeTransferEnabled",
|
|
14595
|
+
type: "bool",
|
|
14596
|
+
},
|
|
14597
|
+
],
|
|
14598
|
+
name: "initializeChainConfig",
|
|
14599
|
+
outputs: [],
|
|
14600
|
+
stateMutability: "nonpayable",
|
|
14601
|
+
type: "function",
|
|
14602
|
+
signature: "0x885af326",
|
|
14603
|
+
},
|
|
14604
|
+
{
|
|
14605
|
+
inputs: [
|
|
14606
|
+
{
|
|
14607
|
+
internalType: "bool",
|
|
14608
|
+
name: "_nativeTransferEnabled",
|
|
14609
|
+
type: "bool",
|
|
14610
|
+
},
|
|
14611
|
+
],
|
|
14612
|
+
name: "updateNativeTransferEnabled",
|
|
14613
|
+
outputs: [],
|
|
14614
|
+
stateMutability: "nonpayable",
|
|
14615
|
+
type: "function",
|
|
14616
|
+
signature: "0x7644f242",
|
|
14617
|
+
},
|
|
14618
|
+
{
|
|
14619
|
+
inputs: [
|
|
14620
|
+
{
|
|
14621
|
+
internalType: "uint16",
|
|
14622
|
+
name: "_nativeTransferGasLimit",
|
|
14623
|
+
type: "uint16",
|
|
14624
|
+
},
|
|
14625
|
+
],
|
|
14626
|
+
name: "updateNativeTransferGasLimit",
|
|
14627
|
+
outputs: [],
|
|
14628
|
+
stateMutability: "nonpayable",
|
|
14629
|
+
type: "function",
|
|
14630
|
+
signature: "0xe085d2a7",
|
|
14631
|
+
},
|
|
14127
14632
|
];
|
|
14128
14633
|
class GNSMultiCollatDiamond__factory {
|
|
14129
14634
|
static createInterface() {
|
|
@@ -32,7 +32,9 @@ const getBorrowingGroupName = (groupIndex) => {
|
|
|
32
32
|
};
|
|
33
33
|
exports.getBorrowingGroupName = getBorrowingGroupName;
|
|
34
34
|
const fetchAllPairBorrowingFees = (contract, collateralIndex) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
-
|
|
35
|
+
const [pairs, pairOi, pairGroups] = yield contract.getAllBorrowingPairs(collateralIndex);
|
|
36
|
+
const feeCaps = yield contract.getBorrowingPairFeePerBlockCaps(collateralIndex, [...Array(pairs.length).keys()]);
|
|
37
|
+
return (0, trade_1.convertPairBorrowingFees)([pairs, pairOi, pairGroups, feeCaps]);
|
|
36
38
|
});
|
|
37
39
|
exports.fetchAllPairBorrowingFees = fetchAllPairBorrowingFees;
|
|
38
40
|
const fetchGroupBorrowingFees = (contract, collateralIndex, groupIxs) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -448,4 +448,8 @@ const PAIR_INDEX_TO_DESCRIPTION = {
|
|
|
448
448
|
[types_1.PairIndex.VINEUSD]: "Vine coin to US Dollar",
|
|
449
449
|
[types_1.PairIndex.TOSHIUSD]: "Toshi to US Dollar",
|
|
450
450
|
[types_1.PairIndex.BERAUSD]: "Berachain to US Dollar",
|
|
451
|
+
[types_1.PairIndex.LAYERUSD]: "Solayer to US Dollar",
|
|
452
|
+
[types_1.PairIndex.CHEEMSUSD]: "Cheems Token to US Dollar",
|
|
453
|
+
[types_1.PairIndex.SOLVUSD]: "Solv Protocol to US Dollar",
|
|
454
|
+
[types_1.PairIndex.TSTUSD]: "Test to US Dollar",
|
|
451
455
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { IBorrowingFees } from "../../../contracts/types/generated/GNSMultiCollatDiamond";
|
|
2
2
|
import { BorrowingFee } from ".";
|
|
3
3
|
export declare const convertPairGroupBorrowingFee: (pairGroup: IBorrowingFees.BorrowingPairGroupStructOutput) => BorrowingFee.PairGroup;
|
|
4
|
-
export declare const convertPairBorrowingFee: (pair: IBorrowingFees.BorrowingDataStructOutput, pairOi: IBorrowingFees.OpenInterestStructOutput, pairGroup: IBorrowingFees.BorrowingPairGroupStructOutput[]) => BorrowingFee.Pair;
|
|
5
|
-
export declare const convertPairBorrowingFees: ([pairs, pairOi, pairGroups]: [
|
|
4
|
+
export declare const convertPairBorrowingFee: (pair: IBorrowingFees.BorrowingDataStructOutput, pairOi: IBorrowingFees.OpenInterestStructOutput, pairGroup: IBorrowingFees.BorrowingPairGroupStructOutput[], feeCap: IBorrowingFees.BorrowingFeePerBlockCapStructOutput) => BorrowingFee.Pair;
|
|
5
|
+
export declare const convertPairBorrowingFees: ([pairs, pairOi, pairGroups, feeCaps]: [
|
|
6
6
|
IBorrowingFees.BorrowingDataStructOutput[],
|
|
7
7
|
IBorrowingFees.OpenInterestStructOutput[],
|
|
8
|
-
IBorrowingFees.BorrowingPairGroupStructOutput[][]
|
|
8
|
+
IBorrowingFees.BorrowingPairGroupStructOutput[][],
|
|
9
|
+
IBorrowingFees.BorrowingFeePerBlockCapStructOutput[]
|
|
9
10
|
]) => BorrowingFee.Pair[];
|
|
10
11
|
export declare const convertGroupBorrowingFee: (group: IBorrowingFees.BorrowingDataStructOutput, groupOi: IBorrowingFees.OpenInterestStructOutput) => BorrowingFee.Group;
|
|
11
12
|
export declare const convertGroupBorrowingData: (obj: IBorrowingFees.BorrowingDataStructOutput, oi: IBorrowingFees.OpenInterestStructOutput) => BorrowingFee.BorrowingData & BorrowingFee.BorrowingOi;
|
|
@@ -13,3 +14,4 @@ export declare const convertGroupBorrowingFees: ([groups, groupOis]: [
|
|
|
13
14
|
IBorrowingFees.BorrowingDataStructOutput[],
|
|
14
15
|
IBorrowingFees.OpenInterestStructOutput[]
|
|
15
16
|
]) => BorrowingFee.Group[];
|
|
17
|
+
export declare const convertFeePerBlockCap: (feeCap: IBorrowingFees.BorrowingFeePerBlockCapStructOutput) => BorrowingFee.BorrowingFeePerBlockCap;
|