FundLockStorage.sol

View Source: contracts/fund-lock/FundLockStorage.sol

↗ Extends: RoleAware, Delegator, OnlyRouterAccess, IFundLockStorage ↘ Derived Contracts: FundLockAdmin, FundLockBase, FundLockStateGetters, IFundLock

FundLockStorage

All storage of the FundLock module declared.

Structs

Funds

struct Funds {
 uint256 value,
 uint256 timestamp
}

Contract Members

Constants & Variables

Variable used for upgrades. Represents the fact that this storage was already initalized. If this variable is "true", {FundLockAdmin.init} will revert, not letting subsequent initializations.

bool public initialized;

The maximum amount of {FundLockUser.withdraw} requests one client can make per one token.

uint256 public constant ALLOWED_WITHDRAWAL_LIMIT;

Address of the {TokenManagerRouter}

contract ITokenManagerMain public tokenManager;

Address of the {ElektroRegistryRouter}

contract IElektroRegistry public registry;

This interval represents time that user has to wait after he called {FundLockUser.withdraw} function before he can {FundLockUser.release} funds to his wallet.This allows the backend to react and ensure all options are always covered. The time lock also ensures the client has eventual access to its funds if the backend were to cease being operational. The backend cannot prevent a withdrawal indefinitely.

uint256 public releaseLock;

Time period during which user's {fundsToWithdrawS} can still be used for funding Elektro (new trades or covering old trades).

uint256 public tradeLock;

Mapping representing all {FundLockUser.withdraw} requests a client made. userAddress => tokenAddress => array of Funds structs

mapping(address => mapping(address => struct FundLockStorage.Funds[5])) internal fundsToWithdrawS;

Main storage mapping representing all Elektro clients balances at any given time in the tokens of Elektro. beneficiaryAddress => tokenAddress => amount

mapping(address => mapping(address => uint256)) internal balanceSheetS;

Functions

Last updated