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

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