Libraries
ITradingInteractionsUtils
Interface for GNSTradingInteractions facet (inherits types and also contains functions, events, and custom errors)
Initializes the trading facet
Updates marketOrdersTimeoutBlocks
Updates the users that can bypass the link cost of triggerOrder
_Sets delegate as the new delegate of caller (can call delegatedAction)
Removes the delegate of caller (can’t call delegatedAction)
_Caller executes a trading action on behalf of trader using delegatecall
Opens a new trade/limit order/stop order
Wraps native token and opens a new trade/limit order/stop order
Updates existing trade’s max closing slippage % for caller
Closes an open trade (market order) for caller
Updates an existing limit/stop order for caller
Cancels an open limit/stop order for caller
Updates the tp of an open trade for caller
Updates the sl of an open trade for caller
Initiates a new trigger order (for tp/sl/liq/limit/stop orders)
Safety function in case oracles don’t answer in time, allows caller to cancel a pending order and if relevant claim back any stuck collateral Only allowed for MARKET_OPEN, MARKET_CLOSE, UPDATE_LEVERAGE, MARKET_PARTIAL_OPEN, and MARKET_PARTIAL_CLOSE orders
Update trade leverage
Increase trade position size
Decrease trade position size
Returns the wrapped native token or address(0) if the current chain, or the wrapped token, is not supported.
Returns true if the token is the wrapped native token for the current chain, where supported.
Returns the address a trader delegates his trading actions to
Returns the current marketOrdersTimeoutBlocks value
Returns whether a user bypasses trigger link costs
Emitted when marketOrdersTimeoutBlocks is updated
Emitted when a user is allowed/disallowed to bypass the link cost of triggerOrder
Emitted when a market order is initiated
Emitted when a new limit/stop order is placed
Emitted when a limit/stop order is canceled (collateral sent back to trader)
Emitted when a trigger order is initiated (tp/sl/liq/limit/stop orders)
Emitted when a pending market order is canceled due to timeout
Emitted when a pending market order is canceled due to timeout and new closeTradeMarket() call failed
Emitted when a native token is wrapped
