{
  "contractName": "CounterweightMock",
  "abi": [
    {
      "type": "constructor",
      "inputs": [
        {
          "name": "whype_",
          "type": "address",
          "internalType": "address"
        },
        {
          "name": "token_",
          "type": "address",
          "internalType": "address"
        },
        {
          "name": "priceFeed_",
          "type": "address",
          "internalType": "address"
        },
        {
          "name": "initialOwner",
          "type": "address",
          "internalType": "address"
        }
      ],
      "stateMutability": "nonpayable"
    },
    {
      "type": "function",
      "name": "accrue",
      "inputs": [],
      "outputs": [],
      "stateMutability": "nonpayable"
    },
    {
      "type": "function",
      "name": "close",
      "inputs": [
        {
          "name": "shareBps",
          "type": "uint256",
          "internalType": "uint256"
        }
      ],
      "outputs": [
        {
          "name": "hypeOut",
          "type": "uint256",
          "internalType": "uint256"
        }
      ],
      "stateMutability": "nonpayable"
    },
    {
      "type": "function",
      "name": "entryPrice",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "uint256",
          "internalType": "uint256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "equity",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "uint256",
          "internalType": "uint256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "floatBalance",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "uint256",
          "internalType": "uint256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "fund",
      "inputs": [
        {
          "name": "amount",
          "type": "uint256",
          "internalType": "uint256"
        }
      ],
      "outputs": [],
      "stateMutability": "nonpayable"
    },
    {
      "type": "function",
      "name": "fundingAccrued",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "int256",
          "internalType": "int256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "fundingRateBpsPerDay",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "int256",
          "internalType": "int256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "fundingSettled",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "int256",
          "internalType": "int256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "fundingUnsettled",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "int256",
          "internalType": "int256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "keeper",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "address",
          "internalType": "address"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "lastAccrual",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "uint256",
          "internalType": "uint256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "margin",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "uint256",
          "internalType": "uint256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "notional",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "uint256",
          "internalType": "uint256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "open",
      "inputs": [
        {
          "name": "size",
          "type": "uint256",
          "internalType": "uint256"
        },
        {
          "name": "marginIn",
          "type": "uint256",
          "internalType": "uint256"
        }
      ],
      "outputs": [],
      "stateMutability": "nonpayable"
    },
    {
      "type": "function",
      "name": "owner",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "address",
          "internalType": "address"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "pnl",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "int256",
          "internalType": "int256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "priceFeed",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "address",
          "internalType": "contract IPriceFeed"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "realizedPnl",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "int256",
          "internalType": "int256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "rebalancer",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "address",
          "internalType": "address"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "resize",
      "inputs": [
        {
          "name": "newSize",
          "type": "uint256",
          "internalType": "uint256"
        }
      ],
      "outputs": [],
      "stateMutability": "nonpayable"
    },
    {
      "type": "function",
      "name": "seedAccrued",
      "inputs": [
        {
          "name": "funding",
          "type": "int256",
          "internalType": "int256"
        },
        {
          "name": "realized",
          "type": "int256",
          "internalType": "int256"
        }
      ],
      "outputs": [],
      "stateMutability": "nonpayable"
    },
    {
      "type": "function",
      "name": "setFundingRateBpsPerDay",
      "inputs": [
        {
          "name": "rate",
          "type": "int256",
          "internalType": "int256"
        }
      ],
      "outputs": [],
      "stateMutability": "nonpayable"
    },
    {
      "type": "function",
      "name": "setKeeper",
      "inputs": [
        {
          "name": "newKeeper",
          "type": "address",
          "internalType": "address"
        }
      ],
      "outputs": [],
      "stateMutability": "nonpayable"
    },
    {
      "type": "function",
      "name": "setRebalancer",
      "inputs": [
        {
          "name": "rebalancer_",
          "type": "address",
          "internalType": "address"
        }
      ],
      "outputs": [],
      "stateMutability": "nonpayable"
    },
    {
      "type": "function",
      "name": "setVault",
      "inputs": [
        {
          "name": "vault_",
          "type": "address",
          "internalType": "address"
        }
      ],
      "outputs": [],
      "stateMutability": "nonpayable"
    },
    {
      "type": "function",
      "name": "shortSize",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "uint256",
          "internalType": "uint256"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "token",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "address",
          "internalType": "address"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "transferOwnership",
      "inputs": [
        {
          "name": "newOwner",
          "type": "address",
          "internalType": "address"
        }
      ],
      "outputs": [],
      "stateMutability": "nonpayable"
    },
    {
      "type": "function",
      "name": "vault",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "address",
          "internalType": "address"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "function",
      "name": "whype",
      "inputs": [],
      "outputs": [
        {
          "name": "",
          "type": "address",
          "internalType": "contract IWHYPE"
        }
      ],
      "stateMutability": "view"
    },
    {
      "type": "event",
      "name": "Closed",
      "inputs": [
        {
          "name": "shareBps",
          "type": "uint256",
          "indexed": false,
          "internalType": "uint256"
        },
        {
          "name": "hypeOut",
          "type": "uint256",
          "indexed": false,
          "internalType": "uint256"
        },
        {
          "name": "shortSize",
          "type": "uint256",
          "indexed": false,
          "internalType": "uint256"
        }
      ],
      "anonymous": false
    },
    {
      "type": "event",
      "name": "Funded",
      "inputs": [
        {
          "name": "from",
          "type": "address",
          "indexed": true,
          "internalType": "address"
        },
        {
          "name": "amount",
          "type": "uint256",
          "indexed": false,
          "internalType": "uint256"
        }
      ],
      "anonymous": false
    },
    {
      "type": "event",
      "name": "FundingAccrued",
      "inputs": [
        {
          "name": "amount",
          "type": "int256",
          "indexed": false,
          "internalType": "int256"
        },
        {
          "name": "fundingAccrued",
          "type": "int256",
          "indexed": false,
          "internalType": "int256"
        }
      ],
      "anonymous": false
    },
    {
      "type": "event",
      "name": "FundingRateSet",
      "inputs": [
        {
          "name": "fundingRateBpsPerDay",
          "type": "int256",
          "indexed": false,
          "internalType": "int256"
        }
      ],
      "anonymous": false
    },
    {
      "type": "event",
      "name": "KeeperSet",
      "inputs": [
        {
          "name": "previousKeeper",
          "type": "address",
          "indexed": true,
          "internalType": "address"
        },
        {
          "name": "newKeeper",
          "type": "address",
          "indexed": true,
          "internalType": "address"
        }
      ],
      "anonymous": false
    },
    {
      "type": "event",
      "name": "Opened",
      "inputs": [
        {
          "name": "sizeAdded",
          "type": "uint256",
          "indexed": false,
          "internalType": "uint256"
        },
        {
          "name": "marginIn",
          "type": "uint256",
          "indexed": false,
          "internalType": "uint256"
        },
        {
          "name": "shortSize",
          "type": "uint256",
          "indexed": false,
          "internalType": "uint256"
        },
        {
          "name": "entryPrice",
          "type": "uint256",
          "indexed": false,
          "internalType": "uint256"
        }
      ],
      "anonymous": false
    },
    {
      "type": "event",
      "name": "OwnershipTransferred",
      "inputs": [
        {
          "name": "previousOwner",
          "type": "address",
          "indexed": true,
          "internalType": "address"
        },
        {
          "name": "newOwner",
          "type": "address",
          "indexed": true,
          "internalType": "address"
        }
      ],
      "anonymous": false
    },
    {
      "type": "event",
      "name": "RebalancerSet",
      "inputs": [
        {
          "name": "rebalancer",
          "type": "address",
          "indexed": true,
          "internalType": "address"
        }
      ],
      "anonymous": false
    },
    {
      "type": "event",
      "name": "Resized",
      "inputs": [
        {
          "name": "oldSize",
          "type": "uint256",
          "indexed": false,
          "internalType": "uint256"
        },
        {
          "name": "newSize",
          "type": "uint256",
          "indexed": false,
          "internalType": "uint256"
        },
        {
          "name": "entryPrice",
          "type": "uint256",
          "indexed": false,
          "internalType": "uint256"
        }
      ],
      "anonymous": false
    },
    {
      "type": "event",
      "name": "Settled",
      "inputs": [
        {
          "name": "pnlRealized",
          "type": "int256",
          "indexed": false,
          "internalType": "int256"
        },
        {
          "name": "fundingRealized",
          "type": "int256",
          "indexed": false,
          "internalType": "int256"
        },
        {
          "name": "margin",
          "type": "uint256",
          "indexed": false,
          "internalType": "uint256"
        }
      ],
      "anonymous": false
    },
    {
      "type": "event",
      "name": "VaultSet",
      "inputs": [
        {
          "name": "vault",
          "type": "address",
          "indexed": true,
          "internalType": "address"
        }
      ],
      "anonymous": false
    },
    {
      "type": "error",
      "name": "CastOverflow",
      "inputs": []
    },
    {
      "type": "error",
      "name": "InsufficientFloat",
      "inputs": []
    },
    {
      "type": "error",
      "name": "InvalidShare",
      "inputs": []
    },
    {
      "type": "error",
      "name": "NotKeeper",
      "inputs": []
    },
    {
      "type": "error",
      "name": "NotOwner",
      "inputs": []
    },
    {
      "type": "error",
      "name": "NotRebalancer",
      "inputs": []
    },
    {
      "type": "error",
      "name": "NotVault",
      "inputs": []
    },
    {
      "type": "error",
      "name": "TransferFailed",
      "inputs": []
    },
    {
      "type": "error",
      "name": "ZeroAddress",
      "inputs": []
    }
  ]
}