Skip to main content
GNSTradingInteractions facet internal library

tradingActivated

Modifier to only allow trading action when trading is activated (= revert if not activated)

tradingActivatedOrCloseOnly

Modifier to only allow trading action when trading is activated or close only (= revert if paused)

notDelegatedAction

Modifier to prevent calling function from delegated action

initializeTrading

Check ITradingInteractionsUtils interface for documentation

updateMarketOrdersTimeoutBlocks

Check ITradingInteractionsUtils interface for documentation
Check ITradingInteractionsUtils interface for documentation

setTradingDelegate

Check ITradingInteractionsUtils interface for documentation

removeTradingDelegate

Check ITradingInteractionsUtils interface for documentation

delegatedTradingAction

Check ITradingInteractionsUtils interface for documentation

openTrade

Check ITradingInteractionsUtils interface for documentation

openTradeNative

Check ITradingInteractionsUtils interface for documentation

updateMaxClosingSlippageP

Check ITradingInteractionsUtils interface for documentation

closeTradeMarket

Check ITradingInteractionsUtils interface for documentation

updateOpenOrder

Check ITradingInteractionsUtils interface for documentation

cancelOpenOrder

Check ITradingInteractionsUtils interface for documentation

updateTp

Check ITradingInteractionsUtils interface for documentation

updateSl

Check ITradingInteractionsUtils interface for documentation

updateLeverage

Check ITradingInteractionsUtils interface for documentation

increasePositionSize

Check ITradingInteractionsUtils interface for documentation

decreasePositionSize

Check ITradingInteractionsUtils interface for documentation

triggerOrder

Check ITradingInteractionsUtils interface for documentation

cancelOrderAfterTimeout

Check ITradingInteractionsUtils interface for documentation

getWrappedNativeToken

Check ITradingInteractionsUtils interface for documentation

isWrappedNativeToken

Check ITradingInteractionsUtils interface for documentation

getTradingDelegate

Check ITradingInteractionsUtils interface for documentation

getMarketOrdersTimeoutBlocks

Check ITradingInteractionsUtils interface for documentation
Check ITradingInteractionsUtils interface for documentation

_getSlot

Returns storage slot to use when fetching storage relevant to library

_getStorage

Returns storage pointer for storage struct in diamond contract, at defined slot

_getMultiCollatDiamond

Returns current address as multi-collateral diamond interface to call other facets functions.

_openTrade

Internal function for openTrade and openTradeNative

Parameters

_checkNoPendingTrigger

Revert if there is an active pending order for the trade

Parameters

_getPriceTriggerOrder

Initiate price aggregator request for trigger order

Parameters

_wrapNativeToken

Receives native token and sends back wrapped token to user

Parameters

_msgSender

Returns the caller of the transaction (overriden by trader address if delegatedAction is called)