# XdYe Token

XdYe is an ERC-20 that will be able to offer Liquidity Providers and holders the capability to support and earn from XdYe Platform profits.

XdYe token inherits from 2 Openzeppelin libraries: *ERC20 & Ownable.* This platform token has governance capabilities.

**XdYe Token** Smart Contract can be found at:&#x20;

{% embed url="<https://github.com/rogerCapone/XdYe_Smart_Contracts/blob/main/XdYeToken.sol>" %}
XdYe Token Contract Source Code
{% endembed %}

### Contract main functions

* *`mint()`*

This method allows only the owner of the XdYe token contract to generate new XdYe Tokens.

* *`delegates()`*

This method returns the *delegatee* for the given *delegate* address.

* *`delegate()`*

This method calls the internal *\_delegate* function, which delegates votes from *msg.sender* to *delegatee*.

* *`delegateBySig()`*

This method delegates votes from signatory to *delegatee*.

* *`getCurrentVotes()`*

This method returns the current votes balance for given account.

* *`getPriorVotes()`*

This method determines the prior number of votes for an account as of a block number.

* *`getChainId()`*

This method retrieves the chain ID in which XdYe token is deployed.

XdYe Token Contract does also have all ERC-20 Standard token methods, as we have seen them several times we are not going to expose them. But you can check Openzeppelin ERC20 Repository.

{% embed url="<https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol>" %}
ERC-20 from Openzeppelin
{% endembed %}

{% hint style="warning" %}
**Attention:** If you are trying to replicate the code, be sure to consider the imports or visit the corresponding [Github Repository](https://github.com/rogerCapone/XdYe_Smart_Contracts/tree/main) in order to have the whole source code.
{% endhint %}
