LockupLinear

Git Source

Structs

Durations

Struct encapsulating the cliff duration and the total duration.

struct Durations {
    uint40 cliff;
    uint40 total;
}

Properties

NameTypeDescription
cliffuint40The cliff duration in seconds.
totaluint40The total duration in seconds.

Stream

Lockup Linear stream.

The fields are arranged like this to save gas via tight variable packing.

struct Stream {
    address sender;
    uint40 startTime;
    uint40 cliffTime;
    bool isCancelable;
    bool wasCanceled;
    IERC20 asset;
    uint40 endTime;
    bool isDepleted;
    bool isStream;
    bool isTransferable;
    Lockup.Amounts amounts;
}

Properties

NameTypeDescription
senderaddressThe address streaming the assets, with the ability to cancel the stream.
startTimeuint40The Unix timestamp indicating the stream's start.
cliffTimeuint40The Unix timestamp indicating the cliff period's end.
isCancelableboolBoolean indicating if the stream is cancelable.
wasCanceledboolBoolean indicating if the stream was canceled.
assetIERC20The contract address of the ERC-20 asset used for streaming.
endTimeuint40The Unix timestamp indicating the stream's end.
isDepletedboolBoolean indicating if the stream is depleted.
isStreamboolBoolean indicating if the struct entity exists.
isTransferableboolBoolean indicating if the stream NFT is transferable.
amountsLockup.AmountsStruct containing the deposit, withdrawn, and refunded amounts, all denoted in units of the asset's decimals.