@gearbox-protocol/sdk 3.0.0-next.157 → 3.0.0-next.158
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.
|
@@ -10,7 +10,7 @@ interface PoolEvent {
|
|
|
10
10
|
readonly poolName?: string;
|
|
11
11
|
}
|
|
12
12
|
export interface TxSerialized {
|
|
13
|
-
type: "TxAddLiquidity" | "TxRemoveLiquidity" | "TxSwap" | "TxAddCollateral" | "TxIncreaseBorrowAmount" | "TxDecreaseBorrowAmount" | "TxOpenAccount" | "TxRepayAccount" | "TxCloseAccount" | "TxApprove" | "TxOpenMultitokenAccount" | "TxClaimReward" | "TxClaimNFT" | "
|
|
13
|
+
type: "TxAddLiquidity" | "TxRemoveLiquidity" | "TxSwap" | "TxAddCollateral" | "TxIncreaseBorrowAmount" | "TxDecreaseBorrowAmount" | "TxOpenAccount" | "TxRepayAccount" | "TxCloseAccount" | "TxApprove" | "TxOpenMultitokenAccount" | "TxClaimReward" | "TxClaimNFT" | "TxClaimRewards" | "TxEnableTokens" | "TxUpdateQuota" | "TxGaugeStake" | "TxGaugeUnstake" | "TxGaugeClaim" | "TxGaugeVote" | "TxWithdrawCollateral";
|
|
14
14
|
content: string;
|
|
15
15
|
}
|
|
16
16
|
export declare class TxSerializer {
|
|
@@ -162,14 +162,14 @@ export declare class TxClaimNFT extends EVMTx {
|
|
|
162
162
|
toString(): string;
|
|
163
163
|
serialize(): TxSerialized;
|
|
164
164
|
}
|
|
165
|
-
interface
|
|
165
|
+
interface TxClaimRewardsProps extends EVMTxProps {
|
|
166
166
|
token: string;
|
|
167
167
|
amount: bigint;
|
|
168
168
|
}
|
|
169
|
-
export declare class
|
|
169
|
+
export declare class TxClaimRewards extends EVMTx {
|
|
170
170
|
readonly token: string;
|
|
171
171
|
readonly amount: bigint;
|
|
172
|
-
constructor(opts:
|
|
172
|
+
constructor(opts: TxClaimRewardsProps);
|
|
173
173
|
toString(): string;
|
|
174
174
|
serialize(): TxSerialized;
|
|
175
175
|
}
|
package/lib/core/transactions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TxWithdrawCollateral = exports.TxGaugeVote = exports.TxGaugeClaim = exports.TxGaugeUnstake = exports.TxGaugeStake = exports.TxUpdateQuota = exports.TxEnableTokens = exports.TxApprove = exports.TxCloseAccount = exports.TxRepayAccount = exports.
|
|
3
|
+
exports.TxWithdrawCollateral = exports.TxGaugeVote = exports.TxGaugeClaim = exports.TxGaugeUnstake = exports.TxGaugeStake = exports.TxUpdateQuota = exports.TxEnableTokens = exports.TxApprove = exports.TxCloseAccount = exports.TxRepayAccount = exports.TxClaimRewards = exports.TxClaimNFT = exports.TxClaimReward = exports.TxOpenMultitokenAccount = exports.TxOpenAccount = exports.TxDecreaseBorrowAmount = exports.TxIncreaseBorrowAmount = exports.TxAddCollateral = exports.TXSwap = exports.TxRemoveLiquidity = exports.TxAddLiquidity = exports.TxSerializer = void 0;
|
|
4
4
|
const sdk_gov_1 = require("@gearbox-protocol/sdk-gov");
|
|
5
5
|
const contractsRegister_1 = require("../contracts/contractsRegister");
|
|
6
6
|
const math_1 = require("../utils/math");
|
|
@@ -39,8 +39,8 @@ class TxSerializer {
|
|
|
39
39
|
return new TxClaimReward(params);
|
|
40
40
|
case "TxClaimNFT":
|
|
41
41
|
return new TxClaimNFT(params);
|
|
42
|
-
case "
|
|
43
|
-
return new
|
|
42
|
+
case "TxClaimRewards":
|
|
43
|
+
return new TxClaimRewards(params);
|
|
44
44
|
case "TxEnableTokens":
|
|
45
45
|
return new TxEnableTokens(params);
|
|
46
46
|
case "TxUpdateQuota":
|
|
@@ -313,7 +313,7 @@ class TxClaimNFT extends eventOrTx_1.EVMTx {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
exports.TxClaimNFT = TxClaimNFT;
|
|
316
|
-
class
|
|
316
|
+
class TxClaimRewards extends eventOrTx_1.EVMTx {
|
|
317
317
|
token;
|
|
318
318
|
amount;
|
|
319
319
|
constructor(opts) {
|
|
@@ -323,16 +323,16 @@ class TxClaimGearRewards extends eventOrTx_1.EVMTx {
|
|
|
323
323
|
}
|
|
324
324
|
toString() {
|
|
325
325
|
const [symbol, decimals] = (0, sdk_gov_1.extractTokenData)(this.token);
|
|
326
|
-
return `
|
|
326
|
+
return `Rewards claimed: ${(0, sdk_gov_1.formatBN)(this.amount, decimals || 18)} ${symbol} `;
|
|
327
327
|
}
|
|
328
328
|
serialize() {
|
|
329
329
|
return {
|
|
330
|
-
type: "
|
|
330
|
+
type: "TxClaimRewards",
|
|
331
331
|
content: JSON.stringify(this),
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
exports.
|
|
335
|
+
exports.TxClaimRewards = TxClaimRewards;
|
|
336
336
|
class TxRepayAccount extends eventOrTx_1.EVMTx {
|
|
337
337
|
creditManager;
|
|
338
338
|
creditManagerName;
|