Token Deployment Flow
TokenMaster allows creators to deploy tokens with precise configurations tailored to their application's needs. The deployment process involves selecting the desired token type, configuring deployment parameters, and leveraging deterministic address computation for predictability.
Steps to Deploy a Token
-
Choose Token Type:
- Decide the type of pool (e.g., Standard, Stable, Promotional) that best suits your application's requirements.
-
Construct Deployment Parameters:
- Use the following key structures to define the token's behavior and settings:
- DeploymentParameters: General deployment settings such as the token factory, deterministic address salt, and transaction rules.
- PoolDeploymentParameters: Pool-specific settings, including token metadata, pairing token, and initial supply.
- Use the following key structures to define the token's behavior and settings:
-
Compute the Deterministic Deployment Address:
-
Use the factory contract's helper function
computeDeploymentAddressto calculate the token's address before deployment:function computeDeploymentAddress(
bytes32 tokenSalt,
PoolDeploymentParameters calldata poolParams,
uint256 pairedValueIn,
uint256 infrastructureFeeBPS
) external view returns(address deploymentAddress); -
This ensures predictability and prevents address conflicts.
-
-
Deploy the Token:
-
Call the
deployTokenfunction on the TokenMaster Router with the constructed parameters:function deployToken(
DeploymentParameters calldata deploymentParameters,
SignatureECDSA calldata signature
) external payable; -
Note: The
signatureparameter is only required when TokenMaster Router has a signing authority enabled for token deployments. If a signing authority is not configured, thesignatureparameter is validated.
-
-
Token Activation:
- Upon successful deployment, the token will be fully operational and managed via the TokenMaster Router.
