{
  "address": "0xe5485a4fD6527911e9b82A75A1bFEd6e47BE2241",
  "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": "receiver",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "expectedReceiver",
          "type": "address"
        }
      ],
      "name": "InvalidReceiverForSubaccountOrder",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "subaccount",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "count",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "maxCount",
          "type": "uint256"
        }
      ],
      "name": "MaxSubaccountActionCountExceeded",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "subaccount",
          "type": "address"
        }
      ],
      "name": "SubaccountNotAuthorized",
      "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"
    },
    {
      "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": "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": "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": "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"
    }
  ],
  "transactionHash": "0xe5b71c86f938f547820ca3262678fb70c379c15ef02430fbb773ee4d37e86e09",
  "receipt": {
    "to": null,
    "from": "0xE7BfFf2aB721264887230037940490351700a068",
    "contractAddress": "0xe5485a4fD6527911e9b82A75A1bFEd6e47BE2241",
    "transactionIndex": 0,
    "gasUsed": "3707710",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "blockHash": "0x00c9beda5865106776abea90f56310f05628852d29d91b7c235c44a20123b601",
    "transactionHash": "0xe5b71c86f938f547820ca3262678fb70c379c15ef02430fbb773ee4d37e86e09",
    "logs": [],
    "blockNumber": 46822607,
    "cumulativeGasUsed": "3707710",
    "status": 1,
    "byzantium": true
  },
  "args": [
    "0x820F5FfC5b525cD4d88Cd91aCf2c28F16530Cc68",
    "0xA44F830B6a2B6fa76657a3B92C1fe74fcB7C6AfD",
    "0x2F0b22339414ADeD7D5F06f9D604c7fF5b2fe3f6",
    "0xDb17B211c34240B014ab6d61d4A31FA0C0e20c26",
    "0x32A0258007a6ea78265a5AE4DBb28f176be4a8EB",
    "0xD3D60D22d415aD43b7e64b510D86A30f19B1B12C"
  ],
  "numDeployments": 3,
  "solcInputHash": "95ed34927f843d6700c121bcc6faf594",
  "libraries": {
    "OrderStoreUtils": "0x805a15bf16582eC8d76841062A47dFfEa7903131"
  },
  "devdoc": {
    "kind": "dev",
    "methods": {
      "multicall(bytes[])": {
        "details": "Receives and executes a batch of function calls on this contract."
      }
    },
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  },
  "storageLayout": {
    "storage": [
      {
        "astId": 115,
        "contract": "contracts/router/SubaccountRouter.sol:SubaccountRouter",
        "label": "_status",
        "offset": 0,
        "slot": "0",
        "type": "t_uint256"
      }
    ],
    "types": {
      "t_uint256": {
        "encoding": "inplace",
        "label": "uint256",
        "numberOfBytes": "32"
      }
    }
  }
}
