# USUAL\*

### High-Level Overview

This section provides an overview of the UsualS smart contract. The UsualS contract is designed to manage the USUALS ERC20 token, implementing essential functionalities for minting, burning, and transferring tokens, along with additional layers of control and security. The contract integrates role-based access control through a registry system, ensuring that only authorized entities can perform sensitive operations such as pausing the contract or blacklisting addresses

### Contract Summary

#### Inherited Contracts

* **ERC20PausableUpgradeable**: Extends ERC20 to support pausability
* **ERC20PermitUpgradeable**: Extends ERC20 to support gasless transactions through signed approvals.

#### ERC20PausableUpgradeable

Standard OpenZeppelin Implementation.

#### ERC20PermitUpgradeable

Standard OpenZeppelin Implementation.

### Functionality Breakdown

#### SC-Flows

<figure><img src="https://1503334455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpUhQzPJGdJzuLTQ5sCym%2Fuploads%2FB2LkpTP3JkXz0o55fpOP%2FSans%20titre.svg?alt=media&#x26;token=7f4f43a7-53c3-4f2e-a693-5dd19711f7f8" alt=""><figcaption></figcaption></figure>

#### Key Functionalities

* **Minting**: Tokens can be minted to an address, subject to role checks.
* **Burning**: Tokens can be burned from an address, also subject to role checks.
* **Transfers**: Tokens can be sent or receive. Will revert if blacklisted.

### Functions Description

#### Public/External Functions

* **pause()**: Pauses all token transfer operations; callable only by the PAUSING\_CONTRACTS\_ROLE.
* **unpause()**: Resumes all token transfer operations; also callable only by the DEFAULT\_ADMIN\_ROLE.
* **transfer(address to, uint256 amount)**: Transfers tokens to a non-blacklisted address.
* **transferFrom(address sender, address to, uint256 amount)**: Transfers tokens from one non-blacklisted address to another.
* **burn(uint256 amount)** and **burnFrom(address account, uint256 amount)**: Burns tokens from an address, requiring the USUALS\_BURN role.
* **blacklist(address account)** and **unBlacklist(address account)**: Those functions allows the admin to blacklist or remove from blacklist malicious users from using this token. Only callable by the BLACKLIST\_ROLE.
* **stakeAll()** : Sends the total supply of **USUALS** to the staking contract. Only callable by the `USUALSP` contract.
* **isBlacklisted()**: Returns true if the account is blacklisted.

### Constants

* **CONTRACT\_REGISTRY\_ACCESS**: Registry access contract address.
* **DEFAULT\_ADMIN\_ROLE**: Default admin role.
* **PAUSING\_CONTRACTS\_ROLE**: Role required to pause the contract.
* **BLACKLIST\_ROLE**: Role required to blacklist an address.
* **USUALS\_BURN**: Role required to burn tokens.

### Safeguards Implementation

* **Pausability**: Ensures that token transfers can be halted in case of emergency.
* **Role-Based Access Control**: Restricts sensitive actions to addresses with appropriate roles.
* **Blacklist Enforcement**: Ensures that unauthorized addresses can't participate in the token economy.

###


---

# 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://tech.usual.money/smart-contracts/token-contracts/usual-1.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.
