Contract execution transaction

Creates a transaction for executing the function of a deployed contract.

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

to
required
string

Contract address

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: 1000000

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

Responses
200

The request is successful.

400

The request is not valid.

post/v2/tx/contract/execute
Request samples
application/json
{
  • "from": "0x60d0902c428D0E197F97a756011Fd4893C1E57B0",
  • "value": "0x0",
  • "to": "0xabcd",
  • "input": "0x123",
  • "nonce": 0,
  • "gas": 0,
  • "submit": true
}
Response samples
application/json
{
  • "from": "0x60d0902c428d0e197f97a756011fd4893c1e57b0",
  • "gas": 1000000,
  • "gasPrice": "0x5d21dba00",
  • "input": "0x",
  • "nonce": 1385,
  • "rlp": "0x30f8828205698505d21dba00830f4240942e47c1cd61c49d498b9a4083ac1491c2d13088b1809460d0902c428d0e197f97a756011fd4893c1e57b080f847f8458207f6a0a75d831ddb93e54a4dbd5c05ff776320c3c7d9ee013169ad581de7479e7368e8a00eb55e5a10b80990a502d3dc85f644e6b72c45642138af01c6aa7bc863fed1b0",
  • "signatures": [
    ],
  • "status": "Submitted",
  • "to": "0x2e47c1cd61c49d498b9a4083ac1491c2d13088b1",
  • "transactionHash": "0x2de49305442ac367da31045f40ba710338d506e95c842b854f7f4dbb8688ed6f",
  • "typeInt": 48,
  • "value": "0x0"
}