File tree
typescript/packages/plugins/mode-governance/src/index.ts
| Original file line number | Diff line number | Diff line change |
|---|---|---|
@@ -1,6 +1,5 @@ |
||
1 |
1 |
import { Chain, PluginBase } from "@goat-sdk/core"; |
2 |
2 |
import { EVMWalletClient } from "@goat-sdk/wallet-evm"; |
3 |
`` | -import { getTools } from "./tools"; |
4 |
3 |
import { StakeParameters, GetStakeInfoParameters, GetBalanceParameters } from "./parameters"; |
5 |
4 |
import { mode } from "viem/chains"; |
6 |
5 |
import { ModeGovernanceService } from "./mode-governance.service"; |
typescript/packages/plugins/mode-governance/src/mode-governance.service.ts
| Original file line number | Diff line number | Diff line change |
|---|---|---|
@@ -12,12 +12,6 @@ import { |
||
12 |
12 |
GetBalanceParameters, |
13 |
13 |
} from "./parameters"; |
15 |
`` | -type StakeInfo = [bigint, bigint, bigint]; // [stakedAmount, warmupEndTime, cooldownEndTime] |
21 |
15 |
export class ModeGovernanceService { |
22 |
16 |
@Tool({ |
23 |
17 |
description: "Stake MODE or BPT tokens in the Mode governance system. Requires MODE or BPT tokens to be approved first.", |
36 |
30 |
} |
38 |
32 |
@Tool({ |
39 |
`` | - description: "Get staking information including warmup and cooldown periods", |
39 |
33 |
+ description: "Get staking information including lock period and voting power", |
41 |
35 |
async getStakeInfo(walletClient: EVMWalletClient, parameters: GetStakeInfoParameters) { |
54 |
48 |
stakedAmount: "0", |
55 |
49 |
startTime: 0, |
50 |
51 |
+ isVoting: false |
80 |
78 |
votingPower: formatUnits(votingPower, 18), |
92 |
89 |
async getBalance(walletClient: EVMWalletClient, parameters: GetBalanceParameters) { |