{
  "abi": [
    {
      "inputs": [
        {
          "internalType": "contract Router",
          "name": "_router",
          "type": "address"
        },
        {
          "internalType": "contract RoleStore",
          "name": "_roleStore",
          "type": "address"
        },
        {
          "internalType": "contract DataStore",
          "name": "_dataStore",
          "type": "address"
        },
        {
          "internalType": "contract EventEmitter",
          "name": "_eventEmitter",
          "type": "address"
        },
        {
          "internalType": "contract IOrderHandler",
          "name": "_orderHandler",
          "type": "address"
        },
        {
          "internalType": "contract OrderVault",
          "name": "_orderVault",
          "type": "address"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "key",
          "type": "bytes32"
        }
      ],
      "name": "DisabledFeature",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "EmptyHoldingAddress",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "EmptyOrder",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "EmptyReceiver",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "token",
          "type": "address"
        }
      ],
      "name": "EmptyTokenTranferGasLimit",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "msgSender",
          "type": "address"
        }
      ],
      "name": "InvalidNativeTokenSender",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "token",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "receiver",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "TokenTransferError",
      "type": "error"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "string",
          "name": "reason",
          "type": "string"
        },
        {
          "indexed": false,
          "internalType": "bytes",
          "name": "returndata",
          "type": "bytes"
        }
      ],
      "name": "TokenTransferReverted",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "subaccount",
          "type": "address"
        }
      ],
      "name": "addSubaccount",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "key",
          "type": "bytes32"
        }
      ],
      "name": "cancelOrder",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "components": [
            {
              "components": [
                {
                  "internalType": "address",
                  "name": "receiver",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "cancellationReceiver",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "callbackContract",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "uiFeeReceiver",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "market",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "initialCollateralToken",
                  "type": "address"
                },
                {
                  "internalType": "address[]",
                  "name": "swapPath",
                  "type": "address[]"
                }
              ],
              "internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses",
              "name": "addresses",
              "type": "tuple"
            },
            {
              "components": [
                {
                  "internalType": "uint256",
                  "name": "sizeDeltaUsd",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "initialCollateralDeltaAmount",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "triggerPrice",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "acceptablePrice",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "executionFee",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "callbackGasLimit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "minOutputAmount",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "validFromTime",
                  "type": "uint256"
                }
              ],
              "internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers",
              "name": "numbers",
              "type": "tuple"
            },
            {
              "internalType": "enum Order.OrderType",
              "name": "orderType",
              "type": "uint8"
            },
            {
              "internalType": "enum Order.DecreasePositionSwapType",
              "name": "decreasePositionSwapType",
              "type": "uint8"
            },
            {
              "internalType": "bool",
              "name": "isLong",
              "type": "bool"
            },
            {
              "internalType": "bool",
              "name": "shouldUnwrapNativeToken",
              "type": "bool"
            },
            {
              "internalType": "bool",
              "name": "autoCancel",
              "type": "bool"
            },
            {
              "internalType": "bytes32",
              "name": "referralCode",
              "type": "bytes32"
            },
            {
              "internalType": "bytes32[]",
              "name": "dataList",
              "type": "bytes32[]"
            }
          ],
          "internalType": "struct IBaseOrderUtils.CreateOrderParams",
          "name": "params",
          "type": "tuple"
        }
      ],
      "name": "createOrder",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "dataStore",
      "outputs": [
        {
          "internalType": "contract DataStore",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "eventEmitter",
      "outputs": [
        {
          "internalType": "contract EventEmitter",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes[]",
          "name": "data",
          "type": "bytes[]"
        }
      ],
      "name": "multicall",
      "outputs": [
        {
          "internalType": "bytes[]",
          "name": "results",
          "type": "bytes[]"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "orderHandler",
      "outputs": [
        {
          "internalType": "contract IOrderHandler",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "orderVault",
      "outputs": [
        {
          "internalType": "contract OrderVault",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "subaccount",
          "type": "address"
        }
      ],
      "name": "removeSubaccount",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "roleStore",
      "outputs": [
        {
          "internalType": "contract RoleStore",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "router",
      "outputs": [
        {
          "internalType": "contract Router",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "receiver",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "sendNativeToken",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "token",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "receiver",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "sendTokens",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "receiver",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "sendWnt",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "subaccount",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "integrationId",
          "type": "bytes32"
        }
      ],
      "name": "setIntegrationId",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "subaccount",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "actionType",
          "type": "bytes32"
        },
        {
          "internalType": "uint256",
          "name": "maxAllowedCount",
          "type": "uint256"
        }
      ],
      "name": "setMaxAllowedSubaccountActionCount",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "subaccount",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "setSubaccountAutoTopUpAmount",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "subaccount",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "actionType",
          "type": "bytes32"
        },
        {
          "internalType": "uint256",
          "name": "expiresAt",
          "type": "uint256"
        }
      ],
      "name": "setSubaccountExpiresAt",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "key",
          "type": "bytes32"
        },
        {
          "internalType": "uint256",
          "name": "sizeDeltaUsd",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "acceptablePrice",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "triggerPrice",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "minOutputAmount",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "validFromTime",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "autoCancel",
          "type": "bool"
        }
      ],
      "name": "updateOrder",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "stateMutability": "payable",
      "type": "receive"
    }
  ]
}