{"compiler":{"version":"0.8.35+commit.47b9dedd"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"uint256","name":"price_","type":"uint256"},{"internalType":"uint256","name":"updatedAt_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revertOnDecimals","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revertOnGetPrice","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"price_","type":"uint256"},{"internalType":"uint256","name":"updatedAt_","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"decimals_","type":"uint8"}],"name":"setDecimals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"getPrice_","type":"bool"},{"internalType":"bool","name":"decimals_","type":"bool"}],"name":"setReverts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],"devdoc":{"details":"Configurable price feed for tests. Returns one price/timestamp for any token pair, at a fixed      number of price decimals (Chainlink-style, default 8).","kind":"dev","methods":{"setReverts(bool,bool)":{"details":"Simulate a dead adapter: make the selected calls revert outright (harder failure than a      stale timestamp, which {set} can already express)."}},"version":1},"userdoc":{"kind":"user","methods":{"decimals()":{"notice":"Fixed number of decimals the adapter's price is scaled by (Chainlink-style, e.g. 8).         Constant per adapter; consumers rebase with this plus the two tokens' own decimals."}},"version":1}},"settings":{"compilationTarget":{"amish-contracts/test/mocks/MockOracle.sol":"MockOracle"},"evmVersion":"cancun","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":200},"remappings":[":@openzeppelin-contracts-5.6.1/=../../../amish-contracts/dependencies/@openzeppelin-contracts-5.6.1/",":@openzeppelin-contracts-upgradeable-5.6.1/=../../../amish-contracts/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/",":@openzeppelin/contracts/=../../../amish-contracts/dependencies/@openzeppelin-contracts-5.6.1/",":amish-test/=../../../amish-contracts/test/",":amish/=../../../amish-contracts/src/",":forge-std-1.16.1/=../../../amish-contracts/dependencies/forge-std-1.16.1/src/",":forge-std/=../../../amish-contracts/dependencies/forge-std-1.16.1/src/"],"viaIR":true},"sources":{"amish-contracts/src/interfaces/IAmishOracle.sol":{"keccak256":"0x48aea1456791d3f8a6dda9b09d43dc6f2b948ea006d845b4f8d9163af02fc906","license":"MIT","content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.30;\n\n/// @title IAmishOracle\n/// @notice Oracle-agnostic price interface. Adapters wrap concrete sources\n///         (Chainlink, Pyth, TWAP, …) behind this interface; anyone can deploy new adapters.\n/// @dev The adapter must live on the principal chain — the health factor is computed on-chain at\n///      liquidation and margin-call time, so the price must be readable directly. Treat this\n///      signature as a stable external interface.\ninterface IAmishOracle {\n    /// @notice Fixed number of decimals the adapter's price is scaled by (Chainlink-style, e.g. 8).\n    ///         Constant per adapter; consumers rebase with this plus the two tokens' own decimals.\n    function decimals() external view returns (uint8);\n\n    /// @notice Price of one *whole* `collateralToken` denominated in *whole* `principalToken`, scaled\n    ///         by `10 ** decimals()`. Independent of the ERC-20s' own decimals (those are applied by\n    ///         the consumer). E.g. WBTC at 100,000 USDC with 8 price-decimals returns 100_000e8.\n    /// @param collateralToken The collateral asset.\n    /// @param principalToken The loan asset the price is quoted in.\n    /// @return price Whole-collateral price in whole-principal units, at `10 ** decimals()` scale.\n    /// @return updatedAt Unix timestamp of the underlying feed's last update (staleness check).\n    function getPrice(address collateralToken, address principalToken)\n        external\n        view\n        returns (uint256 price, uint256 updatedAt);\n}\n"},"amish-contracts/test/mocks/MockOracle.sol":{"keccak256":"0x2994c402f8650d95e5206b1fb34661c5ba235fc47850882a2627195093b9dc37","license":"MIT","content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.30;\n\nimport {IAmishOracle} from \"../../src/interfaces/IAmishOracle.sol\";\n\n/// @dev Configurable price feed for tests. Returns one price/timestamp for any token pair, at a fixed\n///      number of price decimals (Chainlink-style, default 8).\ncontract MockOracle is IAmishOracle {\n    uint256 public price;\n    uint256 public updatedAt;\n    uint8 public priceDecimals;\n    bool public revertOnGetPrice;\n    bool public revertOnDecimals;\n\n    constructor(uint256 price_, uint256 updatedAt_) {\n        price = price_;\n        updatedAt = updatedAt_;\n        priceDecimals = 8;\n    }\n\n    function set(uint256 price_, uint256 updatedAt_) external {\n        price = price_;\n        updatedAt = updatedAt_;\n    }\n\n    function setDecimals(uint8 decimals_) external {\n        priceDecimals = decimals_;\n    }\n\n    /// @dev Simulate a dead adapter: make the selected calls revert outright (harder failure than a\n    ///      stale timestamp, which {set} can already express).\n    function setReverts(bool getPrice_, bool decimals_) external {\n        revertOnGetPrice = getPrice_;\n        revertOnDecimals = decimals_;\n    }\n\n    function decimals() external view returns (uint8) {\n        if (revertOnDecimals) revert(\"MockOracle: decimals dead\");\n        return priceDecimals;\n    }\n\n    function getPrice(address, address) external view returns (uint256, uint256) {\n        if (revertOnGetPrice) revert(\"MockOracle: feed dead\");\n        return (price, updatedAt);\n    }\n}\n"}},"version":1}