Variables
The following are the most important variables used in the contract:
_NOT_ENTERED: a constant that indicates that the lock is not entered_ENTERED: a constant that indicates that the lock is entered_NO_ID: a constant that indicates that there is no position ID_NO_ADDRESS: a constant that indicates that there is no address_GENERAL_LOCK: a variable that is used as a lock to prevent reentrancy attacks_IN_EXEC_LOCK: a variable that is used as a lock to avoid potential race conditionsPOSITION_ID: a variable that indicates the position ID currently under executionSPELL: a variable that indicates the spell currently under executionconfig: an instance ofIProtocolConfigthat stores the protocol configurationoracle: an instance ofICoreOraclethat stores the address of the oracle contractfeeManager: an instance ofIFeeManagerthat stores the address of the fee manager contractnextPositionId: a variable that stores the next available position ID, starting from 1bankStatus: a variable that stores the status of the bank, each bit stores a certain bank status, e.g. borrow allowed, repay allowedallBanks: an array that stores the list of all listed banksbanks: a mapping from token to bank databTokenInBank: a mapping from bToken to its existence in bankpositions: a mapping from position ID to position dataallowContractCalls: a boolean variable that determines whether to allow calls from contracts or notwhitelistedTokens: a mapping from token to whitelist statuswhitelistedSpells: a mapping from spell to whitelist statuswhitelistedContracts: a mapping from user to whitelist status
Last updated