Skip to content

eth_fillTransaction ​

served · same as reth

Fills the missing fields of a transaction (nonce, gas, fees) and returns it with its encoding.

When to use ​

Use it to prepare a transaction before a wallet signs it.

Example ​

bash
curl -s -X POST -H 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_fillTransaction", "params": [{"from": "0xc917c3fa468f2c4b9c84c72caa46420eb9825249", "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "data": "0x18160ddd"}]}' \
  http://127.0.0.1:8547
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xc917c3fa468f2c4b9c84c72caa46420eb9825249",
      "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "data": "0x18160ddd"
    }
  ]
}

Response ​

Live mainnet, block 26193069, 2026-10-14. Checked against reth 2.7: equal.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "raw": "0x02ed0183025c4280840796556982798794a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48808418160dddc0808080",
    "tx": {
      "type": "0x2",
      "chainId": "0x1",
      "nonce": "0x25c42",
      "gas": "0x7987",
      "maxFeePerGas": "0x7965569",
      "maxPriorityFeePerGas": "0x0",
      "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "value": "0x0",
      "accessList": [],
      "input": "0x18160ddd",
      "r": "0x0",
      "s": "0x0",
      "yParity": "0x0",
      "v": "0x0",
      "hash": "0xde415a345d04b820717d326a2caaa21ed2cfec7e515427e8450e996516850dcf"
    }
  }
}

The nonce and the fee fields follow the current state of the chain. The answer changes with time, so it is compared by shape (keys and types; for a list, its first item), not by value.

Full response

Parameters ​

NameTypeRequiredMeaning
transactionobject, see Transaction call objectyesThe transaction. from and to are necessary.

The main fields of transaction. The Transaction call object page has all of them.

FieldTypeMeaning
fromaddressThe sender. Default: the zero address.
toaddressThe contract or account to call. Leave it out to deploy the code in input.
gashex numberThe gas limit. Default: the gas cap of the node (--rpc-gascap, 50 000 000). A larger value gets the gas cap.
valuehex number, weiThe ether to send with the call. Default: 0.
inputhex dataThe call data: the function selector and the arguments. data is also accepted. If both are present and not equal, the call gives -32602, as in reth. eth_simulateV1 then uses input.

Returns ​

An object with raw (the encoded transaction, with an empty signature) and tx (its fields). Sign it before you send it.

Notes and limits ​

  • The nonce is the account nonce, after the transactions of the account in the pool.
  • The gas comes from an estimate on the state of the latest block. As in reth, the estimate sees the number, time, base fee and blob fee of the next block.
  • Without fees, the tip comes from the gas price oracle. maxFeePerGas is two times the latest base fee plus the tip, as in reth and geth.
  • A request with blobVersionedHashes gives a blob transaction (type 3) without a sidecar. Without maxFeePerBlobGas, it gets the blob base fee of the next block (eth_blobBaseFee).
  • A contract deployment (no to) cannot be filled.

Errors ​

CodeMessageWhen
-32602unknown accountThe request has no from.
-32602Failed to convert transaction into RPC response: Transaction is not buildableThe request has no to.
-32602chainId does not match node's (have=N, want=M)The request has the chainId of another chain.
-32602Invalid paramsA parameter is missing or does not parse. data has the text of reth, with the position.

Compared with reth ​

The live example above gives the same answer on Cinder and on reth 2.7.

eth_estimateGas, eth_maxPriorityFeePerGas, eth_sendRawTransaction.

Schema (OpenRPC) ​

Parameter transaction: CallObject
json
{
  "title": "Call object",
  "description": "The transaction fields that Cinder reads for a call. Other fields are ignored. Either data or input holds the call data.",
  "type": "object",
  "properties": {
    "from": {
      "title": "hex encoded address",
      "type": "string",
      "pattern": "^0x[0-9a-fA-F]{40}$"
    },
    "to": {
      "oneOf": [
        {
          "title": "hex encoded address",
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "gas": {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    "gasPrice": {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    "maxFeePerGas": {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    "maxPriorityFeePerGas": {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    "maxFeePerBlobGas": {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    "value": {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    "nonce": {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    "data": {
      "title": "hex encoded bytes",
      "type": "string",
      "pattern": "^0x[0-9a-f]*$"
    },
    "input": {
      "title": "hex encoded bytes",
      "type": "string",
      "pattern": "^0x[0-9a-f]*$"
    },
    "accessList": {
      "title": "Access list",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "address",
          "storageKeys"
        ],
        "properties": {
          "address": {
            "title": "hex encoded address",
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "storageKeys": {
            "type": "array",
            "items": {
              "title": "32 byte hex value",
              "type": "string",
              "pattern": "^0x[0-9a-f]{64}$"
            }
          }
        }
      }
    },
    "authorizationList": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "chainId": {
            "title": "hex encoded unsigned integer",
            "type": "string",
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
          },
          "address": {
            "title": "hex encoded address",
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "nonce": {
            "title": "hex encoded unsigned integer",
            "type": "string",
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
          },
          "yParity": {
            "title": "hex encoded unsigned integer",
            "type": "string",
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
          },
          "v": {
            "title": "hex encoded unsigned integer",
            "type": "string",
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
          },
          "r": {
            "title": "hex encoded unsigned integer",
            "type": "string",
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
          },
          "s": {
            "title": "hex encoded unsigned integer",
            "type": "string",
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
          }
        }
      }
    },
    "blobVersionedHashes": {
      "type": "array",
      "items": {
        "title": "32 byte hex value",
        "type": "string",
        "pattern": "^0x[0-9a-f]{64}$"
      }
    }
  }
}
Result: object
json
{
  "type": "object",
  "properties": {
    "raw": {
      "title": "hex encoded bytes",
      "type": "string",
      "pattern": "^0x[0-9a-f]*$"
    },
    "tx": {
      "title": "Transaction",
      "description": "A transaction in the JSON-RPC format of eth_getTransactionByHash.",
      "type": "object"
    }
  }
}