# launch:team-config — Ammora SDK 0.3.8 npm run launch:team-config -- preview|create [reviewHash] [Read in Docs](https://docs.ammora.org/examples?command=launch%3Ateam-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:team-config -- ` (`tsx src/launch/team/config.ts`). Omit `--` and arguments when the source accepts none. ## Entry file: `src/launch/team/config.ts` ```typescript /** npm run launch:team-config -- preview|create [reviewHash] */ import { readFile } from "node:fs/promises"; import { buildCreateAmmoraV4Config, getAmmoraV4ConfigAtBlock, parseAmmoraV4ConfigCreatedReceipt, verifyAmmoraV4CoreAtBlock } from "@ammora-protocol/sdk"; import { readBlock, reader, signer, v4Deployment } from "../../shared/env.js"; import { printJson, rawAmount } from "../../shared/input.js"; import { main, send } from "../../shared/run.js"; import { assertTeamConfigReview, parseTeamRecipientPolicy, planTeamConfig } from "./policy.js"; main(async () => { const [mode, path, supplyArg, thresholdArg, expectedReview, ...extra] = process.argv.slice(2); if (!path || !["preview", "create"].includes(mode ?? "") || extra.length || (mode === "preview" && expectedReview) || (mode === "create" && !expectedReview)) { throw new Error("usage: preview OR create "); } const policy = parseTeamRecipientPolicy(JSON.parse(await readFile(path, "utf8"))); const saleSupply = rawAmount(supplyArg, "saleSupplyRaw"); const threshold = rawAmount(thresholdArg, "quoteThresholdRaw"); const client = await reader(); const launch = v4Deployment().contracts.launch; if (client.chain?.id !== policy.chainId || launch.configRegistry.toLowerCase() !== policy.registry.toLowerCase()) throw new Error("recipient policy chain/registry does not match the selected deployment"); const block = await readBlock(client); await verifyAmmoraV4CoreAtBlock(client, { configRegistry: launch.configRegistry, launchFactory: launch.factory, graduationAdapter: launch.graduationAdapter, feePolicy: launch.feePolicy }, block.number); const template = await getAmmoraV4ConfigAtBlock(client, launch.configRegistry, BigInt(policy.templateId), block.number); const plan = planTeamConfig(template, policy, { chainId: policy.chainId, registry: launch.configRegistry }, saleSupply, threshold); printJson({ mode, blockNumber: block.number, blockHash: block.hash, snapshot: block.snapshot, policy, ...plan, note: "Creates a new immutable Config. All template fee rates, vesting and LP ratios are preserved. Review every selected recipient and the complete policy. A matching reviewHash is required before loading a signer. No token is created by this command.", }); if (mode === "preview") return; assertTeamConfigReview(expectedReview, plan.reviewHash); const { wallet, account } = signer(); const hash = await send("create team Config", plan.transaction, wallet, account, client); const receipt = await client.getTransactionReceipt({ hash }); const created = parseAmmoraV4ConfigCreatedReceipt(receipt, launch.configRegistry); const confirmed = await getAmmoraV4ConfigAtBlock(client, launch.configRegistry, created.configId, receipt.blockNumber); const actual = buildCreateAmmoraV4Config(confirmed.config, confirmed.segments, policy.configOwner); if (actual.data !== plan.transaction.data || confirmed.configHash !== created.configHash || confirmed.identity.owner.toLowerCase() !== policy.configOwner.toLowerCase() || confirmed.identity.feeClaimer.toLowerCase() !== policy.partnerRecipient.toLowerCase()) { throw new Error("receipt-bound team Config does not match the reviewed calldata policy"); } printJson({ hash, blockNumber: receipt.blockNumber, ...created, recipients: plan.recipients }); }); ``` ## 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/launch/config-from-template.ts](https://docs.ammora.org/examples/source/src/launch/config-from-template.ts.txt) - [src/launch/team/policy.ts](https://docs.ammora.org/examples/source/src/launch/team/policy.ts.txt) - [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.