@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.
320 lines (170 loc) • 5.54 kB
Markdown
# FlashProtocol
## Methods
### flashNFTAddress
```solidity
function flashNFTAddress() external view returns (address)
```
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
### flashStake
```solidity
function flashStake(address _strategyAddress, uint256 _tokenAmount, uint256 _stakeDuration, uint256 _minimumReceived, address _yieldTo, bool _mintNFT) external nonpayable
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _strategyAddress | address | undefined |
| _tokenAmount | uint256 | undefined |
| _stakeDuration | uint256 | undefined |
| _minimumReceived | uint256 | undefined |
| _yieldTo | address | undefined |
| _mintNFT | bool | undefined |
### getStakeInfo
```solidity
function getStakeInfo(uint256 _id, bool _isNFT) external view returns (struct FlashProtocol.StakeStruct _stake)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _id | uint256 | undefined |
| _isNFT | bool | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| _stake | FlashProtocol.StakeStruct | undefined |
### issueNFT
```solidity
function issueNFT(uint256 _stakeId) external nonpayable returns (uint256 _nftId)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _stakeId | uint256 | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| _nftId | uint256 | undefined |
### owner
```solidity
function owner() external view returns (address)
```
*Returns the address of the current owner.*
#### Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
### registerStrategy
```solidity
function registerStrategy(address _strategyAddress, address _principalTokenAddress, string _fTokenName, string _fTokenSymbol) external nonpayable
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _strategyAddress | address | undefined |
| _principalTokenAddress | address | undefined |
| _fTokenName | string | undefined |
| _fTokenSymbol | string | 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.*
### setMintFeeInfo
```solidity
function setMintFeeInfo(address _feeRecipient, uint96 _feePercentageBasis) external nonpayable
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _feeRecipient | address | undefined |
| _feePercentageBasis | uint96 | undefined |
### stake
```solidity
function stake(address _strategyAddress, uint256 _tokenAmount, uint256 _stakeDuration, address _fTokensTo, bool _issueNFT) external nonpayable returns (struct FlashProtocol.StakeStruct _stake)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _strategyAddress | address | undefined |
| _tokenAmount | uint256 | undefined |
| _stakeDuration | uint256 | undefined |
| _fTokensTo | address | undefined |
| _issueNFT | bool | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| _stake | FlashProtocol.StakeStruct | 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 |
### unstake
```solidity
function unstake(uint256 _id, bool _isNFT, uint256 _fTokenToBurn) external nonpayable returns (uint256 _principalReturned, uint256 _fTokensBurned)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _id | uint256 | undefined |
| _isNFT | bool | undefined |
| _fTokenToBurn | uint256 | undefined |
#### Returns
| Name | Type | Description |
|---|---|---|
| _principalReturned | uint256 | undefined |
| _fTokensBurned | uint256 | undefined |
## Events
### NFTIssued
```solidity
event NFTIssued(uint256 _stakeId, uint256 nftId)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _stakeId | uint256 | undefined |
| nftId | uint256 | undefined |
### OwnershipTransferred
```solidity
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| previousOwner `indexed` | address | undefined |
| newOwner `indexed` | address | undefined |
### Staked
```solidity
event Staked(uint256 _stakeId)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _stakeId | uint256 | undefined |
### StrategyRegistered
```solidity
event StrategyRegistered(address indexed _strategyAddress, address indexed _principalTokenAddress, address indexed _fTokenAddress)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _strategyAddress `indexed` | address | undefined |
| _principalTokenAddress `indexed` | address | undefined |
| _fTokenAddress `indexed` | address | undefined |
### Unstaked
```solidity
event Unstaked(uint256 _stakeId, uint256 _tokensReturned, uint256 _fTokensBurned, bool _stakeFinished)
```
#### Parameters
| Name | Type | Description |
|---|---|---|
| _stakeId | uint256 | undefined |
| _tokensReturned | uint256 | undefined |
| _fTokensBurned | uint256 | undefined |
| _stakeFinished | bool | undefined |