# UnionToken

Mint and distribute UnionTokens.

UNION is an erc20 governance token thats earned by using the Union protocol and is used for controlling the [itimelock](https://docs.union.finance/developers/governance/itimelock "mention")that governs the protocol.

UNION is distributed via an algorithmic mechanism in [comptroller](https://docs.union.finance/developers/core/comptroller "mention") to the vouchers who stake and vouch for borrowers who don’t default.

## Functions

### `totalSupply() → uint256` <a href="#iuniontoken-totalsupply" id="iuniontoken-totalsupply"></a>

Get total supply

#### Return Values:

* Total supply

### `balanceOf(address account) → uint256` <a href="#iuniontoken-balanceof-address" id="iuniontoken-balanceof-address"></a>

No description

### `transfer(address recipient, uint256 amount) → bool` <a href="#iuniontoken-transfer-address-uint256" id="iuniontoken-transfer-address-uint256"></a>

No description

### `mint(address account, uint256 amount) → bool` <a href="#iuniontoken-mint-address-uint256" id="iuniontoken-mint-address-uint256"></a>

No description

### `getPriorVotes(address account, uint256 blockNumber) → uint256` <a href="#iuniontoken-getpriorvotes-address-uint256" id="iuniontoken-getpriorvotes-address-uint256"></a>

Determine the prior number of votes for an account as of a block number. Block number must be a finalized block or else this function will revert to prevent misinformation.

#### Parameters:

* `account`: The address of the account to check
* `blockNumber`: The block number to get the vote balance at

#### Return Values:

* The number of votes the account had as of the given block

### `permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)` <a href="#iuniontoken-permit-address-address-uint256-uint256-uint8-bytes32-bytes32" id="iuniontoken-permit-address-address-uint256-uint256-uint8-bytes32-bytes32"></a>

Allows to spend owner's Union tokens by the specified spender. The function can be called by anyone, but requires having allowance parameters signed by the owner according to EIP712.

#### Parameters:

* `owner`: The owner's address, cannot be zero address.
* `spender`: The spender's address, cannot be zero address.
* `value`: The allowance amount, in wei.
* `deadline`: The allowance expiration date (unix timestamp in UTC).
* `v`: A final byte of signature (ECDSA component).
* `r`: The first 32 bytes of signature (ECDSA component).
* `s`: The second 32 bytes of signature (ECDSA component).

### `burnFrom(address account, uint256 amount)` <a href="#iuniontoken-burnfrom-address-uint256" id="iuniontoken-burnfrom-address-uint256"></a>

No description

## Events

### `DelegateChanged(address delegator, address fromDelegate, address toDelegate)` <a href="#iuniontoken-delegatechanged-address-address-address" id="iuniontoken-delegatechanged-address-address-address"></a>

No description

### `DelegateVotesChanged(address delegate, uint256 previousBalance, uint256 newBalance)` <a href="#iuniontoken-delegatevoteschanged-address-uint256-uint256" id="iuniontoken-delegatevoteschanged-address-uint256-uint256"></a>

No description

### **`MinterChange(address oldMinter, address newMinter)`**

Minter address change

### **`NewPendingMinter(address oldPendingMinter, address newPendingMinter)`**

Pending minter address change
