Skip to content

PerpsV2MarketState

Description

Source: contracts/PerpsV2MarketState.sol

Variables

baseAsset

Source

Type: bytes32

delayedOrders

Source

Type: mapping(address => struct IPerpsV2MarketBaseTypes.DelayedOrder)

fundingLastRecomputed

Source

Type: uint32

fundingRateLastRecomputed

Source

Type: int128

fundingSequence

Source

Type: int128[]

marketKey

Source

Type: bytes32

marketSize

Source

Type: uint128

marketSkew

Source

Type: int128

positions

Source

Type: mapping(address => struct IPerpsV2MarketBaseTypes.Position)

Constructor

constructor

Source

Details

Signature

constructor(address _owner, address[] _associatedContracts, bytes32 _baseAsset, bytes32 _marketKey)

Visibility

public

State Mutability

``

Views

entryDebtCorrection

Source

Details

Signature

entryDebtCorrection() view returns (int128)

Visibility

external

State Mutability

view

fundingSequenceLength

Source

Details

Signature

fundingSequenceLength() view returns (uint256)

Visibility

external

State Mutability

view

getDelayedOrderAddressesLength

Source

Details

Signature

getDelayedOrderAddressesLength() view returns (uint256)

Visibility

external

State Mutability

view

Modifiers

getDelayedOrderAddressesPage

Source

Details

Signature

getDelayedOrderAddressesPage(uint256 index, uint256 pageSize) view returns (address[])

Visibility

external

State Mutability

view

Modifiers

getPositionAddressesLength

Source

Details

Signature

getPositionAddressesLength() view returns (uint256)

Visibility

external

State Mutability

view

Modifiers

getPositionAddressesPage

Source

Details

Signature

getPositionAddressesPage(uint256 index, uint256 pageSize) view returns (address[])

Visibility

external

State Mutability

view

Modifiers

nextPositionId

Source

Details

Signature

nextPositionId() view returns (uint64)

Visibility

external

State Mutability

view

Restricted Functions

deleteDelayedOrder

Source

Details

Signature

deleteDelayedOrder(address account)

Visibility

external

State Mutability

``

Modifiers

deletePosition

Source

Details

Signature

deletePosition(address account)

Visibility

external

State Mutability

``

Modifiers

getDelayedOrderAddressesLength

Source

Details

Signature

getDelayedOrderAddressesLength() view returns (uint256)

Visibility

external

State Mutability

view

Modifiers

getDelayedOrderAddressesPage

Source

Details

Signature

getDelayedOrderAddressesPage(uint256 index, uint256 pageSize) view returns (address[])

Visibility

external

State Mutability

view

Modifiers

getPositionAddressesLength

Source

Details

Signature

getPositionAddressesLength() view returns (uint256)

Visibility

external

State Mutability

view

Modifiers

getPositionAddressesPage

Source

Details

Signature

getPositionAddressesPage(uint256 index, uint256 pageSize) view returns (address[])

Visibility

external

State Mutability

view

Modifiers

pushFundingSequence

Source

Details

Signature

pushFundingSequence(int128 _fundingSequence)

Visibility

external

State Mutability

``

Modifiers

setBaseAsset

Source

Details

Signature

setBaseAsset(bytes32 _baseAsset)

Visibility

external

State Mutability

``

Requires

Modifiers

setEntryDebtCorrection

Source

Details

Signature

setEntryDebtCorrection(int128 entryDebtCorrection)

Visibility

external

State Mutability

``

Modifiers

setFundingLastRecomputed

Source

Details

Signature

setFundingLastRecomputed(uint32 lastRecomputed)

Visibility

external

State Mutability

``

Modifiers

setFundingRateLastRecomputed

Source

Details

Signature

setFundingRateLastRecomputed(int128 _fundingRateLastRecomputed)

Visibility

external

State Mutability

``

Modifiers

setMarketKey

Source

Details

Signature

setMarketKey(bytes32 _marketKey)

Visibility

external

State Mutability

``

Requires

Modifiers

setMarketSize

Source

Details

Signature

setMarketSize(uint128 _marketSize)

Visibility

external

State Mutability

``

Modifiers

setMarketSkew

Source

Details

Signature

setMarketSkew(int128 _marketSkew)

Visibility

external

State Mutability

``

Modifiers

setNextPositionId

Source

Details

Signature

setNextPositionId(uint64 nextPositionId)

Visibility

external

State Mutability

``

Modifiers

updateDelayedOrder

Source

Details

Signature

updateDelayedOrder(address account, bool isOffchain, int128 sizeDelta, uint128 priceImpactDelta, uint128 targetRoundId, uint128 commitDeposit, uint128 keeperDeposit, uint256 executableAtTime, uint256 intentionTime, bytes32 trackingCode)

Visibility

external

State Mutability

``

Modifiers

updatePosition

Source

Details

Signature

updatePosition(address account, uint64 id, uint64 lastFundingIndex, uint128 margin, uint128 lastPrice, int128 size)

Visibility

external

State Mutability

``

Modifiers