> ## Documentation Index
> Fetch the complete documentation index at: https://thrackle.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ERC20TaggedRuleFacet

[Git Source](https://github.com/forte-service-company-ltd/forte-rules-engine/blob/6b9ac124d2cb0fe47a8b5c261a1dd458067f45ea/src/client/token/handler/diamond/ERC20TaggedRuleFacet.sol)

**Inherits:**
[HandlerAccountMinMaxTokenBalance](/v1/reference/client/token/handler/ruleContracts/HandlerAccountMinMaxTokenBalance.sol/contract.HandlerAccountMinMaxTokenBalance), [HandlerUtils](/v1/reference/client/token/handler/common/HandlerUtils.sol/contract.HandlerUtils), [AppAdministratorOrOwnerOnlyDiamondVersion](/v1/reference/client/token/handler/common/AppAdministratorOrOwnerOnlyDiamondVersion.sol/contract.AppAdministratorOrOwnerOnlyDiamondVersion)

## Functions

### checkTaggedAndTradingRules

*This function uses the protocol's ruleProcessor to perform the actual tagged rule checks.*

```solidity
function checkTaggedAndTradingRules(
    uint256 _balanceFrom,
    uint256 _balanceTo,
    address _from,
    address _to,
    address _sender,
    uint256 _amount,
    ActionTypes action
) external onlyOwner;
```

**Parameters**

| Name           | Type          | Description                                |
| -------------- | ------------- | ------------------------------------------ |
| `_balanceFrom` | `uint256`     | token balance of sender address            |
| `_balanceTo`   | `uint256`     | token balance of recipient address         |
| `_from`        | `address`     | address of the from account                |
| `_to`          | `address`     | address of the to account                  |
| `_sender`      | `address`     | address of the caller                      |
| `_amount`      | `uint256`     | number of tokens transferred               |
| `action`       | `ActionTypes` | if selling or buying (of ActionTypes type) |

### \_checkTaggedIndividualRules

*This function consolidates all the tagged rules that utilize account tags plus all trading rules.*

```solidity
function _checkTaggedIndividualRules(
    uint256 _balanceFrom,
    uint256 _balanceTo,
    address _from,
    address _to,
    address _sender,
    uint256 _amount,
    ActionTypes action
) internal;
```

**Parameters**

| Name           | Type          | Description                                |
| -------------- | ------------- | ------------------------------------------ |
| `_balanceFrom` | `uint256`     | token balance of sender address            |
| `_balanceTo`   | `uint256`     | token balance of recipient address         |
| `_from`        | `address`     | address of the from account                |
| `_to`          | `address`     | address of the to account                  |
| `_sender`      | `address`     | address of the caller                      |
| `_amount`      | `uint256`     | number of tokens transferred               |
| `action`       | `ActionTypes` | if selling or buying (of ActionTypes type) |
