Skip to content

Add dao-init and proposal-init scripts in CLI form#274

Closed
pileks wants to merge 6 commits intodevelopfrom
pileks/initialize-v0-4-cli-scripts
Closed

Add dao-init and proposal-init scripts in CLI form#274
pileks wants to merge 6 commits intodevelopfrom
pileks/initialize-v0-4-cli-scripts

Conversation

@pileks
Copy link
Copy Markdown
Contributor

@pileks pileks commented Mar 20, 2025

No description provided.

@pileks pileks requested review from R-K-H and metaproph3t March 20, 2025 21:17
@pileks pileks self-assigned this Mar 20, 2025
@@ -0,0 +1,128 @@
import { Keypair } from "@solana/web3.js";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we call files phrases like 'initDao' instead of 'daoInit'


const rpcUrl = await input({
message: "Enter your RPC URL:",
default: process.env.RPC_URL,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdyt about the default devnet and mainnet rpc urls from the setup metric market script?

usdcMint,
usdcAccount,
payer,
2_000_000n * 1_000_000n // 200,000 USDC with 6 decimals (like in tests)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment incorrect


console.log("DAO created with address:", dao.toString());
console.log("DAO keypair public key:", daoKeypair.publicKey.toString());
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we delete the other scripts in the regular anchor style that these are replacing?

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());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@R-K-H R-K-H deleted the pileks/initialize-v0-4-cli-scripts branch January 2, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants