For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_sendTransaction (to do)

Creates new message call transaction or a contract creation, if the data field contains code, and signs it using the account specified in from.

Parameters

Object - The transaction object

  • from: DATA, 20 Bytes - The address the transaction is sent from.

  • to: DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.

  • gas: QUANTITY - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.

  • gasPrice: QUANTITY - (optional, default: To-Be-Determined) Hexadecimal of the gasPrice used for each paid gas.

  • value: QUANTITY - (optional) Hexadecimal of the value sent with this transaction.

  • input: DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters.

  • nonce: QUANTITY - (optional) Hexadecimal nonce value. This allows to overwrite your own pending transactions that use the same nonce.

Returns

DATA, 32 Bytes - The transaction hash, or the zero hash if the transaction is not yet available.

Use eth_getTransactionReceipt to get the contract address, after the transaction was mined, when you created a contract.

Example

Request

Result

source

Last updated