> For the complete documentation index, see [llms.txt](https://docs.zivoe.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zivoe.com/developer-docs/lockers/oct_ydl.sol.md).

# OCT\_YDL.sol

## Introduction

This contract converts assets and forwards them to the YDL.

{% embed url="<https://www.figma.com/board/qjuQ0uGQl9QD7KeBwyf73d/Zivoe-Visualization?node-id=207-552&t=8fVk5MSL8V4T10SB-4>" %}

#### State Variables

<table><thead><tr><th width="144.33333333333331">Type</th><th width="150">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>GBL</td><td>The ZivoeGlobals contract.</td></tr></tbody></table>

## **Sections**

[#read-functions](#read-functions "mention")

* [#canpush](#canpush "mention") - Permission for owner to call `pushToLocker()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)
* [#canpushmulti](#canpushmulti "mention") - Permission for owner to call `pushToLockerMulti()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)
* [#canpull](#canpull "mention") - Permission for owner to call `pullFromLocker()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)
* [#canpullmulti](#canpullmulti "mention") - Permission for owner to call `pullFromLockerMulti()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)
* [#canpullpartial](#canpullpartial "mention") - Permission for owner to call `pullFromLockerPartial()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)
* [#canpullpartialmulti](#canpullpartialmulti "mention") - Permission for owner to call `pullFromLockerMultiPartial()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)

[#write-functions](#write-functions "mention")

* [#convertandforward](#convertandforward "mention") - Converts an asset to YDL.distributedAsset() and forwards it.

[#events](#events "mention")

* [#assetconvertedforwarded](#assetconvertedforwarded "mention")

## Read Functions

#### `canPush()`

Permission for owner to call `pushToLocker()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)

```solidity
 function canPush() public override pure returns (bool) { return true; }
```

#### `canPushMulti()`

Permission for owner to call `pushToLockerMulti()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)

```solidity
 function canPushMulti() public override pure returns (bool) { return true; }
```

#### `canPull()`

Permission for owner to call `pullFromLocker()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)

```solidity
function canPull() public override pure returns (bool) { return true; }
```

#### `canPullMulti()`

Permission for owner to call `pullFromLockerMulti()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)

```solidity
 function canPullMulti() public override pure returns (bool) { return true; }
```

#### `canPullPartial()`

Permission for owner to call `pullFromLockerPartial()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)

```solidity
function canPullPartial() public override pure returns (bool) { return true; }
```

#### `canPullPartialMulti()`

Permission for owner to call `pullFromLockerMultiPartial()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)

```solidity
 function canPullPartialMulti() public override pure returns (bool) { return true; }
```

## Write Functions

#### **`convertAndForward()`**

Converts an asset to YDL.distributedAsset() and forwards it.

```solidity
function convertAndForward(address asset, bytes calldata data) external; 
```

<table><thead><tr><th width="156.33333333333331">Type</th><th width="160">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>asset</td><td>The asset to convert.</td></tr><tr><td>bytes</td><td>data</td><td>The payload containing conversion data, consumed by 1INCH_V5.</td></tr></tbody></table>

Emits the [#assetconvertedforwarded](#assetconvertedforwarded "mention") event

## Events

#### **`AssetConvertedForwarded()`**

Emitted during [#convertandforward](#convertandforward "mention")

<pre class="language-solidity"><code class="lang-solidity">event AssetConvertedForwarded(
<strong>    address indexed asset, 
</strong>    address indexed distributedAsset, 
    uint256 amountFrom, 
    uint256 amountTo
);
</code></pre>

<table><thead><tr><th width="127.33333333333331">Type</th><th width="98">Indexed</th><th width="163">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>True</td><td>asset</td><td>The "asset" being converted.</td></tr><tr><td>address</td><td>True</td><td>distributedAsset</td><td>The ERC20 that we are converting "asset" to, based on YDL.distributedAsset().</td></tr><tr><td>uint256</td><td>False</td><td>amountFrom</td><td>The amount being converted.</td></tr><tr><td>uint256</td><td>False</td><td>amountTo</td><td>The amount of distibutedAsset received.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.zivoe.com/developer-docs/lockers/oct_ydl.sol.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.
