ElektroStorage.sol

View Source: contracts/elektro/base/ElektroStorage.sol

↗ Extends: RoleAware, Resolvable, OnlyRouterAccess ↘ Derived Contracts: ElektroAbstract, ElektroInitialize, ElektroLedgerCommon, ElektroLedgerUpdate, ElektroSetters

ElektroStorage

Main Storage contract for each Elektro market. One of these is used for every market (asset pair) deployed. This stores data necessary for any Elektro market functionality and is tied to every {ElektroRouter}.

Structs

CurrencyPair

struct CurrencyPair {
 address underlyingCurrency,
 address strikeCurrency,
 uint256 srcMultiplier,
 uint256 destMultiplier
}

Contract Members

Constants & Variables

Boolean used to block subsequent initializations for Elektro market storage. Makes sure contract's storage has been initialized and check it upon every call to init().

bool public initialized;

contract ITokenManagerMain public tokenManager;

contract IElektroEventEmitter public elektroEventEmitter;

contract IElektroRegistry public registry;

address public underlyingCurrency;

address public strikeCurrency;

Mapping storing client positions for a specific Elektro market. Map<{uint32 contractId, address clientAddress}, int256 amount>

mapping(uint32 => mapping(address => int64)) public clientPositions;

Functions

  • getChainID()

getChainID

Returns CHAINID from the opcode by using inline assembly.

function getChainID() external pure
returns(uint256)

Returns

uint256 - chainid representing which Ethereum network (chain) this contract belongs to (Ropsten, Mainnet, etc.)

Arguments

Last updated