# RegistryBaseStorage

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

**↗ Extends: RoleAware, Resolvable,** [**OnlyRouterAccess**](https://elektro.gitbook.io/elektro-protocol/smart-contracts/natspec-technical-documentation/registry/broken-reference) **↘ Derived Contracts: ElektroRegistryStorage,** [**RegistryBaseAdmin**](https://elektro.gitbook.io/elektro-protocol/smart-contracts/natspec-technical-documentation/registry/broken-reference)**,** [**RegistryBaseSetters**](https://elektro.gitbook.io/elektro-protocol/smart-contracts/natspec-technical-documentation/registry/broken-reference)

**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


---

# Agent Instructions: 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:

```
GET https://elektro.gitbook.io/elektro-protocol/smart-contracts/natspec-technical-documentation/registry/registrybasestorage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
