Skip to content

Commit

Permalink
Add MOBILE proposals (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass authored Dec 5, 2023
1 parent 46bb275 commit d6ed787
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 11 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/create-proposals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,13 @@ jobs:
--file ./helium-proposals.json \
--wallet ./deploy-keypair.json \
--orgName Helium \
--multisig ${{ secrets.MULTISIG }}
--multisig ${{ secrets.MULTISIG }}
- name: Run Bulk Create Mobile Proposals
run: |
./node_modules/.bin/ts-node ./bin/helium-vote.ts bulk-create-proposal \
-u "https://solana-rpc.web.helium.io?session-key=Pluto" \
--file ./mobile-proposals.json \
--wallet ./deploy-keypair.json \
--orgName "Helium MOBILE" \
--multisig ${{ secrets.MULTISIG }}
20 changes: 20 additions & 0 deletions mobile-proposals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"name": "MOBILE Working Group (Even Class) Elections - Q4 2023",
"uri": "https://gist.githubusercontent.com/hiptron/036867431eb2153a52babe30fb5dbdf3/raw/ebbe80bc2d992e5d9c64530391523683c67c8c0e/2023Q4__MOBILE__00__Summary.md",
"maxChoicesPerVoter": 5,
"tags": ["working-group"],
"choices": [
{ "uri": null, "name": "Heated Lime" },
{ "uri": null, "name": "Keith Rettig" },
{ "uri": null, "name": "Max Gold" },
{ "uri": null, "name": "Kennyy" },
{ "uri": null, "name": "cheflifeworld" },
{ "uri": null, "name": "Erfanjhan" },
{ "uri": null, "name": "Unikt39" },
{ "uri": null, "name": "Brainstormer" },
{ "uri": null, "name": "KΞ7IN" },
{ "uri": null, "name": "greenz" }
]
}
]
20 changes: 10 additions & 10 deletions scripts/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,22 @@ export async function run(args: any = process.argv) {
describe: "Authority index for squads. Defaults to 1",
default: 1,
},
threshold: {
type: "number",
default: "10000000000000000",
},
});
const argv = await yarg.argv;
process.env.ANCHOR_WALLET = argv.wallet;
process.env.ANCHOR_PROVIDER_URL = argv.url;
anchor.setProvider(anchor.AnchorProvider.local(argv.url));

const registrarK = registrarKey(
PublicKey.findProgramAddressSync(
[
Buffer.from("governance", "utf-8"),
Buffer.from(argv.realmName, "utf-8"),
],
new PublicKey("hgovkRU6Ghe1Qoyb54HdSLdqN7VtxaifBzRmh9jtd3S")
)[0],
new PublicKey(argv.mint)
const realmKey = PublicKey.findProgramAddressSync(
[Buffer.from("governance", "utf-8"), Buffer.from(argv.realmName, "utf-8")],
new PublicKey("hgovkRU6Ghe1Qoyb54HdSLdqN7VtxaifBzRmh9jtd3S")
)[0];
console.log("Realm is", realmKey.toBase58())
const registrarK = registrarKey(realmKey, new PublicKey(argv.mint))[0];
const provider = anchor.getProvider() as anchor.AnchorProvider;
const walletKP = loadKeypair(argv.wallet);
const wallet = new anchor.Wallet(walletKP);
Expand All @@ -79,7 +79,7 @@ export async function run(args: any = process.argv) {
settings().and(
settings().choicePercentage(67),
// 100,000,000 veHNT
settings().choiceVoteWeight(new anchor.BN("10000000000000000"))
settings().choiceVoteWeight(new anchor.BN(argv.threshold))
)
),
settings().offsetFromStartTs(new anchor.BN(60 * 60 * 24 * 7))
Expand Down

0 comments on commit d6ed787

Please sign in to comment.