Description:
Smart contract deployed on Ethereum with Factory, Oracle features.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
/**
* @title FixedPegOracleSLTR
* @notice Static price oracle returning $1.00 with 8 decimals.
* @dev Does NOT inherit interfaces to avoid Remix/ethers.js deployment issues.
*/
contract FixedPegOracleSLTR {
function decimals() external pure returns (uint8) {
return 8;
}
function description() external pure returns (string memory) {
return "SLTR / USD Oracle (Fixed at $1.00)";
}
function version() external pure returns (uint256) {
return 1;
}
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
)
{
return (
1,
1e8,
block.timestamp,
block.timestamp,
1
);
}
function getRoundData(uint80 _roundId)
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
)
{
return (
_roundId,
1e8,
block.timestamp,
block.timestamp,
_roundId
);
}
}
Submitted on: 2025-10-25 14:43:35
Comments
Log in to comment.
No comments yet.