Agent Skill · Limit Break
tokenmaster-deployer
Generate TokenMaster token deployment scripts -- pool type selection, parameter construction, deterministic addressing
Skill body
TokenMaster Deployer
Generate deployment scripts for TokenMaster tokens.
Project Setup
Before generating code, check the user’s project is configured:
- Foundry:
foundry.tomlmust exist. If not:forge init - TokenMaster:
lib/tm-tokenmaster/must exist. If not:forge install limitbreakinc/tm-tokenmaster - Remappings:
remappings.txtneeds@limitbreak/tm-tokenmaster/=lib/tm-tokenmaster/. Append if missing – do not overwrite existing entries. - Local testing: For local development, use
apptoken-devto bootstrap an Anvil node with all Apptoken protocols at their deterministic addresses – seeapptoken-general/references/project-setup.md.
Instructions
- Parse requirements from $ARGUMENTS
- Resolve ambiguities before generating – if $ARGUMENTS doesn’t specify pool type (Standard vs Stable vs Promotional) and it’s not obvious from context, or mentions a paired token without an address, ask in a single message. Also clarify fee percentages, creator shares, or infrastructure fee caps if they’d significantly change the deployment. If clear, proceed.
- Determine pool type: Standard (flexible tokenomics), Stable (fixed price), Promotional (no market value)
- Construct DeploymentParameters + PoolDeploymentParameters with encoded pool-specific initialization args
- Compute deterministic address via
factory.computeDeploymentAddress() - Generate Foundry deployment script calling
router.deployToken() - Post-deployment: configure pool settings, set order signers, configure trusted channels if needed
Reference Files
references/deployment-workflow.md– Step-by-step deployment with code examplesreferences/pool-configuration.md– Pool-specific parameter construction- Protocol knowledge:
tokenmaster-protocol
Common Mistakes
- Forgetting to whitelist the TokenMaster Router in the Transfer Validator – tokens won’t be mintable/burnable
- Using
address(0)forpairedTokenwithout sendingmsg.value– native token pairing requires ETH deposit DEPLOYMENT_TYPEHASHonly covers 5 fields (notpoolParamsormaxInfrastructureFeeBPS) – don’t assume the signer covers pool configuration- StablePool does NOT support
transferCreatorShareToMarket– it reverts withTokenMasterERC20__OperationNotSupportedByPool() setTokenAllowedTrustedChannelexists on the Router but is NOT inITokenMasterRouter.sol– use the concrete type for ABI encoding
When to Use This vs Other Skills
- This skill (tokenmaster-deployer): Deploy a new ERC-20C token with a TokenMaster pool. Start here for backed/priced tokens.
- transfer-validator-config: Configure which operators can move the token. Do this before or after deployment – the token needs LBAMM and TokenMaster whitelisted.
- lbamm-pool: Create an LBAMM trading pool for the token. Do this after TokenMaster deployment if you want both backing and AMM trading.
Related Skills
- tokenmaster-integrator – Generate buy/sell/spend transaction code after deployment
- tokenmaster-hook – Generate hook contracts for advanced order post-execution logic
Skill frontmatter
user-invocable: true
disable-model-invocation: true
argument-hint: [description of token requirements - pool type, paired token, pricing, fees]