PerpsV2MarketState¶
Description¶
Source: contracts/PerpsV2MarketState.sol
Variables¶
baseAsset
¶
Type: bytes32
fundingLastRecomputed
¶
Type: uint32
fundingRateLastRecomputed
¶
Type: int128
initialized
¶
Type: bool
legacyFundinSequenceOffset
¶
Type: uint256
legacyState
¶
Type: contract PerpsV2MarketStateLegacyR1
marketKey
¶
Type: bytes32
marketSize
¶
Type: uint128
marketSkew
¶
Type: int128
positionFlagger
¶
Type: mapping(address => address)
Constructor¶
constructor
¶
Details
Signature
constructor(address _owner, address[] _associatedContracts, bytes32 _baseAsset, bytes32 _marketKey, address _legacyState)
Visibility
public
State Mutability
``
Views¶
delayedOrders
¶
Type: mapping(address => struct IPerpsV2MarketBaseTypes.DelayedOrder)
Details
Signature
delayedOrders(address account) view returns (struct IPerpsV2MarketBaseTypes.DelayedOrder)
Visibility
external
State Mutability
view
entryDebtCorrection
¶
Details
Signature
entryDebtCorrection() view returns (int128)
Visibility
external
State Mutability
view
fundingSequence
¶
Type: int128[]
Details
Signature
fundingSequence(uint256 index) view returns (int128)
Visibility
external
State Mutability
view
fundingSequenceLength
¶
Details
Signature
fundingSequenceLength() view returns (uint256)
Visibility
external
State Mutability
view
getDelayedOrderAddressesLength
¶
Details
Signature
getDelayedOrderAddressesLength() view returns (uint256)
Visibility
external
State Mutability
view
getDelayedOrderAddressesPage
¶
Details
Signature
getDelayedOrderAddressesPage(uint256 index, uint256 pageSize) view returns (address[])
Visibility
external
State Mutability
view
getFlaggedAddressesLength
¶
Details
Signature
getFlaggedAddressesLength() view returns (uint256)
Visibility
external
State Mutability
view
getFlaggedAddressesPage
¶
Details
Signature
getFlaggedAddressesPage(uint256 index, uint256 pageSize) view returns (address[])
Visibility
external
State Mutability
view
getPositionAddressesLength
¶
Details
Signature
getPositionAddressesLength() view returns (uint256)
Visibility
external
State Mutability
view
getPositionAddressesPage
¶
Details
Signature
getPositionAddressesPage(uint256 index, uint256 pageSize) view returns (address[])
Visibility
external
State Mutability
view
Modifiers
isFlagged
¶
Details
Signature
isFlagged(address account) view returns (bool)
Visibility
external
State Mutability
view
nextPositionId
¶
Details
Signature
nextPositionId() view returns (uint64)
Visibility
external
State Mutability
view
positions
¶
Type: mapping(address => struct IPerpsV2MarketBaseTypes.Position)
Details
Signature
positions(address account) view returns (struct IPerpsV2MarketBaseTypes.Position)
Visibility
external
State Mutability
view
Restricted Functions¶
deleteDelayedOrder
¶
Details
Signature
deleteDelayedOrder(address account)
Visibility
external
State Mutability
``
Modifiers
deletePosition
¶
Details
Signature
deletePosition(address account)
Visibility
external
State Mutability
``
Modifiers
flag
¶
Details
Signature
flag(address account, address flagger)
Visibility
external
State Mutability
``
Modifiers
getPositionAddressesPage
¶
Details
Signature
getPositionAddressesPage(uint256 index, uint256 pageSize) view returns (address[])
Visibility
external
State Mutability
view
Modifiers
linkOrInitializeState
¶
Details
Signature
linkOrInitializeState()
Visibility
external
State Mutability
``
Requires
Modifiers
Emits
pushFundingSequence
¶
Details
Signature
pushFundingSequence(int128 fundingSequence)
Visibility
external
State Mutability
``
Modifiers
setBaseAsset
¶
Details
Signature
setBaseAsset(bytes32 _baseAsset)
Visibility
external
State Mutability
``
Requires
Modifiers
setEntryDebtCorrection
¶
Details
Signature
setEntryDebtCorrection(int128 entryDebtCorrection)
Visibility
external
State Mutability
``
Modifiers
setFundingLastRecomputed
¶
Details
Signature
setFundingLastRecomputed(uint32 lastRecomputed)
Visibility
external
State Mutability
``
Modifiers
setFundingRateLastRecomputed
¶
Details
Signature
setFundingRateLastRecomputed(int128 _fundingRateLastRecomputed)
Visibility
external
State Mutability
``
Modifiers
setMarketKey
¶
Details
Signature
setMarketKey(bytes32 _marketKey)
Visibility
external
State Mutability
``
Requires
Modifiers
setMarketSize
¶
Details
Signature
setMarketSize(uint128 _marketSize)
Visibility
external
State Mutability
``
Modifiers
setMarketSkew
¶
Details
Signature
setMarketSkew(int128 _marketSkew)
Visibility
external
State Mutability
``
Modifiers
setNextPositionId
¶
Details
Signature
setNextPositionId(uint64 nextPositionId)
Visibility
external
State Mutability
``
Modifiers
unflag
¶
Details
Signature
unflag(address account)
Visibility
external
State Mutability
``
Modifiers
updateDelayedOrder
¶
Details
Signature
updateDelayedOrder(address account, bool isOffchain, int128 sizeDelta, uint128 desiredFillPrice, uint128 targetRoundId, uint128 commitDeposit, uint128 keeperDeposit, uint256 executableAtTime, uint256 intentionTime, bytes32 trackingCode)
Visibility
external
State Mutability
``
Modifiers
updatePosition
¶
Details
Signature
updatePosition(address account, uint64 id, uint64 lastFundingIndex, uint128 margin, uint128 lastPrice, int128 size)
Visibility
external
State Mutability
``
Modifiers
Modifiers¶
onlyIfInitialized
¶
Events¶
MarketStateInitialized
¶
Signature: MarketStateInitialized(bytes32 marketKey, bool legacyContractExists, address legacyState, uint256 legacyFundinSequenceOffset)