# ERC20

*Developer note: Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {\_mint}. For a generic mechanism see {ERC20PresetMinterPauser}. TIP: For a detailed writeup see our guide <https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226\\[How> to implement supply mechanisms]. We have followed general OpenZeppelin guidelines: functions revert instead of returning \`false\` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been added to mitigate the well-known issues around setting allowances. See {IERC20-approve}.*

## Functions

### constructor

`constructor(string,string)` public

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| name\_   | string |             |
| symbol\_ | string |             |

### name

`name()` view public

**Returns:**

| Name | Type   | Description |
| ---- | ------ | ----------- |
| \[0] | string |             |

### symbol

`symbol()` view public

**Returns:**

| Name | Type   | Description |
| ---- | ------ | ----------- |
| \[0] | string |             |

### decimals

`decimals()` view public

**Returns:**

| Name | Type  | Description |
| ---- | ----- | ----------- |
| \[0] | uint8 |             |

### totalSupply

`totalSupply()` view public

**Returns:**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \[0] | uint256 |             |

### balanceOf

`balanceOf(address)` view public

| Name    | Type    | Description |
| ------- | ------- | ----------- |
| account | address |             |

**Returns:**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \[0] | uint256 |             |

### transfer

`transfer(address,uint256)` public

| Name      | Type    | Description |
| --------- | ------- | ----------- |
| recipient | address |             |
| amount    | uint256 |             |

**Returns:**

| Name | Type | Description |
| ---- | ---- | ----------- |
| \[0] | bool |             |

### allowance

`allowance(address,address)` view public

| Name    | Type    | Description |
| ------- | ------- | ----------- |
| owner   | address |             |
| spender | address |             |

**Returns:**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \[0] | uint256 |             |

### approve

`approve(address,uint256)` public

| Name    | Type    | Description |
| ------- | ------- | ----------- |
| spender | address |             |
| amount  | uint256 |             |

**Returns:**

| Name | Type | Description |
| ---- | ---- | ----------- |
| \[0] | bool |             |

### transferFrom

`transferFrom(address,address,uint256)` public

| Name      | Type    | Description |
| --------- | ------- | ----------- |
| sender    | address |             |
| recipient | address |             |
| amount    | uint256 |             |

**Returns:**

| Name | Type | Description |
| ---- | ---- | ----------- |
| \[0] | bool |             |

### increaseAllowance

`increaseAllowance(address,uint256)` public

| Name       | Type    | Description |
| ---------- | ------- | ----------- |
| spender    | address |             |
| addedValue | uint256 |             |

**Returns:**

| Name | Type | Description |
| ---- | ---- | ----------- |
| \[0] | bool |             |

### decreaseAllowance

`decreaseAllowance(address,uint256)` public

| Name            | Type    | Description |
| --------------- | ------- | ----------- |
| spender         | address |             |
| subtractedValue | uint256 |             |

**Returns:**

| Name | Type | Description |
| ---- | ---- | ----------- |
| \[0] | bool |             |

***


---

# Agent Instructions: 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.algebra.finance/algebra-integral-documentation/algebra-v1-technical-reference/contracts/api-reference-v1.0/v1.0-periphery/erc20.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.
