Mint Token

Mints a specified amount of tokens to a specified account address.

The contract's totalSupply will increase accordingly.

From

The account that sends the transaction. You can enter the Klaytn account address of an authorized Minter, or leave it blank, so it will automatically be set to the deployer address as default . You can find the deployer address by KIP7Deployer.

You can omit the KRN if the from address is managed by the KIP-7 or Wallet Service account-pool.
Otherwise you have to provide the KRN object in the header (x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}).

NOTE

Remember that a contract address is not an account address managed by Wallet Service, so it can't in from.

Request
Security:
path Parameters
contract-address-or-alias
required
string

Contract address (in hex.) or alias.

header Parameters
x-chain-id
required
string

Kaia Network Chain ID (1001 or 8217)

Request Body schema: application/json
from
string

The Kaia account address to mint the tokens. The default value is the deployer's account.

to
required
string

The Kaia account address to receive the new tokens.

amount
required
string

The amount of tokens to create (in hexadecimal)

Responses
200

Your request was successful.

400

Your request is not valid.

401

The credential you entered is invalid.

404

The resource you requested doesn't exist.

post/v1/contract/{contract-address-or-alias}/mint
Request samples
application/json
{
  • "from": "0xd6905b98E4Ba43a24E842d2b66c1410173791cab",
  • "to": "0xd6905b98E4Ba43a24E842d2b66c1410173791cab",
  • "amount": "0x10"
}
Response samples
application/json

Your request was successful.

{
  • "status": "Submitted",
  • "transactionHash": "0x31dd75c39e569b3fa5336186a6a464c0a84c487f481e80009a4d238fbe0d2357"
}