# EVMScriptRegistry

## contract EVMScriptRegistry

is [IEVMScriptRegistry](https://legacy-docs.aragon.org/developers/tools/aragonos/smart-contract-references/evmscript/ievmscriptregistry), [EVMScriptRegistryConstants](https://legacy-docs.aragon.org/developers/tools/aragonos/smart-contract-references/evmscript/evmscriptregistryconstants), [AragonApp](https://legacy-docs.aragon.org/developers/tools/aragonos/smart-contract-references/apps/aragonapp)

Source: [contracts/evmscript/EVMScriptRegistry.sol](https://github.com/aragon/aragonOS/blob/v4.4.0/contracts/evmscript/EVMScriptRegistry.sol)

## Index

* [DisableExecutor](#disableexecutor)
* [EnableExecutor](#enableexecutor)
* [addScriptExecutor](#addscriptexecutor)
* [disableScriptExecutor](#disablescriptexecutor)
* [enableScriptExecutor](#enablescriptexecutor)
* [executorExists](#executorexists)
* [getScriptExecutor](#getscriptexecutor)
* [initialize](#initialize)

## Reference

### Events

#### **DisableExecutor** <a href="#disableexecutor" id="disableexecutor"></a>

` event`` `` `**`DisableExecutor`**`(uint256 executorId, address executorAddress)`

Parameters:

* `executorId` - uint256
* `executorAddress` - address

#### **EnableExecutor** <a href="#enableexecutor" id="enableexecutor"></a>

` event`` `` `**`EnableExecutor`**`(uint256 executorId, address executorAddress)`

Parameters:

* `executorId` - uint256
* `executorAddress` - address

### Modifiers

#### **executorExists** <a href="#executorexists" id="executorexists"></a>

` modifier`` `` `**`executorExists`**`(uint256 _executorId)`

Parameters:

* `_executorId` - uint256

### Functions

#### **addScriptExecutor** <a href="#addscriptexecutor" id="addscriptexecutor"></a>

` function`` `` `**`addScriptExecutor`**`(IEVMScriptExecutor _executor) external returns (uint256)`

Add a new script executor with address \`\_executor\` to the registry.

Modifiers:

* [auth](https://legacy-docs.aragon.org/developers/tools/aragonos/apps/aragonapp#authp)

Parameters:

* `_executor` - Address of the IEVMScriptExecutor that will be added to the registry

Returns:

* id Identifier of the executor in the registry

#### **disableScriptExecutor** <a href="#disablescriptexecutor" id="disablescriptexecutor"></a>

` function`` `` `**`disableScriptExecutor`**`(uint256 _executorId) external`

Disable script executor with ID \`\_executorId\`.

Modifiers:

* [authP](https://legacy-docs.aragon.org/developers/tools/aragonos/apps/aragonapp#canperform)

Parameters:

* `_executorId` - Identifier of the executor in the registry

#### **enableScriptExecutor** <a href="#enablescriptexecutor" id="enablescriptexecutor"></a>

` function`` `` `**`enableScriptExecutor`**`(uint256 _executorId) external`

Enable script executor with ID \`\_executorId\`.

Modifiers:

* [authP executorExists](#addscriptexecutor)

Parameters:

* `_executorId` - Identifier of the executor in the registry

#### **getScriptExecutor** <a href="#getscriptexecutor" id="getscriptexecutor"></a>

` function`` `` `**`getScriptExecutor`**`(bytes _script) public view returns (IEVMScriptExecutor)`

\`\`

Get the script executor that can execute a particular script based on its first 4 bytes.

Parameters:

* `_script` - EVMScript being inspected

Returns:

* IEVMScriptExecutor

#### **initialize** <a href="#initialize" id="initialize"></a>

` function`` `` `**`initialize`**`() public`

\`\`

Initialize the registry.

Modifiers:

* [onlyInit](https://legacy-docs.aragon.org/developers/tools/aragonos/common/initializable#getinitializationblock)


---

# 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://legacy-docs.aragon.org/developers/tools/aragonos/smart-contract-references/evmscript/evmscriptregistry.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.
