githubEdit

eth_sendRawTransaction - Celo

Example code for the eth_newFilter JSON-RPC method. Complete guide on how to use eth_newFilter JSON-RPC in GetBlock Web3 documentation.

The eth_sendRawTransaction method submits a pre-signed transaction to the Celo network for execution. This is the primary method for broadcasting transactions. With Celo's one-block finality and sub-cent fees, transactions are confirmed rapidly and economically. Celo also supports fee abstraction, allowing gas to be paid in stablecoins.

Parameters

Parameter
Type
Required
Description

signedTransactionData

string

Yes

The signed transaction data as a hex string

Request Example

curl
curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "method": "eth_sendRawTransaction",
  "params": ["0xf86c098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83"]
}'

Response Example

response.json
{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "result": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"
}

Response Definition

Field
Type
Description

result

string

32-byte transaction hash

Use Cases

  • Submit signed transactions to the network

  • Deploy smart contracts

  • Transfer CELO tokens

  • Execute contract functions

  • Send stablecoin payments (cUSD, cEUR)

Error Handling

Error Code
Description

-32602

Invalid params - malformed transaction data

-32603

Internal error - node processing issues

-32000

Transaction rejected - insufficient funds, nonce issues

SDK Integration

Last updated

Was this helpful?