# BeaconTimelockTrigger

The BeaconTimelockTrigger smart contract passes the information about the current draw to the prizeDistributionFactory for the creation of a prizeDistribution.

## Write methods description

### initialize()

Allows to initialize the contract during the deployment.

Parameters:

<table><thead><tr><th width="250.33333333333331">Name</th><th width="115">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>_owner</strong></td><td>address</td><td>An account that will become a new owner of a contract.</td></tr><tr><td><strong>_prizeDistributionFactory</strong></td><td>address</td><td>PrizeDistributionFactory address.</td></tr><tr><td><strong>_timelock</strong></td><td>address</td><td>DrawCalculatorTimelock address.</td></tr></tbody></table>

### push()

Locks next Draw, logs the `totalNetworkTicketSupply` to PrizeDistributionFactory and triggers the prize distribution push. Restricts new draws for N seconds by forcing time lock on the next target draw ID.

Parameters:

<table><thead><tr><th width="263.3333333333333">Name</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>_draw</strong></td><td>IDrawBeacon.Draw</td><td>Draw including values like: drawId, timestamp, beaconPeriodStartedAt, beaconPeriodSeconds, paid.</td></tr><tr><td><strong>_totalNetworkTicketSupply</strong></td><td>uint256</td><td>Total network ticket supply calculated off chain.</td></tr></tbody></table>

### transferOwnership()

Transfers ownership of the contract to a `_pendingOwner`. Can only be called by the current owner.

Parameters:

<table><thead><tr><th width="160.33333333333331">Name</th><th width="144">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>_newOwner</strong></td><td>address</td><td>An account that will become the <code>_pendingOwner</code>.</td></tr></tbody></table>

### claimOwnership()

Allows the `pendingOwner` address to claim the owner role. This function is only callable by the `pendingOwner`.

### renounceOwnership()

Leaves the contract without owner. It will not be possible to call the owner's functions anymore. Can only be called by the current owner. The method does not take any parameters. Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

### setManager()

Allows the owner to give the manager role to an address. The manager role has access to the functions with the modified `onlyManager` or `onlyManagerOrOwner`.

Parameters:

<table><thead><tr><th width="193.33333333333331">Name</th><th width="165">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>_newManager</strong></td><td>address</td><td>An account that will become the new manager.</td></tr></tbody></table>

## Read methods description

### prizeDistributionFactory()

Address of the PrizeDistributionFactory contract.

### timelock()

Address of the DrawCalculatorTimelock contract.

### owner()

Wwner role that can be granted exclusive access to specific functions with the modifier `onlyOwner`.

### manager()

Manager role that can be granted exclusive access to specific functions with the modifier `onlyManager` or `onlyManagerOrOwner`.

### pendingOwner()

The address that can claim the owner role. It is used to transfer the owner.


---

# 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.asymetrix.io/resources/developers-docs/beacontimelocktrigger.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.
