aftermath-ts-sdk 1.2.61 → 1.2.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/general/apiHelpers/eventsApiHelpers.d.ts +1 -1
- package/dist/general/apiHelpers/eventsApiHelpers.d.ts.map +1 -1
- package/dist/general/apiHelpers/eventsApiHelpers.js +4 -1
- package/dist/general/types/castingTypes.d.ts +15 -0
- package/dist/general/types/castingTypes.d.ts.map +1 -1
- package/dist/general/types/configTypes.d.ts +5 -0
- package/dist/general/types/configTypes.d.ts.map +1 -1
- package/dist/general/utils/helpers.d.ts +1 -1
- package/dist/general/utils/helpers.d.ts.map +1 -1
- package/dist/general/utils/helpers.js +1 -1
- package/dist/packages/farms/api/farmsApi.d.ts +711 -60
- package/dist/packages/farms/api/farmsApi.d.ts.map +1 -1
- package/dist/packages/farms/api/farmsApi.js +1138 -156
- package/dist/packages/farms/api/farmsApiCasting.d.ts +34 -18
- package/dist/packages/farms/api/farmsApiCasting.d.ts.map +1 -1
- package/dist/packages/farms/api/farmsApiCasting.js +218 -17
- package/dist/packages/farms/api/farmsApiCastingTypes.d.ts +117 -21
- package/dist/packages/farms/api/farmsApiCastingTypes.d.ts.map +1 -1
- package/dist/packages/farms/farms.d.ts +4 -2
- package/dist/packages/farms/farms.d.ts.map +1 -1
- package/dist/packages/farms/farms.js +8 -2
- package/dist/packages/farms/farmsStakedPosition.d.ts +2 -1
- package/dist/packages/farms/farmsStakedPosition.d.ts.map +1 -1
- package/dist/packages/farms/farmsStakedPosition.js +36 -12
- package/dist/packages/farms/farmsStakingPool.d.ts +2 -1
- package/dist/packages/farms/farmsStakingPool.d.ts.map +1 -1
- package/dist/packages/farms/farmsStakingPool.js +36 -7
- package/dist/packages/farms/farmsTypes.d.ts +21 -2
- package/dist/packages/farms/farmsTypes.d.ts.map +1 -1
- package/dist/packages/router/routerTypes.d.ts +1 -1
- package/dist/packages/router/routerTypes.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,23 +1,39 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FarmsAddedRewardEventOnChainV1, FarmsCreatedVaultEventOnChainV1, FarmsDepositedPrincipalEventOnChainV1, FarmsDestroyedStakedPositionEventOnChainV1, FarmsHarvestedRewardsEventOnChainV1, FarmsIncreasedEmissionsEventOnChainV1, FarmsInitializedRewardEventOnChainV1, FarmsJoinedEventOnChainV1, FarmsLockedEventOnChainV1, FarmsSplitEventOnChainV1, FarmsStakedEventOnChainV1, FarmsStakedRelaxedEventOnChainV1, FarmsUnlockedEventOnChainV1, FarmsWithdrewPrincipalEventOnChainV1, FarmsStakedEventOnChainV2, FarmsWithdrewPrincipalEventOnChainV2, FarmsUnlockedEventOnChainV2, FarmsSplitEventOnChainV2, FarmsLockedEventOnChainV2, FarmsJoinedEventOnChainV2, FarmsInitializedRewardEventOnChainV2, FarmsUpdatedEmissionsEventOnChainV2, FarmsHarvestedRewardsEventOnChainV2, FarmsDestroyedStakedPositionEventOnChainV2, FarmsDepositedPrincipalEventOnChainV2, FarmsCreatedVaultEventOnChainV2, FarmsAddedRewardEventOnChainV2 } from "./farmsApiCastingTypes";
|
|
2
2
|
import { FarmsAddedRewardEvent, FarmsCreatedVaultEvent, FarmsDepositedPrincipalEvent, FarmsDestroyedStakedPositionEvent, FarmsHarvestedRewardsEvent, FarmsIncreasedEmissionsEvent, FarmsInitializedRewardEvent, FarmsJoinedEvent, FarmsLockedEvent, FarmsSplitEvent, FarmsStakedEvent, FarmsStakedRelaxedEvent, FarmsUnlockedEvent, FarmsWithdrewPrincipalEvent, StakingPoolOwnerCapObject, PartialFarmsStakedPositionObject, StakingPoolOneTimeAdminCapObject } from "../farmsTypes";
|
|
3
3
|
import { SuiObjectResponse } from "@mysten/sui/client";
|
|
4
4
|
export declare class FarmsApiCasting {
|
|
5
|
-
static
|
|
6
|
-
static
|
|
7
|
-
static
|
|
8
|
-
static
|
|
9
|
-
static
|
|
10
|
-
static
|
|
11
|
-
static
|
|
12
|
-
static
|
|
13
|
-
static
|
|
14
|
-
static
|
|
15
|
-
static
|
|
16
|
-
static
|
|
17
|
-
static
|
|
18
|
-
static
|
|
19
|
-
static
|
|
20
|
-
static
|
|
21
|
-
static
|
|
5
|
+
static partialStakedPositionObjectFromSuiObjectResponseV1: (data: SuiObjectResponse) => PartialFarmsStakedPositionObject;
|
|
6
|
+
static partialStakedPositionObjectFromSuiObjectResponseV2: (data: SuiObjectResponse) => PartialFarmsStakedPositionObject;
|
|
7
|
+
static stakingPoolOwnerCapObjectFromSuiObjectResponseV1: (data: SuiObjectResponse) => StakingPoolOwnerCapObject;
|
|
8
|
+
static stakingPoolOwnerCapObjectFromSuiObjectResponseV2: (data: SuiObjectResponse) => StakingPoolOwnerCapObject;
|
|
9
|
+
static stakingPoolOneTimeAdminCapObjectFromSuiObjectResponseV1: (data: SuiObjectResponse) => StakingPoolOneTimeAdminCapObject;
|
|
10
|
+
static stakingPoolOneTimeAdminCapObjectFromSuiObjectResponseV2: (data: SuiObjectResponse) => StakingPoolOneTimeAdminCapObject;
|
|
11
|
+
static addedRewardEventFromOnChainV1: (eventOnChain: FarmsAddedRewardEventOnChainV1) => FarmsAddedRewardEvent;
|
|
12
|
+
static addedRewardEventFromOnChainV2: (eventOnChain: FarmsAddedRewardEventOnChainV2) => FarmsAddedRewardEvent;
|
|
13
|
+
static createdVaultEventFromOnChainV1: (eventOnChain: FarmsCreatedVaultEventOnChainV1) => FarmsCreatedVaultEvent;
|
|
14
|
+
static createdVaultEventFromOnChainV2: (eventOnChain: FarmsCreatedVaultEventOnChainV2) => FarmsCreatedVaultEvent;
|
|
15
|
+
static depositedPrincipalEventFromOnChainV1: (eventOnChain: FarmsDepositedPrincipalEventOnChainV1) => FarmsDepositedPrincipalEvent;
|
|
16
|
+
static depositedPrincipalEventFromOnChainV2: (eventOnChain: FarmsDepositedPrincipalEventOnChainV2) => FarmsDepositedPrincipalEvent;
|
|
17
|
+
static destroyedStakedPositionEventFromOnChainV1: (eventOnChain: FarmsDestroyedStakedPositionEventOnChainV1) => FarmsDestroyedStakedPositionEvent;
|
|
18
|
+
static destroyedStakedPositionEventFromOnChainV2: (eventOnChain: FarmsDestroyedStakedPositionEventOnChainV2) => FarmsDestroyedStakedPositionEvent;
|
|
19
|
+
static harvestedRewardsEventFromOnChainV1: (eventOnChain: FarmsHarvestedRewardsEventOnChainV1) => FarmsHarvestedRewardsEvent;
|
|
20
|
+
static harvestedRewardsEventFromOnChainV2: (eventOnChain: FarmsHarvestedRewardsEventOnChainV2) => FarmsHarvestedRewardsEvent;
|
|
21
|
+
static increasedEmissionsEventFromOnChainV1: (eventOnChain: FarmsIncreasedEmissionsEventOnChainV1) => FarmsIncreasedEmissionsEvent;
|
|
22
|
+
static updatedEmissionsEventFromOnChainV2: (eventOnChain: FarmsUpdatedEmissionsEventOnChainV2) => FarmsIncreasedEmissionsEvent;
|
|
23
|
+
static initializedRewardEventFromOnChainV1: (eventOnChain: FarmsInitializedRewardEventOnChainV1) => FarmsInitializedRewardEvent;
|
|
24
|
+
static initializedRewardEventFromOnChainV2: (eventOnChain: FarmsInitializedRewardEventOnChainV2) => FarmsInitializedRewardEvent;
|
|
25
|
+
static joinedEventFromOnChainV1: (eventOnChain: FarmsJoinedEventOnChainV1) => FarmsJoinedEvent;
|
|
26
|
+
static joinedEventFromOnChainV2: (eventOnChain: FarmsJoinedEventOnChainV2) => FarmsJoinedEvent;
|
|
27
|
+
static lockedEventFromOnChainV1: (eventOnChain: FarmsLockedEventOnChainV1) => FarmsLockedEvent;
|
|
28
|
+
static lockedEventFromOnChainV2: (eventOnChain: FarmsLockedEventOnChainV2) => FarmsLockedEvent;
|
|
29
|
+
static splitEventFromOnChainV1: (eventOnChain: FarmsSplitEventOnChainV1) => FarmsSplitEvent;
|
|
30
|
+
static splitEventFromOnChainV2: (eventOnChain: FarmsSplitEventOnChainV2) => FarmsSplitEvent;
|
|
31
|
+
static stakedEventFromOnChainV1: (eventOnChain: FarmsStakedEventOnChainV1) => FarmsStakedEvent;
|
|
32
|
+
static stakedEventFromOnChainV2: (eventOnChain: FarmsStakedEventOnChainV2) => FarmsStakedEvent;
|
|
33
|
+
static stakedRelaxedEventFromOnChainV1: (eventOnChain: FarmsStakedRelaxedEventOnChainV1) => FarmsStakedRelaxedEvent;
|
|
34
|
+
static unlockedEventFromOnChainV1: (eventOnChain: FarmsUnlockedEventOnChainV1) => FarmsUnlockedEvent;
|
|
35
|
+
static unlockedEventFromOnChainV2: (eventOnChain: FarmsUnlockedEventOnChainV2) => FarmsUnlockedEvent;
|
|
36
|
+
static withdrewPrincipalEventFromOnChainV1: (eventOnChain: FarmsWithdrewPrincipalEventOnChainV1) => FarmsWithdrewPrincipalEvent;
|
|
37
|
+
static withdrewPrincipalEventFromOnChainV2: (eventOnChain: FarmsWithdrewPrincipalEventOnChainV2) => FarmsWithdrewPrincipalEvent;
|
|
22
38
|
}
|
|
23
39
|
//# sourceMappingURL=farmsApiCasting.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"farmsApiCasting.d.ts","sourceRoot":"","sources":["../../../../src/packages/farms/api/farmsApiCasting.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,
|
|
1
|
+
{"version":3,"file":"farmsApiCasting.d.ts","sourceRoot":"","sources":["../../../../src/packages/farms/api/farmsApiCasting.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,8BAA8B,EAE9B,+BAA+B,EAC/B,qCAAqC,EACrC,0CAA0C,EAC1C,mCAAmC,EACnC,qCAAqC,EACrC,oCAAoC,EACpC,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,gCAAgC,EAGhC,2BAA2B,EAC3B,oCAAoC,EAKpC,yBAAyB,EACzB,oCAAoC,EACpC,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,oCAAoC,EACpC,mCAAmC,EACnC,mCAAmC,EACnC,0CAA0C,EAC1C,qCAAqC,EACrC,+BAA+B,EAC/B,8BAA8B,EAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,qBAAqB,EACrB,sBAAsB,EACtB,4BAA4B,EAC5B,iCAAiC,EAEjC,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,2BAA2B,EAC3B,yBAAyB,EACzB,gCAAgC,EAChC,gCAAgC,EAChC,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,qBAAa,eAAe;IAK3B,OAAc,kDAAkD,SACzD,iBAAiB,KACrB,gCAAgC,CAqCjC;IAEF,OAAc,kDAAkD,SACzD,iBAAiB,KACrB,gCAAgC,CAqCjC;IAEF,OAAc,gDAAgD,SACvD,iBAAiB,KACrB,yBAAyB,CAY1B;IAEF,OAAc,gDAAgD,SACvD,iBAAiB,KACrB,yBAAyB,CAY1B;IAEF,OAAc,uDAAuD,SAC9D,iBAAiB,KACrB,gCAAgC,CAYjC;IAEF,OAAc,uDAAuD,SAC9D,iBAAiB,KACrB,gCAAgC,CAajC;IAMF,OAAc,6BAA6B,oDAExC,qBAAqB,CAYtB;IAEF,OAAc,6BAA6B,oDAExC,qBAAqB,CAYtB;IAEF,OAAc,8BAA8B,qDAEzC,sBAAsB,CAavB;IAEF,OAAc,8BAA8B,qDAEzC,sBAAsB,CAavB;IAEF,OAAc,oCAAoC,2DAE/C,4BAA4B,CAW7B;IAEF,OAAc,oCAAoC,2DAE/C,4BAA4B,CAW7B;IAEF,OAAc,yCAAyC,gEAEpD,iCAAiC,CAQlC;IAEF,OAAc,yCAAyC,gEAEpD,iCAAiC,CAQlC;IAEF,OAAc,kCAAkC,yDAE7C,0BAA0B,CAc3B;IAEF,OAAc,kCAAkC,yDAE7C,0BAA0B,CAc3B;IAEF,OAAc,oCAAoC,2DAE/C,4BAA4B,CAa7B;IAEF,OAAc,kCAAkC,yDAE7C,4BAA4B,CAa7B;IAEF,OAAc,mCAAmC,0DAE9C,2BAA2B,CAc5B;IAEF,OAAc,mCAAmC,0DAE9C,2BAA2B,CAc5B;IAEF,OAAc,wBAAwB,+CAEnC,gBAAgB,CASjB;IAEF,OAAc,wBAAwB,+CAEnC,gBAAgB,CASjB;IAEF,OAAc,wBAAwB,+CAEnC,gBAAgB,CAgBjB;IAEF,OAAc,wBAAwB,+CAEnC,gBAAgB,CAgBjB;IAEF,OAAc,uBAAuB,8CAElC,eAAe,CAShB;IAEF,OAAc,uBAAuB,8CAElC,eAAe,CAShB;IAEF,OAAc,wBAAwB,+CAEnC,gBAAgB,CAiBjB;IAEF,OAAc,wBAAwB,+CAEnC,gBAAgB,CAiBjB;IAEF,OAAc,+BAA+B,sDAE1C,uBAAuB,CAexB;IAEF,OAAc,0BAA0B,iDAErC,kBAAkB,CAanB;IAEF,OAAc,0BAA0B,iDAErC,kBAAkB,CAanB;IAEF,OAAc,mCAAmC,0DAE9C,2BAA2B,CAW5B;IAEF,OAAc,mCAAmC,0DAE9C,2BAA2B,CAW5B;CACF"}
|
|
@@ -9,7 +9,7 @@ exports.FarmsApiCasting = FarmsApiCasting;
|
|
|
9
9
|
// =========================================================================
|
|
10
10
|
// Objects
|
|
11
11
|
// =========================================================================
|
|
12
|
-
FarmsApiCasting.
|
|
12
|
+
FarmsApiCasting.partialStakedPositionObjectFromSuiObjectResponseV1 = (data) => {
|
|
13
13
|
const objectType = utils_1.Helpers.getObjectType(data);
|
|
14
14
|
const fields = utils_1.Helpers.getObjectFields(data);
|
|
15
15
|
const stakeCoinType = utils_1.Helpers.addLeadingZeroesToType(coin_1.Coin.getInnerCoinType(objectType));
|
|
@@ -30,9 +30,34 @@ FarmsApiCasting.partialStakedPositionObjectFromSuiObjectResponse = (data) => {
|
|
|
30
30
|
multiplierRewardsAccumulated: BigInt(fields.multiplier_rewards_accumulated[index]),
|
|
31
31
|
multiplierRewardsDebt: BigInt(fields.multiplier_rewards_debt[index]),
|
|
32
32
|
})),
|
|
33
|
+
version: 1,
|
|
33
34
|
};
|
|
34
35
|
};
|
|
35
|
-
FarmsApiCasting.
|
|
36
|
+
FarmsApiCasting.partialStakedPositionObjectFromSuiObjectResponseV2 = (data) => {
|
|
37
|
+
const objectType = utils_1.Helpers.getObjectType(data);
|
|
38
|
+
const fields = utils_1.Helpers.getObjectFields(data);
|
|
39
|
+
const stakeCoinType = utils_1.Helpers.addLeadingZeroesToType(coin_1.Coin.getInnerCoinType(objectType));
|
|
40
|
+
return {
|
|
41
|
+
objectType,
|
|
42
|
+
objectId: utils_1.Helpers.getObjectId(data),
|
|
43
|
+
stakeCoinType,
|
|
44
|
+
stakingPoolObjectId: fields.vault_id,
|
|
45
|
+
stakedAmount: BigInt(fields.balance),
|
|
46
|
+
stakedAmountWithMultiplier: BigInt(fields.multiplier_staked_amount),
|
|
47
|
+
lockStartTimestamp: Number(fields.lock_start_timestamp_ms),
|
|
48
|
+
lockDurationMs: Number(fields.lock_duration_ms),
|
|
49
|
+
lockMultiplier: BigInt(fields.lock_multiplier),
|
|
50
|
+
lastHarvestRewardsTimestamp: Number(fields.last_reward_timestamp_ms),
|
|
51
|
+
rewardCoins: fields.base_rewards_accumulated.map((baseRewardsAccumulated, index) => ({
|
|
52
|
+
baseRewardsAccumulated: BigInt(baseRewardsAccumulated),
|
|
53
|
+
baseRewardsDebt: BigInt(fields.base_rewards_debt[index]),
|
|
54
|
+
multiplierRewardsAccumulated: BigInt(fields.multiplier_rewards_accumulated[index]),
|
|
55
|
+
multiplierRewardsDebt: BigInt(fields.multiplier_rewards_debt[index]),
|
|
56
|
+
})),
|
|
57
|
+
version: 2,
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
FarmsApiCasting.stakingPoolOwnerCapObjectFromSuiObjectResponseV1 = (data) => {
|
|
36
61
|
const objectType = utils_1.Helpers.getObjectType(data);
|
|
37
62
|
const fields = utils_1.Helpers.getObjectFields(data);
|
|
38
63
|
return {
|
|
@@ -41,7 +66,16 @@ FarmsApiCasting.stakingPoolOwnerCapObjectFromSuiObjectResponse = (data) => {
|
|
|
41
66
|
stakingPoolId: fields.afterburner_vault_id,
|
|
42
67
|
};
|
|
43
68
|
};
|
|
44
|
-
FarmsApiCasting.
|
|
69
|
+
FarmsApiCasting.stakingPoolOwnerCapObjectFromSuiObjectResponseV2 = (data) => {
|
|
70
|
+
const objectType = utils_1.Helpers.getObjectType(data);
|
|
71
|
+
const fields = utils_1.Helpers.getObjectFields(data);
|
|
72
|
+
return {
|
|
73
|
+
objectType,
|
|
74
|
+
objectId: utils_1.Helpers.getObjectId(data),
|
|
75
|
+
stakingPoolId: fields.for,
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
FarmsApiCasting.stakingPoolOneTimeAdminCapObjectFromSuiObjectResponseV1 = (data) => {
|
|
45
79
|
const objectType = utils_1.Helpers.getObjectType(data);
|
|
46
80
|
const fields = utils_1.Helpers.getObjectFields(data);
|
|
47
81
|
return {
|
|
@@ -50,10 +84,20 @@ FarmsApiCasting.stakingPoolOneTimeAdminCapObjectFromSuiObjectResponse = (data) =
|
|
|
50
84
|
stakingPoolId: fields.afterburner_vault_id,
|
|
51
85
|
};
|
|
52
86
|
};
|
|
87
|
+
FarmsApiCasting.stakingPoolOneTimeAdminCapObjectFromSuiObjectResponseV2 = (data) => {
|
|
88
|
+
const objectType = utils_1.Helpers.getObjectType(data);
|
|
89
|
+
const fields = utils_1.Helpers.getObjectFields(data);
|
|
90
|
+
// TODO: add reward coin type ?
|
|
91
|
+
return {
|
|
92
|
+
objectType,
|
|
93
|
+
objectId: utils_1.Helpers.getObjectId(data),
|
|
94
|
+
stakingPoolId: fields.cap.for,
|
|
95
|
+
};
|
|
96
|
+
};
|
|
53
97
|
// =========================================================================
|
|
54
98
|
// Events
|
|
55
99
|
// =========================================================================
|
|
56
|
-
FarmsApiCasting.
|
|
100
|
+
FarmsApiCasting.addedRewardEventFromOnChainV1 = (eventOnChain) => {
|
|
57
101
|
const fields = eventOnChain.parsedJson;
|
|
58
102
|
return {
|
|
59
103
|
vaultId: fields.vault_id,
|
|
@@ -64,7 +108,18 @@ FarmsApiCasting.addedRewardEventFromOnChain = (eventOnChain) => {
|
|
|
64
108
|
type: eventOnChain.type,
|
|
65
109
|
};
|
|
66
110
|
};
|
|
67
|
-
FarmsApiCasting.
|
|
111
|
+
FarmsApiCasting.addedRewardEventFromOnChainV2 = (eventOnChain) => {
|
|
112
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
113
|
+
return {
|
|
114
|
+
vaultId: fields.vault_id,
|
|
115
|
+
rewardType: utils_1.Helpers.addLeadingZeroesToType("0x" + fields.reward_type),
|
|
116
|
+
rewardAmount: BigInt(fields.reward_amount),
|
|
117
|
+
timestamp: eventOnChain.timestampMs,
|
|
118
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
119
|
+
type: eventOnChain.type,
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
FarmsApiCasting.createdVaultEventFromOnChainV1 = (eventOnChain) => {
|
|
68
123
|
const fields = eventOnChain.parsedJson;
|
|
69
124
|
return {
|
|
70
125
|
vaultId: fields.vault_id,
|
|
@@ -78,7 +133,21 @@ FarmsApiCasting.createdVaultEventFromOnChain = (eventOnChain) => {
|
|
|
78
133
|
type: eventOnChain.type,
|
|
79
134
|
};
|
|
80
135
|
};
|
|
81
|
-
FarmsApiCasting.
|
|
136
|
+
FarmsApiCasting.createdVaultEventFromOnChainV2 = (eventOnChain) => {
|
|
137
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
138
|
+
return {
|
|
139
|
+
vaultId: fields.vault_id,
|
|
140
|
+
stakeType: utils_1.Helpers.addLeadingZeroesToType("0x" + fields.stake_type),
|
|
141
|
+
minLockDurationMs: Number(fields.min_lock_duration_ms),
|
|
142
|
+
maxLockDurationMs: Number(fields.max_lock_duration_ms),
|
|
143
|
+
maxLockMultiplier: BigInt(fields.max_lock_multiplier),
|
|
144
|
+
minStakeAmount: BigInt(fields.min_stake_amount),
|
|
145
|
+
timestamp: eventOnChain.timestampMs,
|
|
146
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
147
|
+
type: eventOnChain.type,
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
FarmsApiCasting.depositedPrincipalEventFromOnChainV1 = (eventOnChain) => {
|
|
82
151
|
const fields = eventOnChain.parsedJson;
|
|
83
152
|
return {
|
|
84
153
|
stakedPositionId: fields.staked_position_id,
|
|
@@ -90,7 +159,19 @@ FarmsApiCasting.depositedPrincipalEventFromOnChain = (eventOnChain) => {
|
|
|
90
159
|
type: eventOnChain.type,
|
|
91
160
|
};
|
|
92
161
|
};
|
|
93
|
-
FarmsApiCasting.
|
|
162
|
+
FarmsApiCasting.depositedPrincipalEventFromOnChainV2 = (eventOnChain) => {
|
|
163
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
164
|
+
return {
|
|
165
|
+
stakedPositionId: fields.staked_position_id,
|
|
166
|
+
vaultId: fields.vault_id,
|
|
167
|
+
amount: BigInt(fields.amount),
|
|
168
|
+
stakeType: utils_1.Helpers.addLeadingZeroesToType("0x" + fields.stake_type),
|
|
169
|
+
timestamp: eventOnChain.timestampMs,
|
|
170
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
171
|
+
type: eventOnChain.type,
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
FarmsApiCasting.destroyedStakedPositionEventFromOnChainV1 = (eventOnChain) => {
|
|
94
175
|
const fields = eventOnChain.parsedJson;
|
|
95
176
|
return {
|
|
96
177
|
stakedPositionId: fields.staked_position_id,
|
|
@@ -99,7 +180,16 @@ FarmsApiCasting.destroyedStakedPositionEventFromOnChain = (eventOnChain) => {
|
|
|
99
180
|
type: eventOnChain.type,
|
|
100
181
|
};
|
|
101
182
|
};
|
|
102
|
-
FarmsApiCasting.
|
|
183
|
+
FarmsApiCasting.destroyedStakedPositionEventFromOnChainV2 = (eventOnChain) => {
|
|
184
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
185
|
+
return {
|
|
186
|
+
stakedPositionId: fields.staked_position_id,
|
|
187
|
+
timestamp: eventOnChain.timestampMs,
|
|
188
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
189
|
+
type: eventOnChain.type,
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
FarmsApiCasting.harvestedRewardsEventFromOnChainV1 = (eventOnChain) => {
|
|
103
193
|
const fields = eventOnChain.parsedJson;
|
|
104
194
|
return {
|
|
105
195
|
vaultId: fields.afterburner_vault_id,
|
|
@@ -110,7 +200,18 @@ FarmsApiCasting.harvestedRewardsEventFromOnChain = (eventOnChain) => {
|
|
|
110
200
|
type: eventOnChain.type,
|
|
111
201
|
};
|
|
112
202
|
};
|
|
113
|
-
FarmsApiCasting.
|
|
203
|
+
FarmsApiCasting.harvestedRewardsEventFromOnChainV2 = (eventOnChain) => {
|
|
204
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
205
|
+
return {
|
|
206
|
+
vaultId: fields.afterburner_vault_id,
|
|
207
|
+
rewardTypes: fields.reward_types.map((rewardType) => utils_1.Helpers.addLeadingZeroesToType("0x" + rewardType)),
|
|
208
|
+
rewardAmounts: fields.reward_amounts.map((amount) => BigInt(amount)),
|
|
209
|
+
timestamp: eventOnChain.timestampMs,
|
|
210
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
211
|
+
type: eventOnChain.type,
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
FarmsApiCasting.increasedEmissionsEventFromOnChainV1 = (eventOnChain) => {
|
|
114
215
|
const fields = eventOnChain.parsedJson;
|
|
115
216
|
return {
|
|
116
217
|
vaultId: fields.vault_id,
|
|
@@ -122,7 +223,19 @@ FarmsApiCasting.increasedEmissionsEventFromOnChain = (eventOnChain) => {
|
|
|
122
223
|
type: eventOnChain.type,
|
|
123
224
|
};
|
|
124
225
|
};
|
|
125
|
-
FarmsApiCasting.
|
|
226
|
+
FarmsApiCasting.updatedEmissionsEventFromOnChainV2 = (eventOnChain) => {
|
|
227
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
228
|
+
return {
|
|
229
|
+
vaultId: fields.vault_id,
|
|
230
|
+
rewardType: utils_1.Helpers.addLeadingZeroesToType("0x" + fields.reward_type),
|
|
231
|
+
emissionScheduleMs: Number(fields.emission_schedule_ms),
|
|
232
|
+
emissionRate: BigInt(fields.emission_rate),
|
|
233
|
+
timestamp: eventOnChain.timestampMs,
|
|
234
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
235
|
+
type: eventOnChain.type,
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
FarmsApiCasting.initializedRewardEventFromOnChainV1 = (eventOnChain) => {
|
|
126
239
|
const fields = eventOnChain.parsedJson;
|
|
127
240
|
return {
|
|
128
241
|
vaultId: fields.vault_id,
|
|
@@ -135,7 +248,20 @@ FarmsApiCasting.initializedRewardEventFromOnChain = (eventOnChain) => {
|
|
|
135
248
|
type: eventOnChain.type,
|
|
136
249
|
};
|
|
137
250
|
};
|
|
138
|
-
FarmsApiCasting.
|
|
251
|
+
FarmsApiCasting.initializedRewardEventFromOnChainV2 = (eventOnChain) => {
|
|
252
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
253
|
+
return {
|
|
254
|
+
vaultId: fields.vault_id,
|
|
255
|
+
rewardType: utils_1.Helpers.addLeadingZeroesToType("0x" + fields.reward_type),
|
|
256
|
+
rewardAmount: BigInt(fields.reward_amount),
|
|
257
|
+
emissionRate: BigInt(fields.emission_rate),
|
|
258
|
+
emissionStartMs: Number(fields.emission_start_ms),
|
|
259
|
+
timestamp: eventOnChain.timestampMs,
|
|
260
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
261
|
+
type: eventOnChain.type,
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
FarmsApiCasting.joinedEventFromOnChainV1 = (eventOnChain) => {
|
|
139
265
|
const fields = eventOnChain.parsedJson;
|
|
140
266
|
return {
|
|
141
267
|
stakedPositionId: fields.staked_position_id,
|
|
@@ -145,7 +271,17 @@ FarmsApiCasting.joinedEventFromOnChain = (eventOnChain) => {
|
|
|
145
271
|
type: eventOnChain.type,
|
|
146
272
|
};
|
|
147
273
|
};
|
|
148
|
-
FarmsApiCasting.
|
|
274
|
+
FarmsApiCasting.joinedEventFromOnChainV2 = (eventOnChain) => {
|
|
275
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
276
|
+
return {
|
|
277
|
+
stakedPositionId: fields.staked_position_id,
|
|
278
|
+
otherStakedPositionId: fields.other_staked_position_id,
|
|
279
|
+
timestamp: eventOnChain.timestampMs,
|
|
280
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
281
|
+
type: eventOnChain.type,
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
FarmsApiCasting.lockedEventFromOnChainV1 = (eventOnChain) => {
|
|
149
285
|
const fields = eventOnChain.parsedJson;
|
|
150
286
|
return {
|
|
151
287
|
stakedPositionId: fields.staked_position_id,
|
|
@@ -160,7 +296,22 @@ FarmsApiCasting.lockedEventFromOnChain = (eventOnChain) => {
|
|
|
160
296
|
type: eventOnChain.type,
|
|
161
297
|
};
|
|
162
298
|
};
|
|
163
|
-
FarmsApiCasting.
|
|
299
|
+
FarmsApiCasting.lockedEventFromOnChainV2 = (eventOnChain) => {
|
|
300
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
301
|
+
return {
|
|
302
|
+
stakedPositionId: fields.staked_position_id,
|
|
303
|
+
vaultId: fields.vault_id,
|
|
304
|
+
stakedType: utils_1.Helpers.addLeadingZeroesToType("0x" + fields.staked_type),
|
|
305
|
+
stakedAmount: BigInt(fields.staked_amount),
|
|
306
|
+
lockStartTimestampMs: Number(fields.lock_start_timestamp_ms),
|
|
307
|
+
lockDurationMs: Number(fields.lock_duration_ms),
|
|
308
|
+
lockMultiplier: BigInt(fields.lock_multiplier),
|
|
309
|
+
timestamp: eventOnChain.timestampMs,
|
|
310
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
311
|
+
type: eventOnChain.type,
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
FarmsApiCasting.splitEventFromOnChainV1 = (eventOnChain) => {
|
|
164
315
|
const fields = eventOnChain.parsedJson;
|
|
165
316
|
return {
|
|
166
317
|
stakedPositionId: fields.staked_position_id,
|
|
@@ -170,7 +321,17 @@ FarmsApiCasting.splitEventFromOnChain = (eventOnChain) => {
|
|
|
170
321
|
type: eventOnChain.type,
|
|
171
322
|
};
|
|
172
323
|
};
|
|
173
|
-
FarmsApiCasting.
|
|
324
|
+
FarmsApiCasting.splitEventFromOnChainV2 = (eventOnChain) => {
|
|
325
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
326
|
+
return {
|
|
327
|
+
stakedPositionId: fields.staked_position_id,
|
|
328
|
+
splitStakedPositionId: fields.split_staked_position_id,
|
|
329
|
+
timestamp: eventOnChain.timestampMs,
|
|
330
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
331
|
+
type: eventOnChain.type,
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
FarmsApiCasting.stakedEventFromOnChainV1 = (eventOnChain) => {
|
|
174
335
|
const fields = eventOnChain.parsedJson;
|
|
175
336
|
return {
|
|
176
337
|
stakedPositionId: fields.staked_position_id,
|
|
@@ -186,7 +347,23 @@ FarmsApiCasting.stakedEventFromOnChain = (eventOnChain) => {
|
|
|
186
347
|
type: eventOnChain.type,
|
|
187
348
|
};
|
|
188
349
|
};
|
|
189
|
-
FarmsApiCasting.
|
|
350
|
+
FarmsApiCasting.stakedEventFromOnChainV2 = (eventOnChain) => {
|
|
351
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
352
|
+
return {
|
|
353
|
+
stakedPositionId: fields.staked_position_id,
|
|
354
|
+
vaultId: fields.vault_id,
|
|
355
|
+
stakedType: utils_1.Helpers.addLeadingZeroesToType("0x" + fields.staked_type),
|
|
356
|
+
stakedAmount: BigInt(fields.staked_amount),
|
|
357
|
+
multipliedStakedAmount: BigInt(fields.multiplier_staked_amount),
|
|
358
|
+
lockStartTimestampMs: Number(fields.lock_start_timestamp_ms),
|
|
359
|
+
lockDurationMs: Number(fields.lock_duration_ms),
|
|
360
|
+
lockMultiplier: BigInt(fields.lock_multiplier),
|
|
361
|
+
timestamp: eventOnChain.timestampMs,
|
|
362
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
363
|
+
type: eventOnChain.type,
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
FarmsApiCasting.stakedRelaxedEventFromOnChainV1 = (eventOnChain) => {
|
|
190
367
|
const fields = eventOnChain.parsedJson;
|
|
191
368
|
return {
|
|
192
369
|
stakedPositionId: fields.staked_position_id,
|
|
@@ -200,7 +377,7 @@ FarmsApiCasting.stakedRelaxedEventFromOnChain = (eventOnChain) => {
|
|
|
200
377
|
type: eventOnChain.type,
|
|
201
378
|
};
|
|
202
379
|
};
|
|
203
|
-
FarmsApiCasting.
|
|
380
|
+
FarmsApiCasting.unlockedEventFromOnChainV1 = (eventOnChain) => {
|
|
204
381
|
const fields = eventOnChain.parsedJson;
|
|
205
382
|
return {
|
|
206
383
|
stakedPositionId: fields.staked_position_id,
|
|
@@ -212,7 +389,19 @@ FarmsApiCasting.unlockedEventFromOnChain = (eventOnChain) => {
|
|
|
212
389
|
type: eventOnChain.type,
|
|
213
390
|
};
|
|
214
391
|
};
|
|
215
|
-
FarmsApiCasting.
|
|
392
|
+
FarmsApiCasting.unlockedEventFromOnChainV2 = (eventOnChain) => {
|
|
393
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
394
|
+
return {
|
|
395
|
+
stakedPositionId: fields.staked_position_id,
|
|
396
|
+
vaultId: fields.vault_id,
|
|
397
|
+
stakedType: utils_1.Helpers.addLeadingZeroesToType("0x" + fields.staked_type),
|
|
398
|
+
stakedAmount: BigInt(fields.staked_amount),
|
|
399
|
+
timestamp: eventOnChain.timestampMs,
|
|
400
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
401
|
+
type: eventOnChain.type,
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
FarmsApiCasting.withdrewPrincipalEventFromOnChainV1 = (eventOnChain) => {
|
|
216
405
|
const fields = eventOnChain.parsedJson;
|
|
217
406
|
return {
|
|
218
407
|
stakedPositionId: fields.staked_position_id,
|
|
@@ -224,3 +413,15 @@ FarmsApiCasting.withdrewPrincipalEventFromOnChain = (eventOnChain) => {
|
|
|
224
413
|
type: eventOnChain.type,
|
|
225
414
|
};
|
|
226
415
|
};
|
|
416
|
+
FarmsApiCasting.withdrewPrincipalEventFromOnChainV2 = (eventOnChain) => {
|
|
417
|
+
const fields = eventOnChain.parsedJson.pos0;
|
|
418
|
+
return {
|
|
419
|
+
stakedPositionId: fields.staked_position_id,
|
|
420
|
+
vaultId: fields.vault_id,
|
|
421
|
+
amount: BigInt(fields.amount),
|
|
422
|
+
stakeType: utils_1.Helpers.addLeadingZeroesToType("0x" + fields.stake_type),
|
|
423
|
+
timestamp: eventOnChain.timestampMs,
|
|
424
|
+
txnDigest: eventOnChain.id.txDigest,
|
|
425
|
+
type: eventOnChain.type,
|
|
426
|
+
};
|
|
427
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BigIntAsString, CoinType, ObjectId } from "../../../types";
|
|
2
|
-
import { EventOnChain, TableOnChain } from "../../../general/types/castingTypes";
|
|
2
|
+
import { EventOnChain, TableOnChain, WrappedEventOnChain } from "../../../general/types/castingTypes";
|
|
3
3
|
export interface FarmsAfterburnerVaultFieldsOnChain {
|
|
4
4
|
id: ObjectId;
|
|
5
5
|
type_names: CoinType[];
|
|
@@ -18,7 +18,7 @@ export interface FarmsAfterburnerVaultFieldsOnChain {
|
|
|
18
18
|
max_lock_multiplier: BigIntAsString;
|
|
19
19
|
min_stake_amount: BigIntAsString;
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface FarmsStakedPositionFieldsOnChainV1 {
|
|
22
22
|
id: ObjectId;
|
|
23
23
|
afterburner_vault_id: ObjectId;
|
|
24
24
|
balance: BigIntAsString;
|
|
@@ -32,24 +32,46 @@ export interface FarmsStakedPositionFieldsOnChain {
|
|
|
32
32
|
base_rewards_debt: BigIntAsString[];
|
|
33
33
|
multiplier_rewards_debt: BigIntAsString[];
|
|
34
34
|
}
|
|
35
|
-
export interface
|
|
35
|
+
export interface FarmsStakedPositionFieldsOnChainV2 {
|
|
36
36
|
id: ObjectId;
|
|
37
|
+
vault_id: ObjectId;
|
|
38
|
+
balance: BigIntAsString;
|
|
39
|
+
multiplier_staked_amount: BigIntAsString;
|
|
40
|
+
lock_start_timestamp_ms: BigIntAsString;
|
|
41
|
+
lock_duration_ms: BigIntAsString;
|
|
42
|
+
lock_multiplier: BigIntAsString;
|
|
43
|
+
last_reward_timestamp_ms: BigIntAsString;
|
|
44
|
+
base_rewards_accumulated: BigIntAsString[];
|
|
45
|
+
multiplier_rewards_accumulated: BigIntAsString[];
|
|
46
|
+
base_rewards_debt: BigIntAsString[];
|
|
47
|
+
multiplier_rewards_debt: BigIntAsString[];
|
|
48
|
+
}
|
|
49
|
+
export interface FarmsVaultRegistryFieldsOnChain {
|
|
37
50
|
registered_vaults: TableOnChain;
|
|
38
51
|
}
|
|
39
|
-
export interface
|
|
40
|
-
id: ObjectId;
|
|
52
|
+
export interface FarmsStakingPoolOwnerCapFieldsOnChainV1 {
|
|
41
53
|
afterburner_vault_id: ObjectId;
|
|
42
54
|
}
|
|
43
|
-
export interface
|
|
44
|
-
|
|
55
|
+
export interface FarmsStakingPoolOwnerCapFieldsOnChainV2 {
|
|
56
|
+
for: ObjectId;
|
|
57
|
+
}
|
|
58
|
+
export interface FarmsStakingPoolOneTimeAdminCapFieldsOnChainV1 {
|
|
45
59
|
afterburner_vault_id: ObjectId;
|
|
46
60
|
}
|
|
47
|
-
export
|
|
61
|
+
export interface FarmsStakingPoolOneTimeAdminCapFieldsOnChainV2 {
|
|
62
|
+
cap: FarmsStakingPoolOwnerCapFieldsOnChainV2;
|
|
63
|
+
}
|
|
64
|
+
export type FarmsAddedRewardEventOnChainV1 = EventOnChain<{
|
|
65
|
+
vault_id: ObjectId;
|
|
66
|
+
reward_type: CoinType;
|
|
67
|
+
reward_amount: BigIntAsString;
|
|
68
|
+
}>;
|
|
69
|
+
export type FarmsAddedRewardEventOnChainV2 = WrappedEventOnChain<{
|
|
48
70
|
vault_id: ObjectId;
|
|
49
71
|
reward_type: CoinType;
|
|
50
72
|
reward_amount: BigIntAsString;
|
|
51
73
|
}>;
|
|
52
|
-
export type
|
|
74
|
+
export type FarmsCreatedVaultEventOnChainV1 = EventOnChain<{
|
|
53
75
|
vault_id: ObjectId;
|
|
54
76
|
stake_type: CoinType;
|
|
55
77
|
min_lock_duration_ms: BigIntAsString;
|
|
@@ -57,38 +79,86 @@ export type FarmsCreatedVaultEventOnChain = EventOnChain<{
|
|
|
57
79
|
max_lock_multiplier: BigIntAsString;
|
|
58
80
|
min_stake_amount: BigIntAsString;
|
|
59
81
|
}>;
|
|
60
|
-
export type
|
|
82
|
+
export type FarmsCreatedVaultEventOnChainV2 = WrappedEventOnChain<{
|
|
83
|
+
vault_id: ObjectId;
|
|
84
|
+
stake_type: CoinType;
|
|
85
|
+
min_lock_duration_ms: BigIntAsString;
|
|
86
|
+
max_lock_duration_ms: BigIntAsString;
|
|
87
|
+
max_lock_multiplier: BigIntAsString;
|
|
88
|
+
min_stake_amount: BigIntAsString;
|
|
89
|
+
}>;
|
|
90
|
+
export type FarmsDepositedPrincipalEventOnChainV1 = EventOnChain<{
|
|
61
91
|
staked_position_id: ObjectId;
|
|
62
92
|
vault_id: ObjectId;
|
|
63
93
|
amount: BigIntAsString;
|
|
64
94
|
stake_type: CoinType;
|
|
65
95
|
}>;
|
|
66
|
-
export type
|
|
96
|
+
export type FarmsDepositedPrincipalEventOnChainV2 = WrappedEventOnChain<{
|
|
67
97
|
staked_position_id: ObjectId;
|
|
98
|
+
vault_id: ObjectId;
|
|
99
|
+
amount: BigIntAsString;
|
|
100
|
+
stake_type: CoinType;
|
|
68
101
|
}>;
|
|
69
|
-
export type
|
|
102
|
+
export type FarmsDestroyedStakedPositionEventOnChainV1 = EventOnChain<{
|
|
103
|
+
staked_position_id: ObjectId;
|
|
104
|
+
}>;
|
|
105
|
+
export type FarmsDestroyedStakedPositionEventOnChainV2 = WrappedEventOnChain<{
|
|
106
|
+
staked_position_id: ObjectId;
|
|
107
|
+
}>;
|
|
108
|
+
export type FarmsHarvestedRewardsEventOnChainV1 = EventOnChain<{
|
|
109
|
+
afterburner_vault_id: ObjectId;
|
|
110
|
+
reward_types: CoinType[];
|
|
111
|
+
reward_amounts: BigIntAsString[];
|
|
112
|
+
}>;
|
|
113
|
+
export type FarmsHarvestedRewardsEventOnChainV2 = WrappedEventOnChain<{
|
|
70
114
|
afterburner_vault_id: ObjectId;
|
|
71
115
|
reward_types: CoinType[];
|
|
72
116
|
reward_amounts: BigIntAsString[];
|
|
73
117
|
}>;
|
|
74
|
-
export type
|
|
118
|
+
export type FarmsIncreasedEmissionsEventOnChainV1 = EventOnChain<{
|
|
119
|
+
vault_id: ObjectId;
|
|
120
|
+
reward_type: CoinType;
|
|
121
|
+
emission_schedule_ms: BigIntAsString;
|
|
122
|
+
emission_rate: BigIntAsString;
|
|
123
|
+
}>;
|
|
124
|
+
export type FarmsUpdatedEmissionsEventOnChainV2 = WrappedEventOnChain<{
|
|
75
125
|
vault_id: ObjectId;
|
|
76
126
|
reward_type: CoinType;
|
|
77
127
|
emission_schedule_ms: BigIntAsString;
|
|
78
128
|
emission_rate: BigIntAsString;
|
|
79
129
|
}>;
|
|
80
|
-
export type
|
|
130
|
+
export type FarmsInitializedRewardEventOnChainV1 = EventOnChain<{
|
|
81
131
|
vault_id: ObjectId;
|
|
82
132
|
reward_type: CoinType;
|
|
83
133
|
reward_amount: BigIntAsString;
|
|
84
134
|
emission_rate: BigIntAsString;
|
|
85
135
|
emission_start_ms: BigIntAsString;
|
|
86
136
|
}>;
|
|
87
|
-
export type
|
|
137
|
+
export type FarmsInitializedRewardEventOnChainV2 = WrappedEventOnChain<{
|
|
138
|
+
vault_id: ObjectId;
|
|
139
|
+
reward_type: CoinType;
|
|
140
|
+
reward_amount: BigIntAsString;
|
|
141
|
+
emission_rate: BigIntAsString;
|
|
142
|
+
emission_start_ms: BigIntAsString;
|
|
143
|
+
}>;
|
|
144
|
+
export type FarmsJoinedEventOnChainV1 = EventOnChain<{
|
|
88
145
|
staked_position_id: ObjectId;
|
|
89
146
|
other_staked_position_id: ObjectId;
|
|
90
147
|
}>;
|
|
91
|
-
export type
|
|
148
|
+
export type FarmsJoinedEventOnChainV2 = WrappedEventOnChain<{
|
|
149
|
+
staked_position_id: ObjectId;
|
|
150
|
+
other_staked_position_id: ObjectId;
|
|
151
|
+
}>;
|
|
152
|
+
export type FarmsLockedEventOnChainV1 = EventOnChain<{
|
|
153
|
+
staked_position_id: ObjectId;
|
|
154
|
+
vault_id: ObjectId;
|
|
155
|
+
staked_type: CoinType;
|
|
156
|
+
staked_amount: BigIntAsString;
|
|
157
|
+
lock_start_timestamp_ms: BigIntAsString;
|
|
158
|
+
lock_duration_ms: BigIntAsString;
|
|
159
|
+
lock_multiplier: BigIntAsString;
|
|
160
|
+
}>;
|
|
161
|
+
export type FarmsLockedEventOnChainV2 = WrappedEventOnChain<{
|
|
92
162
|
staked_position_id: ObjectId;
|
|
93
163
|
vault_id: ObjectId;
|
|
94
164
|
staked_type: CoinType;
|
|
@@ -97,11 +167,15 @@ export type FarmsLockedEventOnChain = EventOnChain<{
|
|
|
97
167
|
lock_duration_ms: BigIntAsString;
|
|
98
168
|
lock_multiplier: BigIntAsString;
|
|
99
169
|
}>;
|
|
100
|
-
export type
|
|
170
|
+
export type FarmsSplitEventOnChainV1 = EventOnChain<{
|
|
171
|
+
staked_position_id: ObjectId;
|
|
172
|
+
split_staked_position_id: ObjectId;
|
|
173
|
+
}>;
|
|
174
|
+
export type FarmsSplitEventOnChainV2 = WrappedEventOnChain<{
|
|
101
175
|
staked_position_id: ObjectId;
|
|
102
176
|
split_staked_position_id: ObjectId;
|
|
103
177
|
}>;
|
|
104
|
-
export type
|
|
178
|
+
export type FarmsStakedEventOnChainV1 = EventOnChain<{
|
|
105
179
|
staked_position_id: ObjectId;
|
|
106
180
|
vault_id: ObjectId;
|
|
107
181
|
staked_type: CoinType;
|
|
@@ -111,7 +185,17 @@ export type FarmsStakedEventOnChain = EventOnChain<{
|
|
|
111
185
|
lock_duration_ms: BigIntAsString;
|
|
112
186
|
lock_multiplier: BigIntAsString;
|
|
113
187
|
}>;
|
|
114
|
-
export type
|
|
188
|
+
export type FarmsStakedEventOnChainV2 = WrappedEventOnChain<{
|
|
189
|
+
staked_position_id: ObjectId;
|
|
190
|
+
vault_id: ObjectId;
|
|
191
|
+
staked_type: CoinType;
|
|
192
|
+
staked_amount: BigIntAsString;
|
|
193
|
+
multiplier_staked_amount: BigIntAsString;
|
|
194
|
+
lock_start_timestamp_ms: BigIntAsString;
|
|
195
|
+
lock_duration_ms: BigIntAsString;
|
|
196
|
+
lock_multiplier: BigIntAsString;
|
|
197
|
+
}>;
|
|
198
|
+
export type FarmsStakedRelaxedEventOnChainV1 = EventOnChain<{
|
|
115
199
|
staked_position_id: ObjectId;
|
|
116
200
|
vault_id: ObjectId;
|
|
117
201
|
staked_type: CoinType;
|
|
@@ -119,13 +203,25 @@ export type FarmsStakedRelaxedEventOnChain = EventOnChain<{
|
|
|
119
203
|
lock_start_timestamp_ms: BigIntAsString;
|
|
120
204
|
lock_end_timestamp_ms: BigIntAsString;
|
|
121
205
|
}>;
|
|
122
|
-
export type
|
|
206
|
+
export type FarmsUnlockedEventOnChainV1 = EventOnChain<{
|
|
123
207
|
staked_position_id: ObjectId;
|
|
124
208
|
vault_id: ObjectId;
|
|
125
209
|
staked_type: CoinType;
|
|
126
210
|
staked_amount: BigIntAsString;
|
|
127
211
|
}>;
|
|
128
|
-
export type
|
|
212
|
+
export type FarmsUnlockedEventOnChainV2 = WrappedEventOnChain<{
|
|
213
|
+
staked_position_id: ObjectId;
|
|
214
|
+
vault_id: ObjectId;
|
|
215
|
+
staked_type: CoinType;
|
|
216
|
+
staked_amount: BigIntAsString;
|
|
217
|
+
}>;
|
|
218
|
+
export type FarmsWithdrewPrincipalEventOnChainV1 = EventOnChain<{
|
|
219
|
+
staked_position_id: ObjectId;
|
|
220
|
+
vault_id: ObjectId;
|
|
221
|
+
amount: BigIntAsString;
|
|
222
|
+
stake_type: CoinType;
|
|
223
|
+
}>;
|
|
224
|
+
export type FarmsWithdrewPrincipalEventOnChainV2 = WrappedEventOnChain<{
|
|
129
225
|
staked_position_id: ObjectId;
|
|
130
226
|
vault_id: ObjectId;
|
|
131
227
|
amount: BigIntAsString;
|