Skip to content

DexStorageVars ​

Git Source

Abstract contract providing view functions for DEX storage variables

Functions ​

getDexVariablesRaw ​

Get the raw DEX variables

solidity
function getDexVariablesRaw(address dex_) public view returns (uint256);

Parameters

NameTypeDescription
dex_addressThe address of the DEX

Returns

NameTypeDescription
<none>uint256The raw DEX variables

getDexVariables2Raw ​

Get the raw DEX variables2

solidity
function getDexVariables2Raw(address dex_) public view returns (uint256);

Parameters

NameTypeDescription
dex_addressThe address of the DEX

Returns

NameTypeDescription
<none>uint256The raw DEX variables2

getTotalSupplyShares ​

Get the total supply shares of a DEX

solidity
function getTotalSupplyShares(address dex_) public view returns (uint256);

Parameters

NameTypeDescription
dex_addressThe address of the DEX

Returns

NameTypeDescription
<none>uint256The total supply shares

getUserSupplyDataRaw ​

Get the raw user supply data for a specific user and DEX

solidity
function getUserSupplyDataRaw(address dex_, address user_) public view returns (uint256);

Parameters

NameTypeDescription
dex_addressThe address of the DEX
user_addressThe address of the user

Returns

NameTypeDescription
<none>uint256The raw user supply data

getTotalBorrowShares ​

Get the total borrow shares of a DEX

solidity
function getTotalBorrowShares(address dex_) public view returns (uint256);

Parameters

NameTypeDescription
dex_addressThe address of the DEX

Returns

NameTypeDescription
<none>uint256The total borrow shares

getUserBorrowDataRaw ​

Get the raw user borrow data for a specific user and DEX

solidity
function getUserBorrowDataRaw(address dex_, address user_) public view returns (uint256);

Parameters

NameTypeDescription
dex_addressThe address of the DEX
user_addressThe address of the user

Returns

NameTypeDescription
<none>uint256The raw user borrow data

getOracleRaw ​

Get the raw oracle data for a specific DEX and index

solidity
function getOracleRaw(address dex_, uint256 index_) public view returns (uint256);

Parameters

NameTypeDescription
dex_addressThe address of the DEX
index_uint256The index of the oracle data

Returns

NameTypeDescription
<none>uint256The raw oracle data

getRangeShiftRaw ​

Get the raw range shift for a DEX

solidity
function getRangeShiftRaw(address dex_) public view returns (uint256);

Parameters

NameTypeDescription
dex_addressThe address of the DEX

Returns

NameTypeDescription
<none>uint256The raw range shift

getThresholdShiftRaw ​

Get the raw threshold shift for a DEX

solidity
function getThresholdShiftRaw(address dex_) public view returns (uint256);

Parameters

NameTypeDescription
dex_addressThe address of the DEX

Returns

NameTypeDescription
<none>uint256The raw threshold shift

getCenterPriceShiftRaw ​

Get the raw center price shift for a DEX

solidity
function getCenterPriceShiftRaw(address dex_) public view returns (uint256);

Parameters

NameTypeDescription
dex_addressThe address of the DEX

Returns

NameTypeDescription
<none>uint256The raw center price shift

_calculateStorageSlotUintMapping ​

Calculate the storage slot for a uint mapping

solidity
function _calculateStorageSlotUintMapping(uint256 slot_, uint256 key_) internal pure returns (bytes32);

Parameters

NameTypeDescription
slot_uint256The base slot of the mapping
key_uint256The key of the mapping

Returns

NameTypeDescription
<none>bytes32The calculated storage slot