# launch:get-config — Ammora SDK 0.3.8 Read a launch config, or list what is registered. No key required. npm run launch:get-config # list the first page npm run launch:get-config -- # one config in detail A config is the shape of a launch: the curve, the fee schedule, what happens at graduation. Launches reference one by id rather than restating it, so reading the config tells you what a launch built on it will do. [Read in Docs](https://docs.ammora.org/examples?command=launch%3Aget-config) · [Detailed guide](https://docs.ammora.org/guides/launchpad) · [Local setup](https://docs.ammora.org/guides/example-setup) ## Context and execution GIWA Sepolia 91342. Public SDK 0.3.8, Math 0.3.0. Source revision: `a9b3fd798fa51495e8defec99a25de59e4d70672`. Install the SDK in your app, or prepare the example project using the local setup guide for its npm commands. Review the entry source and guide for required arguments, roles and deployment selection. `AMMORA_SEND=0` does not turn send-only commands into previews. Never put CLI keys in a browser or resend an uncertain transaction. Command: `npm run launch:get-config -- ` (`tsx src/launch/get-config.ts`). Omit `--` and arguments when the source accepts none. ## Entry file: `src/launch/get-config.ts` ```typescript /** * Read a launch config, or list what is registered. No key required. * * npm run launch:get-config # list the first page * npm run launch:get-config -- # one config in detail * * A config is the shape of a launch: the curve, the fee schedule, what happens at * graduation. Launches reference one by id rather than restating it, so reading the config * tells you what a launch built on it will do. */ import { getAmmoraV4ConfigAtBlock, getAmmoraV4NextConfigId, } from "@ammora-protocol/sdk"; import { readBlock, reader, v4Deployment } from "../shared/env.js"; import { printJson } from "../shared/input.js"; import { main } from "../shared/run.js"; main(async () => { const idArgument = process.argv[2]; const client = await reader(); const contracts = v4Deployment().contracts.launch; const { number: blockNumber } = await readBlock(client); if (!idArgument) { const nextConfigId = await getAmmoraV4NextConfigId( client, contracts.configRegistry, blockNumber, ); const ids = Array.from( { length: Number(nextConfigId > 17n ? 16n : nextConfigId - 1n) }, (_, index) => BigInt(index + 1), ); const items: Awaited>[] = []; for (const configId of ids) { if (items.length > 0) await new Promise((resolve) => setTimeout(resolve, 1000)); items.push(await getAmmoraV4ConfigAtBlock(client, contracts.configRegistry, configId, blockNumber)); } console.log(`registry ${contracts.configRegistry}`); console.log(`as of block ${blockNumber}`); console.log(`showing ${items.length} config(s)`); for (const entry of items) { console.log( ` #${entry.configId} ${entry.enabled ? "enabled " : "disabled"}` + ` segments ${entry.segments.length}` + ` quote threshold ${entry.config.migrationQuoteThreshold}` + ` owner ${entry.identity.owner}`, ); } if (items.length === 0) console.log("\nnothing registered on this deployment yet"); return; } if (!/^\d+$/.test(idArgument)) throw new Error("config id must be a positive integer"); const entry = await getAmmoraV4ConfigAtBlock( client, contracts.configRegistry, BigInt(idArgument), blockNumber, ); console.log(`config #${idArgument} ${entry.enabled ? "enabled" : "disabled"}`); console.log(`hash ${entry.configHash}`); console.log(`segments ${entry.segments.length}`); console.log(`owner ${entry.identity.owner}`); console.log(`fee claim ${entry.identity.feeClaimer}`); console.log(`created block ${entry.identity.createdAtBlock}`); console.log(`policy ${entry.feePolicyVersion}`); console.log(""); console.log(`quote threshold ${entry.config.migrationQuoteThreshold}`); console.log(`base threshold ${entry.config.migrationBaseThreshold}`); console.log(`total supply ${entry.config.totalSupply}`); console.log(`cliff fee ${entry.config.cliffFeeBps} bps`); console.log(`migration mode ${entry.config.migrationMode}`); printJson({ config: entry.config, note: "Full inherited fee, recipient, vesting and LP policy. Config ownership does not redirect partner fees." }); console.log(""); for (const [index, segment] of entry.segments.entries()) { console.log( ` segment ${index} sqrt ${segment.lowerSqrtPrice} .. ${segment.upperSqrtPrice}` + ` liquidity ${segment.liquidity}`, ); } }); ``` ## Supporting files Keep relative paths intact. Local imports are listed recursively; JSON templates are choices to review, not approved inputs. Runtime-selected files and wallet/environment setup still follow the detailed guide. - [src/shared/env.ts](https://docs.ammora.org/examples/source/src/shared/env.ts.txt) - [src/shared/input.ts](https://docs.ammora.org/examples/source/src/shared/input.ts.txt) - [src/shared/retry.ts](https://docs.ammora.org/examples/source/src/shared/retry.ts.txt) - [src/shared/rpc.ts](https://docs.ammora.org/examples/source/src/shared/rpc.ts.txt) - [src/shared/run.ts](https://docs.ammora.org/examples/source/src/shared/run.ts.txt) - [src/launch/config-document.example.json](https://docs.ammora.org/examples/source/src/launch/config-document.example.json.txt) - [src/launch/team/fees.example.json](https://docs.ammora.org/examples/source/src/launch/team/fees.example.json.txt) - [src/launch/team/recipients.example.json](https://docs.ammora.org/examples/source/src/launch/team/recipients.example.json.txt) - [package.json](https://docs.ammora.org/examples/source/package.json.txt) - [package-lock.json](https://docs.ammora.org/examples/source/package-lock.json.txt) - [tsconfig.json](https://docs.ammora.org/examples/source/tsconfig.json.txt) - [.env.giwa.example](https://docs.ammora.org/examples/source/file.env.giwa.example.txt) - [.nvmrc](https://docs.ammora.org/examples/source/file.nvmrc.txt) ## AI implementation checklist Use the actual SDK exports and parameter types in the linked files. Start with reads and unsigned plans where supported. Use a connected wallet for browser signing. Preserve raw integer units, exact approvals, caller authority, deadlines and receipt reconciliation. Report local checks separately from live-chain verification.