GmxV2CauldronOrderAgent
Agent handling the creation and management of RouterOrder clones.
createOrder | only callable by cauldrons
This function creates a new order for a specific user with the given parameters. It is called by the GmxV2CauldronV4
contract to set up a new order in response to user actions.
It creates a clone of the RouterOrder contract and initializes it accordingly.
Parameters
Name | Type | Note |
---|---|---|
|
| Address of the user for whom the order is being created. |
|
| Parameters defining the details of the order. |
setOracle | only owner
Sets the oracle for a specific GMX V2 market, essential for ensuring accurate market data for the orders.
This oracle is then used by all RouterOrder clones
Parameters
Name | Type | Note |
---|---|---|
|
| The market for which the oracle is being set. |
|
| The oracle contract to use for the specified market. |
setCallbackGasLimit | only owner
Adjusts the gas limit for callback functions used in the GMX architecture. This function sets the maximum amount of gas allowed for operations following a callback. This is particularly relevant for the non-atomic nature of GMX transactions, where a user creates an order that is later filled by a keeper. The callback mechanism allows for composability by enabling the orderRouter proxy contract to continue the flow after receiving tokens from the deposit or withdrawal handler.
This callback gas limit is used by all RouterOrder clones.
Parameters
Name | Type | Note |
---|---|---|
|
| The new gas limit for callbacks. |
Last updated