# aOdToken

For while, we are not using WETH, so we have a special contract for PUT and CALL when Ether is the `underlying asset .`

## Methods

### Mint

Writes an `amount` of Options by locking in the contract the equivalent amount of Strike Asset.

{% hint style="warning" %}
This function can only be called **before** expiration date defined in the contract
{% endhint %}

{% tabs %}
{% tab title="Solidity" %}

```javascript
/// Instantiate Option
CallEth call = CallEth("/*address*/");

uint256 amount = 1 ether;

// Mints 1 option by locking equivalent amount of strikeAsset
call.mint.value(amount)();
```

{% endtab %}

{% tab title="Web3" %}

```javascript
import CallETHABI from './CallETHABI.json'

const callContract = new web3.eth.Contract(CallETHABI, callAddress)

await callContract.methods.mint().send({
    value: amount
})
```

{% endtab %}
{% endtabs %}

### Burn

Unlocks your previously stored Strike Asset by burning an `amount` of Options.

{% hint style="warning" %}
This function can only be called **before** expiration date defined in the contract
{% endhint %}

{% tabs %}
{% tab title="Solidity" %}

```javascript
/// Instantiate Option
CallEth call = CallEth("/*address*/");

uint256 amount = 1 ether;

// Burns 1 option and redeem locked strikeAsset
call.burn(amount);
```

{% endtab %}

{% tab title="Web3" %}

```javascript
// Soon
```

{% endtab %}
{% endtabs %}

### Exchange

Buys an `amount` of ETH for the same amount of Options and the equivalent amount of Strike Tokens

{% hint style="warning" %}
This function can only be called **before** expiration date defined in the contract
{% endhint %}

{% tabs %}
{% tab title="Solidity" %}

```javascript
/// Instantiate Option
CallEth call = CallEth("/*address*/");

uint256 amount = 1 ether;

// Sends 1 option and the equivalent amount of strikeAsset in exchange of ETH
call.exchange(amount);
```

{% endtab %}

{% tab title="Web3" %}

```javascript
// Soon
```

{% endtab %}
{% endtabs %}

### Withdraw

Withdraws the locked amount of Strike Tokens after expiration by burning Options.

The Strike Asset is withdrawn on a first-come-first-serve basis. Meaning that, if there is not enough Strike Asset because the series have been exercised, the remaining balance is converted into ETH and given to the caller.

{% hint style="warning" %}
This function can only be called **after** expiration date defined in the contract
{% endhint %}

{% tabs %}
{% tab title="Solidity" %}

```javascript
/// Instantiate Option
CallEth call = CallEth("/*address*/");

// Withdraws all locked collateral
call.withdraw();
```

{% endtab %}
{% endtabs %}
