Skip to content

eth_sendTransaction

Defined in EIP-1474

Creates, signs, and sends a new transaction to the network.

Parameters

Array<TransactionConfig>

An array containing a single transaction object with the following fields:

FieldTypeDescription
fromstringThe address the transaction is sent from
tostring(Optional) The address the transaction is directed to
gasstring(Optional) Integer of the gas provided for the transaction
gasPricestring(Optional) Integer of the gas price in wei
valuestring(Optional) Integer of the value sent with this transaction
datastring(Optional) Hash of the method signature and encoded parameters
noncestring(Optional) Integer of a nonce used to prevent transaction replay
maxFeePerGasstring(Optional) The maximum fee per gas for EIP-1559 transactions
maxPriorityFeePerGasstring(Optional) The maximum priority fee per gas for EIP-1559 transactions

Returns

string

A transaction hash.

Errors

CodeMessage
4001User denied transaction signature
4100Requested method not supported
4200Wallet not connected