> For the complete documentation index, see [llms.txt](https://docs.getblock.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getblock.io/api-reference/celo/eth_getstorageat-celo.md).

# eth\_getStorageAt - Celo

This method returns the value from a storage position at a given address on the Celo network. This is useful for reading raw contract storage, including private variables that aren't exposed through public functions.

## Parameters

| Parameter   | Type   | Required | Description                                             |
| ----------- | ------ | -------- | ------------------------------------------------------- |
| address     | string | Yes      | Contract address                                        |
| position    | string | Yes      | Storage position as hex                                 |
| blockNumber | string | Yes      | Block number in hex, or "latest", "earliest", "pending" |

## Request Example

{% tabs %}
{% tab title="First Tab" %}
{% code title="cURL" %}

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

{% endcode %}
{% endtab %}

{% tab title="Second Tab" %}
{% code title="JavaScript (Axios)" %}

```javascript
const axios = require('axios');

const url = 'https://go.getblock.io/<ACCESS-TOKEN>/';

const payload = {
  jsonrpc: '2.0',
  id: 'getblock.io',
  method: 'eth_getStorageAt',
  params: [
    '0x765DE816845861e75A25fCA122bb6898B8B1282a',
    '0x0',
    'latest'
  ]
};

axios.post(url, payload, {
  headers: { 'Content-Type': 'application/json' }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
```

{% endcode %}

{% endtab %}

{% tab title="Untitled" %}
{% code title="Python" %}

```python
import requests
import json

url = "https://go.getblock.io/<ACCESS-TOKEN>/"

payload = {
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "method": "eth_getStorageAt",
    "params": [
        "0x765DE816845861e75A25fCA122bb6898B8B1282a",
        "0x0",
        "latest"
    ]
}

response = requests.post(url, headers={"Content-Type": "application/json"}, json=payload)
print(response.json())
```

{% endcode %}

{% endtab %}
{% endtabs %}

## Response Example

{% code title="Response JSON" %}

```json
{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000001"
}
```

{% endcode %}

## Response Definition

| Field  | Type   | Description                         |
| ------ | ------ | ----------------------------------- |
| result | string | Storage value as 32-byte hex string |

## Use Cases

* Read contract storage directly
* Access private variables
* Analyze proxy contract state
* Debug contract behavior

## Error Handling

| Error Code | Description                                    |
| ---------- | ---------------------------------------------- |
| -32602     | Invalid params - malformed address or position |
| -32603     | Internal error - node processing issues        |

## SDK Integration

{% tabs %}
{% tab title="Ethers.js" %}
{% code title="Ethers.js" overflow="wrap" %}

```javascript
const { ethers } = require('ethers');

const provider = new ethers.JsonRpcProvider('https://go.getblock.io/<ACCESS-TOKEN>/');

const storage = await provider.getStorage('0x765DE816845861e75A25fCA122bb6898B8B1282a', 0);
console.log(storage);
```

{% endcode %}
{% endtab %}

{% tab title="ContractKit" %}
{% code title="ContractKit" overflow="wrap" %}

```javascript
const { newKit } = require('@celo/contractkit');

const kit = newKit('https://go.getblock.io/<ACCESS-TOKEN>/');

const storage = await kit.web3.eth.getStorageAt('0x765DE816845861e75A25fCA122bb6898B8B1282a', 0);
console.log(storage);
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.getblock.io/api-reference/celo/eth_getstorageat-celo.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
