# EIP2612PermitAndDeposit

This contract allows to delegate during the deposits using signatures (EIP-2612).

## Write methods description

### depositToAndDelegate()

Deposits user’s token into the prize pool and delegates tickets.

Parameters:

<table><thead><tr><th width="205.33333333333331">Name</th><th width="99">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>_prizePool</strong></td><td>address</td><td>An address of the prize pool contract to deposit into.</td></tr><tr><td><strong>_amount</strong></td><td>uint256</td><td>Amount of tokens to deposit into the prize pool.</td></tr><tr><td><strong>_to</strong></td><td>address</td><td>An address that will receive the tickets.</td></tr><tr><td><strong>_delegateSignature</strong></td><td>tuple</td><td>Delegate signature (delegate (address), signature (tuple)).</td></tr></tbody></table>

### initialize()

Allows to initialize the contract during the deployment. The method does not take any parameters.

### permitAndDepositToAndDelegate()

Permits this contract to spend on a user’s behalf and deposits into the prize pool. The `_spender` address required by the permit function is the address of this contract.

Parameters:

<table><thead><tr><th width="203.33333333333331">Name</th><th width="102">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>_prizePool</strong></td><td>address</td><td>An address of the prize pool contract to deposit into.</td></tr><tr><td><strong>_amount</strong></td><td>uint256</td><td>Amount of tokens to deposit into the prize pool.</td></tr><tr><td><strong>_to</strong></td><td>address</td><td>An address that will receive the tickets.</td></tr><tr><td><strong>_permitSignature</strong></td><td>tuple</td><td>Permit signature (deadline (uint256), v (uint8), r (bytes32), s (bytes32)).</td></tr><tr><td><strong>_delegateSignature</strong></td><td>tuple</td><td>Delegate signature (delegate (address), signature (tuple)).</td></tr></tbody></table>

## Read methods description

This contract does not have read methods.


---

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