pragma solidity ^0.5.16; interface IPerpsV2MarketBaseTypesLegacyR1 { /* ========== TYPES ========== */ enum OrderType {Atomic, Delayed, Offchain} enum Status { Ok, InvalidPrice, InvalidOrderType, PriceOutOfBounds, CanLiquidate, CannotLiquidate, MaxMarketSizeExceeded, MaxLeverageExceeded, InsufficientMargin, NotPermitted, NilOrder, NoPositionOpen, PriceTooVolatile, PriceImpactToleranceExceeded, PositionFlagged, PositionNotFlagged } // If margin/size are positive, the position is long; if negative then it is short. struct Position { uint64 id; uint64 lastFundingIndex; uint128 margin; uint128 lastPrice; int128 size; } // Delayed order storage struct DelayedOrder { bool isOffchain; // flag indicating the delayed order is offchain int128 sizeDelta; // difference in position to pass to modifyPosition uint128 priceImpactDelta; // desired price delta uint128 targetRoundId; // price oracle roundId using which price this order needs to executed uint128 commitDeposit; // the commitDeposit paid upon submitting that needs to be refunded if order succeeds uint128 keeperDeposit; // the keeperDeposit paid upon submitting that needs to be paid / refunded on tx confirmation uint256 executableAtTime; // The timestamp at which this order is executable at uint256 intentionTime; // The block timestamp of submission bytes32 trackingCode; // tracking code to emit on execution for volume source fee sharing } }