> For the complete documentation index, see [llms.txt](https://elektro.gitbook.io/elektro-protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elektro.gitbook.io/elektro-protocol/smart-contracts/natspec-technical-documentation/elektro-market/elektrostorage.sol.md).

# ElektroStorage.sol

View Source: contracts/elektro/base/ElektroStorage.sol

**↗ Extends: RoleAware, Resolvable, OnlyRouterAccess** **↘ Derived Contracts: ElektroAbstract,** [**ElektroInitialize**](broken://pages/pVabwpJKc6yBjCd7jo5X)**,** [**ElektroLedgerCommon**](broken://pages/BPuyrdyPg8fZ8aCXebEa)**,** [**ElektroLedgerUpdate**](broken://pages/4rTtyqdOmVwIcj8LwcTw)**,** [**ElektroSetters**](broken://pages/bBCJFcGIoQxNotyu2zST)

**ElektroStorage**

Main Storage contract for each Elektro market. One of these is used for every market (asset pair) deployed. This stores data necessary for any Elektro market functionality and is tied to every {ElektroRouter}.

## Structs

### CurrencyPair

```js
struct CurrencyPair {
 address underlyingCurrency,
 address strikeCurrency,
 uint256 srcMultiplier,
 uint256 destMultiplier
}
```

## Contract Members

**Constants & Variables**

Boolean used to block subsequent initializations for Elektro market storage. Makes sure contract's storage has been initialized and check it upon every call to init().

```js
bool public initialized;
```

***

```js
contract ITokenManagerMain public tokenManager;
```

***

```js
contract IElektroEventEmitter public elektroEventEmitter;
```

***

```js
contract IElektroRegistry public registry;
```

***

```js
address public underlyingCurrency;
```

***

```js
address public strikeCurrency;
```

***

Mapping storing client positions for a specific Elektro market. Map<{uint32 contractId, address clientAddress}, int256 amount>

```js
mapping(uint32 => mapping(address => int64)) public clientPositions;
```

***

## Functions

* getChainID()

### getChainID

Returns CHAINID from the opcode by using inline assembly.

```js
function getChainID() external pure
returns(uint256)
```

**Returns**

uint256 - chainid representing which Ethereum network (chain) this contract belongs to (Ropsten, Mainnet, etc.)

**Arguments**
