Contract deploy transaction with user fee delegation

Create a transaction for deploying contracts with the fee payer account created by user.

To use this API, you need two x-krn for account-pool and feepayer-pool. The values for x-krn are written separated with a comma, as shown below.

x-krn: krn:1001:wallet:local:account-pool:{{account-pool-id}},krn:1001:wallet:local:feepayer-pool:{{feepayer-pool-id}}
Request
Security:
header Parameters
x-chain-id
required
string

Kaia Network Chain ID (1001 or 8217)

Request Body schema: application/json
from
required
string

Kaia account address to send transaction

value
string

KAIA converted into kei

input
required
string

Data that is sent along with the transaction and is used for execution.

nonce
integer <int64>

Unique identifier for the transactions being sent (By entering 0, the nonce will be automatically determined)

gas
integer <int64>
Default: 9000000

The maximum computational units required to execute a transaction (By entering 0, it will be set to default value)

submit
boolean

Shows whether to send the transaction to Kaia

feePayer
required
string

Account address for user Fee Delegation

feeRatio
integer <int64> <= 99

The ratio of the gas fee to be delegated. When it's empty or 0, the entire fee will be delegated.

Responses
200

The request is successful.

400

The request is not valid.

post/v2/tx/fd-user/contract/deploy
Request samples
application/json
{
  • "from": "0x60d0902c428D0E197F97a756011Fd4893C1E57B0",
  • "value": "0x0",
  • "input": "0x60806040526000805534801561001457600080fd5b50610116806100246000396000f3006080604052600436106053576000357c0100000000000000000000000000000",
  • "nonce": 0,
  • "gas": 0,
  • "submit": true,
  • "feePayer": "0x48C71A602AC5284b9A501457e4340E16D8d40C3d"
}
Response samples
application/json
{
  • "feePayer": "0x0e916319466895015cbcb453a1ff8c4134feb902",
  • "feeRatio": 20,
  • "from": "0x60d0902c428d0e197f97a756011fd4893c1e57b0",
  • "gas": 9000000,
  • "gasPrice": "0x5d21dba00",
  • "input": "0x",
  • "nonce": 1424,
  • "rlp": "0x2af8cf8205908505d21dba008389544080809460d0902c428d0e197f97a756011fd4893c1e57b080801480f847f8458207f5a0dba4b9b2046ccb5c18d0daffa3804330551d0cff62d143f1c4e0bdcbde65f5a4a040889af1ce17a4706b93043ae03b4d2da713d8d24931d2e19166af8393f3ad30940e916319466895015cbcb453a1ff8c4134feb902f847f8458207f6a0e16de840c71c3153c7dfb87021c115159966b1f903b6f1ca7daaf5efb1aecb0da07907f7c9df8593b7b01585eeeed5d56b6bc80043f08c9e39e25f2445b32b4466",
  • "signatures": [
    ],
  • "status": "Submitted",
  • "transactionHash": "0x825a235f1672478017f1586d5d9cfcffe417fdf1c0d28d9fe9f773175b405581",
  • "typeInt": 42,
  • "value": "0x0"
}