Skip to main content

Lockup

Git Source

Namespace for the structs used in both SablierV2LockupLinear and SablierV2LockupDynamic.

Structs

Amounts

Struct encapsulating the deposit, withdrawn, and refunded amounts, all denoted in units of the asset's decimals.

Because the deposited and the withdrawn amount are often read together, declaring them in the same slot saves gas.

struct Amounts {
uint128 deposited;
uint128 withdrawn;
uint128 refunded;
}

Properties

NameTypeDescription
depositeduint128The initial amount deposited in the stream, net of fees.
withdrawnuint128The cumulative amount withdrawn from the stream.
refundeduint128The amount refunded to the sender. Unless the stream was canceled, this is always zero.

CreateAmounts

Struct encapsulating the deposit amount, the protocol fee amount, and the broker fee amount, all denoted in units of the asset's decimals.

struct CreateAmounts {
uint128 deposit;
uint128 protocolFee;
uint128 brokerFee;
}

Properties

NameTypeDescription
deposituint128The amount to deposit in the stream.
protocolFeeuint128The protocol fee amount.
brokerFeeuint128The broker fee amount.

Enums

Status

Enum representing the different statuses of a stream.

enum Status {
PENDING,
STREAMING,
SETTLED,
CANCELED,
DEPLETED
}