# ElektroRegistryAdmin

View Source: contracts/elektro/init/ElektroRegistryAdmin.sol

**↗ Extends:** [**ElektroRegistryStorage**](broken://pages/9Wx8JFN9MwfzcO2Qo7w4)**,** [**Delegator**](broken://pages/HodRCMxbn60x1wNP5Viw)**, IElektroRegistryAdmin**

**ElektroRegistryAdmin**

Registry contract of Elektro Protocol. Provides contract registration and verification if contract has been registered. Is responsible for deployment of each Elektro market ({ElektroRouter}).

## Contract Members

**Constants & Variables**

```js
bytes32 private constant ADMIN_ROLE_NAME;
```

***

Signature of the {RegistryBase.initRegistryBase} which will initialize {RegistryBaseStorage} which is a part (inherited) of the {ElektroRegistryStorage} Is needed for delegate calls.

```js
bytes4 private constant BASE_INIT_SIG;
```

***

## Functions

* deployElektro(address \_underlyingCurrency, address \_strikeCurrency, uint256 \_precisionUnderlyingCurrency, uint256 \_precisionStrikeCurrency)
* initElektroRegistry(address \_tokenManager, address \_fundLock, address \_elektroResolver, address \_tokenValidator)
* isValidContractOrUtility(address \_contract)

### deployElektro

Deployment of each Elektro market ({ElektroRouter}). First Router contract is deployed, next - Router is added as verified contract. Finally deployment of Elektro contract is executed.

```js
function deployElektro(address _underlyingCurrency, address _strikeCurrency, uint256 _precisionUnderlyingCurrency, uint256 _precisionStrikeCurrency) external nonpayable onlyRole onlyRouterAccess 
returns(address)
```

**Arguments**

| Name                          | Type    | Description                                                  |
| ----------------------------- | ------- | ------------------------------------------------------------ |
| \_underlyingCurrency          | address | address of underlyingCurrency asset used in Elektro contract |
| \_strikeCurrency              | address | address of strikeCurrency asset used in Elektro contract     |
| \_precisionUnderlyingCurrency | uint256 | min precision of base token                                  |
| \_precisionStrikeCurrency     | uint256 | min precision of underlying token                            |

### initElektroRegistry

function that sets crucial contracts addresses used by Registry

```js
function initElektroRegistry(address _tokenManager, address _fundLock, address _elektroResolver, address _tokenValidator) external nonpayable onlyRouterAccess 
returns(bool)
```

**Arguments**

| Name              | Type    | Description                                      |
| ----------------- | ------- | ------------------------------------------------ |
| \_tokenManager    | address | address of TokenManager contract to be set in    |
| \_fundLock        | address | address of FundLock contract to be set in        |
| \_elektroResolver | address | address of ElektroResolver contract to be set in |
| \_tokenValidator  | address |                                                  |

### isValidContractOrUtility

Function used by some modifiers or to just check if the a certain contract is registered as a part of Elektro Protocol. Protects from unauthorized calls from external contracts outside of our domain.

```js
function isValidContractOrUtility(address _contract) external view
returns(bool)
```

**Arguments**

| Name       | Type    | Description                        |
| ---------- | ------- | ---------------------------------- |
| \_contract | address | - address of the contract to check |


---

# 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/elektroregistryadmin.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.
