> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# Create Token \[token.create]

Creates a new TIP-20 token, and assigns the admin role to `admin` (defaults to the Client's account). [Learn more](https://docs.tempo.xyz/protocol/tip20/overview)

## Usage

:::code-group
```ts twoslash [example.ts]
import { client } from './viem.config'

const { admin, receipt, token } = await client.token.createSync({
  currency: 'USD',
  logoURI: 'https://example.com/cusd.svg',
  name: 'My Company USD',
  symbol: 'CUSD',
})

console.log('Address:', token)
// @log: Address: 0x20c0000000000000000000000000000000000004
console.log('Admin:', admin)
// @log: Admin: 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
// [!include ~/snippets/tempo/viem.config.ts:setup]
```
:::

### Asynchronous Usage

The example above uses a `*Sync` variant of the action, that will wait for the transaction to be included before returning.

If you are optimizing for performance, you should use the non-sync `token.create` action and wait for inclusion manually:

```ts twoslash
import { Actions } from 'viem/tempo'
import { client } from './viem.config'

const hash = await client.token.create({
  currency: 'USD',
  logoURI: 'https://example.com/cusd.svg',
  name: 'My Company USD',
  symbol: 'CUSD',
})
const receipt = await client.transaction.waitForReceipt({ hash }).receipt

const { args: { token } } = Actions.token.create.extractEvent(receipt.logs)
```

## Recipes

### Assign the Admin Role to a Treasury Multisig

Pass `admin` to hand role administration to a treasury multisig at deployment, keeping the deployer key out of day-to-day control of the token.

:::code-group
```ts twoslash [example.ts]
import { client } from './viem.config'

const { admin, token } = await client.token.createSync({
  admin: '0x8ba1f109551bD432803012645Ac136ddd64DBA72', // [!code focus]
  currency: 'USD',
  name: 'My Company USD',
  symbol: 'CUSD',
})

console.log('Admin:', admin)
// @log: Admin: 0x8ba1f109551bD432803012645Ac136ddd64DBA72
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
// [!include ~/snippets/tempo/viem.config.ts:setup]
```
:::

### Set Up Issuance for a Payments Backend

Combine `token.createSync` with [`token.grantRolesSync`](/tempo/actions/token.grantRoles) to authorize your backend's minting key immediately after deployment, so it can issue supply on customer deposits.

:::code-group
```ts twoslash [example.ts]
import { client } from './viem.config'

const { token } = await client.token.createSync({
  currency: 'USD',
  name: 'My Company USD',
  symbol: 'CUSD',
})

const { value } = await client.token.grantRolesSync({ // [!code focus]
  roles: ['issuer'], // [!code focus]
  to: '0x8ba1f109551bD432803012645Ac136ddd64DBA72', // [!code focus]
  token, // [!code focus]
}) // [!code focus]

console.log('Issuer granted:', value[0].hasRole)
// @log: Issuer granted: true
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
// [!include ~/snippets/tempo/viem.config.ts:setup]
```
:::

### Pin the Token Address Across Environments

Pass a fixed `salt` so redeploys with identical parameters land at a predictable address, letting downstream systems allowlist the token ahead of deployment.

:::code-group
```ts twoslash [example.ts]
import { client } from './viem.config'

const { token } = await client.token.createSync({
  currency: 'USD',
  name: 'My Company USD',
  salt: '0x0000000000000000000000000000000000000000000000000000000000000001', // [!code focus]
  symbol: 'CUSD',
})

console.log('Address:', token)
// @log: Address: 0x20c0000000000000000000000000000000000004
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
// [!include ~/snippets/tempo/viem.config.ts:setup]
```
:::

## Return Value

```ts
type ReturnType = {
  /** Created token address. */
  token: Address
  /** Token name. */
  name: string
  /** Token symbol. */
  symbol: string
  /** Currency (e.g. "USD"). */
  currency: string
  /** Quote token address. */
  quoteToken: Address
  /** Admin address. */
  admin: Address
  /** Unique salt. */
  salt: Hex
  /** Transaction receipt. */
  receipt: TransactionReceipt
}
```

## Parameters

### admin

* **Type:** `Account | Address`
* **Default:** `client.account`

Admin address for the token. Required when the Client has no account.

### currency

* **Type:** `string`

Currency code for the token (e.g. `"USD"`).

### logoURI

* **Type:** `string`

Logo URI for the token. Requires a T5-enabled Tempo chain.

### name

* **Type:** `string`

Name of the token.

### quoteToken

* **Type:** `Address | bigint`

Quote token address or ID. Defaults to pathUSD.

### salt

* **Type:** `Hex`
* **Default:** `Hex.random(32)`

Unique salt for deterministic token address generation.

### symbol

* **Type:** `string`

Symbol of the token.

### account (optional)

* **Type:** `Account | Address`

Account that will be used to send the transaction.

### feePayer (optional)

* **Type:** `Account | boolean`

Fee payer for the transaction (TIP-1 gas sponsorship).

Pass `true` to defer the fee token to an external fee payer (e.g. a relay), or a local Account to co-sign the transaction as the fee payer.

### feeToken (optional)

* **Type:** `Address | bigint`

Fee token for the transaction.

Can be an unpaused USD-denominated TIP-20 token address or ID.

### gas (optional)

* **Type:** `bigint`

Gas limit for the transaction.

### keyAuthorization (optional)

* **Type:** `KeyAuthorization`

Signed key authorization to include with the transaction, authorizing an access key to act for the sending account.

### maxFeePerGas (optional)

* **Type:** `bigint`

Max fee per gas for the transaction.

### maxPriorityFeePerGas (optional)

* **Type:** `bigint`

Max priority fee per gas for the transaction.

### nonce (optional)

* **Type:** `number`

Nonce for the transaction.

### nonceKey (optional)

* **Type:** `'expiring' | 'random' | bigint`

Nonce key for the transaction (TIP-1009 2D nonces).

Use `'expiring'` to select an expiring nonce, which enables concurrent transaction submission without nonce ordering. Use `'random'` to select a random key.

### throwOnReceiptRevert (optional)

* **Type:** `boolean`
* **Default:** `true`

Whether a `Sync` action throws when the receipt reports a revert.

### validAfter (optional)

* **Type:** `number`

Unix timestamp after which the transaction can be included.

### validBefore (optional)

* **Type:** `number`

Unix timestamp before which the transaction must be included.
