# event-configuration-contracts

### **EthereumEventConfiguration**

#### **`buildEventInitData`**

Build initial data for the event contract by extending the event vote data with configuration params.

```
function buildEventInitData(
        IEthereumEvent.EthereumEventVoteData eventVoteData
    ) internal view returns(
        IEthereumEvent.EthereumEventInitData eventInitData)
```

**Parameters:**

***

| Name          | Type                  | Description                                  |
| ------------- | --------------------- | -------------------------------------------- |
| eventVoteData | EthereumEventVoteData | Event vote data structure, passed by relayer |
| signatures    | bytes\[] memory       | Payload signatures                           |

#### **`deployEvent`**

Deploys the event contract (creates a new instance of EthereumBaseEvent contract).

```
function deployEvent(
        IEthereumEvent.EthereumEventVoteData eventVoteData
    ) external override reserveMinBalance(MIN_CONTRACT_BALANCE)
```

**Parameters**

| Name          | Type                  | Description               |
| ------------- | --------------------- | ------------------------- |
| eventVoteData | EthereumEventVoteData | Event vote data structure |

**Events emitted:**

* NewEventContract

#### **`deriveEventAddress`**

Derive the Ethereum event contract address from its init data.

```
function deriveEventAddress(
        IEthereumEvent.EthereumEventVoteData eventVoteData
    ) override public view responsible
    returns(address eventContract)
```

**Parameters:**

| Type    | Description                         |
| ------- | ----------------------------------- |
| address | Address to return the remaining gas |

### EverscaleEventConfiguration

#### **`buildEventInitData`**

Extends event vote data with configuration params.

```
function buildEventInitData(
        IEverscaleEvent.EverscaleEventVoteData eventVoteData
    ) internal view returns(
        IEverscaleEvent.EverscaleEventInitData eventInitData)
```

**Parameters:**

| Name          | Type                   | Description                                  |
| ------------- | ---------------------- | -------------------------------------------- |
| eventVoteData | EverscaleEventVoteData | Event vote data structure, passed by relayer |

**Return values:**

| Name          | Type                   | Description                     |
| ------------- | ---------------------- | ------------------------------- |
| eventInitData | EverscaleEventVoteData | Initial data for event contract |

#### **`deployEvent`**

Deploy event contract (creates new instance of EverscaleBaseEvent contract).

```
function deployEvent(
        IEverscaleEvent.EverscaleEventVoteData eventVoteData
    ) override external reserveMinBalance(MIN_CONTRACT_BALANCE)
```

**Parameters:**

| Name          | Type                   | Description               |
| ------------- | ---------------------- | ------------------------- |
| eventVoteData | EverscaleEventVoteData | Event vote data structure |

**Events emitted:**

* NewEventContract

#### **`deriveEventAddress`**

Derives the Everscale event contract address from it's initial data.

```
function deriveEventAddress(
        IEverscaleEvent.EverscaleEventVoteData eventVoteData
    ) override public view responsible
    returns (address eventContract)
```

**Parameters:**

| Name          | Type                   | Description               |
| ------------- | ---------------------- | ------------------------- |
| eventVoteData | EverscaleEventVoteData | Event vote data structure |

**Return values:**

| Name          | Type    | Description                                           |
| ------------- | ------- | ----------------------------------------------------- |
| eventContract | address | Address of the corresponding everscale event contract |

#### **`onEventConfirmedExtended`**

Receives "confirm" callback from the event contract and checks event contract correctness. If it's correct, then sends the callback to the proxy with the same signature.

```
function onEventConfirmedExtended(
        IEthereumEvent.EthereumEventInitData eventInitData,
        TvmCell _meta,
        address gasBackAddress
    ) external override reserveMinBalance(MIN_CONTRACT_BALANCE)
```

**Parameters:**

| Type    | Description                         |
| ------- | ----------------------------------- |
| address | Address to return the remaining gas |


---

# 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://docs.octusbridge.io/integrate/octus-bridge-contracts/everscale/bridge-section/event-configuration-contracts.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.
