Files
smom-dbis-138/contracts/reserve/ReserveConversionPriceAdapter.sol
defiQUG 11c97777d4
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m11s
CI/CD Pipeline / Security Scanning (push) Has been cancelled
CI/CD Pipeline / Lint and Format (push) Has been cancelled
CI/CD Pipeline / Terraform Validation (push) Has been cancelled
CI/CD Pipeline / Kubernetes Validation (push) Has been cancelled
Validation / validate-genesis (push) Has been cancelled
Validation / validate-terraform (push) Has been cancelled
Validation / validate-kubernetes (push) Has been cancelled
Validation / validate-smart-contracts (push) Has been cancelled
Validation / validate-security (push) Has been cancelled
Validation / validate-documentation (push) Has been cancelled
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 1m4s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 31s
OMNL reconcile anchor / Run omnl:reconcile and upload artifacts (push) Failing after 29s
Verify Deployment / Verify Deployment (push) Failing after 57s
feat(chain138): Monad CCIP, token aggregation OMNL gates, HYBX client, and PMM deploy updates.
Relay router, reserve system, oracle publisher, token-aggregation compliance middleware, and Monad deployment scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 00:11:33 -07:00

29 lines
1.0 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {IReserveSystem} from "./IReserveSystem.sol";
/// @notice Live-chain shim: corrects inverted getConversionPrice on deployed ReserveSystem.
/// @dev DODOPMMIntegration only reads getPrice / getConversionPrice from the wired address.
contract ReserveConversionPriceAdapter {
IReserveSystem public immutable underlying;
constructor(address underlying_) {
require(underlying_ != address(0), "ReserveConversionPriceAdapter: zero underlying");
underlying = IReserveSystem(underlying_);
}
function getConversionPrice(
address sourceAsset,
address targetAsset
) external view returns (uint256) {
(uint256 sourcePrice,) = underlying.getPrice(sourceAsset);
(uint256 targetPrice,) = underlying.getPrice(targetAsset);
return (sourcePrice * 1e18) / targetPrice;
}
function getPrice(address asset) external view returns (uint256 price, uint256 timestamp) {
return underlying.getPrice(asset);
}
}