# Escrow

## Initialize

### Code

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

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

## Transfer

### Inputs

**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

````solidity
```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)
