@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.
487 lines (242 loc) • 6.16 kB
Markdown
# IFSushiBar
## Methods
### asset
```solidity
function asset() external view returns (address)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
### balanceOf
```solidity
function balanceOf(address account) external view returns (uint256)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| account | address | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
### checkpoint
```solidity
function checkpoint() external nonpayable
```
### checkpointedTotalAssets
```solidity
function checkpointedTotalAssets() external nonpayable returns (uint256)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
### checkpointedTotalAssetsDuring
```solidity
function checkpointedTotalAssetsDuring(uint256 week) external nonpayable returns (uint256)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| week | uint256 | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
### decimals
```solidity
function decimals() external view returns (uint8)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint8 | undefined |
### deposit
```solidity
function deposit(uint256 assets, uint256 _weeks, address receiver) external nonpayable returns (uint256)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| assets | uint256 | undefined |
| _weeks | uint256 | undefined |
| receiver | address | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
### depositSigned
```solidity
function depositSigned(uint256 assets, uint256 _weeks, address receiver, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable returns (uint256)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| assets | uint256 | undefined |
| _weeks | uint256 | undefined |
| receiver | address | undefined |
| deadline | uint256 | undefined |
| v | uint8 | undefined |
| r | bytes32 | undefined |
| s | bytes32 | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
### lastCheckpoint
```solidity
function lastCheckpoint() external view returns (uint256)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
### name
```solidity
function name() external view returns (string)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | string | undefined |
### previewDeposit
```solidity
function previewDeposit(uint256 assets, uint256 _weeks) external view returns (uint256 shares)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| assets | uint256 | undefined |
| _weeks | uint256 | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| shares | uint256 | undefined |
### previewWithdraw
```solidity
function previewWithdraw(address owner) external view returns (uint256 shares, uint256 assets, uint256 yield)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| shares | uint256 | undefined |
| assets | uint256 | undefined |
| yield | uint256 | undefined |
### startWeek
```solidity
function startWeek() external view returns (uint256)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
### symbol
```solidity
function symbol() external view returns (string)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | string | undefined |
### totalAssets
```solidity
function totalAssets() external view returns (uint256)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
### totalAssetsDuring
```solidity
function totalAssetsDuring(uint256 week) external view returns (uint256)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| week | uint256 | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
### totalSupply
```solidity
function totalSupply() external view returns (uint256)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
### withdraw
```solidity
function withdraw(address beneficiary) external nonpayable returns (uint256 shares, uint256 assets, uint256 yield)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| beneficiary | address | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| shares | uint256 | undefined |
| assets | uint256 | undefined |
| yield | uint256 | undefined |
## Events
### Deposit
```solidity
event Deposit(address indexed sender, address indexed beneficiary, uint256 shares, uint256 assets)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| sender `indexed` | address | undefined |
| beneficiary `indexed` | address | undefined |
| shares | uint256 | undefined |
| assets | uint256 | undefined |
### Transfer
```solidity
event Transfer(address indexed from, address indexed to, uint256 value)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| from `indexed` | address | undefined |
| to `indexed` | address | undefined |
| value | uint256 | undefined |
### Withdraw
```solidity
event Withdraw(address indexed owner, address indexed beneficiary, uint256 shares, uint256 assets, uint256 yield)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| owner `indexed` | address | undefined |
| beneficiary `indexed` | address | undefined |
| shares | uint256 | undefined |
| assets | uint256 | undefined |
| yield | uint256 | undefined |
## Errors
### Bankrupt
```solidity
error Bankrupt()
```
### InvalidAccount
```solidity
error InvalidAccount()
```
### InvalidDuration
```solidity
error InvalidDuration()
```
### NotEnoughBalance
```solidity
error NotEnoughBalance()
```
### WithdrawalDenied
```solidity
error WithdrawalDenied()
```