Skip to main content

eth_getTransactionCount

Returns the number of transactions sent from an address. Parameters
  • DATA, 20 Bytes - address.
  • QUANTITY|TAG - integer block number, or the string “latest”, “earliest”, “pending”, “safe” or “finalized”, see the default block parameter
  • params: ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest", // state at the latest block]
Returns QUANTITY - integer of the number of transactions send from this address. Example
// Request
curl -X POST https://testnet-rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0xC08bA0F9E8a976d2DF3eC899E2F5dff6336549C8","latest"],"id":1}'
// Response
{"jsonrpc":"2.0","id":1,"result":"0xd83"}

eth_signTransaction

Signs a transaction that can be submitted to the network at a later time using with eth_sendRawTransaction. Parameters
  • Object - The transaction object
  • Content-Type
  • 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) Integer of the gasPrice used for each paid gas, in Wei.
  • value: QUANTITY - (optional) Integer of the value sent with this transaction, in Wei.
  • data: DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters.
  • nonce: QUANTITY - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
Returns DATA, The RLP-encoded transaction object signed by the specified account. Example
// Request
curl -X POST https://testnet-rpc1.autheo.com -H "Content-Type: application/json" --data '{"id": 1,"jsonrpc":"2.0","method": "eth_signTransaction","params":[{"data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675","from":"0xb60e8dd61c5d32be8058bb8eb970870f07233155","gas": "0x76c0","gasPrice": "0x9184e72a000","to":"0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}]}'
// Result
{"id": 1, "jsonrpc": "2.0", "result":"0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b"}

eth_sendTransaction

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) Integer of the gasPrice used for each paid gas.
  • value: QUANTITY - (optional) Integer 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) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
  • params:
[

  {

    from: "0xb60e8dd61c5d32be8058bb8eb970870f07233155",

    to: "0xd46e8dd67c5d32be8058bb8eb970870f07244567",

    gas: "0x76c0", // 30400

    gasPrice: "0x9184e72a000", // 10000000000000

    value: "0x9184e72a", // 2441406250

    input:

      "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",

  },

]
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 proposed in a block, when you created a contract. Example
// Request
curl -X POST https://testnet-rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": [{"to": "0x89A7EF2F08B1c018D5Cc88836249b84Dd5392905", "data": "0x18160ddd"}, "latest"], "id": 1}'
// Result
{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}

eth_sendRawTransaction

Creates new message call transaction or a contract creation for signed transactions. Parameters
  • DATA, The signed transaction data.
  • params: ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",]
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 proposed in a block, when you created a contract. Example
// Request
 curl -X POST https://testnet-rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": [{"to": "0x89A7EF2F08B1c018D5Cc88836249b84Dd5392905", "data": "0x18160ddd"}, "latest"], "id": 1}'
// Result
{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}

eth_getTransactionByHash

Returns the information about a transaction requested by transaction hash. Parameters
  • DATA, 32 Bytes - hash of a transaction
  • params: ["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"]
Returns
  • Object - A transaction object, or null when no transaction was found:
  • blockHash: DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.
  • blockNumber: QUANTITY - block number where this transaction was in. null when its pending.
  • from: DATA, 20 Bytes - address of the sender.
  • gas: QUANTITY - gas provided by the sender.
  • gasPrice: QUANTITY - gas price provided by the sender in Wei.
  • hash: DATA, 32 Bytes - hash of the transaction.
  • input: DATA - the data send along with the transaction.
  • nonce: QUANTITY - the number of transactions made by the sender prior to this one.
  • to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.
  • transactionIndex: QUANTITY - integer of the transactions index position in the block. null when its pending.
  • value: QUANTITY - value transferred in Wei.
  • v: QUANTITY - ECDSA recovery id
  • r: QUANTITY - ECDSA signature r
  • s: QUANTITY - ECDSA signature s
Example
// Request
curl -X POST https://testnet-rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x150dfcd895b2856f2418564aae294c1e37346734e29617b3a29b15f7facb50d6"],"id":1}'
// Response
{"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x6f9ccc098b4f2f56154d3ad12df650a253d9c8bb5e6e28c5d92ae51a935af5bd","blockNumber":"0xaa19b","from":"0xeecc2fa50180e7c929c814a8bd65e45f81994327","gas":"0x5208","gasPrice":"0x7","hash":"0x150dfcd895b2856f2418564aae294c1e37346734e29617b3a29b15f7facb50d6","input":"0x","nonce":"0x1a5b","to":"0x65925ceb2e33bb7fde5f1c7488bbe8cca6c4e177","transactionIndex":"0x0","value":"0x5497acb9bd0b","type":"0x0","chainId":"0x311","v":"0x646","r":"0xa8c2b5d2d2c95eb58274e1a1c90626964e6ea3ae9ee8103769f34f2d83f83e26","s":"0x5ebebaf19ade625611bf30575e4503e9611ff561d0d88bb5872eb1cf457e411d"}}

eth_getTransactionByBlockHashAndIndex

Returns information about a transaction by block hash and transaction index position. Parameters
  • DATA, 32 Bytes - hash of a block.
  • QUANTITY - integer of the transaction index position.
  • params: ["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2","0x0", // 0]
Returns See eth_getTransactionByHash. Example
// Request
curl -X POST https://testnet-rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"],"id":1}'
// Response
{"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x6f9ccc098b4f2f56154d3ad12df650a253d9c8bb5e6e28c5d92ae51a935af5bd","blockNumber":"0xaa19b","from":"0xeecc2fa50180e7c929c814a8bd65e45f81994327","gas":"0x5208","gasPrice":"0x7","hash":"0x150dfcd895b2856f2418564aae294c1e37346734e29617b3a29b15f7facb50d6","input":"0x","nonce":"0x1a5b","to":"0x65925ceb2e33bb7fde5f1c7488bbe8cca6c4e177","transactionIndex":"0x0","value":"0x5497acb9bd0b","type":"0x0","chainId":"0x311","v":"0x646","r":"0xa8c2b5d2d2c95eb58274e1a1c90626964e6ea3ae9ee8103769f34f2d83f83e26","s":"0x5ebebaf19ade625611bf30575e4503e9611ff561d0d88bb5872eb1cf457e411d"}}

eth_getTransactionByBlockNumberAndIndex

Returns information about a transaction by block number and transaction index position. Parameters
  • QUANTITY|TAG - a block number, or the string “earliest”, “latest”, “pending”, “safe” or “finalized”, as in the default block parameter.
  • QUANTITY - the transaction index position.
  • params: [ "0x9c47cf", // 10241999 "0x24", // 36 ]
Returns See eth_getTransactionByHash. Example
// Request
 curl -X POST https://testnet-rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params":["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"],"id":1}'
// Response
{"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x6f9ccc098b4f2f56154d3ad12df650a253d9c8bb5e6e28c5d92ae51a935af5bd","blockNumber":"0xaa19b","from":"0xeecc2fa50180e7c929c814a8bd65e45f81994327","gas":"0x5208","gasPrice":"0x7","hash":"0x150dfcd895b2856f2418564aae294c1e37346734e29617b3a29b15f7facb50d6","input":"0x","nonce":"0x1a5b","to":"0x65925ceb2e33bb7fde5f1c7488bbe8cca6c4e177","transactionIndex":"0x0","value":"0x5497acb9bd0b","type":"0x0","chainId":"0x311","v":"0x646","r":"0xa8c2b5d2d2c95eb58274e1a1c90626964e6ea3ae9ee8103769f34f2d83f83e26","s":"0x5ebebaf19ade625611bf30575e4503e9611ff561d0d88bb5872eb1cf457e411d"}}

eth_getTransactionReceipt

Returns the receipt of a transaction by transaction hash. Note: The receipt is not available for pending transactions. Parameters
  • DATA, 32 Bytes - hash of a transaction
  • params: ["0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5"]
Returns
  • Object - A transaction receipt object, or null when no receipt was found:
  • transactionHash: DATA, 32 Bytes - hash of the transaction.
  • transactionIndex: QUANTITY - integer of the transactions index position in the block.
  • blockHash: DATA, 32 Bytes - hash of the block where this transaction was in.
  • blockNumber: QUANTITY - block number where this transaction was in.
  • from: DATA, 20 Bytes - address of the sender.
  • to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.
  • cumulativeGasUsed: QUANTITY - The total amount of gas used when this transaction was executed in the block.
  • effectiveGasPrice: QUANTITY - The sum of the base fee and tip paid per unit of gas.
  • gasUsed: QUANTITY - The amount of gas used by this specific transaction alone.
  • contractAddress: DATA, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
  • logs: [Array] of log objects, which this transaction generated.
  • logsBloom: DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs.
  • type: QUANTITY - integer of the transaction type, 0x0 for legacy transactions, 0x1 for access list types, 0x2 for dynamic fees.
It also returns either:
  • root: DATA 32 bytes of post-transaction stateroot (pre Byzantium)
  • status: QUANTITY either 1 (success) or 0 (failure)
Example
// Request
curl -X POST https://testnet-rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xe83e89c6fac48fc02fea39ded109236ef1b5991dd6924248a5e05bce6ee3f756"],"id":1}'
// Response
{"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x97a7578df5a69f09417328638c428389b92283427ff62febee6888eb1c11a1dc","blockNumber":"0xa63d8","contractAddress":null,"cumulativeGasUsed":"0xf618","from":"0xeecc2fa50180e7c929c814a8bd65e45f81994327","gasUsed":"0x5208","logs":[],"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","status":"0x1","to":"0xfb937e6e8aec33e64672d83b58e0e7ff8feaf74b","transactionHash":"0xe83e89c6fac48fc02fea39ded109236ef1b5991dd6924248a5e05bce6ee3f756","transactionIndex":"0x2","type":"0x0"}}