{
  "_format": "hh-sol-artifact-1",
  "contractName": "MockPriceOracleOfMargin",
  "sourceName": "contracts/mocks/MockPriceOracleM.sol",
  "abi": [
    {
      "inputs": [],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "amm",
          "type": "address"
        },
        {
          "internalType": "uint8",
          "name": "beta",
          "type": "uint8"
        },
        {
          "internalType": "uint256",
          "name": "quoteAmount",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "negative",
          "type": "bool"
        }
      ],
      "name": "getMarkPriceAcc",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "price",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "amm",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "quoteAmount",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "baseAmount",
          "type": "uint256"
        }
      ],
      "name": "getMarkPriceInRatio",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "amm",
          "type": "address"
        }
      ],
      "name": "getPremiumFraction",
      "outputs": [
        {
          "internalType": "int256",
          "name": "",
          "type": "int256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "isIndex",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "markPriceInRatio",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "p",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "pf",
      "outputs": [
        {
          "internalType": "int256",
          "name": "",
          "type": "int256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "baseToken",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "quoteToken",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "baseAmount",
          "type": "uint256"
        }
      ],
      "name": "quote",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "quoteAmount",
          "type": "uint256"
        },
        {
          "internalType": "uint8",
          "name": "source",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bool",
          "name": "value",
          "type": "bool"
        }
      ],
      "name": "setIsIndex",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_p",
          "type": "uint256"
        }
      ],
      "name": "setMarkPrice",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_markPriceInRatio",
          "type": "uint256"
        }
      ],
      "name": "setMarkPriceInRatio",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "int256",
          "name": "_pf",
          "type": "int256"
        }
      ],
      "name": "setPf",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "amm",
          "type": "address"
        }
      ],
      "name": "setupTwap",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "pair",
          "type": "address"
        }
      ],
      "name": "updateAmmTwap",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "bytecode": "0x60806040526000805534801561001457600080fd5b50637735940060015561047e8061002c6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80639ae8886a1161008c578063c6f714d411610066578063c6f714d4146101f9578063ccadf7d11461020c578063f65770ba146100ef578063fcb968a114610215576100ea565b80639ae8886a146101b25780639f6232e2146101bb578063b6466384146101c4576100ea565b80634c0000dc116100c85780634c0000dc1461013b5780634f2b5de01461014e5780637a1dd4231461016f5780637e650a0514610182576100ea565b8063422bb010146100ef57806346b55e401461010257806347cb316714610128575b600080fd5b6101006100fd3660046102ea565b50565b005b6101156101103660046102ea565b610232565b6040519081526020015b60405180910390f35b6101006101363660046103e5565b600155565b610115610149366004610378565b61023b565b61010061015c3660046103cb565b6003805460ff1916911515919091179055565b61010061017d3660046103e5565b600055565b610195610190366004610346565b610266565b60408051938452602084019290925215159082015260600161011f565b61011560015481565b61011560025481565b6101e26101d236600461030b565b5064174876e80092600092509050565b6040805192835260ff90911660208301520161011f565b6101006102073660046103e5565b600255565b61011560005481565b6003546102229060ff1681565b604051901515815260200161011f565b6000545b919050565b60015460009061025384670de0b6b3a764000061041d565b61025d91906103fd565b95945050505050565b600080600060025485670de0b6b3a7640000610282919061041d565b61028c91906103fd565b670de0b6b3a7640000600254866102a3919061041d565b6102ad91906103fd565b600354919450925060ff16905093509350939050565b80356001600160a01b038116811461023657600080fd5b8035801515811461023657600080fd5b6000602082840312156102fb578081fd5b610304826102c3565b9392505050565b60008060006060848603121561031f578182fd5b610328846102c3565b9250610336602085016102c3565b9150604084013590509250925092565b60008060006060848603121561035a578283fd5b610363846102c3565b95602085013595506040909401359392505050565b6000806000806080858703121561038d578081fd5b610396856102c3565b9350602085013560ff811681146103ab578182fd5b9250604085013591506103c0606086016102da565b905092959194509250565b6000602082840312156103dc578081fd5b610304826102da565b6000602082840312156103f6578081fd5b5035919050565b60008261041857634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561044357634e487b7160e01b81526011600452602481fd5b50029056fea264697066735822122068309ac30fc297c1e8376394dce8a711498feab25d7bcb870572ddd99771fd2364736f6c63430008020033",
  "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80639ae8886a1161008c578063c6f714d411610066578063c6f714d4146101f9578063ccadf7d11461020c578063f65770ba146100ef578063fcb968a114610215576100ea565b80639ae8886a146101b25780639f6232e2146101bb578063b6466384146101c4576100ea565b80634c0000dc116100c85780634c0000dc1461013b5780634f2b5de01461014e5780637a1dd4231461016f5780637e650a0514610182576100ea565b8063422bb010146100ef57806346b55e401461010257806347cb316714610128575b600080fd5b6101006100fd3660046102ea565b50565b005b6101156101103660046102ea565b610232565b6040519081526020015b60405180910390f35b6101006101363660046103e5565b600155565b610115610149366004610378565b61023b565b61010061015c3660046103cb565b6003805460ff1916911515919091179055565b61010061017d3660046103e5565b600055565b610195610190366004610346565b610266565b60408051938452602084019290925215159082015260600161011f565b61011560015481565b61011560025481565b6101e26101d236600461030b565b5064174876e80092600092509050565b6040805192835260ff90911660208301520161011f565b6101006102073660046103e5565b600255565b61011560005481565b6003546102229060ff1681565b604051901515815260200161011f565b6000545b919050565b60015460009061025384670de0b6b3a764000061041d565b61025d91906103fd565b95945050505050565b600080600060025485670de0b6b3a7640000610282919061041d565b61028c91906103fd565b670de0b6b3a7640000600254866102a3919061041d565b6102ad91906103fd565b600354919450925060ff16905093509350939050565b80356001600160a01b038116811461023657600080fd5b8035801515811461023657600080fd5b6000602082840312156102fb578081fd5b610304826102c3565b9392505050565b60008060006060848603121561031f578182fd5b610328846102c3565b9250610336602085016102c3565b9150604084013590509250925092565b60008060006060848603121561035a578283fd5b610363846102c3565b95602085013595506040909401359392505050565b6000806000806080858703121561038d578081fd5b610396856102c3565b9350602085013560ff811681146103ab578182fd5b9250604085013591506103c0606086016102da565b905092959194509250565b6000602082840312156103dc578081fd5b610304826102da565b6000602082840312156103f6578081fd5b5035919050565b60008261041857634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561044357634e487b7160e01b81526011600452602481fd5b50029056fea264697066735822122068309ac30fc297c1e8376394dce8a711498feab25d7bcb870572ddd99771fd2364736f6c63430008020033",
  "linkReferences": {},
  "deployedLinkReferences": {}
}
