Skip to content

Commit

Permalink
Add abstain vote
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass committed Oct 24, 2024
1 parent 347cc76 commit ed6de51
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 201 deletions.
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
},
"dependencies": {
"@coral-xyz/anchor": "^0.29.0",
"@helium/account-fetch-cache": "^0.9.7",
"@helium/account-fetch-cache-hooks": "^0.9.7",
"@helium/helium-react-hooks": "^0.9.7",
"@helium/modular-governance-hooks": "^0.0.13",
"@helium/modular-governance-idls": "^0.0.13",
"@helium/organization-sdk": "^0.0.13",
"@helium/position-voting-rewards-sdk": "^0.9.7",
"@helium/spl-utils": "^0.9.7",
"@helium/state-controller-sdk": "^0.0.13",
"@helium/voter-stake-registry-hooks": "^0.9.7",
"@helium/voter-stake-registry-sdk": "^0.9.7",
"@helium/account-fetch-cache": "^0.9.8",
"@helium/account-fetch-cache-hooks": "^0.9.8",
"@helium/helium-react-hooks": "^0.9.8",
"@helium/modular-governance-hooks": "^0.0.14",
"@helium/modular-governance-idls": "^0.0.14",
"@helium/organization-sdk": "^0.0.14",
"@helium/position-voting-rewards-sdk": "^0.9.8",
"@helium/spl-utils": "^0.9.8",
"@helium/state-controller-sdk": "^0.0.14",
"@helium/voter-stake-registry-hooks": "^0.9.8",
"@helium/voter-stake-registry-sdk": "^0.9.8",
"@hookform/resolvers": "^3.3.4",
"@metaplex-foundation/mpl-token-metadata": "2.10.0",
"@project-serum/anchor": "^0.26.0",
Expand Down Expand Up @@ -72,18 +72,18 @@
"yargs": "^17.7.2"
},
"resolutions": {
"@helium/position-voting-rewards-sdk": "^0.9.7",
"@helium/position-voting-rewards-sdk": "^0.9.8",
"@tanstack/react-query": "5.45.1",
"@solana/web3.js": "^1.90.0",
"@helium/account-fetch-cache": "^0.9.7",
"@helium/account-fetch-cache-hooks": "^0.9.7",
"@helium/helium-react-hooks": "^0.9.7",
"@helium/voter-stake-registry-hooks": "^0.9.7",
"@helium/modular-governance-idls": "^0.0.13",
"@helium/spl-utils": "^0.9.7",
"@helium/modular-governance-hooks": "^0.0.13",
"@helium/account-fetch-cache": "^0.9.8",
"@helium/account-fetch-cache-hooks": "^0.9.8",
"@helium/helium-react-hooks": "^0.9.8",
"@helium/voter-stake-registry-hooks": "^0.9.8",
"@helium/modular-governance-idls": "^0.0.14",
"@helium/spl-utils": "^0.9.8",
"@helium/modular-governance-hooks": "^0.0.14",
"@solana/wallet-adapter-react": "^0.15.35",
"@helium/voter-stake-registry-sdk": "^0.9.7"
"@helium/voter-stake-registry-sdk": "^0.9.8"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.10",
Expand Down
16 changes: 9 additions & 7 deletions scripts/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,17 @@ export async function run(args: any = process.argv) {
// Must have 100,000,000 veHNT, 67% of the vote. Choose the top one as the winner.
const nodes = settings()
.and(
settings().offsetFromStartTs(new anchor.BN(60 * 60 * 24 * 7)),
settings().and(
settings().top(1),
settings().and(
settings().choicePercentage(67),
// 100,000,000 veHNT
settings().choiceVoteWeight(new anchor.BN(argv.threshold))
)
),
settings().offsetFromStartTs(new anchor.BN(60 * 60 * 24 * 7))
settings().totalWeight(new anchor.BN(argv.threshold)),
settings().and(
settings().not("Abstain"),
settings().choicePercentageOfCurrent(67)
)
),
settings().top(1)
)
)
.build();

Expand Down
Loading

0 comments on commit ed6de51

Please sign in to comment.