Fraction ProtocolsubInternalFacetsmarginCallPhaseFacetsmarginCallTimeFacetsfixedDurationTime

FixedDurationMarginCallFacetStorage

FixedDurationMarginCallFacetStorage

AlreadyInitialized

error AlreadyInitialized()

Thrown when attempting to re-initialize.

InvalidZeroMarginCallDuration

error InvalidZeroMarginCallDuration()

Thrown when attempting to set margin call duration as 0.

NotWithinMarginCallTimeLine

error NotWithinMarginCallTimeLine()

Thrown when attempting to add margin while not in margin call timeline.

NonSetMarginCallDuration

error NonSetMarginCallDuration()

Thrown when margin call duration is not set.

STORAGE_SLOT

bytes32 STORAGE_SLOT

================================================== STORAGE =================================================

Unique identifier for the storage slot where the Layout struct is stored. Derived from the ERC7201 formula. STORAGE_SLOT: 0xde39f236bfccc048a61e2c3f1fe387e006c234b9064f3a50516a4edfc43a4100

Layout

struct Layout {
  bool isInitialized;
  uint256 marginCallDuration;
  mapping(uint256 => uint256) startingTimestamps;
  mapping(uint256 => uint256) endingTimestamps;
}

layout

function layout() internal pure returns (struct FixedDurationMarginCallFacetStorage.Layout l)

Retrieves a reference to the Layout struct stored at a specified storage slot

initMarginCallTimeFacet

function initMarginCallTimeFacet(struct FixedDurationMarginCallFacetStorage.Layout l, bytes initMarginCallTimeData) internal returns (uint256)

checkMarginCallTimes

function checkMarginCallTimes(struct FixedDurationMarginCallFacetStorage.Layout l, uint256 campaignId) internal view

isMarginCallPeriodExpired

function isMarginCallPeriodExpired(struct FixedDurationMarginCallFacetStorage.Layout l, uint256 campaignId) internal view returns (bool)

triggerMarginCallPeriod

function triggerMarginCallPeriod(struct FixedDurationMarginCallFacetStorage.Layout l, uint256 campaignId) internal

getMarginCallTimes

function getMarginCallTimes(struct FixedDurationMarginCallFacetStorage.Layout l, uint256 campaignId) internal view returns (uint256, uint256)

setMarginCallDuration

function setMarginCallDuration(struct FixedDurationMarginCallFacetStorage.Layout l, uint256 marginCallDuration) internal

On this page