{
  "_format": "hh-sol-artifact-1",
  "contractName": "IPrimitiveEngine",
  "sourceName": "contracts/interfaces/IPrimitiveEngine.sol",
  "abi": [
    {
      "inputs": [],
      "name": "BalanceError",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "delRisky",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "delStable",
          "type": "uint256"
        }
      ],
      "name": "CalibrationError",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "DeltaInError",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "DeltaOutError",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "GammaError",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "int128",
          "name": "invariant",
          "type": "int128"
        },
        {
          "internalType": "int128",
          "name": "nextInvariant",
          "type": "int128"
        }
      ],
      "name": "InvariantError",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "LockedError",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "MinLiquidityError",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "PoolDuplicateError",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "PoolExpiredError",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "expected",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "actual",
          "type": "uint256"
        }
      ],
      "name": "RiskyBalanceError",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "RiskyPerLpError",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "SigmaError",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "expected",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "actual",
          "type": "uint256"
        }
      ],
      "name": "StableBalanceError",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "StrikeError",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "UninitializedError",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "ZeroDeltasError",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "ZeroLiquidityError",
      "type": "error"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delRisky",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delStable",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delLiquidity",
          "type": "uint256"
        }
      ],
      "name": "Allocate",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint128",
          "name": "strike",
          "type": "uint128"
        },
        {
          "indexed": false,
          "internalType": "uint32",
          "name": "sigma",
          "type": "uint32"
        },
        {
          "indexed": true,
          "internalType": "uint32",
          "name": "maturity",
          "type": "uint32"
        },
        {
          "indexed": true,
          "internalType": "uint32",
          "name": "gamma",
          "type": "uint32"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delRisky",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delStable",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delLiquidity",
          "type": "uint256"
        }
      ],
      "name": "Create",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delRisky",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delStable",
          "type": "uint256"
        }
      ],
      "name": "Deposit",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delRisky",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delStable",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delLiquidity",
          "type": "uint256"
        }
      ],
      "name": "Remove",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        },
        {
          "indexed": false,
          "internalType": "bool",
          "name": "riskyForStable",
          "type": "bool"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "deltaIn",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "deltaOut",
          "type": "uint256"
        }
      ],
      "name": "Swap",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        }
      ],
      "name": "UpdateLastTimestamp",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delRisky",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "delStable",
          "type": "uint256"
        }
      ],
      "name": "Withdraw",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "BUFFER",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "MIN_LIQUIDITY",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "PRECISION",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        },
        {
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "delRisky",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "delStable",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "fromMargin",
          "type": "bool"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "allocate",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "delLiquidity",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        }
      ],
      "name": "calibrations",
      "outputs": [
        {
          "internalType": "uint128",
          "name": "strike",
          "type": "uint128"
        },
        {
          "internalType": "uint32",
          "name": "sigma",
          "type": "uint32"
        },
        {
          "internalType": "uint32",
          "name": "maturity",
          "type": "uint32"
        },
        {
          "internalType": "uint32",
          "name": "lastTimestamp",
          "type": "uint32"
        },
        {
          "internalType": "uint32",
          "name": "gamma",
          "type": "uint32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint128",
          "name": "strike",
          "type": "uint128"
        },
        {
          "internalType": "uint32",
          "name": "sigma",
          "type": "uint32"
        },
        {
          "internalType": "uint32",
          "name": "maturity",
          "type": "uint32"
        },
        {
          "internalType": "uint32",
          "name": "gamma",
          "type": "uint32"
        },
        {
          "internalType": "uint256",
          "name": "riskyPerLp",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "delLiquidity",
          "type": "uint256"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "create",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        },
        {
          "internalType": "uint256",
          "name": "delRisky",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "delStable",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "delRisky",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "delStable",
          "type": "uint256"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "deposit",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "factory",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        }
      ],
      "name": "invariantOf",
      "outputs": [
        {
          "internalType": "int128",
          "name": "invariant",
          "type": "int128"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        }
      ],
      "name": "liquidity",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "liquidity",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "margins",
      "outputs": [
        {
          "internalType": "uint128",
          "name": "balanceRisky",
          "type": "uint128"
        },
        {
          "internalType": "uint128",
          "name": "balanceStable",
          "type": "uint128"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        },
        {
          "internalType": "uint256",
          "name": "delLiquidity",
          "type": "uint256"
        }
      ],
      "name": "remove",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "delRisky",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "delStable",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        }
      ],
      "name": "reserves",
      "outputs": [
        {
          "internalType": "uint128",
          "name": "reserveRisky",
          "type": "uint128"
        },
        {
          "internalType": "uint128",
          "name": "reserveStable",
          "type": "uint128"
        },
        {
          "internalType": "uint128",
          "name": "liquidity",
          "type": "uint128"
        },
        {
          "internalType": "uint32",
          "name": "blockTimestamp",
          "type": "uint32"
        },
        {
          "internalType": "uint256",
          "name": "cumulativeRisky",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "cumulativeStable",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "cumulativeLiquidity",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "risky",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "scaleFactorRisky",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "scaleFactorStable",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "stable",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        },
        {
          "internalType": "bool",
          "name": "riskyForStable",
          "type": "bool"
        },
        {
          "internalType": "uint256",
          "name": "deltaIn",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "deltaOut",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "fromMargin",
          "type": "bool"
        },
        {
          "internalType": "bool",
          "name": "toMargin",
          "type": "bool"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "swap",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "poolId",
          "type": "bytes32"
        }
      ],
      "name": "updateLastTimestamp",
      "outputs": [
        {
          "internalType": "uint32",
          "name": "lastTimestamp",
          "type": "uint32"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "delRisky",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "delStable",
          "type": "uint256"
        }
      ],
      "name": "withdraw",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "linkReferences": {},
  "deployedLinkReferences": {}
}
