Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions governance/xc_admin/packages/xc_admin_cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ multisigCommand(
voteAccounts.map((voteAccount: PublicKey) =>
fetchStakeAccounts(
new Connection(getPythClusterApiUrl(cluster)),
authorizedPubkey,
voteAccount,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export class SolanaStakingMultisigInstruction implements MultisigInstruction {

export async function fetchStakeAccounts(
connection: Connection,
staker: PublicKey,
voterAccount: PublicKey,
) {
const stakeAccounts = await connection.getProgramAccounts(
Expand All @@ -137,12 +138,24 @@ export async function fetchStakeAccounts(
bytes: bs58.encode(Buffer.from([2, 0, 0, 0])),
},
},
{
memcmp: {
offset: 12,
bytes: staker.toBase58(),
},
},
{
memcmp: {
offset: 124,
bytes: voterAccount.toBase58(),
},
},
{
memcmp: {
offset: 172,
bytes: bs58.encode(Buffer.from("ff".repeat(8), "hex")), // account is active
},
},
],
},
);
Expand Down
Loading