-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add instructions for raising proposals
- Loading branch information
1 parent
96fdcb6
commit 5c759a0
Showing
4 changed files
with
53 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { initializeProposal } from "./main"; | ||
import * as anchor from "@coral-xyz/anchor"; | ||
import { MEMO_PROGRAM_ID } from "@solana/spl-memo"; | ||
|
||
const { PublicKey, Keypair, SystemProgram } = anchor.web3; | ||
const { BN, Program } = anchor; | ||
|
||
async function main() { | ||
const memoText = | ||
"I, glorious autocrat of the divine Meta-DAO, " + | ||
"sanction the creation of this Saber vote market platform.\n\n" + | ||
"That I shall bestow lavish rewards upon those who contribute to its creation is guaranteed. " + | ||
"Remember that my word is not the word of a man but the word of a market.\n\n" + | ||
"Godspeed, futards!"; | ||
|
||
const memoInstruction = { | ||
programId: new PublicKey(MEMO_PROGRAM_ID), | ||
data: Buffer.from(memoText), | ||
accounts: [], | ||
}; | ||
|
||
// accounts should be an array of objects that look like | ||
// { | ||
// pubkey: new PublicKey(MEMO_PROGRAM_ID), | ||
// isWritable: false, | ||
// isSigner: false, | ||
// } | ||
|
||
await initializeProposal( | ||
memoInstruction, | ||
"https://hackmd.io/@jlPYU3_dTOuQkU5duRNUlg/rkhWWXjLp" | ||
); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters