# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'eth_sendRawTransactionSync',
    params: [
      '0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833',
      5000
    ]
  })
};

fetch('https://gnosis-mainnet.g.alchemy.com/v2/docs-demo', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://gnosis-mainnet.g.alchemy.com/v2/docs-demo"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_sendRawTransactionSync",
    "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833", 5000]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://gnosis-mainnet.g.alchemy.com/v2/docs-demo"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_sendRawTransactionSync\",\n  \"params\": [\n    \"0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833\",\n    5000\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://gnosis-mainnet.g.alchemy.com/v2/docs-demo")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_sendRawTransactionSync\",\n  \"params\": [\n    \"0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833\",\n    5000\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://gnosis-mainnet.g.alchemy.com/v2/docs-demo");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_sendRawTransactionSync\",\n  \"params\": [\n    \"0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833\",\n    5000\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## OpenRPC Method Specification

```yaml
name: eth_sendRawTransactionSync
description: Sends a raw transaction to the network and waits for the transaction to be mined.
params:
  - name: Transaction data
    required: true
    description: The signed transaction data, RLP-encoded and hex-encoded.
    schema:
      title: hex encoded bytes
      type: string
      pattern: ^0x[0-9a-f]*$
  - name: Timeout
    required: false
    description: Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout.
    schema:
      type: integer
      minimum: 1
result:
  name: Receipt information
  description: The transaction receipt object containing various properties of the transaction receipt.
  schema:
    oneOf:
      - title: Not Found (null)
        type: 'null'
      - type: object
        title: Receipt information
        required:
          - blockHash
          - blockNumber
          - from
          - cumulativeGasUsed
          - gasUsed
          - logs
          - logsBloom
          - transactionHash
          - transactionIndex
          - effectiveGasPrice
        additionalProperties: false
        properties:
          type:
            title: type
            type: string
            pattern: ^0x([0-9a-fA-F]?){1,2}$
          transactionHash:
            title: transaction hash
            type: string
            pattern: ^0x[0-9a-f]{64}$
          transactionIndex:
            title: transaction index
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
          blockHash:
            title: block hash
            type: string
            pattern: ^0x[0-9a-f]{64}$
          blockNumber:
            title: block number
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
          from:
            title: from
            type: string
            pattern: ^0x[0-9a-fA-F]{40}$
          to:
            title: to
            description: Address of the receiver or null in a contract creation transaction.
            oneOf:
              - title: Contract Creation (null)
                type: 'null'
              - title: Recipient Address
                type: string
                pattern: ^0x[0-9a-fA-F]{40}$
          cumulativeGasUsed:
            title: cumulative gas used
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
            description: The sum of gas used by this transaction and all preceding transactions in the same block.
          gasUsed:
            title: gas used
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
            description: The amount of gas used for this specific transaction alone.
          blobGasUsed:
            title: blob gas used
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
            description: The amount of blob gas used for this specific transaction. Only specified for blob transactions as defined by EIP-4844.
          contractAddress:
            title: contract address
            description: The contract address created, if the transaction was a contract creation, otherwise null.
            oneOf:
              - title: hex encoded address
                type: string
                pattern: ^0x[0-9a-fA-F]{40}$
              - title: 'Null'
                type: 'null'
          logs:
            title: logs
            type: array
            items:
              title: log
              type: object
              required:
                - transactionHash
              additionalProperties: false
              properties:
                removed:
                  title: removed
                  type: boolean
                logIndex:
                  title: log index
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                transactionIndex:
                  title: transaction index
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                transactionHash:
                  title: transaction hash
                  type: string
                  pattern: ^0x[0-9a-f]{64}$
                blockHash:
                  title: block hash
                  type: string
                  pattern: ^0x[0-9a-f]{64}$
                blockNumber:
                  title: block number
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                address:
                  title: address
                  type: string
                  pattern: ^0x[0-9a-fA-F]{40}$
                data:
                  title: data
                  type: string
                  pattern: ^0x[0-9a-f]*$
                topics:
                  title: topics
                  type: array
                  items:
                    title: 32 hex encoded bytes
                    type: string
                    pattern: ^0x[0-9a-f]{64}$
          logsBloom:
            title: logs bloom
            type: string
            pattern: ^0x[0-9a-f]{512}$
          root:
            title: state root
            type: string
            pattern: ^0x[0-9a-f]{64}$
            description: The post-transaction state root. Only specified for transactions included before the Byzantium upgrade.
          status:
            title: status
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
            description: Either 1 (success) or 0 (failure). Only specified for transactions included after the Byzantium upgrade.
          effectiveGasPrice:
            title: effective gas price
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
            description: The actual value per gas deducted from the sender's account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).
          blobGasPrice:
            title: blob gas price
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
            description: The actual value per gas deducted from the sender's account for blob gas. Only specified for blob transactions as defined by EIP-4844.
examples:
  - name: eth_sendRawTransactionSync example
    params:
      - name: Transaction data
        value: '0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833'
      - name: Timeout
        value: 5000
    result:
      name: Receipt information
      value:
        transactionHash: 0x1234abcd...
        blockHash: 0xabcd1234...
        blockNumber: '0x10d4f'
        cumulativeGasUsed: '0x5208'
        gasUsed: '0x5208'
        contractAddress: null
        logs: []
        status: '0x1'
```
