Skip to main content

LockupDynamic

Git Source

Namespace for the structs used in SablierV2LockupDynamic.

Structs

CreateWithDeltas

Struct encapsulating the parameters for the {SablierV2LockupDynamic.createWithDeltas} function.

struct CreateWithDeltas {
address sender;
bool cancelable;
address recipient;
uint128 totalAmount;
IERC20 asset;
Broker broker;
SegmentWithDelta[] segments;
}

CreateWithMilestones

Struct encapsulating the parameters for the {SablierV2LockupDynamic.createWithMilestones} function.

struct CreateWithMilestones {
address sender;
uint40 startTime;
bool cancelable;
address recipient;
uint128 totalAmount;
IERC20 asset;
Broker broker;
Segment[] segments;
}

Range

Struct encapsulating the time range.

struct Range {
uint40 start;
uint40 end;
}

Segment

Segment struct used in the Lockup Dynamic stream.

struct Segment {
uint128 amount;
UD2x18 exponent;
uint40 milestone;
}

SegmentWithDelta

Segment struct used at runtime in {SablierV2LockupDynamic.createWithDeltas}.

struct SegmentWithDelta {
uint128 amount;
UD2x18 exponent;
uint40 delta;
}

Stream

Lockup Dynamic stream.

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

struct Stream {
address sender;
uint40 startTime;
uint40 endTime;
bool isCancelable;
bool wasCanceled;
IERC20 asset;
bool isDepleted;
bool isStream;
Lockup.Amounts amounts;
Segment[] segments;
}