Infura icon

Infura

Interact with blockchain APIs via Infura

Send Raw Transaction

AI-generated

Overview

This node operation sends a signed raw transaction to the Ethereum blockchain via the Infura API. It is useful for users who have already signed a transaction offline or through another service and want to broadcast it to the network. For example, developers or blockchain users can use this to submit transactions without exposing private keys to the node itself.

Use Case Examples

  1. Sending a signed Ethereum transaction in hex format to transfer tokens or execute a contract function.
  2. Broadcasting a pre-signed transaction from a hardware wallet or external signing service.

Properties

Name Meaning
Signed Transaction The signed transaction data in hexadecimal format that will be sent to the Ethereum network.

Output

JSON

  • transactionHash - The hash of the submitted transaction returned by the network.
  • signedTransaction - The original signed transaction hex string that was sent.
  • metadata
    • network - The Ethereum network used (e.g., mainnet, rinkeby).
    • operation - The operation performed, here it is 'sendRawTransaction'.
    • timestamp - Timestamp when the transaction was sent.
    • infura_endpoint - The Infura API endpoint used for the request.
    • raw_response - The full raw response from the Infura API.

Dependencies

  • Infura API credentials including network, project ID, and optionally project secret for authentication.

Troubleshooting

  • Ensure the signed transaction is correctly formatted as a hex string starting with '0x'.
  • Check that the Infura credentials (network, project ID, and secret) are valid and have the necessary permissions.
  • If the transaction is rejected, verify that the nonce, gas price, and other transaction parameters are correct and that the account has sufficient funds.
  • Common error messages may include invalid transaction format, insufficient funds, or network connectivity issues. Resolving these involves validating the transaction data and credentials, and ensuring network access to Infura.

Links

Discussion