FRAX Price: $0.91 (-0.00%)

Contract

0x35d6c8800335c739cadE2c66bE822D0A0057A7dF

Overview

FRAX Balance | FXTL Balance

0 FRAX | 26 FXTL

FRAX Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

1 Internal Transaction and > 10 Token Transfers found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
230284292025-07-18 19:39:29193 days ago1752867569  Contract Creation0 FRAX

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Oracle

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 200 runs

Other Settings:
shanghai EvmVersion
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.25;

import "../interfaces/utils/IOracle.sol";

contract Oracle is IOracle {
    /// @inheritdoc IOracle
    bytes32 public constant SET_VALUE_ROLE = keccak256("ORACLE:SET_VALUE_ROLE");
    /// @inheritdoc IOracle
    bytes32 public constant SET_MAX_AGE_ROLE = keccak256("ORACLE:SET_MAX_AGE_ROLE");

    /// @inheritdoc IOracle
    address public immutable core;
    /// @inheritdoc IOracle
    uint256 public value;
    /// @inheritdoc IOracle
    uint256 public lastUpdated;
    /// @inheritdoc IOracle
    uint256 public maxAge;

    constructor(address core_, uint256 initialValue_, uint256 initialMaxAge_) {
        core = core_;
        value = initialValue_;
        lastUpdated = block.timestamp;
        maxAge = initialMaxAge_;
    }

    modifier onlyRole(bytes32 role) {
        if (!IAccessControl(core).hasRole(role, msg.sender)) {
            revert("Oracle: forbidden");
        }
        _;
    }

    /// @inheritdoc IOracle
    function getValue() public view returns (uint256) {
        if (lastUpdated + maxAge < block.timestamp) {
            revert("Oracle: stale value");
        }
        return value;
    }

    /// @inheritdoc IOracle
    function setMaxAge(uint256 maxAge_) external onlyRole(SET_MAX_AGE_ROLE) {
        maxAge = maxAge_;
        emit MaxAgeSet(maxAge_);
    }

    /// @inheritdoc IOracle
    function setValue(uint256 value_) external onlyRole(SET_VALUE_ROLE) {
        value = value_;
        uint256 timestamp = block.timestamp;
        lastUpdated = timestamp;
        emit ValueSet(value_, timestamp);
    }
}

// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.8.25;

import "@openzeppelin/contracts/access/IAccessControl.sol";

/**
 * @title IOracle
 * @dev Interface for the Oracle contract, responsible for providing and managing asset price data.
 *
 * The Oracle contract implements role-based access control for setting and modifying asset values,
 * ensuring only authorized addresses can update the price or adjust the maximum data age.
 */
interface IOracle {
    /**
     * @notice Role identifier for setting the asset value.
     */
    function SET_VALUE_ROLE() external view returns (bytes32);

    /**
     * @notice Role identifier for setting the maximum allowable data age.
     */
    function SET_MAX_AGE_ROLE() external view returns (bytes32);

    /**
     * @notice Returns the address of the core contract with administrative control.
     */
    function core() external view returns (address);

    /**
     * @notice Returns the current stored value (asset price or data).
     */
    function value() external view returns (uint256);

    /**
     * @notice Returns the timestamp of the last update to the asset value.
     */
    function lastUpdated() external view returns (uint256);

    /**
     * @notice Returns the maximum allowed age (in seconds) before data is considered stale.
     */
    function maxAge() external view returns (uint256);

    /**
     * @notice Returns the current asset value if the data is valid and not stale.
     * @dev Reverts if the data is older than the `maxAge` threshold.
     */
    function getValue() external view returns (uint256);

    /**
     * @notice Updates the maximum allowable data age for the Oracle contract.
     * @dev Can only be called by an address with the `ORACLE:SET_MAX_AGE_ROLE`.
     * @param maxAge_ The new maximum age in seconds.
     */
    function setMaxAge(uint256 maxAge_) external;

    /**
     * @notice Updates the stored asset value.
     * @dev Can only be called by an address with the `ORACLE:SET_VALUE_ROLE`.
     * @param value_ The new asset value.
     */
    function setValue(uint256 value_) external;

    /**
     * @notice Emitted when the maximum data age is updated.
     * @param maxAge The new maximum age value in seconds.
     */
    event MaxAgeSet(uint256 indexed maxAge);

    /**
     * @notice Emitted when the asset value is updated.
     * @param value The new asset value.
     * @param timestamp The timestamp when the value was updated.
     */
    event ValueSet(uint256 indexed value, uint256 indexed timestamp);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC-165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).
     * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

Settings
{
  "remappings": [
    "@layerzerolabs/oft-evm/=lib/devtools/packages/oft-evm/",
    "@layerzerolabs/oapp-evm/=lib/devtools/packages/oapp-evm/",
    "@layerzerolabs/lz-evm-protocol-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/protocol/",
    "@layerzerolabs/test-devtools-evm-foundry/=lib/devtools/packages/test-devtools-evm-foundry/",
    "@layerzerolabs/lz-evm-messagelib-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/messagelib/",
    "solidity-bytes-utils/=lib/solidity-bytes-utils/",
    "@layerzerolabs/lz-evm-v1-0.7/=lib/layerzero-v1/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@mellow-finance/simple-lrt/=lib/simple-lrt/src/",
    "@eigenlayer-interfaces/=lib/simple-lrt/src/interfaces/external/eigen-layer/",
    "@symbiotic/burners/=lib/simple-lrt/lib/burners/src/",
    "@symbiotic/core-test/=lib/simple-lrt/lib/core/test/",
    "@symbiotic/core/=lib/simple-lrt/lib/core/src/",
    "@symbiotic/rewards/=lib/simple-lrt/lib/rewards/src/",
    "@symbioticfi/core/=lib/simple-lrt/lib/burners/lib/core/",
    "burners/=lib/simple-lrt/lib/burners/",
    "core/=lib/simple-lrt/lib/core/",
    "devtools/=lib/devtools/packages/toolbox-foundry/src/",
    "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
    "layerzero-v1/=lib/layerzero-v1/contracts/",
    "layerzero-v2/=lib/layerzero-v2/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "rewards/=lib/simple-lrt/lib/rewards/",
    "simple-lrt/=lib/simple-lrt/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"core_","type":"address"},{"internalType":"uint256","name":"initialValue_","type":"uint256"},{"internalType":"uint256","name":"initialMaxAge_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"maxAge","type":"uint256"}],"name":"MaxAgeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ValueSet","type":"event"},{"inputs":[],"name":"SET_MAX_AGE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_VALUE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"core","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxAge_","type":"uint256"}],"name":"setMaxAge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"setValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"value","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a0604052348015600e575f80fd5b5060405161056c38038061056c833981016040819052602b916046565b6001600160a01b039092166080525f55426001556002556083565b5f805f606084860312156057575f80fd5b83516001600160a01b0381168114606c575f80fd5b602085015160409095015190969495509392505050565b6080516104c36100a95f395f81816101440152818161021d015261034701526104c35ff3fe608060405234801561000f575f80fd5b5060043610610090575f3560e01c8063552410771161006357806355241077146101055780635ae28fc91461011a578063687043c51461012d578063d0b06f5d14610136578063f2f4eb261461013f575f80fd5b80632096525514610094578063243ddf27146100af5780633fa4f245146100d657806343a642c3146100de575b5f80fd5b61009c61017e565b6040519081526020015b60405180910390f35b61009c7f7bbf9aef3d31793416726c26f176c7819dc8835894f672164a8c307f65407b2e81565b61009c5f5481565b61009c7fa9146fff3103c7a809874c345ee6b6c99f1d8c7b9043121571b2a4f2bb2557a081565b61011861011336600461042b565b6101df565b005b61011861012836600461042b565b610309565b61009c60025481565b61009c60015481565b6101667f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100a6565b5f426002546001546101909190610442565b10156101d95760405162461bcd60e51b81526020600482015260136024820152724f7261636c653a207374616c652076616c756560681b60448201526064015b60405180910390fd5b505f5490565b604051632474521560e21b81527fa9146fff3103c7a809874c345ee6b6c99f1d8c7b9043121571b2a4f2bb2557a060048201819052336024830152907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906391d1485490604401602060405180830381865afa15801561026a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028e9190610467565b6102ce5760405162461bcd60e51b815260206004820152601160248201527027b930b1b6329d103337b93134b23232b760791b60448201526064016101d0565b5f8281554260018190556040519091829185917f69be06033bef8d755e18606a27d6d07393aabbd1800776e503af2c8a03b7c68191a3505050565b604051632474521560e21b81527f7bbf9aef3d31793416726c26f176c7819dc8835894f672164a8c307f65407b2e60048201819052336024830152907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906391d1485490604401602060405180830381865afa158015610394573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103b89190610467565b6103f85760405162461bcd60e51b815260206004820152601160248201527027b930b1b6329d103337b93134b23232b760791b60448201526064016101d0565b600282905560405182907f6777d8e4257e9f6a86d2f91b2b9fceaeb931d8b35249fbb63203c2dc0c081870905f90a25050565b5f6020828403121561043b575f80fd5b5035919050565b8082018082111561046157634e487b7160e01b5f52601160045260245ffd5b92915050565b5f60208284031215610477575f80fd5b81518015158114610486575f80fd5b939250505056fea2646970667358221220ff9e517fd9c1a55f49d34d6215ca63e6b87d9b720391da0b0fec6b280582fb5f64736f6c6343000819003300000000000000000000000024dd1eabead7b3cb07b7d162439ec0a4eec703df0000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000127500

Deployed Bytecode

0x608060405234801561000f575f80fd5b5060043610610090575f3560e01c8063552410771161006357806355241077146101055780635ae28fc91461011a578063687043c51461012d578063d0b06f5d14610136578063f2f4eb261461013f575f80fd5b80632096525514610094578063243ddf27146100af5780633fa4f245146100d657806343a642c3146100de575b5f80fd5b61009c61017e565b6040519081526020015b60405180910390f35b61009c7f7bbf9aef3d31793416726c26f176c7819dc8835894f672164a8c307f65407b2e81565b61009c5f5481565b61009c7fa9146fff3103c7a809874c345ee6b6c99f1d8c7b9043121571b2a4f2bb2557a081565b61011861011336600461042b565b6101df565b005b61011861012836600461042b565b610309565b61009c60025481565b61009c60015481565b6101667f00000000000000000000000024dd1eabead7b3cb07b7d162439ec0a4eec703df81565b6040516001600160a01b0390911681526020016100a6565b5f426002546001546101909190610442565b10156101d95760405162461bcd60e51b81526020600482015260136024820152724f7261636c653a207374616c652076616c756560681b60448201526064015b60405180910390fd5b505f5490565b604051632474521560e21b81527fa9146fff3103c7a809874c345ee6b6c99f1d8c7b9043121571b2a4f2bb2557a060048201819052336024830152907f00000000000000000000000024dd1eabead7b3cb07b7d162439ec0a4eec703df6001600160a01b0316906391d1485490604401602060405180830381865afa15801561026a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028e9190610467565b6102ce5760405162461bcd60e51b815260206004820152601160248201527027b930b1b6329d103337b93134b23232b760791b60448201526064016101d0565b5f8281554260018190556040519091829185917f69be06033bef8d755e18606a27d6d07393aabbd1800776e503af2c8a03b7c68191a3505050565b604051632474521560e21b81527f7bbf9aef3d31793416726c26f176c7819dc8835894f672164a8c307f65407b2e60048201819052336024830152907f00000000000000000000000024dd1eabead7b3cb07b7d162439ec0a4eec703df6001600160a01b0316906391d1485490604401602060405180830381865afa158015610394573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103b89190610467565b6103f85760405162461bcd60e51b815260206004820152601160248201527027b930b1b6329d103337b93134b23232b760791b60448201526064016101d0565b600282905560405182907f6777d8e4257e9f6a86d2f91b2b9fceaeb931d8b35249fbb63203c2dc0c081870905f90a25050565b5f6020828403121561043b575f80fd5b5035919050565b8082018082111561046157634e487b7160e01b5f52601160045260245ffd5b92915050565b5f60208284031215610477575f80fd5b81518015158114610486575f80fd5b939250505056fea2646970667358221220ff9e517fd9c1a55f49d34d6215ca63e6b87d9b720391da0b0fec6b280582fb5f64736f6c63430008190033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000024dd1eabead7b3cb07b7d162439ec0a4eec703df0000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000127500

-----Decoded View---------------
Arg [0] : core_ (address): 0x24dD1eaBEad7b3cB07b7d162439ec0A4EEC703DF
Arg [1] : initialValue_ (uint256): 1000000000000000000
Arg [2] : initialMaxAge_ (uint256): 1209600

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000024dd1eabead7b3cb07b7d162439ec0a4eec703df
Arg [1] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000127500


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.