Skip to main content

ILinearVesting

Git Source

Interface for a linear vesting derivative

This contract does not inherit from IDerivative in order to avoid conflicts. Implementing contracts should inherit from both DerivativeModule (or IDerivative) and this interface.

Functions

getTokenVestingParams

Get the vesting parameters for a derivative token

function getTokenVestingParams(
uint256 tokenId
) external view returns (VestingParams memory vestingParams);

Parameters

NameTypeDescription
tokenIduint256The ID of the derivative token

Returns

NameTypeDescription
vestingParamsVestingParamsThe vesting parameters

Events

DerivativeCreated

event DerivativeCreated(uint256 indexed tokenId, uint48 start, uint48 expiry, address baseToken);

WrappedDerivativeCreated

event WrappedDerivativeCreated(uint256 indexed tokenId, address wrappedToken);

Wrapped

event Wrapped(uint256 indexed tokenId, address indexed owner, uint256 amount, address wrappedToken);

Unwrapped

event Unwrapped(
uint256 indexed tokenId, address indexed owner, uint256 amount, address wrappedToken
);

Redeemed

event Redeemed(uint256 indexed tokenId, address indexed owner, uint256 amount);

Errors

BrokenInvariant

error BrokenInvariant();

InsufficientBalance

error InsufficientBalance();

NotPermitted

error NotPermitted();

InvalidParams

error InvalidParams();

UnsupportedToken

error UnsupportedToken(address token_);

Structs

VestingParams

Format for the vesting data, stored in Token.data

struct VestingParams {
uint48 start;
uint48 expiry;
}

Properties

NameTypeDescription
startuint48The timestamp at which the vesting starts
expiryuint48The timestamp at which the vesting expires