Add dao-init and proposal-init scripts in CLI form#274
Closed
Add dao-init and proposal-init scripts in CLI form#274
Conversation
…swap functionality.
metaproph3t
reviewed
Mar 21, 2025
| @@ -0,0 +1,128 @@ | |||
| import { Keypair } from "@solana/web3.js"; | |||
Member
There was a problem hiding this comment.
nit: can we call files phrases like 'initDao' instead of 'daoInit'
metaproph3t
reviewed
Mar 21, 2025
|
|
||
| const rpcUrl = await input({ | ||
| message: "Enter your RPC URL:", | ||
| default: process.env.RPC_URL, |
Member
There was a problem hiding this comment.
wdyt about the default devnet and mainnet rpc urls from the setup metric market script?
metaproph3t
reviewed
Mar 21, 2025
| usdcMint, | ||
| usdcAccount, | ||
| payer, | ||
| 2_000_000n * 1_000_000n // 200,000 USDC with 6 decimals (like in tests) |
metaproph3t
reviewed
Mar 21, 2025
|
|
||
| console.log("DAO created with address:", dao.toString()); | ||
| console.log("DAO keypair public key:", daoKeypair.publicKey.toString()); | ||
| } |
Member
There was a problem hiding this comment.
can we delete the other scripts in the regular anchor style that these are replacing?
metaproph3t
reviewed
Mar 21, 2025
Comment on lines
+46
to
+64
| // Create META token mint | ||
| const metaMint = await token.createMint( | ||
| provider.connection, | ||
| payer, | ||
| payer.publicKey, // mint authority | ||
| payer.publicKey, // freeze authority | ||
| 9 // 9 decimals like in tests | ||
| ); | ||
| console.log("Created META mint:", metaMint.toString()); | ||
|
|
||
| // Create USDC mint | ||
| const usdcMint = await token.createMint( | ||
| provider.connection, | ||
| payer, | ||
| payer.publicKey, | ||
| payer.publicKey, | ||
| 6 // 6 decimals for USDC | ||
| ); | ||
| console.log("Created USDC mint:", usdcMint.toString()); |
Member
There was a problem hiding this comment.
it would be kinda cool if the default was to create a new mint, but we could also use this with existing mints, that way we can use the script in prod
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.