> For the complete documentation index, see [llms.txt](https://docs.owy.wtf/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.owy.wtf/contracts/integrations.md).

# Integrations

Guide to connect your smart contracts and application to Owy contracts.

{% hint style="warning" %}
We highly recommend you to have a read and understanding the contract(s) from Owy you want to work it. You can do this by looking at [Source Codes](/contracts/source-codes.md) or [Deployment Adresses](/contracts/deployment-addresses.md).
{% endhint %}

{% hint style="info" %}
At the moment, there is only one contract from Owy, the [Owy Token contract](/contracts/source-codes/owy-token-contract.md), and it is only launched on the Sepolia Testnet. You may want to recheck the mainnet version again after the official document release. However,  this guide now should give you the sense what is possible with Owy Token contract because all or majority of the code will remain the same on the mainnet.
{% endhint %}

Called by an external address. Required `allowance` value more than zero. Sender the funds from `from` to `to` with the amount `value` (with 18 decimals). If successful, return true. Anything else beyond this, it works similar to `transfer`. **Sender will pay the required tax amount.**&#x20;

```solidity
function transferFromWithSlippage(
        address from,
        address to,
        uint256 value,
        uint256 maxTax
    ) external returns (bool);
```

Called by an external address. Required `allowance` value more than zero. Sender the funds from `from` to `to` with the amount `value` (with 18 decimals). If successful, return true. Anything else beyond this, it works similar to `transferWithSlippage`. **Sender will pay the required tax amount.**&#x20;

```solidity
function transferFromFixedAmouunt(
        address from,
        address to,
        uint256 value,
        uint256 taxOffer
    ) external returns (bool, uint256);
```

Called by an external address. Required `allowance` value more than zero. Sender the funds from `from` to `to` with the amount `value` (with 18 decimals). If successful, return true. Anything else beyond this, it works similar to `transferFixedAmount`. **Sender will pay the offered tax amount.**&#x20;

***

### Events

```solidity
event Transfer(
        address indexed from,
        address indexed to,
        uint256 value,
        uint256 realValue
    );
```

Emit this event whenever any transfer or transferFrom functions succeed.

```solidity
event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
```

Emit this event whnever any approval functions succeed.

***

### Errors

Below is the list of errors in Owy Token contract. You may need to go through the [Owy.sol](https://docs.owy.wtf/contracts/pages/e7sJ9VZ1bfrStuLdN7D2#owy.sol) contract to find out more where each of the error will be raised.

```solidity
error ERC20InsufficientBalance(
        address sender,
        uint256 balance,
        uint256 needed
    );

    error ERC20InvalidSender();

    error ERC20InvalidReceiver();

    error ERC20InvalidAmount();

    error ERC20InsufficientAllowance(
        address spender,
        uint256 allowance,
        uint256 needed
    );

    error ERC20InvalidApprove(address approver, address spender);

    error ERC20SlippageExceed(uint256 tax, uint256 maxTax);

    error ERC20InsufficientTaxOffer(uint256 tax, uint256 taxOffer);

    error ERC2612ExpiredSignature(uint256 deadline);

    error ERC2612InvalidSigner(address signer, address owner);
```
