Skip to main content

FuroVestingRouter

FuroVestingRouter is the contract that is actually utilized directly for vesting tokens.

The full contract can be found here.

Functions

setBentoBoxApproval

function setBentoBoxApproval(
address user,
bool approved,
uint8 v,
bytes32 r,
bytes32 s
) external payable

Approves this contract for BentoBox.

Parameters

NameTypeDescription
useraddressuser address to set as owner in BentoBox
approvedboolboolean if approved or not by BentoBox
vuint8recovery byte of the signature
rbytes32half of the ECDSA signature pair
sbytes32half of the ECDSA signature pair

createVesting

function createVesting(IFuroVesting.VestParams memory vestParams, uint256 minShare)
external
payable
returns (
uint256 depositedShares,
uint256 vestId,
uint128 stepShares,
uint128 cliffShares
)

Creates a vesting.

Parameters

NameTypeDescription
vestParamsIFuroVesting.VestParamsinfo necessary to create a new vesting (start, cliff, steps, etc.)
minShareuint256minimum amount of shares

Returns

NameTypeDescription
depositedSharesuint256amount of shares deposited
vestIduint256new vesting ID
stepSharesuint128amount of step shares
cliffSharesuint128amount of cliff shares

_depositToken

function _depositToken(
address token,
address from,
address to,
uint256 amount,
bool fromBentoBox
) internal returns (uint256 depositedShares)

Internal function that deposits a token into a vesting.

Parameters

NameTypeDescription
tokenaddressaddress of token to deposit
fromaddressaddress of user depositing tokens
toaddressaddress of token recipient
amountuint256amount of tokens to deposit
fromBentoBoxboolboolean of whether update is coming from BentoBox or not

Returns

NameTypeDescription
depositedSharesuint256amount of shares deposited in vesting