# The Boneyard

Based on [Sushiswap's Masterchef v1](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef)

### Methods[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#methods) <a href="#methods" id="methods"></a>

#### BONUS\_MULTIPLIER[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#bonus_multiplier) <a href="#bonus_multiplier" id="bonus_multiplier"></a>

```
function BONUS_MULTIPLIER() external view returns (uint256)
```

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns)

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### add[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#add)Token <a href="#add" id="add"></a>

```
function addToken(uint256 _allocPoint, contract IERC20 _pToken, bool _withUpdate) external nonpayable
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters)

| Name         | Type            | Description |
| ------------ | --------------- | ----------- |
| \_allocPoint | uint256         | undefined   |
| \_pToken     | contract IERC20 | undefined   |
| \_withUpdate | bool            | undefined   |

#### bonusEndBlock[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#bonusendblock) <a href="#bonusendblock" id="bonusendblock"></a>

```
function bonusEndBlock() external view returns (uint256)
```

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-1)

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### &#x20;<a href="#deposit" id="deposit"></a>

#### deposit[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#deposit) <a href="#deposit" id="deposit"></a>

```
function deposit(uint256 _pid, uint256 _amount) external nonpayable
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-1)

| Name     | Type    | Description |
| -------- | ------- | ----------- |
| \_pid    | uint256 | undefined   |
| \_amount | uint256 | undefined   |

#### dev[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#dev) <a href="#dev" id="dev"></a>

```
function dev(address _devaddr) external nonpayable
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-2)

| Name      | Type    | Description |
| --------- | ------- | ----------- |
| \_devaddr | address | undefined   |

#### devaddr[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#devaddr) <a href="#devaddr" id="devaddr"></a>

```
function devaddr() external view returns (address)
```

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-2)

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

#### emergencyWithdraw[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#emergencywithdraw) <a href="#emergencywithdraw" id="emergencywithdraw"></a>

```
function emergencyWithdraw(uint256 _pid) external nonpayable
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-3)

| Name  | Type    | Description |
| ----- | ------- | ----------- |
| \_pid | uint256 | undefined   |

#### getMultiplier[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#getmultiplier) <a href="#getmultiplier" id="getmultiplier"></a>

```
function getMultiplier(uint256 _from, uint256 _to) external view returns (uint256)
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-4)

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| \_from | uint256 | undefined   |
| \_to   | uint256 | undefined   |

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-3)

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

**grantRole**

```
function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account);}
```

**Parameters**

<table><thead><tr><th width="141">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>role</td><td>bytes32</td><td>undefined</td></tr><tr><td>account</td><td>address</td><td>undefined</td></tr></tbody></table>

#### massUpdatePools[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#massupdatepools) <a href="#massupdatepools" id="massupdatepools"></a>

```
function massUpdatePools() external nonpayable
```

[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-4)

#### owner[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#owner) <a href="#owner" id="owner"></a>

```
function owner() external view returns (address)
```

*Returns the address of the current owner.*

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-5)

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

#### pendingSkrimples[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#pendingsushi) <a href="#pendingsushi" id="pendingsushi"></a>

```
function pendingSkrimples(uint256 _pid, address _user) external view returns (uint256)
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-6)

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| \_pid  | uint256 | undefined   |
| \_user | address | undefined   |

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-6)

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### poolInfo[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#poolinfo) <a href="#poolinfo" id="poolinfo"></a>

```
function poolInfo(uint256) external view returns (contract IERC20 lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accSushiPerShare)
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-7)

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-7)

<table><thead><tr><th width="226">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>pToken</td><td>contract IERC20</td><td>undefined</td></tr><tr><td>allocPoint</td><td>uint256</td><td>undefined</td></tr><tr><td>lastRewardBlock</td><td>uint256</td><td>undefined</td></tr><tr><td>accSkrimplesPerShare</td><td>uint256</td><td>undefined</td></tr></tbody></table>

#### poolLength[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#poollength) <a href="#poollength" id="poollength"></a>

```
function poolLength() external view returns (uint256)
```

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-8)

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### renounceRole[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#renounceownership) <a href="#renounceownership" id="renounceownership"></a>

```
function renounceRole() external nonpayable
```

**Parameters**

| Name    | Type    | Description |
| ------- | ------- | ----------- |
| role    | uint256 | undefined   |
| account | address | undefined   |

*Leaves the contract without admin. It will not be possible to call `onlyAdmin` functions anymore. Can only be called by the current admin. NOTE: Renouncing admin role will leave the contract without an admin, thereby removing any functionality that is only available to the admin.*

#### revokeRole[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#renounceownership) <a href="#renounceownership" id="renounceownership"></a>

```
function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account);}
```

**Parameters**

| Name    | Type    | Description |
| ------- | ------- | ----------- |
| role    | uint256 | undefined   |
| account | address | undefined   |

#### set[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#set) <a href="#set" id="set"></a>

```
function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) external nonpayable
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-8)

| Name         | Type    | Description |
| ------------ | ------- | ----------- |
| \_pid        | uint256 | undefined   |
| \_allocPoint | uint256 | undefined   |
| \_withUpdate | bool    | undefined   |

#### startBlock[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#startblock) <a href="#startblock" id="startblock"></a>

```
function startBlock() external view returns (uint256)
```

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-9)

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### skrimples <a href="#sushi" id="sushi"></a>

```
function skrimples() external view returns (contract SkrimplesToken)
```

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-10)

<table><thead><tr><th>Name</th><th width="226">Type</th><th>Description</th></tr></thead><tbody><tr><td>_0</td><td>contract SkrimplesToken</td><td>undefined</td></tr></tbody></table>

#### skrimplesPerBlock[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#sushiperblock) <a href="#sushiperblock" id="sushiperblock"></a>

```
function skrimplesPerBlock() external view returns (uint256)
```

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-11)

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### totalAllocPoint[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#totalallocpoint) <a href="#totalallocpoint" id="totalallocpoint"></a>

```
function totalAllocPoint() external view returns (uint256)
```

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-12)

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### updatePool[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#updatepool) <a href="#transferownership" id="transferownership"></a>

```
function updatePool(uint256 _pid) external nonpayable
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-11)

<table><thead><tr><th>Name</th><th width="192">Type</th><th>Description</th></tr></thead><tbody><tr><td>_pid</td><td>uint256</td><td>undefined</td></tr></tbody></table>

**updateTreasury**

```
function updateTreasury(address _treasury) public {require (hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Caller is not admin");treasury = _treasury;}}
```

**Parameters**

| Name     | Type    | Description |
| -------- | ------- | ----------- |
| treasury | address | undefinied  |

*updateTreasury is an onlyAdmin function and can only be called by current admin.*

#### userInfo[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#userinfo) <a href="#userinfo" id="userinfo"></a>

```
function userInfo(uint256, address) external view returns (uint256 amount, uint256 rewardDebt)
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-12)

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |
| \_1  | address | undefined   |

**Returns**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#returns-13)

| Name       | Type    | Description |
| ---------- | ------- | ----------- |
| amount     | uint256 | undefined   |
| rewardDebt | uint256 | undefined   |

#### withdraw[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#withdraw) <a href="#withdraw" id="withdraw"></a>

```
function withdraw(uint256 _pid, uint256 _amount) external nonpayable
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-13)

| Name     | Type    | Description |
| -------- | ------- | ----------- |
| \_pid    | uint256 | undefined   |
| \_amount | uint256 | undefined   |

### Events[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#events) <a href="#events" id="events"></a>

#### Deposit[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#deposit-1) <a href="#deposit-1" id="deposit-1"></a>

```
event Deposit(address indexed user, uint256 indexed pid, uint256 amount)
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-14)

| Name           | Type    | Description |
| -------------- | ------- | ----------- |
| user `indexed` | address | undefined   |
| pid `indexed`  | uint256 | undefined   |
| amount         | uint256 | undefined   |

#### EmergencyWithdraw[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#emergencywithdraw-1) <a href="#emergencywithdraw-1" id="emergencywithdraw-1"></a>

```
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount)
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-15)

| Name           | Type    | Description |
| -------------- | ------- | ----------- |
| user `indexed` | address | undefined   |
| pid `indexed`  | uint256 | undefined   |
| amount         | uint256 | undefined   |

#### Withdraw[​](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#withdraw-1) <a href="#withdraw-1" id="withdraw-1"></a>

```
event Withdraw(address indexed user, uint256 indexed pid, uint256 amount)
```

**Parameters**[**​**](https://sushiswap-docs.vercel.app/docs/onsen/MasterChef#parameters-17)

<table><thead><tr><th>Name</th><th width="115">Type</th><th>Description</th></tr></thead><tbody><tr><td>user <code>indexed</code></td><td>address</td><td>undefined</td></tr><tr><td>pid <code>indexed</code></td><td>uint256</td><td>undefined</td></tr><tr><td>amount</td><td>uint256</td><td>undefined</td></tr></tbody></table>

[Edit this page](https://github.com/manifoldfinance/sushi-doc-portal/edit/master/docs/onsen/MasterChef.md)


---

# 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://skrimples.gitbook.io/product-docs/skrimples/contracts/the-boneyard.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.
