Description:
Smart contract deployed on Ethereum with Factory, Oracle features.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"contracts/v2/oracle/priceFeeds/TermMaxWeETHPriceCapAdapter.sol": {
"content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;
import {IPriceCapAdapter} from "contracts/v2/extensions/aave/IPriceCapAdapter.sol";
/**
* @title TermMaxWeETHPriceCapAdapter
* @notice Adapter that wraps Aave's WeETHPriceCapAdapter to provide Chainlink-like interface
* @dev Converts Aave's latestAnswer() to Chainlink's latestRoundData() format
*/
contract TermMaxWeETHPriceCapAdapter {
IPriceCapAdapter public immutable adapter;
uint8 private immutable _decimals;
constructor(address _aaveWeETHPriceCapAdapter) {
adapter = IPriceCapAdapter(_aaveWeETHPriceCapAdapter);
_decimals = adapter.decimals();
}
function latestRoundData()
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
{
answer = adapter.latestAnswer();
startedAt = block.timestamp;
updatedAt = block.timestamp;
}
function decimals() external view returns (uint8) {
return _decimals;
}
function description() external view returns (string memory) {
return adapter.description();
}
}
"
},
"contracts/v2/extensions/aave/IPriceCapAdapter.sol": {
"content": "// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
interface IPriceCapAdapter {
function latestAnswer() external view returns (int256);
function decimals() external view returns (uint8);
function description() external view returns (string memory);
}
"
}
},
"settings": {
"remappings": [
"@chainlink/=dependencies/@chainlink-contracts-v1.12.0/",
"@morpho/=dependencies/metamorpho-1.0.0/",
"@openzeppelin/contracts-upgradeable/=dependencies/@openzeppelin-contracts-upgradeable-5.2.0/",
"@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-5.2.0/",
"@pendle/core-v2/=dependencies/pendle-core-v2-1.0.0/",
"@uniswap/v3-core/=dependencies/@uniswap-v3-core-1.0.2-solc-0.8-simulate/",
"@uniswap/v3-periphery/=dependencies/@uniswap-v3-periphery-1.4.4/",
"forge-std/=dependencies/forge-std-1.9.6/src/",
"@chainlink-contracts-1.2.0/=dependencies/@chainlink-contracts-1.2.0/src/",
"@chainlink-contracts-v1.12.0/=dependencies/@chainlink-contracts-v1.12.0/integration-tests/contracts/ethereum/src/",
"@openzeppelin-contracts-5.2.0/=dependencies/@openzeppelin-contracts-5.2.0/",
"@openzeppelin-contracts-upgradeable-5.2.0/=dependencies/@openzeppelin-contracts-upgradeable-5.2.0/",
"@uniswap-v3-core-1.0.2-solc-0.8-simulate/=dependencies/@uniswap-v3-core-1.0.2-solc-0.8-simulate/contracts/",
"@uniswap-v3-periphery-1.4.4/=dependencies/@uniswap-v3-periphery-1.4.4/contracts/",
"forge-std-1.9.6/=dependencies/forge-std-1.9.6/src/",
"metamorpho-1.0.0/=dependencies/metamorpho-1.0.0/src/",
"pendle-core-v2-1.0.0/=dependencies/pendle-core-v2-1.0.0/contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": true
}
}}
Submitted on: 2025-10-29 14:56:06
Comments
Log in to comment.
No comments yet.