ILinearVesting
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
Name | Type | Description |
---|---|---|
tokenId | uint256 | The ID of the derivative token |
Returns
Name | Type | Description |
---|---|---|
vestingParams | VestingParams | The 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
Name | Type | Description |
---|---|---|
start | uint48 | The timestamp at which the vesting starts |
expiry | uint48 | The timestamp at which the vesting expires |