Appearance
Transaction call object
A transaction that the node runs without a signature and without a change to the chain.
eth_call, eth_estimateGas, eth_createAccessList, eth_callMany, eth_simulateV1, debug_traceCall and trace_call take this object. All fields are optional.
Fields
| Field | Type | Meaning |
|---|---|---|
from | address | The sender. Default: the zero address. |
to | address | The contract or account to call. Leave it out to deploy the code in input. |
gas | hex number | The gas limit. Default: the gas cap of the node (--rpc-gascap, 50 000 000). A larger value gets the gas cap. |
gasPrice | hex number, wei | The gas price of a legacy transaction. |
maxFeePerGas | hex number, wei | The fee cap of an EIP-1559 transaction. |
maxPriorityFeePerGas | hex number, wei | The tip of an EIP-1559 transaction. |
value | hex number, wei | The ether to send with the call. Default: 0. |
input | hex data | The 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. |
nonce | hex number | The nonce of the sender. Default: the account nonce. |
chainId | hex number | The chain. A different chain gives -32000 invalid chain ID, as in reth. eth_fillTransaction gives -32602 chainId does not match node's (have=N, want=M). |
accessList | list of | An EIP-2930 access list. |
authorizationList | list of | EIP-7702 authorizations. The call runs as a type 4 transaction. |
blobVersionedHashes | list of 32-byte hashes | The blob hashes of an EIP-4844 transaction. |
maxFeePerBlobGas | hex number, wei | The blob fee cap of an EIP-4844 transaction. |
Notes
- A call pays no gas fee, as in reth. A call without a gas price sees a base fee of zero.
- With a gas price and no
gas, the gas limit is what the sender can pay for: (balance - value) / price. The gas limit of the block is the upper limit. If the value is above the balance, the answer is -32003insufficient funds for gas * price + value. - The gas price of an EIP-1559 call is the lower of
maxFeePerGasand the base fee plus the tip. WithoutmaxFeePerGas, the gas price is the base fee plus the tip, as in reth. - A call with
maxFeePerBlobGasis a blob call. Its gas price is the same as for an EIP-1559 call. It must have blob hashes. Blob hashes withoutmaxFeePerBlobGasuse the blob fee of the block. - Some fee fields give an error before the call runs, as in reth.
maxFeePerGasbelow the base fee gives -32000. A tip abovemaxFeePerGasgives -32003.gasPricewith an EIP-1559 or blob fee field gives -32602. - A fee value larger than 128 bits gives -32602
Invalid params, as in reth. eth_simulateV1has its own fee rules.
Used by
debug_traceCall, eth_call, eth_createAccessList, eth_estimateGas, eth_fillTransaction, eth_sendTransaction, eth_signTransaction, trace_call, trace_callMany.