# DullahanZapDeposit

### aave

```solidity
address aave
```

Address of the AAVE token

### stkAave

```solidity
address stkAave
```

Address of the stkAAVE token

### vault

```solidity
address vault
```

Address of the Dullahan Vault

### staking

```solidity
address staking
```

Address of the Dullahan Staking

### ZapDeposit

```solidity
event ZapDeposit(address caller, address receiver, address sourceToken, uint256 amount, bool staked)
```

Event emitted when a Zap Depsoit is performed

### TokenRecovered

```solidity
event TokenRecovered(address token, uint256 amount)
```

Event emitted when an ERC20 token is recovered from this contract

### constructor

```solidity
constructor(address _aave, address _stkAave, address _vault, address _staking) public
```

### zapDeposit

```solidity
function zapDeposit(address sourceToken, uint256 amount, address receiver, bool stake) external
```

Zap deposit AAVE or stkAAVE into the Vault & stake them

*Pull AAVE or stkAAVE, deposit in the Vault, and stake if flag was given*

#### Parameters

| Name        | Type    | Description                                                    |
| ----------- | ------- | -------------------------------------------------------------- |
| sourceToken | address | Address of the token to pull (AAVE or stkAAVE)                 |
| amount      | uint256 | Amount to deposit                                              |
| receiver    | address | Address to receive the share token / to be staked on behalf of |
| stake       | bool    | Flag to stake the received shares                              |

### pause

```solidity
function pause() external
```

Pause the contract

### unpause

```solidity
function unpause() external
```

Unpause the contract

### recoverERC20

```solidity
function recoverERC20(address token) external returns (bool)
```

Recover ERC2O tokens in the contract

*Recover ERC2O tokens in the contract*

#### Parameters

| Name  | Type    | Description                |
| ----- | ------- | -------------------------- |
| token | address | Address of the ERC2O token |

#### Return Values

| Name | Type | Description   |
| ---- | ---- | ------------- |
| \[0] | bool | bool: success |


---

# 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.paladin.vote/dullahan/smart-contracts/dullahanzapdeposit.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.
