eth_sendTransaction - Arbitrum

Example code for the eth_sendTransaction JSON RPC method. Сomplete guide on how to use eth_sendTransaction JSON RPC in GetBlock Web3 documentation.

This method sends a new transaction to the network. Unlike eth_sendRawTransaction, this method requires the node or connected wallet to manage the private key and sign the transaction on behalf of the user. Used mostly in browser wallets or trusted local nodes.

Parameters

Field
Type
Description

from

string

Address sending the transaction. Must be unlocked on the node or wallet.

to

string or null

Address receiving the transaction. Null if deploying a contract.

gas

string

Gas limit for execution. Optional.

gasPrice

string

Gas price for the transaction. Optional.

maxPriorityFeePerGas

string

EIP-1559 priority fee. Optional.

maxFeePerGas

string

EIP-1559 max total fee. Optional.

value

string

Amount of ETH to transfer, in wei.

data

string

Hex encoded data payload for contract interaction. Optional.

nonce

string

Nonce for the transaction. If omitted, the node assigns automatically.

Request

curl --location 'https://go.getblock.us/<ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
   "jsonrpc": "2.0",
    "method": "eth_sendTransaction",
    "params": [
        {
            "from": "0xD1AF2dAc4e0a9d1F58B99E2f42Bc0320Ed74a7cd",
            "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
            "gas": "0x76c0",
            "gasPrice": "0x9184e72a000",
            "value": "0x9184e72a",
            "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
        }
    ],
    "id": "getblock.io"
}'

Response

Reponse Parameter Definition

Field
Description
Data Type

result

The hash of the submitted transaction, as a hexadecimal string.

String

Use case

The eth_sendTransaction method helps developers to:

  • Initiate transactions directly from wallets without manual signing

  • Deploy contracts when using browser wallets like MetaMask

  • Allow frontends to request transactions from users without exposing private keys

  • Create a trustless UI where signing occurs locally on the user's device

  • Simplify interactions for beginners by handling nonce, gas, and signing automatically

  • Build dApps that request on-chain operations with minimal backend logic

Error handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS_TOKEN.

-3200

Unknown account

  • Invalid wallet address

  • Insufficient funds

  • gas too low

  • gas price too low

  • nonce too low

  • invalid sender

Integration with Web3

The eth_sendTransaction method enables developers to:

  • Trigger wallet popups for signing transactions in dApps

  • Build trustless browser interfaces where key management stays entirely client side

  • Avoid handling private keys on servers

  • Create user friendly transaction flows for DeFi, NFTs, gaming, and marketplaces

  • Use MetaMask or WalletConnect to sign and broadcast actions securely

Last updated

Was this helpful?