# IERC20Minimal

## IERC20Minimal

Contains a subset of the full ERC20 interface that is used in DragonswapV2

### Functions[​](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#functions) <a href="#functions" id="functions"></a>

#### balanceOf[​](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#balanceof) <a href="#balanceof" id="balanceof"></a>

```solidity
  function balanceOf(
    address account
  ) external view returns (uint256)
```

Returns the balance of a token

**Parameters:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#parameters)

| Name      | Type    | Description                                                                    |
| --------- | ------- | ------------------------------------------------------------------------------ |
| `account` | address | The account for which to look up the number of tokens it has, i.e. its balance |

**Return Values:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#return-values)

| Type    | Description                          |
| ------- | ------------------------------------ |
| uint256 | number of tokens held by the account |

#### transfer[​](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#transfer) <a href="#transfer" id="transfer"></a>

```solidity
  function transfer(
    address recipient,
    uint256 amount
  ) external returns (bool)
```

Transfers the amount of token from the `msg.sender` to the recipient

**Parameters:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#parameters-1)

| Name        | Type    | Description                                                   |
| ----------- | ------- | ------------------------------------------------------------- |
| `recipient` | address | The account that will receive the amount transferred          |
| `amount`    | uint256 | The number of tokens to send from the sender to the recipient |

**Return Values:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#return-values-1)

| Type | Description                                                        |
| ---- | ------------------------------------------------------------------ |
| bool | true for a successful transfer, false for an unsuccessful transfer |

#### allowance[​](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#allowance) <a href="#allowance" id="allowance"></a>

```solidity
  function allowance(
    address owner,
    address spender
  ) external view returns (uint256)
```

Returns the current allowance given to a spender by an owner

**Parameters:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#parameters-2)

| Name      | Type    | Description                      |
| --------- | ------- | -------------------------------- |
| `owner`   | address | The account of the token owner   |
| `spender` | address | The account of the token spender |

**Return Values:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#return-values-2)

| Type    | Description                                       |
| ------- | ------------------------------------------------- |
| uint256 | current allowance granted by `owner` to `spender` |

#### approve[​](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#approve) <a href="#approve" id="approve"></a>

```solidity
  function approve(
    address spender,
    uint256 amount
  ) external returns (bool)
```

Sets the allowance of a spender from the `msg.sender` to the value `amount`

**Parameters:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#parameters-3)

| Name      | Type    | Description                                                                    |
| --------- | ------- | ------------------------------------------------------------------------------ |
| `spender` | address | The account which will be allowed to spend a given amount of the owners tokens |
| `amount`  | uint256 | The amount of tokens allowed to be used by `spender`                           |

**Return Values:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#return-values-3)

| Type | Description                                            |
| ---- | ------------------------------------------------------ |
| bool | true for a successful approval, false for unsuccessful |

#### transferFrom[​](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#transferfrom) <a href="#transferfrom" id="transferfrom"></a>

```solidity
  function transferFrom(
    address sender,
    address recipient,
    uint256 amount
  ) external returns (bool)
```

Transfers `amount` tokens from `sender` to `recipient` up to the allowance given to the `msg.sender`

**Parameters:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#parameters-4)

| Name        | Type    | Description                                           |
| ----------- | ------- | ----------------------------------------------------- |
| `sender`    | address | The account from which the transfer will be initiated |
| `recipient` | address | The recipient of the transfer                         |
| `amount`    | uint256 | The amount of the transfer                            |

**Return Values:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#return-values-4)

| Type | Description                                            |
| ---- | ------------------------------------------------------ |
| bool | true for a successful transfer, false for unsuccessful |

### Events[​](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#events) <a href="#events" id="events"></a>

#### Transfer[​](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#transfer-1) <a href="#transfer-1" id="transfer-1"></a>

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

Event emitted when tokens are transferred from one address to another, either via `#transfer` or `#transferFrom`.

**Parameters:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#parameters-5)

| Name    | Type    | Description                                                             |
| ------- | ------- | ----------------------------------------------------------------------- |
| `from`  | address | The account from which the tokens were sent, i.e. the balance decreased |
| `to`    | address | The account to which the tokens were sent, i.e. the balance increased   |
| `value` | uint256 | The amount of tokens that were transferred                              |

#### Approval[​](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#approval) <a href="#approval" id="approval"></a>

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

Event emitted when the approval amount for the spender of a given owner's tokens changes.

**Parameters:**[**​**](https://docs.uniswap.org/contracts/v3/reference/core/interfaces/IERC20Minimal#parameters-6)

| Name      | Type    | Description                                               |
| --------- | ------- | --------------------------------------------------------- |
| `owner`   | address | The account that approved spending of its tokens          |
| `spender` | address | The account for which the spending allowance was modified |
| `value`   | uint256 | The new allowance from the owner to the spender           |


---

# 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.dragonswap.app/dragonswap/resources/developer-resources/smart-contracts/dragonswapv2/core/interfaces/ierc20minimal.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.
