---
title: "Deploy a fungible token smart contract"
method: POST
path: "/v3/blockchain/token/deploy"
tags: ["Fungible Tokens (ERC-20 or compatible)"]
---

# Deploy a fungible token smart contract

`POST /v3/blockchain/token/deploy`

## Request

- Base URL: `https://api.tatum.io`
- URL: `https://api.tatum.io/v3/blockchain/token/deploy`
- Auth: API key in header `x-api-key`

/v3/blockchain/token/deploy

**2 credits per API call**

Deploy a fungible token smart contract on the blockchain. In a deployed smart contract, you can mint and burn fungible tokens. The whole supply of fungible tokens (the `supply` parameter in the request body) will be transferred to the specified blockchain address (the `address` parameter in the request body).

Additionally, you can specify the number of additional digits for the token amounts using the `digits` parameter. Please note that the maximum value for the `supply` parameter with added digits is within the range of `uint64`.

Smart contracts are standardized and audited.

This API is supported for the following blockchains:

*   Algorand
*   BNB Smart Chain
*   Celo
*   Ethereum
*   Harmony
*   Klaytn
*   KuCoin Community Chain
*   Polygon
*   Solana
*   XinFin
*   Flare
*   Cronos
*   Base
*   Avalanche
*   Fantom
*   Optimism

You can review the code of a deployed smart contract [here](https://github.com/tatumio/tatum-middleware/blob/master/src/contracts/token.sol).

**Signing a transaction**  
When deploying a fungible token smart contract, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.

Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the **testnet** of a blockchain.

For signing transactions on the **mainnet**, we strongly recommend that you use the Tatum [Key Management System (KMS)](https://github.com/tatumio/tatum-kms) and provide the signature ID instead of the private key in the API. Alternatively, you can use the [Tatum JavaScript client](https://github.com/tatumio/tatum-js/tree/v2).

## Query parameters

- `testnetType` 'ethereum-sepolia' | 'flare-coston' | 'flare-coston2' | 'flare-songbird': Specifies the testnet type. The default is ethereum-sepolia for Ethereum (ETH) currency and flare-coston for Flare (FLR) currency. Valid testnet types depend on the specified currency.

## Headers

- `x-testnet-type` Schema (unresolved $ref)

## Request body

- union
  - ChainDeployErc20
    - `chain` 'ETH' | 'BSC' | 'MATIC' | 'KLAY' | 'XDC' | 'ONE' | 'FLR' | 'CRO' | 'BASE' | 'AVAX' | 'OPTIMISM' | 'FTM', required: The blockchain to work with
    - `symbol` string, required: Symbol of the ERC20 token
    - `name` string, required: Name of the ERC20 token
    - `totalCap` string: Max supply of ERC20 token.
    - `supply` string, required: Initial supply of ERC20 token. If totalCap is not defined, this will be the total cap.
    - `digits` number, required: Number of decimal points
    - `address` string, required: Address on Ethereum blockchain, where all created ERC20 tokens will be transferred.
    - `fromPrivateKey` string, required: Private key of Ethereum account address, from which the fee for the deployment of ERC20 will be paid. Private key, or signature Id must be present.
    - `nonce` number: The nonce to be set to the transaction; if not present, the last known nonce will be used
    - `fee` CustomFee: The custom defined fee; if not present, will be calculated automatically
      - `gasPrice` string, required: The price for one gas unit (in Gwei)
      - `gasLimit` string, required: The maximum number of gas units that you are willing to spend on processing the transaction at the provided gas price
  - ChainDeploySolanaSpl
    - `chain` 'SOL', required: The blockchain to work with
    - `supply` string, required: Initial supply of SPL token.
    - `digits` number, required: Number of decimal points
    - `address` string, required: Address on Solana blockchain, where all created SPL tokens will be transferred.
    - `from` string, required: Address on Solana blockchain, from which the fee for the deployment of SPL will be paid.
    - `freezeAuthority` string: Address on Solana blockchain which which can freeze token accounts. Default to the 'from'
    - `fromPrivateKey` string, required: Private key of Solana account address, from which the fee for the deployment of SPL will be paid. Private key, or signature Id must be present.
    - `feePayer` string: Address on the Solana blockchain, from which the fee will be paid for transaction. Defaults to from.
    - `feePayerPrivateKey` string: Private key of the fee payer address.
  - ChainDeployCeloErc20
    - `chain` 'CELO', required: The blockchain to work with
    - `symbol` string, required: Symbol of the ERC20 token
    - `name` string, required: Name of the ERC20 token
    - `totalCap` string: Max supply of ERC20 token.
    - `supply` string, required: Max supply of ERC20 token.
    - `digits` number, required: Number of decimal points
    - `address` string, required: Address on Ethereum blockchain, where all created ERC20 tokens will be transferred.
    - `fromPrivateKey` string, required: Private key of Ethereum account address, from which the fee for the deployment of ERC20 will be paid. Private key, or signature Id must be present.
    - `nonce` number: The nonce to be set to the transaction; if not present, the last known nonce will be used
    - `feeCurrency` 'CELO' | 'CUSD' | 'CEUR', required: The currency in which the transaction fee will be paid
    - `fee` CustomFee: The custom defined fee; if not present, will be calculated automatically
      - `gasPrice` string, required: The price for one gas unit (in Gwei)
      - `gasLimit` string, required: The maximum number of gas units that you are willing to spend on processing the transaction at the provided gas price
  - ChainDeployKcsErc20
    - `chain` 'KCS', required: The blockchain to work with
    - `symbol` string, required: Symbol of the ERC20 token
    - `name` string, required: Name of the ERC20 token
    - `totalCap` string: Max supply of ERC20 token.
    - `supply` string, required: Initial supply of ERC20 token. If totalCap is not defined, this will be the total cap.
    - `digits` number, required: Number of decimal points
    - `address` string, required: Address on Ethereum blockchain, where all created ERC20 tokens will be transferred.
    - `fromPrivateKey` string, required: Private key of Ethereum account address, from which the fee for the deployment of ERC20 will be paid. Private key, or signature Id must be present.
    - `nonce` number: The nonce to be set to the transaction; if not present, the last known nonce will be used
    - `fee` CustomFee: The custom defined fee; if not present, will be calculated automatically
      - `gasPrice` string, required: The price for one gas unit (in Gwei)
      - `gasLimit` string, required: The maximum number of gas units that you are willing to spend on processing the transaction at the provided gas price
  - ChainDeployAlgoErc20
    - `chain` 'ALGO', required: The blockchain to work with
    - `symbol` string, required: Symbol of the ERC20 token
    - `name` string, required: Name of the ERC20 token
    - `supply` string, required: Initial supply of ERC20 token. If totalCap is not defined, this will be the total cap.
    - `digits` number, required: Number of decimal points
    - `url` string: The URL pointing to the metadata
    - `fromPrivateKey` string, required: Private key of Ethereum account address, from which the fee for the deployment of ERC20 will be paid. Private key, or signature Id must be present.
    - `fee` string, required: The transaction fee in Algos
  - ChainDeployErc20KMS
    - `chain` 'ETH' | 'BSC' | 'MATIC' | 'KLAY' | 'XDC' | 'ONE', required: The blockchain to work with
    - `symbol` string, required: Symbol of the ERC20 token
    - `name` string, required: Name of the ERC20 token
    - `totalCap` string: Max supply of ERC20 token.
    - `supply` string, required: Max supply of ERC20 token.
    - `digits` number, required: Number of decimal points
    - `address` string, required: Address on Ethereum blockchain, where all created ERC20 tokens will be transferred.
    - `signatureId` string, uuid, required: Identifier of the private key associated in signing application. Private key, or signature Id must be present.
    - `nonce` number: The nonce to be set to the transaction; if not present, the last known nonce will be used
    - `fee` CustomFee: The custom defined fee; if not present, will be calculated automatically
      - `gasPrice` string, required: The price for one gas unit (in Gwei)
      - `gasLimit` string, required: The maximum number of gas units that you are willing to spend on processing the transaction at the provided gas price
  - ChainDeploySolanaSplKMS
    - `chain` 'SOL', required: The blockchain to work with
    - `supply` string, required: Initial supply of SPL token.
    - `digits` number, required: Number of decimal points
    - `address` string, required: Address on Solana blockchain, where all created SPL tokens will be transferred.
    - `from` string, required: Address on Solana blockchain, from which the fee for the deployment of SPL will be paid.
    - `freezeAuthority` string: Address on Solana blockchain which which can freeze token accounts. Default to the 'from'
    - `signatureId` string, uuid, required: Identifier of the private key associated in signing application. Private key, or signature Id must be present.
    - `feePayer` string: Blockchain address to pay the fee for the transaction from
    - `feePayerSignatureId` string, uuid: Identifier of the private key used for paying the gas costs in signing application. Defaults to the signatureId.
  - ChainDeployCeloErc20KMS
    - `chain` 'CELO', required: The blockchain to work with
    - `symbol` string, required: Symbol of the ERC20 token
    - `name` string, required: Name of the ERC20 token
    - `totalCap` string: Max supply of ERC20 token.
    - `supply` string, required: Max supply of ERC20 token.
    - `digits` number, required: Number of decimal points
    - `address` string, required: Address on Ethereum blockchain, where all created ERC20 tokens will be transferred.
    - `signatureId` string, uuid, required: Identifier of the private key associated in signing application. Private key, or signature Id must be present.
    - `nonce` number: The nonce to be set to the transaction; if not present, the last known nonce will be used
    - `feeCurrency` 'CELO' | 'CUSD' | 'CEUR', required: The currency in which the transaction fee will be paid
    - `fee` CustomFee: The custom defined fee; if not present, will be calculated automatically
      - `gasPrice` string, required: The price for one gas unit (in Gwei)
      - `gasLimit` string, required: The maximum number of gas units that you are willing to spend on processing the transaction at the provided gas price
  - ChainDeployKcsErc20KMS
    - `chain` 'KCS', required: The blockchain to work with
    - `symbol` string, required: Symbol of the ERC20 token
    - `name` string, required: Name of the ERC20 token
    - `totalCap` string: Max supply of ERC20 token.
    - `supply` string, required: Max supply of ERC20 token.
    - `digits` number, required: Number of decimal points
    - `address` string, required: Address on Ethereum blockchain, where all created ERC20 tokens will be transferred.
    - `signatureId` string, uuid, required: Identifier of the private key associated in signing application. Private key, or signature Id must be present.
    - `nonce` number: The nonce to be set to the transaction; if not present, the last known nonce will be used
    - `fee` CustomFee: The custom defined fee; if not present, will be calculated automatically
      - `gasPrice` string, required: The price for one gas unit (in Gwei)
      - `gasLimit` string, required: The maximum number of gas units that you are willing to spend on processing the transaction at the provided gas price
  - ChainDeployAlgoErc20KMS
    - `chain` 'ALGO', required: The blockchain to work with
    - `symbol` string, required: Symbol of the ERC20 token
    - `name` string, required: Name of the ERC20 token
    - `supply` string, required: Initial supply of ERC20 token. If totalCap is not defined, this will be the total cap.
    - `digits` number, required: Number of decimal points
    - `from` string, required: Blockchain address to create token from
    - `url` string: The URL pointing to the metadata
    - `signatureId` string, uuid, required: Identifier of the private key associated in signing application. Private key, or signature Id must be present.
    - `index` number: If signatureId is mnemonic-based, this is the index to the specific address from that mnemonic.
    - `fee` string: The transaction fee in ALGO

## Response `200`

OK

- union
  - TransactionHash
    - `txId` string, required: The hash (ID) of the transaction
  - SignatureId
    - `signatureId` string, uuid, required: The internal Tatum ID of the prepared transaction for Key Management Sysytem (KMS) to sign<br/>This is different from the <code>signatureId</code> parameter that you provided in the request body. The <code>signatureId</code> parameter in the request body specifies the signature ID associated with the private key in KMS.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
- `403`: Forbidden. The request is authenticated, but it is not possible to perform the operation due to logical error or invalid permissions.
- `500`: Internal server error. There was an error on the server during the processing of the request.

---

[API](https://skmtc.dev/tatum/apis/smart-contracts.md) - [All operations](https://skmtc.dev/tatum/apis/smart-contracts/llms.txt) - [OpenAPI document](https://skmtc.dev/tatum/apis/smart-contracts/revisions/c0146043bb37?raw)
