[Transaction] eth_fillTransaction
Fills the defaults (nonce, gas, gasPrice or 1559 fields) on a given unsigned transaction, and returns it to the caller for further processing (signing + broadcast).
JSONRPC: eth_fillTransaction
Request
- application/json
Body
Array [
]
params
object[]
An object of transaction arguments. See the table below for the object's properties.
The address from which the transaction is sent.
(not required when creating a new contract) The address to which the transaction is directed.
(optional) The integer of the gas provided for the transaction's execution. It will return unused gas.
(optional, default: 250 ston) The maximum amount to pay for the transaction's execution. Since Kaia uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum).
(optional, default: 250 ston) Gas tip cap for dynamic fee transaction in peb. Since Kaia uses a fixed gas price, it must be set to 250 ston (Gpeb in Ethereum).
(optional) The hash of the method signature and the encoded parameter. It replaces data field, but 'data` field is still supported for backward compatibility.
(optional) The integer of values sent with this transaction.
(optional) The integer of a nonce.
Responses
- 200
Return a rawTransaction string and a transaction object.
- application/json
- Schema
- Example (from schema)
Schema
error
object
A Number that indicates the error type that occurred. This MUST be an integer.
code | message | description |
---|---|---|
-32700 | Parse error | invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. |
-32602 | Invalid params | Invalid method parameter(s). |
A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.
A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).
result
object
A rawTransaction string (a RLP-encoded transaction string).
tx
object
required
An integer representing the type of the transaction.
The block number where this transaction was in.
Gas price provided by the sender in peb. null when it is not a legacy transaction.
A maximum amount to pay for the transaction to execute. null when it is a legacy transaction.
Gas tip cap for dynamic fee transaction in peb. null when it is a legacy transaction.
Gas provided by the sender.
Integer of values sent with this transaction.
ECDSA recovery id.
ECDSA signature r.
ECDSA signature s.
Chain id set on the requested node.
An array of accessList.
Hash of the transaction.
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": {
"raw": "0x02ef8302edaf808505d21dba008505d21dba00829999948c9f4468ae04fb3d79c80f6eacf0e4e1dd21deee0180c0808080",
"tx": {
"type": "0x2",
"nonce": "0x0",
"gasPrice": null,
"maxPriorityFeePerGas": "0x5d21dba00",
"maxFeePerGas": "0x5d21dba00",
"gas": "0x9999",
"value": "0x1",
"input": "0x",
"v": "0x0",
"r": "0x0",
"s": "0x0",
"to": "0x8c9f4468ae04fb3d79c80f6eacf0e4e1dd21deee",
"chainId": "0x2edaf",
"accessList": [],
"hash": "0x83e382bfb39249dc0e2b4283702bc1c0685deffad1316d166546da9c4c14c59d"
}
}
}