# `getStorageAt`

Reads bytes of storage of length `length` in the current contract, from the position defined by `offset`.

## Usage


<Tabs items={['example.sol']}>
  <Tabs.Tab>
    ```solidity
    interface ISafe {
        function getStorageAt(uint256 offset, uint256 length) external view returns (bytes);
    }

    contract Example {
        function example() ... {
            (ISafe safe).getStorageAt(0, 1);
        }
    }
    ```
  </Tabs.Tab>
</Tabs>

## Parameters

### `offset`
- **Type:** `uint256`

The offset in the current contract's storage in words to start reading from.

```solidity focus=2
(ISafe safe).getStorageAt(
    0,
    1
);
```

### `length`

- **Type:** `uint256`

The number of words (32 bytes) of data to read.

```solidity focus=3
(ISafe safe).getStorageAt(
    0,
    1
);
```

## Returns

- **Type:** `bytes`

The bytes that were read.
