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/brBTCRawBTCExchangeRateChainlinkAdapter.sol": {
"content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
// Reference: https://github.com/morpho-org/morpho-blue-oracles/blob/main/src/wsteth-exchange-rate-adapter/interfaces/MinimalAggregatorV3Interface.sol
interface IMorphoMinimalAggregatorV3 {
function decimals() external view returns (uint8);
function latestRoundData()
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}
interface IBrBTCRate {
function getRate() external pure returns (uint256);
}
// Reference: https://github.com/morpho-org/morpho-blue-oracles/blob/main/src/wsteth-exchange-rate-adapter/WstEthStEthExchangeRateChainlinkAdapter.sol
contract brBTCRawBTCExchangeRateChainlinkAdapter is IMorphoMinimalAggregatorV3 {
uint8 public constant decimals = 8;
string public constant description = "brBTC/BTC exchange rate";
address public immutable brBTCRate;
constructor(address _brBTCRate) {
brBTCRate = _brBTCRate;
}
function latestRoundData() external view returns (uint80, int256, uint256, uint256, uint80) {
return (0, int256(IBrBTCRate(brBTCRate).getRate()), 0, 0, 0);
}
}
"
}
},
"settings": {
"remappings": [
"@openzeppelin/contracts/=lib/OpenZeppelin/openzeppelin-contracts@4.8.3/contracts/",
"@openzeppelin/contracts-upgradeable/=lib/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.3/contracts/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"OpenZeppelin/=lib/OpenZeppelin/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "london",
"viaIR": false
}
}}
Submitted on: 2025-10-29 11:34:27
Comments
Log in to comment.
No comments yet.