Deploy Contract

Deploys a new KIP-7 contract with the given parameters. You will automatically be assigned a deployer address, which cannot be changed. You can find the deployer address using KIP7Deployer.

The alias must only consist of lowercase letters, numbers and hyphens, and the first letter is restricted to a lowercase letter.

Options

With options you can set the transaction fee payment method. You can find more details in Fee Payer Options.

Request
Security:
header Parameters
x-chain-id
required
string

Kaia Network Chain ID (1001 or 8217)

Request Body schema: application/json
alias
required
string

The alias of the contract. When using KIP-7 API, you can use the contract alias in place of the address. The alias must only consist of lowercase letters, numbers and hyphens, and the first letter is restricted to a lowercase letter.

name
required
string

Contract name

symbol
required
string

Token symbol

decimals
integer <int64>

The number of digits that come after the decimal place when displaying token values on-screen. The default value is 0.

initialSupply
required
string

Initial supply (in hex.)

object (Kip7FeePayerOption)
Responses
200

Your request was successful.

400

Your request is not valid.

401

The credential you entered is invalid.

409

There was a conflict with the current state of the server.

post/v1/contract
Request samples
application/json
{
  • "alias": "mycontract",
  • "name": "MyKIP7",
  • "symbol": "MSK7",
  • "decimals": 8,
  • "initialSupply": 268435456,
  • "options": {
    }
}
Response samples
application/json

Your request was successful.

{
  • "status": "Submitted",
  • "transactionHash": "0xf7843f034f2283d0ec32886a69d44a85ce19af25d8bd89d84322b973a86328a8",
  • "options": {
    }
}