# Staking Allowance

SDL is a staking allowance token which enables stakers to earn a percentage of protocol rewards and grants stakers the right to priority staking access over non SDL holders.

## ERC20 Functions

All standard ERC20 functions are implemented for `StakingAllowance`

## Write Functions

### mint

Mints tokens to an account

```solidity
function mint(address _account, uint256 _amount) public
```

#### Parameters

| Name      | Type    | Description              |
| --------- | ------- | ------------------------ |
| \_account | address | Address to mint to       |
| \_amount  | uint256 | Amount of tokens to mint |

### mintToContract

Mints tokens to a contract on behalf of an account via ERC677

```solidity
function mintToContract(address _contract, address _account, uint256 _amount, bytes _calldata) public
```

#### Parameters

| Name       | Type    | Description                           |
| ---------- | ------- | ------------------------------------- |
| \_contract | address | Address of contract to send tokens to |
| \_account  | address | Address to mint to                    |
| \_amount   | uint256 | Amount of tokens to mint              |
| \_calldata | bytes   |                                       |

### burn

Burns tokens from the sender

```solidity
function burn(uint256 _amount) public
```

#### Parameters

| Name     | Type    | Description              |
| -------- | ------- | ------------------------ |
| \_amount | uint256 | Amount of tokens to burn |

### burnFrom

Burns `_amount` tokens from `_account`, deducting from the sender's allowance

```solidity
function burnFrom(address account, uint256 amount) public
```

#### Parameters

| Name      | Type    | Description              |
| --------- | ------- | ------------------------ |
| \_account | address | Address to burn from     |
| \_amount  | uint256 | Amount of tokens to burn |

### transferAndCall

Transfers tokens to an address and calls `onTokenTransfer` with additional data if the recipient is a contract

```solidity
function transferAndCall(address _to, uint256 _value, bytes _data) external returns (bool)
```

#### Parameters

| Name    | Type    | Description                       |
| ------- | ------- | --------------------------------- |
| \_to    | address | Address to send the tokens to     |
| \_value | uint256 | Value of token transfer           |
| \_data  | bytes   | Calldata included in the transfer |

### transferAndCallWithSender

Similar to `transferAndCall` but allows the caller to specify a custom sender (used to mint allowance on behalf of an address and send to a contract fallback)

```solidity
function transferAndCallWithSender(address _sender, address _to, uint256 _value, bytes _data) private returns (bool)
```

#### Parameters

| Name     | Type    | Description                                                                   |
| -------- | ------- | ----------------------------------------------------------------------------- |
| \_sender | address | Specified sender of the tokens, the party who 'receives' them into a contract |
| \_to     | address | Contract address to send the tokens to                                        |
| \_value  | uint256 | Value of token transfer                                                       |
| \_data   | bytes   | Calldata included in the transfer                                             |


---

# 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.stake.link/core-staking-contracts/stakingallowance.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.
