@gainsnetwork/sdk 0.0.28-rc1 → 0.0.30-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.
- package/lib/contracts/index.js +2 -2
- package/lib/contracts/types/generated/GNSBorrowingFeesV6_3_2.d.ts +14 -14
- package/lib/contracts/types/generated/GNSBorrowingFeesV6_4.d.ts +1058 -0
- package/lib/contracts/types/generated/GNSBorrowingFeesV6_4.js +2 -0
- package/lib/contracts/types/generated/GNSTradingCallbacksV6_4.d.ts +821 -0
- package/lib/contracts/types/generated/GNSTradingCallbacksV6_4.js +2 -0
- package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_3_2__factory.d.ts +1 -1
- package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_3_2__factory.js +9 -9
- package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_4__factory.d.ts +113 -0
- package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_4__factory.js +1742 -0
- package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_3_2__factory.d.ts +1 -1
- package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_3_2__factory.js +1 -1
- package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_4__factory.d.ts +82 -0
- package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_4__factory.js +1326 -0
- package/lib/contracts/types/generated/factories/index.d.ts +2 -2
- package/lib/contracts/types/generated/factories/index.js +5 -5
- package/lib/contracts/types/generated/index.d.ts +4 -4
- package/lib/contracts/types/generated/index.js +5 -5
- package/lib/contracts/types/index.d.ts +3 -3
- package/lib/contracts/utils/openLimitOrders.js +12 -1
- package/lib/trade/fees/borrowing/index.d.ts +4 -10
- package/lib/trade/fees/borrowing/index.js +24 -31
- package/lib/trade/fees/borrowing/types.d.ts +3 -0
- package/lib/trade/openLimitOrder.js +2 -2
- package/lib/trade/types.d.ts +2 -0
- package/package.json +1 -1
package/lib/contracts/index.js
CHANGED
|
@@ -25,8 +25,8 @@ const getContractsForChain = (chainId, signerOrProvider) => {
|
|
|
25
25
|
gnsPairsStorageV6: factories_1.GNSPairsStorageV6__factory.connect(addresses.gnsPairsStorageV6, signerOrProvider),
|
|
26
26
|
gTokenOpenPnlFeed: factories_1.GTokenOpenPnlFeed__factory.connect(addresses.gTokenOpenPnlFeed, signerOrProvider),
|
|
27
27
|
gnsNftRewards: factories_1.GNSNftRewardsV6_3_1__factory.connect(addresses.gnsNftRewardsV6_3_1, signerOrProvider),
|
|
28
|
-
gnsBorrowingFees: factories_1.
|
|
29
|
-
gnsTradingCallbacks: factories_1.
|
|
28
|
+
gnsBorrowingFees: factories_1.GNSBorrowingFeesV6_4__factory.connect(addresses.gnsBorrowingFeesV6_3_2, signerOrProvider),
|
|
29
|
+
gnsTradingCallbacks: factories_1.GNSTradingCallbacksV6_4__factory.connect(addresses.gnsTradingCallbacksV6_3_2, signerOrProvider),
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
exports.getContractsForChain = getContractsForChain;
|
|
@@ -347,11 +347,11 @@ export interface GNSBorrowingFeesV6_3_2Interface extends utils.Interface {
|
|
|
347
347
|
decodeFunctionResult(functionFragment: "withinMaxGroupOi", data: BytesLike): Result;
|
|
348
348
|
events: {
|
|
349
349
|
"GroupAccFeesUpdated(uint16,uint256,uint64,uint64,uint256)": EventFragment;
|
|
350
|
-
"GroupOiUpdated(
|
|
351
|
-
"GroupUpdated(
|
|
350
|
+
"GroupOiUpdated(uint16,bool,bool,uint112,uint112,uint112)": EventFragment;
|
|
351
|
+
"GroupUpdated(uint16,uint32,uint80)": EventFragment;
|
|
352
352
|
"Initialized(uint8)": EventFragment;
|
|
353
353
|
"PairAccFeesUpdated(uint256,uint256,uint64,uint64,uint256)": EventFragment;
|
|
354
|
-
"PairGroupUpdated(uint256,
|
|
354
|
+
"PairGroupUpdated(uint256,uint16,uint16)": EventFragment;
|
|
355
355
|
"PairParamsUpdated(uint256,uint16,uint32)": EventFragment;
|
|
356
356
|
"TradeActionHandled(address,uint256,uint256,bool,bool,uint256)": EventFragment;
|
|
357
357
|
"TradeInitialAccFeesStored(address,uint256,uint256,uint64,uint64)": EventFragment;
|
|
@@ -382,7 +382,7 @@ export type GroupAccFeesUpdatedEvent = TypedEvent<[
|
|
|
382
382
|
], GroupAccFeesUpdatedEventObject>;
|
|
383
383
|
export type GroupAccFeesUpdatedEventFilter = TypedEventFilter<GroupAccFeesUpdatedEvent>;
|
|
384
384
|
export interface GroupOiUpdatedEventObject {
|
|
385
|
-
groupIndex:
|
|
385
|
+
groupIndex: number;
|
|
386
386
|
long: boolean;
|
|
387
387
|
increase: boolean;
|
|
388
388
|
amount: BigNumber;
|
|
@@ -390,7 +390,7 @@ export interface GroupOiUpdatedEventObject {
|
|
|
390
390
|
oiShort: BigNumber;
|
|
391
391
|
}
|
|
392
392
|
export type GroupOiUpdatedEvent = TypedEvent<[
|
|
393
|
-
|
|
393
|
+
number,
|
|
394
394
|
boolean,
|
|
395
395
|
boolean,
|
|
396
396
|
BigNumber,
|
|
@@ -399,12 +399,12 @@ export type GroupOiUpdatedEvent = TypedEvent<[
|
|
|
399
399
|
], GroupOiUpdatedEventObject>;
|
|
400
400
|
export type GroupOiUpdatedEventFilter = TypedEventFilter<GroupOiUpdatedEvent>;
|
|
401
401
|
export interface GroupUpdatedEventObject {
|
|
402
|
-
groupIndex:
|
|
402
|
+
groupIndex: number;
|
|
403
403
|
feePerBlock: number;
|
|
404
404
|
maxOi: BigNumber;
|
|
405
405
|
}
|
|
406
406
|
export type GroupUpdatedEvent = TypedEvent<[
|
|
407
|
-
|
|
407
|
+
number,
|
|
408
408
|
number,
|
|
409
409
|
BigNumber
|
|
410
410
|
], GroupUpdatedEventObject>;
|
|
@@ -431,13 +431,13 @@ export type PairAccFeesUpdatedEvent = TypedEvent<[
|
|
|
431
431
|
export type PairAccFeesUpdatedEventFilter = TypedEventFilter<PairAccFeesUpdatedEvent>;
|
|
432
432
|
export interface PairGroupUpdatedEventObject {
|
|
433
433
|
pairIndex: BigNumber;
|
|
434
|
-
prevGroupIndex:
|
|
435
|
-
newGroupIndex:
|
|
434
|
+
prevGroupIndex: number;
|
|
435
|
+
newGroupIndex: number;
|
|
436
436
|
}
|
|
437
437
|
export type PairGroupUpdatedEvent = TypedEvent<[
|
|
438
438
|
BigNumber,
|
|
439
|
-
|
|
440
|
-
|
|
439
|
+
number,
|
|
440
|
+
number
|
|
441
441
|
], PairGroupUpdatedEventObject>;
|
|
442
442
|
export type PairGroupUpdatedEventFilter = TypedEventFilter<PairGroupUpdatedEvent>;
|
|
443
443
|
export interface PairParamsUpdatedEventObject {
|
|
@@ -869,15 +869,15 @@ export interface GNSBorrowingFeesV6_3_2 extends BaseContract {
|
|
|
869
869
|
filters: {
|
|
870
870
|
"GroupAccFeesUpdated(uint16,uint256,uint64,uint64,uint256)"(groupIndex?: PromiseOrValue<BigNumberish> | null, currentBlock?: null, accFeeLong?: null, accFeeShort?: null, accBlockWeightedMarketCap?: null): GroupAccFeesUpdatedEventFilter;
|
|
871
871
|
GroupAccFeesUpdated(groupIndex?: PromiseOrValue<BigNumberish> | null, currentBlock?: null, accFeeLong?: null, accFeeShort?: null, accBlockWeightedMarketCap?: null): GroupAccFeesUpdatedEventFilter;
|
|
872
|
-
"GroupOiUpdated(
|
|
872
|
+
"GroupOiUpdated(uint16,bool,bool,uint112,uint112,uint112)"(groupIndex?: PromiseOrValue<BigNumberish> | null, long?: PromiseOrValue<boolean> | null, increase?: PromiseOrValue<boolean> | null, amount?: null, oiLong?: null, oiShort?: null): GroupOiUpdatedEventFilter;
|
|
873
873
|
GroupOiUpdated(groupIndex?: PromiseOrValue<BigNumberish> | null, long?: PromiseOrValue<boolean> | null, increase?: PromiseOrValue<boolean> | null, amount?: null, oiLong?: null, oiShort?: null): GroupOiUpdatedEventFilter;
|
|
874
|
-
"GroupUpdated(
|
|
874
|
+
"GroupUpdated(uint16,uint32,uint80)"(groupIndex?: PromiseOrValue<BigNumberish> | null, feePerBlock?: null, maxOi?: null): GroupUpdatedEventFilter;
|
|
875
875
|
GroupUpdated(groupIndex?: PromiseOrValue<BigNumberish> | null, feePerBlock?: null, maxOi?: null): GroupUpdatedEventFilter;
|
|
876
876
|
"Initialized(uint8)"(version?: null): InitializedEventFilter;
|
|
877
877
|
Initialized(version?: null): InitializedEventFilter;
|
|
878
878
|
"PairAccFeesUpdated(uint256,uint256,uint64,uint64,uint256)"(pairIndex?: PromiseOrValue<BigNumberish> | null, currentBlock?: null, accFeeLong?: null, accFeeShort?: null, accBlockWeightedMarketCap?: null): PairAccFeesUpdatedEventFilter;
|
|
879
879
|
PairAccFeesUpdated(pairIndex?: PromiseOrValue<BigNumberish> | null, currentBlock?: null, accFeeLong?: null, accFeeShort?: null, accBlockWeightedMarketCap?: null): PairAccFeesUpdatedEventFilter;
|
|
880
|
-
"PairGroupUpdated(uint256,
|
|
880
|
+
"PairGroupUpdated(uint256,uint16,uint16)"(pairIndex?: PromiseOrValue<BigNumberish> | null, prevGroupIndex?: PromiseOrValue<BigNumberish> | null, newGroupIndex?: PromiseOrValue<BigNumberish> | null): PairGroupUpdatedEventFilter;
|
|
881
881
|
PairGroupUpdated(pairIndex?: PromiseOrValue<BigNumberish> | null, prevGroupIndex?: PromiseOrValue<BigNumberish> | null, newGroupIndex?: PromiseOrValue<BigNumberish> | null): PairGroupUpdatedEventFilter;
|
|
882
882
|
"PairParamsUpdated(uint256,uint16,uint32)"(pairIndex?: PromiseOrValue<BigNumberish> | null, groupIndex?: PromiseOrValue<BigNumberish> | null, feePerBlock?: null): PairParamsUpdatedEventFilter;
|
|
883
883
|
PairParamsUpdated(pairIndex?: PromiseOrValue<BigNumberish> | null, groupIndex?: PromiseOrValue<BigNumberish> | null, feePerBlock?: null): PairParamsUpdatedEventFilter;
|