jup_staker 是一个专为 Solana 链上的 Jupiter 质押和投票设计的批量脚本。通过简化的命令行界面,用户可以轻松进行批量质押和投票操作。 网站 https://vote.jup.ag/
在项目根目录下,执行以下命令来安装项目依赖:
npm i
首先,您需要在 keys.txt 文件中输入相关的信息。请确保按照下面的格式添加您的信息(例如,地址、私钥等),一行一个:
地址----私钥
私钥
然后,运行以下命令来启动程序:
node index.js
单账号单个进程同时运行
若需对投票目标进行修改,请按照以下步骤操作:
- 打开
src/worker.js
文件。 - 定位到文件中的第 43 至 48 行。
- 根据您的需求,修改以下代码段中的
proposalId
和voteId
值:
// 示例投票链接:https://vote.jup.ag/proposal/5N9UbMGzga3SL8Rq7qDZCGfZX3FRDUhgqkSY2ksQjg8r
// 修改 `proposalId` 为您想要投票的提案 ID
const proposalId = new PublicKey(
"5N9UbMGzga3SL8Rq7qDZCGfZX3FRDUhgqkSY2ksQjg8r"
);
const voteId = 2; // 根据实际情况修改 voteId
例如,如果您希望投票给链接为 https://vote.jup.ag/proposal/5N9UbMGzga3SL8Rq7qDZCGfZX3FRDUhgqkSY2ksQjg8r 的提案,则将 proposalId
的值更改为 5N9UbMGzga3SL8Rq7qDZCGfZX3FRDUhgqkSY2ksQjg8r
。
比如投票链接为 https://vote.jup.ag/proposal/5N9UbMGzga3SL8Rq7qDZCGfZX3FRDUhgqkSY2ksQjg8r 就把 proposalId 的 内容改成 5N9UbMGzga3SL8Rq7qDZCGfZX3FRDUhgqkSY2ksQjg8r
要查找特定投票的 voteId
:
- 手动进行一次投票。
- 在区块浏览器中打开您的交易记录。
- 在
CastVote
交易详情中找到Side
字段,其值即为所需的voteId
。
jup_staker is a batch script designed for Jupiter staking and voting on the Solana blockchain. With a simplified command-line interface, users can easily perform batch staking and voting operations. Website: https://vote.jup.ag/
Staking Operation Voting Operation
In the root directory of the project, execute the following command to install project dependencies:
npm i
First, you need to input relevant information in the keys.txt file. Make sure to add your information in the following format (e.g., address, private key), one per line:
address----privateKey
privateKey
Then, run the following command to start the program:
node index.js
Single account runs in a single process simultaneously.
If you need to modify the voting target, follow these steps:
- Open the
src/worker.js
file. - Navigate to lines 43 to 48 in the file.
- Modify the
proposalId
andvoteId
values in the following code snippet according to your needs:
// Example voting link: https://vote.jup.ag/proposal/5N9UbMGzga3SL8Rq7qDZCGfZX3FRDUhgqkSY2ksQjg8r
// Modify `proposalId` to the ID of the proposal you want to vote for
const proposalId = new PublicKey(
"5N9UbMGzga3SL8Rq7qDZCGfZX3FRDUhgqkSY2ksQjg8r"
);
const voteId = 2; // Modify voteId according to your actual situation
For example, if you want to vote for the proposal with the link https://vote.jup.ag/proposal/5N9UbMGzga3SL8Rq7qDZCGfZX3FRDUhgqkSY2ksQjg8r, then change the value of proposalId
to 5N9UbMGzga3SL8Rq7qDZCGfZX3FRDUhgqkSY2ksQjg8r
.
For instance, if the voting link is https://vote.jup.ag/proposal/5N9UbMGzga3SL8Rq7qDZCGfZX3FRDUhgqkSY2ksQjg8r, then change the content of proposalId
to 5N9UbMGzga3SL8Rq7qDZCGfZX3FRDUhgqkSY2ksQjg8r
.
To find the voteId
for a specific vote:
- Cast a vote manually.
- Open your transaction records in the blockchain explorer.
- In the transaction details for the
CastVote
transaction, locate theSide
field, which contains the desiredvoteId
.