## ABIs of contracts to be used by client

MarginBank = {
  "_format": "hh-sol-artifact-1",
  "contractName": "MarginBank",
  "sourceName": "contracts/MarginBank.sol",
  "abi": [
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "enum MarginBank.Action",
          "name": "action",
          "type": "uint8"
        },
        {
          "indexed": True,
          "internalType": "address",
          "name": "srcAddress",
          "type": "address"
        },
        {
          "indexed": True,
          "internalType": "address",
          "name": "destAddress",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "amount",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "srcBalance",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "destBalance",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "timestamp",
          "type": "uint128"
        }
      ],
      "name": "BankBalanceUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": True,
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "address",
          "name": "destination",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "amount",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "balance",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "timestamp",
          "type": "uint128"
        }
      ],
      "name": "BankTransferToPerpetual",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "uint8",
          "name": "version",
          "type": "uint8"
        }
      ],
      "name": "Initialized",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "address",
          "name": "operator",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "bool",
          "name": "approved",
          "type": "bool"
        }
      ],
      "name": "MarginBankOperatorUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": True,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": True,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "bankBalances",
      "outputs": [
        {
          "internalType": "uint128",
          "name": "",
          "type": "uint128"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "bankOperators",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "candidate",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_account",
          "type": "address"
        },
        {
          "internalType": "uint128",
          "name": "_amount",
          "type": "uint128"
        }
      ],
      "name": "depositToBank",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_account",
          "type": "address"
        }
      ],
      "name": "getAccountBankBalance",
      "outputs": [
        {
          "internalType": "uint128",
          "name": "",
          "type": "uint128"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "guardianContract",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_token",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "_guardian",
          "type": "address"
        }
      ],
      "name": "initialize",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "isWithdrawalAllowed",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_operator",
          "type": "address"
        },
        {
          "internalType": "bool",
          "name": "_approved",
          "type": "bool"
        }
      ],
      "name": "setBankOperator",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "setOwner",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "enum Types.GuardianStatus",
          "name": "_newStatus",
          "type": "uint8"
        }
      ],
      "name": "setWithdrawalStatus",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "token",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_account",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "_destination",
          "type": "address"
        },
        {
          "internalType": "uint128",
          "name": "_amount",
          "type": "uint128"
        }
      ],
      "name": "transferMarginToAccount",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "updateOwner",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_destination",
          "type": "address"
        },
        {
          "internalType": "uint128",
          "name": "_amount",
          "type": "uint128"
        }
      ],
      "name": "withdrawFromBank",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "bytecode": " ",
  "deployedBytecode": " ",
  "linkReferences": {},
  "deployedLinkReferences": {}
}

Perpetual = {
  "_format": "hh-sol-artifact-1",
  "contractName": "Perpetual",
  "sourceName": "contracts/Perpetual.sol",
  "abi": [
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": True,
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "address",
          "name": "sender",
          "type": "address"
        },
        {
          "components": [
            {
              "internalType": "bool",
              "name": "isPosPositive",
              "type": "bool"
            },
            {
              "internalType": "uint128",
              "name": "mro",
              "type": "uint128"
            },
            {
              "internalType": "uint128",
              "name": "qPos",
              "type": "uint128"
            },
            {
              "internalType": "uint128",
              "name": "margin",
              "type": "uint128"
            },
            {
              "internalType": "uint128",
              "name": "oiOpen",
              "type": "uint128"
            }
          ],
          "indexed": False,
          "internalType": "struct Types.PositionBalance",
          "name": "position",
          "type": "tuple"
        },
        {
          "indexed": False,
          "internalType": "enum Perpetual.Action",
          "name": "action",
          "type": "uint8"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "timestamp",
          "type": "uint128"
        }
      ],
      "name": "AccountPositionUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": True,
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "components": [
            {
              "internalType": "bool",
              "name": "isPosPositive",
              "type": "bool"
            },
            {
              "internalType": "uint128",
              "name": "mro",
              "type": "uint128"
            },
            {
              "internalType": "uint128",
              "name": "qPos",
              "type": "uint128"
            },
            {
              "internalType": "uint128",
              "name": "margin",
              "type": "uint128"
            },
            {
              "internalType": "uint128",
              "name": "oiOpen",
              "type": "uint128"
            }
          ],
          "indexed": False,
          "internalType": "struct Types.PositionBalance",
          "name": "balance",
          "type": "tuple"
        },
        {
          "indexed": False,
          "internalType": "bool",
          "name": "settlementIsPositive",
          "type": "bool"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "settlementAmount",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "price",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "int256",
          "name": "fundingRate",
          "type": "int256"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "timestamp",
          "type": "uint128"
        }
      ],
      "name": "AccountSettlementUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "defaultMakerFee",
          "type": "uint128"
        }
      ],
      "name": "DefaultMakerFeeUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "defaultTakerFee",
          "type": "uint128"
        }
      ],
      "name": "DefaultTakerFeeUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "address",
          "name": "feePool",
          "type": "address"
        }
      ],
      "name": "FeePoolUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "address",
          "name": "funder",
          "type": "address"
        }
      ],
      "name": "FundingOracleUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "int256",
          "name": "",
          "type": "int256"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "",
          "type": "uint128"
        }
      ],
      "name": "GlobalIndexUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "int256",
          "name": "initialMargin",
          "type": "int256"
        }
      ],
      "name": "IMRUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "uint8",
          "name": "version",
          "type": "uint8"
        }
      ],
      "name": "Initialized",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "int256",
          "name": "maintenanceMargin",
          "type": "int256"
        }
      ],
      "name": "MMRUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "address",
          "name": "marginBank",
          "type": "address"
        }
      ],
      "name": "MarginBankUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "address",
          "name": "provider",
          "type": "address"
        }
      ],
      "name": "OffchainFROperatorUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": True,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": True,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "settlementPrice",
          "type": "uint128"
        }
      ],
      "name": "PerpetualDelisted",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": True,
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "amount",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "timestamp",
          "type": "uint128"
        }
      ],
      "name": "PositionClosed",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "address",
          "name": "oracle",
          "type": "address"
        }
      ],
      "name": "PriceOracleUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "address",
          "name": "operator",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "bool",
          "name": "approved",
          "type": "bool"
        }
      ],
      "name": "SettlementOperatorUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": True,
          "internalType": "address",
          "name": "sender",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "address",
          "name": "operator",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "bool",
          "name": "approved",
          "type": "bool"
        }
      ],
      "name": "SubAccountUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "address",
          "name": "tradeContract",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "bool",
          "name": "approved",
          "type": "bool"
        }
      ],
      "name": "TradeContractUpdate",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "address",
          "name": "trader",
          "type": "address"
        },
        {
          "indexed": True,
          "internalType": "address",
          "name": "maker",
          "type": "address"
        },
        {
          "indexed": True,
          "internalType": "address",
          "name": "taker",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "bytes32",
          "name": "makerOrderHash",
          "type": "bytes32"
        },
        {
          "indexed": False,
          "internalType": "bytes32",
          "name": "takerOrderHash",
          "type": "bytes32"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "makerMRO",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "takerMRO",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "makerFee",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "takerFee",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "int256",
          "name": "makerPnl",
          "type": "int256"
        },
        {
          "indexed": False,
          "internalType": "int256",
          "name": "takerPnl",
          "type": "int256"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "tradeQuantity",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "price",
          "type": "uint128"
        },
        {
          "indexed": False,
          "internalType": "bool",
          "name": "isBuy",
          "type": "bool"
        },
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "timestamp",
          "type": "uint128"
        }
      ],
      "name": "TradeExecuted",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "startTime",
          "type": "uint128"
        }
      ],
      "name": "TradingStarted",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": False,
          "internalType": "uint128",
          "name": "stopTime",
          "type": "uint128"
        }
      ],
      "name": "TradingStopped",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_account",
          "type": "address"
        },
        {
          "internalType": "uint128",
          "name": "_amount",
          "type": "uint128"
        }
      ],
      "name": "addMargin",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "addresses",
      "outputs": [
        {
          "internalType": "address",
          "name": "marginMath",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "oracle",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "funder",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "marginBank",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "evaluator",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "feePool",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "guardian",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_account",
          "type": "address"
        },
        {
          "internalType": "uint128",
          "name": "_leverage",
          "type": "uint128"
        }
      ],
      "name": "adjustLeverage",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "candidate",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_account",
          "type": "address"
        }
      ],
      "name": "closePosition",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "defaultMakerFee",
      "outputs": [
        {
          "internalType": "uint128",
          "name": "",
          "type": "uint128"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "defaultTakerFee",
      "outputs": [
        {
          "internalType": "uint128",
          "name": "",
          "type": "uint128"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint128",
          "name": "_priceLowerBound",
          "type": "uint128"
        },
        {
          "internalType": "uint128",
          "name": "_priceUpperBound",
          "type": "uint128"
        }
      ],
      "name": "delistPerpetual",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "delisted",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "delistingPrice",
      "outputs": [
        {
          "internalType": "uint128",
          "name": "",
          "type": "uint128"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "getAccountBalance",
      "outputs": [
        {
          "components": [
            {
              "internalType": "bool",
              "name": "isPosPositive",
              "type": "bool"
            },
            {
              "internalType": "uint128",
              "name": "mro",
              "type": "uint128"
            },
            {
              "internalType": "uint128",
              "name": "qPos",
              "type": "uint128"
            },
            {
              "internalType": "uint128",
              "name": "margin",
              "type": "uint128"
            },
            {
              "internalType": "uint128",
              "name": "oiOpen",
              "type": "uint128"
            }
          ],
          "internalType": "struct Types.PositionBalance",
          "name": "",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "operator",
          "type": "address"
        }
      ],
      "name": "getIsSubAccount",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "globalIndex",
      "outputs": [
        {
          "internalType": "uint128",
          "name": "timestamp",
          "type": "uint128"
        },
        {
          "internalType": "int256",
          "name": "value",
          "type": "int256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "operator",
          "type": "address"
        }
      ],
      "name": "hasAccountPermissions",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "initialMarginRequired",
      "outputs": [
        {
          "internalType": "int256",
          "name": "",
          "type": "int256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "string",
          "name": "_marketName",
          "type": "string"
        },
        {
          "components": [
            {
              "internalType": "address",
              "name": "marginMath",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "oracle",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "funder",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "marginBank",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "evaluator",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "feePool",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "guardian",
              "type": "address"
            }
          ],
          "internalType": "struct IPerpetual.Addresses",
          "name": "_addresses",
          "type": "tuple"
        },
        {
          "internalType": "address",
          "name": "_trustedForwarder",
          "type": "address"
        },
        {
          "internalType": "int256",
          "name": "_initialMargin",
          "type": "int256"
        },
        {
          "internalType": "int256",
          "name": "_maintenanceMargin",
          "type": "int256"
        },
        {
          "internalType": "uint128",
          "name": "_defaultMakerFee",
          "type": "uint128"
        },
        {
          "internalType": "uint128",
          "name": "_defaultTakerFee",
          "type": "uint128"
        }
      ],
      "name": "initialize",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "isTradingAllowed",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "forwarder",
          "type": "address"
        }
      ],
      "name": "isTrustedForwarder",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "maintenanceMarginRequired",
      "outputs": [
        {
          "internalType": "int256",
          "name": "",
          "type": "int256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "marketName",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "msgSender",
      "outputs": [
        {
          "internalType": "address payable",
          "name": "ret",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_account",
          "type": "address"
        },
        {
          "internalType": "uint128",
          "name": "_amount",
          "type": "uint128"
        }
      ],
      "name": "removeMargin",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint128",
          "name": "_defaultMakerFee",
          "type": "uint128"
        }
      ],
      "name": "setDefaultMakerFee",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint128",
          "name": "_defaultTakerFee",
          "type": "uint128"
        }
      ],
      "name": "setDefaultTakerFee",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_feePool",
          "type": "address"
        }
      ],
      "name": "setFeePool",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_funder",
          "type": "address"
        }
      ],
      "name": "setFunder",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "setFundingRate",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "int256",
          "name": "_initialMargin",
          "type": "int256"
        }
      ],
      "name": "setInitialMargin",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "int256",
          "name": "_maintenanceMargin",
          "type": "int256"
        }
      ],
      "name": "setMaintenanceMargin",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_marginBank",
          "type": "address"
        }
      ],
      "name": "setMarginBank",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_newOperator",
          "type": "address"
        }
      ],
      "name": "setOffChainFROperator",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "int256",
          "name": "offchainFundingRate",
          "type": "int256"
        }
      ],
      "name": "setOffChainFundingRate",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_oracle",
          "type": "address"
        }
      ],
      "name": "setOracle",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "setOwner",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_operator",
          "type": "address"
        },
        {
          "internalType": "bool",
          "name": "_approved",
          "type": "bool"
        }
      ],
      "name": "setSettlementOperator",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_operator",
          "type": "address"
        },
        {
          "internalType": "bool",
          "name": "_approved",
          "type": "bool"
        }
      ],
      "name": "setSubAccount",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_trader",
          "type": "address"
        },
        {
          "internalType": "bool",
          "name": "_approved",
          "type": "bool"
        }
      ],
      "name": "setTradeContract",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "enum Types.GuardianStatus",
          "name": "_newStatus",
          "type": "uint8"
        }
      ],
      "name": "setTradingStatus",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "settlementOperators",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint128",
          "name": "_startingTime",
          "type": "uint128"
        }
      ],
      "name": "startTrading",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "stopTrading",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address[]",
          "name": "_accounts",
          "type": "address[]"
        },
        {
          "components": [
            {
              "internalType": "uint128",
              "name": "takerIndex",
              "type": "uint128"
            },
            {
              "internalType": "uint128",
              "name": "makerIndex",
              "type": "uint128"
            },
            {
              "internalType": "address",
              "name": "trader",
              "type": "address"
            },
            {
              "internalType": "bytes",
              "name": "data",
              "type": "bytes"
            }
          ],
          "internalType": "struct IPerpetual.TradeArg[]",
          "name": "_trades",
          "type": "tuple[]"
        },
        {
          "internalType": "uint128",
          "name": "gasCharges",
          "type": "uint128"
        }
      ],
      "name": "trade",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "tradeContracts",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "tradingStartTime",
      "outputs": [
        {
          "internalType": "uint128",
          "name": "",
          "type": "uint128"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "trustedForwarder",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "updateOwner",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ]
}

USDC = {
  "_format": "hh-sol-artifact-1",
  "contractName": "DummyUSDC",
  "sourceName": "contracts/mock/DummyUSDC.sol",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "string",
          "name": "_name",
          "type": "string"
        },
        {
          "internalType": "string",
          "name": "_symbol",
          "type": "string"
        },
        {
          "internalType": "uint128",
          "name": "_initialSupply",
          "type": "uint128"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": True,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": True,
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Approval",
      "type": "event"
    },
    {
      "anonymous": False,
      "inputs": [
        {
          "indexed": True,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": True,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": False,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Transfer",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        }
      ],
      "name": "allowance",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "approve",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "balanceOf",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "decimals",
      "outputs": [
        {
          "internalType": "uint8",
          "name": "",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "subtractedValue",
          "type": "uint256"
        }
      ],
      "name": "decreaseAllowance",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "addedValue",
          "type": "uint256"
        }
      ],
      "name": "increaseAllowance",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_recipient",
          "type": "address"
        },
        {
          "internalType": "uint128",
          "name": "_amount",
          "type": "uint128"
        }
      ],
      "name": "mint",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "name",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "symbol",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "totalSupply",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "transfer",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "transferFrom",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "bytecode": " ",
  "deployedBytecode": " ",
  "linkReferences": {},
  "deployedLinkReferences": {}
}
