@ohgeez/fsushi
Version:
fSUSHI is a protocol built on top of [FlashStake](http://flashstake.io/) and [SushiSwap](https://sushi.com) that enables stakers to get instant, upfront yield without waiting for it to accrue.
438 lines (212 loc) • 5.46 kB
Markdown
# SousChef
## Methods
### checkpoint
```solidity
function checkpoint() external nonpayable
```
*if this function doesn't get called for 512 weeks (around 9.8 years) this contract breaks*
### createBill
```solidity
function createBill(uint256 pid) external nonpayable returns (address bill)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| pid | uint256 | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| bill | address | undefined |
### fSushi
```solidity
function fSushi() external view returns (address)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
### flashStrategyFactory
```solidity
function flashStrategyFactory() external view returns (address)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
### getBill
```solidity
function getBill(uint256) external view returns (address)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
### kitchen
```solidity
function kitchen() external view returns (address)
```
address of IFSushiKitchen
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
### lastCheckpoint
```solidity
function lastCheckpoint() external view returns (uint256)
```
weeklyRewards is guaranteed to be correct before this week (exclusive)
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
### mintFSushi
```solidity
function mintFSushi(uint256 pid, address to, uint256 amount) external nonpayable
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| pid | uint256 | undefined |
| to | address | undefined |
| amount | uint256 | undefined |
### owner
```solidity
function owner() external view returns (address)
```
*Returns the address of the current owner.*
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
### predictBillAddress
```solidity
function predictBillAddress(uint256 pid) external view returns (address bill)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| pid | uint256 | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| bill | address | undefined |
### renounceOwnership
```solidity
function renounceOwnership() external nonpayable
```
*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.*
### restaurant
```solidity
function restaurant() external view returns (address)
```
address of IFSushiRestaurant
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
### startWeek
```solidity
function startWeek() external view returns (uint256)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
### transferOwnership
```solidity
function transferOwnership(address newOwner) external nonpayable
```
*Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.*
#### Parameters
| Name | Type | Description |
|---|---|---|
| newOwner | address | undefined |
### updateKitchen
```solidity
function updateKitchen(address _kitchen) external nonpayable
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _kitchen | address | undefined |
### updateRestaurant
```solidity
function updateRestaurant(address _restaurant) external nonpayable
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _restaurant | address | undefined |
### weeklyRewards
```solidity
function weeklyRewards(uint256) external view returns (uint256)
```
how much rewards to be minted at the week
#### Parameters
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
## Events
### Checkpoint
```solidity
event Checkpoint()
```
### CreateBill
```solidity
event CreateBill(uint256 indexed pid, address indexed bill)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| pid `indexed` | uint256 | undefined |
| bill `indexed` | address | undefined |
### OwnershipTransferred
```solidity
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| previousOwner `indexed` | address | undefined |
| newOwner `indexed` | address | undefined |
### UpdateKitchen
```solidity
event UpdateKitchen(address indexed kitchen)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| kitchen `indexed` | address | undefined |
### UpdateRestaurant
```solidity
event UpdateRestaurant(address indexed restaurant)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| restaurant `indexed` | address | undefined |
## Errors
### BillCreated
```solidity
error BillCreated()
```
### Forbidden
```solidity
error Forbidden()
```
### InvalidKitchen
```solidity
error InvalidKitchen()
```
### InvalidRestaurant
```solidity
error InvalidRestaurant()
```