Docs
Supported ChainsBoba NetworkJSON-RPC APITransaction Methods

eth_sendRawTransaction - Boba Network RPC Method

Submit signed transactions to Boba Network. Essential for broadcasting transactions for AI-powered dApps, Web2 API integration, enterprise blockchain solutions, and offchain computation.

Submits a pre-signed transaction for broadcast to Boba Network.

Why Boba Network? Build on the Hybrid Compute L2 enabling smart contracts to access AI models and Web2 APIs natively with HybridCompute 2.0 for native AI/API access, $70M ecosystem funding, OP Stack compatibility, and two-way offchain integration.

Use Cases

The eth_sendRawTransaction method is essential for:

  • Broadcasting transactions - Submit signed transactions to the network
  • Wallet operations - Send native tokens and interact with contracts
  • DeFi operations - Execute swaps, provide liquidity for AI-powered dApps, Web2 API integration, enterprise blockchain solutions, and offchain computation
  • Batch operations - Submit multiple transactions efficiently

Request Parameters

Request
signedTransactionDataDATA

The signed transaction data (RLP encoded)

Response Body

Response
resultDATA

32-byte transaction hash

Code Examples

Bash
curl -X POST https://api-boba-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_sendRawTransaction",
    "params": ["0xf86c808504a817c80082520894..."],
    "id": 1
  }'
JavaScript
import { JsonRpcProvider, Wallet, parseEther } from 'ethers';

const provider = new JsonRpcProvider('https://api-boba-mainnet.n.dwellir.com/YOUR_API_KEY');
const wallet = new Wallet('YOUR_PRIVATE_KEY', provider);

// Send native tokens
async function sendTransaction(to, value) {
  const tx = await wallet.sendTransaction({
    to: to,
    value: parseEther(value)
  });

  console.log('Transaction hash:', tx.hash);

  // Wait for confirmation
  const receipt = await tx.wait();
  console.log('Confirmed in block:', receipt.blockNumber);

  return receipt;
}

// Send to contract
async function sendContractTransaction(contract, method, args, value = '0') {
  const tx = await contract[method](...args, {
    value: parseEther(value)
  });

  return await tx.wait();
}
Python
from web3 import Web3

w3 = Web3(Web3.HTTPProvider('https://api-boba-mainnet.n.dwellir.com/YOUR_API_KEY'))

def send_transaction(private_key, to, value_in_ether):
    account = w3.eth.account.from_key(private_key)

    # Build transaction
    tx = {
        'nonce': w3.eth.get_transaction_count(account.address),
        'to': to,
        'value': w3.to_wei(value_in_ether, 'ether'),
        'gas': 21000,
        'gasPrice': w3.eth.gas_price,
        'chainId': w3.eth.chain_id
    }

    # Sign transaction
    signed_tx = account.sign_transaction(tx)

    # Send transaction
    tx_hash = w3.eth.send_raw_transaction(signed_tx.rawTransaction)
    print(f'Transaction hash: {tx_hash.hex()}')

    # Wait for confirmation
    receipt = w3.eth.wait_for_transaction_receipt(tx_hash)
    print(f'Confirmed in block: {receipt["blockNumber"]}')

    return receipt
Go
package main

import (
    "context"
    "crypto/ecdsa"
    "fmt"
    "log"
    "math/big"

    "github.com/ethereum/go-ethereum/common"
    "github.com/ethereum/go-ethereum/core/types"
    "github.com/ethereum/go-ethereum/crypto"
    "github.com/ethereum/go-ethereum/ethclient"
)

func main() {
    client, err := ethclient.Dial("https://api-boba-mainnet.n.dwellir.com/YOUR_API_KEY")
    if err != nil {
        log.Fatal(err)
    }

    privateKey, err := crypto.HexToECDSA("YOUR_PRIVATE_KEY")
    if err != nil {
        log.Fatal(err)
    }

    publicKey := privateKey.Public()
    publicKeyECDSA, _ := publicKey.(*ecdsa.PublicKey)
    fromAddress := crypto.PubkeyToAddress(*publicKeyECDSA)

    nonce, _ := client.PendingNonceAt(context.Background(), fromAddress)
    value := big.NewInt(1000000000000000000)
    gasLimit := uint64(21000)
    gasPrice, _ := client.SuggestGasPrice(context.Background())

    toAddress := common.HexToAddress("0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000")
    tx := types.NewTransaction(nonce, toAddress, value, gasLimit, gasPrice, nil)

    chainID, _ := client.NetworkID(context.Background())
    signedTx, _ := types.SignTx(tx, types.NewEIP155Signer(chainID), privateKey)

    err = client.SendTransaction(context.Background(), signedTx)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Printf("Transaction hash: %s\n", signedTx.Hash().Hex())
}

Error Handling

Error CodeMessageDescription
-32000Nonce too lowTransaction nonce already used
-32000Insufficient fundsAccount has insufficient balance
-32000Gas too lowGas limit insufficient
-32000Replacement underpricedGas price too low for replacement