Parameters
- transactionobjectREQUIRED
Transaction to populate with missing gas, fee, and nonce values
- fromstring
Sender address. May be omitted.
- tostring
Recipient address
- valuestring
Value to transfer, as a hexadecimal quantity
- datastring
Transaction input data, as hexadecimal bytes
- gasstring
Gas limit, as a hexadecimal quantity
- noncestring
Sender nonce, as a hexadecimal quantity
- gasPricestring
Legacy gas price, as a hexadecimal quantity
- maxFeePerGasstring
Maximum fee per gas for a type 2 transaction
- maxPriorityFeePerGasstring
Maximum priority fee per gas for a type 2 transaction
Returns
- rawstring
Unsigned serialized transaction, encoded as hexadecimal bytes
- txobject
Populated transaction fields
- typestring
Transaction type
- chainIdstring
Chain ID as a hexadecimal quantity for a type 2 transaction; omitted for a legacy transaction
- noncestring
Filled sender nonce
- gasstring
Filled gas limit
- maxFeePerGasstring
Filled maximum fee per gas for a type 2 transaction, or null for a legacy transaction
- maxPriorityFeePerGasstring
Filled maximum priority fee per gas for a type 2 transaction, or null for a legacy transaction
- tostring
Recipient address, or null for contract creation
- valuestring
Transfer value
- accessListarray
Addresses and storage keys to access for a type 2 transaction; omitted for a legacy transaction
- inputstring
Transaction input data
- rstring
Zero before signing
- sstring
Zero before signing
- yParitystring
Zero before signing a type 2 transaction; omitted for a legacy transaction
- vstring
Zero before signing
- hashstring
Hash of the unsigned transaction
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"raw": "0x02ea8280ea82372f80840db5858082520894339d413ccefd986b1b3647a9cfa9cbbe70a307498080c0808080",6"tx": {7"type": "0x2",8"chainId": "0x80ea",9"nonce": "0x372f",10"gas": "0x5208",11"maxFeePerGas": "0xdb58580",12"maxPriorityFeePerGas": "0x0",13"to": "0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",14"value": "0x0",15"accessList": [],16"input": "0x",17"r": "0x0",18"s": "0x0",19"yParity": "0x0",20"v": "0x0",21"hash": "0x42ff7f41c0ab8d4eff37363233ce738b59040ff7ce84b6ac907d30688e4ee7fa"22}23}24}
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"raw": "0x02ea8280ea82372f80840db5858082520894339d413ccefd986b1b3647a9cfa9cbbe70a307498080c0808080",6"tx": {7"type": "0x2",8"chainId": "0x80ea",9"nonce": "0x372f",10"gas": "0x5208",11"maxFeePerGas": "0xdb58580",12"maxPriorityFeePerGas": "0x0",13"to": "0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",14"value": "0x0",15"accessList": [],16"input": "0x",17"r": "0x0",18"s": "0x0",19"yParity": "0x0",20"v": "0x0",21"hash": "0x42ff7f41c0ab8d4eff37363233ce738b59040ff7ce84b6ac907d30688e4ee7fa"22}23}24}