Skip to content

AccountLibrary

Functions

requestFlags

Gets the locked and fulfilled request flags for the request with the given index.

function requestFlags(Account storage self, uint32 idx) internal view returns (bool locked, bool fulfilled);
Parameters
NameTypeDescription
selfAccountThe account to get the request flags from.
idxuint32The index of the request.
Returns
NameTypeDescription
lockedboolTrue if the request is locked, false otherwise.
fulfilledboolTrue if the request is fulfilled, false otherwise.

setRequestFlags

Sets the locked and fulfilled request flags for the request with the given index.

The given value of flags will be applied with |= to the flags for the request. Least significant bit is locked, second-least significant is fulfilled.

function setRequestFlags(Account storage self, uint32 idx, uint8 flags) internal;
Parameters
NameTypeDescription
selfAccountThe account to set the request flags for.
idxuint32The index of the request.
flagsuint8The flags to set for the request.

setRequestLocked

Sets the locked flag for the request with the given index.

The flag indicates that a request has been locked now or in the past. If a requests lock expires this flag will still be set.

function setRequestLocked(Account storage self, uint32 idx) internal;
Parameters
NameTypeDescription
selfAccountThe account to set the request flag for.
idxuint32The index of the request.

setRequestFulfilled

Sets the fulfilled flag for the request with the given index.

function setRequestFulfilled(Account storage self, uint32 idx) internal;
Parameters
NameTypeDescription
selfAccountThe account to set the request flag for.
idxuint32The index of the request.