> 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/registry/registrybasestorage.md).

# RegistryBaseStorage

Used to store most critical contract addresses

View Source: @nomisma/elektro-protocol-aux/contracts/registry/RegistryBaseStorage.sol

**↗ Extends: RoleAware, Resolvable,** [**OnlyRouterAccess**](broken://pages/y1tH5phNInqPDfksQ3cv) **↘ Derived Contracts: ElektroRegistryStorage,** [**RegistryBaseAdmin**](broken://pages/jMqhK1pnKDlRRAQ3myib)**,** [**RegistryBaseSetters**](broken://pages/EurvTbUtKZ0xsSdUZdP6)

**RegistryBaseStorage**

Contract is used as a single place to keep addresses of major contracts used in Elektro. Instead of passing all needed contract addresses to contracts that need them, only Registry contract is passed. This approach ensures that change of contract address is done in one place, instead of multiple updates in all the contracts.

## Structs

### ContractStorage

```js
struct ContractStorage {
 uint256 length,
 mapping(uint256 => address) _contractsByIdx,
 mapping(address => bool) _contractsByAddress
}
```

## Contract Members

**Constants & Variables**

Address of {TokenManagerRouter}

```js
address public tokenManager;
```

***

Address of {EventEmitterRouter}

```js
address public eventEmitter;
```

***

Address of {TokenValidator}

```js
address public tokenValidator;
```

***

Address of {ElektroResolver} - Resolver for the Elektro market module.

```js
contract Resolver public elektroResolver;
```

***

Variable to prevent subsequent initializations of the module's storage. Can only be set once during the construction of the higher level contract. Setting this var to 'true' should be done in the higher level contract since there might be extra functionality that can potentially fail after initRegistryBase() is complete

```js
bool public initialized;
```

***

See {ContractStorage} struct

```js
struct RegistryBaseStorage.ContractStorage internal contractStorage;
```

***

## Modifiers

* onlySelf

### onlySelf

Modifier protecting functions that can only be called by the same module.

```js
modifier onlySelf() internal
```

**Arguments**

## Functions
