# deploy

### Description

Create a new KRC-20 token. The operation can specify "Mint Mode" or "Issue Mode".

### Transaction Fee

1,000 KAS  minimum required.

### Parameters

JSON format example:

{% code overflow="wrap" fullWidth="false" %}

```json
{"p":"krc-20","op":"deploy", "tick":"kasp","max":"2100000000000000","lim":"100000000000","to":"kaspa:..."}
```

{% endcode %}

#### Mint Mode

Enabled when ( DaaScore >= 83441551 AND DaaScore <= 83525600 OR DaaScore >= 90090600 ).

<table><thead><tr><th width="203">Key</th><th width="118.33333333333331">Required?</th><th>Description</th></tr></thead><tbody><tr><td>p</td><td>Yes</td><td>Protocol header. <strong>Must be "krc-20"</strong> (case-insensitive).</td></tr><tr><td>op</td><td>Yes</td><td>Operation. <strong>Must be "deploy"</strong> (case-insensitive).</td></tr><tr><td>tick</td><td>Yes</td><td>Ticker. 4 to 6 letter unique identifier of the token (case-insensitive).</td></tr><tr><td>max</td><td>Yes</td><td>Max supply of the token, including decimal.</td></tr><tr><td>lim</td><td>Yes</td><td>The balance obtained for each mint, including decimal.</td></tr><tr><td>to</td><td>No</td><td>The deployer address of the token and receiver address of the pre allocated token (If <code>pre</code> is provided).</td></tr><tr><td>dec</td><td>No</td><td>Decimal. Default to 8.</td></tr><tr><td>pre</td><td>No</td><td>The amount of tokens allocated to a particular address after deployment.</td></tr></tbody></table>

#### Issue Mode

Enabled when ( DaaScore >= 110165000 ).

<table><thead><tr><th width="203">Key</th><th width="118.33333333333331">Required?</th><th>Description</th></tr></thead><tbody><tr><td>p</td><td>Yes</td><td>Protocol header. <strong>Must be "krc-20"</strong> (case-insensitive).</td></tr><tr><td>op</td><td>Yes</td><td>Operation. <strong>Must be "deploy"</strong> (case-insensitive).</td></tr><tr><td>mod</td><td>Yes</td><td>Deployment Mode. <strong>Must be "issue"</strong>.</td></tr><tr><td>name</td><td>Yes</td><td>Token name: 4 to 6 letter, allow duplicates (case-insensitive).</td></tr><tr><td>max</td><td>Yes</td><td>max supply of the token, "0" means unlimited issuance, including decimal.</td></tr><tr><td>to</td><td>No</td><td>The owner address of the token and receiver address of the pre allocated token (If <code>pre</code> is provided).</td></tr><tr><td>dec</td><td>No</td><td>Decimal. Default to 8.</td></tr><tr><td>pre</td><td>No</td><td>The amount of tokens allocated to a particular address after deployment.</td></tr></tbody></table>

### Notice

* if `pre` > `max`, only `max` amount of tokens will allocate to `to` address.
* If `to` field is not configured,  it defaults to the transaction sender address.
* In "Issue Mode", Use the deployment transaction ID as the token contract address (CA).
* Use API to check whether the corresponding `tick` is available before deployment to avoid loss of transaction fee.
