Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/assets/SOLO/SOLO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Solomon",
"symbol": "SOLO",
"description": "The composable dollar that always earns",
"image": "https://raw.githubusercontent.com/metaDAOproject/futarchy/refs/heads/develop/scripts/assets/SOLO/SOLO.png"
}
Binary file added scripts/assets/SOLO/SOLO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 96 additions & 0 deletions scripts/v0.6/launchSOLO.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import * as anchor from "@coral-xyz/anchor";
import {
LaunchpadClient,
getLaunchAddr,
getLaunchSignerAddr,
} from "@metadaoproject/futarchy/v0.6";
import { PublicKey, SystemProgram, Transaction } from "@solana/web3.js";
import BN from "bn.js";
import * as token from "@solana/spl-token";

// DAO DETAILS
const SPENDING_MEMBERS = [
new PublicKey("5wXBWMea5KWQHUjtcK5Np5zubMqYuicCLnvFZYbYt2ik"), // SOLO 1
new PublicKey("BCNsaGbVu4KdwWu2uS59628Un8uFWv9KG15JFkqYQtLT"), // SOLO 2
new PublicKey("CNbdt6wVxpRdDJ5Tu179wVMEyoLeokdMchBgx5Lkat22"), // SOLO 3
];
const PERFORMANCE_PACKAGE_GRANTEE = new PublicKey(
"9LuV5LrXJjpzb7rxhYwBwnraq9XEYcxA1mkuWTqUy2or",
);
const PERFORMANCE_PACKAGE_TOKEN_AMOUNT = 12_900_000;
const PERFORMANCE_PACKAGE_UNLOCK_TIME = 18;

const SPENDING_LIMIT = 100_000;
const MIN_GOAL = 2_000_000;

const TOKEN_SEED = "QOOD2FDAocrPF1ms";

const secondsPerDay = 86_400;
const fourDays = secondsPerDay * 4;

const provider = anchor.AnchorProvider.env();
const payer = provider.wallet["payer"];

const launchpad: LaunchpadClient = LaunchpadClient.createClient({ provider });

export const launch = async () => {
const seed = TOKEN_SEED;
const lamports = await provider.connection.getMinimumBalanceForRentExemption(
token.MINT_SIZE,
);

const TOKEN = await PublicKey.createWithSeed(
payer.publicKey,
seed,
token.TOKEN_PROGRAM_ID,
);
console.log("Token address:", TOKEN.toBase58());

const [launch] = getLaunchAddr(undefined, TOKEN);
const [launchSigner] = getLaunchSignerAddr(undefined, launch);

const tx = new Transaction().add(
SystemProgram.createAccountWithSeed({
fromPubkey: payer.publicKey,
newAccountPubkey: TOKEN,
basePubkey: payer.publicKey,
seed,
lamports: lamports,
space: token.MINT_SIZE,
programId: token.TOKEN_PROGRAM_ID,
}),
token.createInitializeMint2Instruction(TOKEN, 6, launchSigner, null),
);
tx.recentBlockhash = (
await provider.connection.getLatestBlockhash()
).blockhash;
tx.feePayer = payer.publicKey;
tx.sign(payer);

const txHash = await provider.connection.sendRawTransaction(tx.serialize());
await provider.connection.confirmTransaction(txHash, "confirmed");

const launchIx = await launchpad
.initializeLaunchIx({
tokenName: "Solomon",
tokenSymbol: "SOLO",
tokenUri:
"https://solomonlabs.org/assets/solo.json",
minimumRaiseAmount: new BN(MIN_GOAL * 10 ** 6),
baseMint: TOKEN,
monthlySpendingLimitAmount: new BN(SPENDING_LIMIT * 10 ** 6),
monthlySpendingLimitMembers: SPENDING_MEMBERS,
performancePackageGrantee: PERFORMANCE_PACKAGE_GRANTEE,
performancePackageTokenAmount: new BN(
PERFORMANCE_PACKAGE_TOKEN_AMOUNT * 10 ** 6,
),
monthsUntilInsidersCanUnlock: PERFORMANCE_PACKAGE_UNLOCK_TIME,
secondsForLaunch: fourDays,
})
.rpc();

console.log("Launch initialized - YaaS Baby!", launchIx);
// await launchpad.startLaunchIx({ launch }).rpc();
};

launch().catch(console.error);
Loading