# launch:fee-sharing — Ammora SDK 0.3.8 Read a Config's fee policy, beneficiaries and illustrative splits. No key required. npm run launch:fee-sharing -- [beneficiary] FeeVault claimable is keyed by fee asset (usually quote/WETH), not launch identity. [Read in Docs](https://docs.ammora.org/examples?command=launch%3Afee-sharing) · [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:fee-sharing -- ` (`tsx src/launch/fee-sharing.ts`). Omit `--` and arguments when the source accepts none. ## Entry file: `src/launch/fee-sharing.ts` ```typescript /** Read a Config's fee policy, beneficiaries and illustrative splits. No key required. * npm run launch:fee-sharing -- [beneficiary] * FeeVault claimable is keyed by fee asset (usually quote/WETH), not launch identity. */ import { ammoraLaunchFactoryV4Abi, feeVaultAbi, getAmmoraV4ConfigAtBlock, getAmmoraProtocolFeePolicyV1, assertAmmoraProtocolFeePolicyV1, previewAmmoraLaunchFeeDistribution, previewAmmoraGraduatedFeeDistribution, verifyAmmoraV4CoreAtBlock, } from "@ammora-protocol/sdk"; import { address, readBlock, reader, v4Deployment } from "../shared/env.js"; import { main } from "../shared/run.js"; import { printJson, rawAmount } from "../shared/input.js"; main(async () => { const [id, beneficiaryArg, ...extra] = process.argv.slice(2); if (!id || extra.length) throw new Error("usage: [beneficiary]"); const configId = rawAmount(id, "configId"); const beneficiary = beneficiaryArg ? address("AMMORA_FEE_BENEFICIARY", beneficiaryArg) : undefined; const client = await reader(); const deployment = v4Deployment(); const launch = deployment.contracts.launch; const block = await readBlock(client); await verifyAmmoraV4CoreAtBlock(client, { configRegistry: launch.configRegistry, launchFactory: launch.factory, graduationAdapter: launch.graduationAdapter, feePolicy: launch.feePolicy }, block.number); const entry = await getAmmoraV4ConfigAtBlock(client, launch.configRegistry, configId, block.number); const policy = await getAmmoraProtocolFeePolicyV1(client, launch.feePolicy, block.number); assertAmmoraProtocolFeePolicyV1(policy); const feeVault = await client.readContract({ address: launch.factory, abi: ammoraLaunchFactoryV4Abi, functionName: "feeVault", blockNumber: block.number }); const claimableQuote = beneficiary ? await client.readContract({ address: feeVault, abi: feeVaultAbi, functionName: "claimable", args: [entry.config.quoteToken, beneficiary], blockNumber: block.number }) : null; printJson({ slot: deployment.slot, registry: launch.configRegistry, configId, configHash: entry.configHash, enabled: entry.enabled, blockNumber: block.number, blockHash: block.hash, snapshot: block.snapshot, policy, feeVault, configOwner: entry.identity.owner, feeClaimer: entry.identity.feeClaimer, partnerRecipient: entry.config.partnerRecipient, quoteToken: entry.config.quoteToken, creatorShareOfNonProtocolBps: entry.config.creatorShareOfNonProtocolBps, feeSchedule: { cliffFeeBps: entry.config.cliffFeeBps, periods: entry.config.feeNumberOfPeriods, frequency: entry.config.feePeriodFrequency, reductionBps: entry.config.feeReductionFactorBps, mode: entry.config.feeSchedulerMode, dynamicFeeEnabled: entry.config.dynamicFeeEnabled, rateLimiterEnabled: entry.config.rateLimiterEnabled }, illustrativeFeeRaw: 10_000n, launchSplitWithoutReferral: previewAmmoraLaunchFeeDistribution(10_000n, entry.config.creatorShareOfNonProtocolBps, false), launchSplitWithReferral: previewAmmoraLaunchFeeDistribution(10_000n, entry.config.creatorShareOfNonProtocolBps, true), graduatedSplitWithoutReferral: previewAmmoraGraduatedFeeDistribution(10_000n, entry.config.postMigrationCompoundingFeeBps, false), migrationQuoteFeeBps: entry.config.migrationQuoteFeeBps, creatorMigrationFeeShareBps: entry.config.creatorMigrationFeeShareBps, liquidityDistribution: entry.config.liquidityDistribution, beneficiary: beneficiary ?? null, claimableQuoteRaw: claimableQuote, note: "Illustrations split a fee amount, not trade notional. Creator is the launch creator, not necessarily Config owner. Graduation pays creator/partner through LP positions. Vault balances aggregate all sources for each asset/beneficiary; use trade events for per-launch accounting. AFS vaults are optional and are not created or funded by this Config.", }); }); ``` ## 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.