> For the complete documentation index, see [llms.txt](https://docs.openmesh.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openmesh.network/open-source-initiatives/openr-and-d/openr-and-d-smart-contracts/escrow.md).

# Escrow

### Initialize <a href="#initialize" id="initialize"></a>

#### Code <a href="#code" id="code"></a>

````
```solidity
function __Escrow_init() external {
    if (owner != address(0)) {
        revert AlreadyInitialized();
    }

    owner = msg.sender;
}
```
````

### Transfer <a href="#transfer" id="transfer"></a>

#### Inputs <a href="#inputs" id="inputs"></a>

**Token**: IERC20 (address); the ERC20 contract to transfer tokens of.

**To**: address; the address to transfer tokens to.

**Amount**: uint256; the amount of tokens to transfer.

#### Code <a href="#code-1" id="code-1"></a>

````
```solidity
function transfer(IERC20 token, address to, uint256 amount) external {
    if (msg.sender != owner) {
        revert NotOwner();
    }

    token.transfer(to, amount);
}
```
````

### [Auto-generated documentation](https://github.com/L3A-Protocol/openrd/blob/main/docs/Tasks/Escrow.md) <a href="#auto-generated-documentation" id="auto-generated-documentation"></a>


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.openmesh.network/open-source-initiatives/openr-and-d/openr-and-d-smart-contracts/escrow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
