ETH Price: $2,062.58 (-0.66%)
Gas: 0.03 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

ContractCreator

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Accept Ownership242426232026-01-15 20:52:2330 days ago1768510343IN
0x142b6f8F...081E0f57b
0 ETH0.000002470.08807123
Transfer Ownersh...242425422026-01-15 20:36:1130 days ago1768509371IN
0x142b6f8F...081E0f57b
0 ETH0.000004440.09261469
Set Internal Pri...242425412026-01-15 20:35:5930 days ago1768509359IN
0x142b6f8F...081E0f57b
0 ETH0.000006530.09458078

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OracleAdapterV2

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: MIT

pragma solidity 0.8.26;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@openzeppelin/contracts/utils/Multicall.sol";

interface IPyth {
    struct Price {
        int64 price;
        uint64 conf;
        int32 expo;
        uint64 publishTime;
    }

    function getPriceUnsafe(bytes32 id) external view returns (Price memory);
}

// OracleAdapterV2 wraps Pyth with an internal price feed so PolicyManager has a simple price source.
// Tries Pyth first, then uses internal price if Pyth is unavailable.
// Strict mode lets PolicyManager enforce freshness only when collateral ratio actually needs it.
// V2: Converts STRC price to BUCK price (STRC/100) and handles Pyth reverts gracefully.
contract OracleAdapterV2 is Ownable2Step, Multicall {
    error ZeroAddress();
    error UnauthorizedStrictModeAccess();
    error UnauthorizedPriceUpdate();
    error RenounceOwnershipDisabled();

    event PythConfigured(
        address indexed contractAddress,
        bytes32 indexed priceId,
        uint256 staleAfter,
        uint256 maxConf
    );
    event InternalPriceUpdated(uint256 price, uint256 updatedAt);
    event StrictModeUpdated(bool strictMode);
    event PolicyManagerUpdated(address indexed policyManager);
    event PriceUpdaterUpdated(address indexed priceUpdater);

    // STRC to BUCK conversion divisor (BUCK = STRC / 100)
    uint256 public constant STRC_DIVISOR = 100;

    // Strict mode toggles freshness enforcement; off when CR ≥ 1 so prices are optional.
    bool public strictMode;

    // PolicyManager address that can automatically toggle strict mode based on CR
    address public policyManager;

    // Hot wallet that can update internal price quickly during stress (CR < 1)
    address public priceUpdater;

    // Primary oracle (Pyth) plus config for staleness + acceptable confidence interval.
    address public pythContract;
    bytes32 public pythPriceId;
    uint256 public pythStaleAfter;
    uint256 public pythMaxConf;

    // Internal price if Pyth feed fails, plus bookkeeping for update timing.
    uint256 private _internalPrice;
    uint256 private _internalUpdatedAt;

    // Deployment wires in the owner (typically the multisig) so it can configure feeds.
    constructor(address initialOwner) Ownable(initialOwner) {
        if (initialOwner == address(0)) revert ZeroAddress();
    }

    // Configure the Pyth feed for primary oracle price source.
    function configurePyth(address pyth, bytes32 priceId, uint256 staleAfter, uint256 maxConf)
        external
        onlyOwner
    {
        if (pyth == address(0) || priceId == bytes32(0)) revert ZeroAddress();
        pythContract = pyth;
        pythPriceId = priceId;
        pythStaleAfter = staleAfter;
        pythMaxConf = maxConf;
        emit PythConfigured(pyth, priceId, staleAfter, maxConf);
    }

    // Set hot wallet that can update internal price quickly during stress periods
    function setPriceUpdater(address _priceUpdater) external onlyOwner {
        priceUpdater = _priceUpdater;
        emit PriceUpdaterUpdated(_priceUpdater);
    }

    // Internal price used when Pyth feed fails. Owner or priceUpdater can update.
    function setInternalPrice(uint256 price) external {
        if (msg.sender != owner() && msg.sender != priceUpdater) {
            revert UnauthorizedPriceUpdate();
        }
        _internalPrice = price;
        _internalUpdatedAt = block.timestamp;
        emit InternalPriceUpdated(price, block.timestamp);
    }

    // Set PolicyManager address that can automatically toggle strict mode
    function setPolicyManager(address _policyManager) external onlyOwner {
        if (_policyManager == address(0)) revert ZeroAddress();
        policyManager = _policyManager;
        emit PolicyManagerUpdated(_policyManager);
    }

    // Allow PolicyManager to automatically toggle strict mode on-chain based on CR.
    // Only owner or PolicyManager can call this to prevent manipulation.
    function setStrictMode(bool enabled) external {
        if (msg.sender != owner() && msg.sender != policyManager) {
            revert UnauthorizedStrictModeAccess();
        }
        // Only update and emit if value changes to avoid unnecessary events
        if (strictMode != enabled) {
            strictMode = enabled;
            emit StrictModeUpdated(enabled);
        }
    }

    // Returns the freshest price we can find, trying Pyth → internal in order.
    // Always scales to 18 decimals so downstream math is consistent.
    function latestPrice() external view returns (uint256 price, uint256 updatedAt) {
        return _latestPrice();
    }

    // Internal helper for price lookup (avoids external self-call overhead)
    function _latestPrice() internal view returns (uint256 price, uint256 updatedAt) {
        (price, updatedAt) = _tryPyth();
        if (price != 0) return (price, updatedAt);
        return (_internalPrice, _internalUpdatedAt);
    }

    // PolicyManager calls this before trusting CAP pricing; enforces freshness only in strict mode.
    // Returns true in healthy mode so the oracle can go stale without blocking normal operations.
    function isHealthy(uint256 maxStale) external view returns (bool) {
        // When not in strict mode (CR ≥ 1.0), oracle health doesn't matter
        // CAP price = $1.00 regardless of oracle state
        if (!strictMode) {
            return true;
        }

        // In strict mode (CR < 1.0), oracle MUST be fresh for CAP pricing
        (uint256 price, uint256 updatedAt) = _latestPrice();
        if (price == 0 || updatedAt == 0) return false;
        return block.timestamp <= updatedAt + maxStale;
    }

    // Internal helper: read Pyth, enforce publish window + confidence bound, scale to 18 decimals.
    // V2: Wraps in try-catch and divides by STRC_DIVISOR to convert STRC price to BUCK price.
    function _tryPyth() internal view returns (uint256 price, uint256 updatedAt) {
        if (pythContract == address(0) || pythPriceId == bytes32(0)) return (0, 0);

        try IPyth(pythContract).getPriceUnsafe(pythPriceId) returns (IPyth.Price memory p) {
            if (p.price <= 0) return (0, 0);
            if (pythStaleAfter != 0 && block.timestamp > p.publishTime + pythStaleAfter) {
                return (0, 0);
            }
            if (pythMaxConf != 0 && p.conf > 0) {
                uint256 scaledConf = _scalePythConfidence(p);
                // Accept extremely small confidence that scales to zero; only reject when above max
                if (scaledConf > pythMaxConf) {
                    return (0, 0);
                }
            }

            uint256 strcPrice = _scalePythPrice(p);
            if (strcPrice == 0) return (0, 0);

            // V2: Convert STRC price to BUCK price
            uint256 buckPrice = strcPrice / STRC_DIVISOR;
            return (buckPrice, p.publishTime);
        } catch {
            // Pyth reverted - fall through to internal price
            return (0, 0);
        }
    }

    // Scale Pyth's signed price into a plain uint in 18-decimal format.
    function _scalePythPrice(IPyth.Price memory p) private pure returns (uint256) {
        int256 signed = int256(p.price);
        if (signed <= 0) return 0;

        uint256 value = uint256(signed);
        return _scalePythValue(value, p.expo);
    }

    // Same deal for Pyth confidence interval values.
    function _scalePythConfidence(IPyth.Price memory p) private pure returns (uint256) {
        if (p.conf == 0) return 0;
        return _scalePythValue(uint256(p.conf), p.expo);
    }

    // Generic scaler for Pyth numbers, guarding against wild exponents and overflow.
    function _scalePythValue(uint256 value, int32 expo) private pure returns (uint256) {
        int256 exp = int256(expo) + 18;
        // Mirror canonical Pyth SDK bounds (+/- 58)
        if (exp > 58 || exp < -58) return 0;

        if (exp >= 0) {
            uint256 pow = 10 ** uint256(exp);
            return value * pow;
        } else {
            uint256 pow = 10 ** uint256(-exp);
            return value / pow;
        }
    }

    /// @notice Ownership renunciation is disabled to prevent accidental lockout
    /// @dev OracleAdapter requires ongoing governance for price feed configuration
    function renounceOwnership() public pure override {
        revert RenounceOwnershipDisabled();
    }
}

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

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

pragma solidity ^0.8.20;

import {Ownable} from "./Ownable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is specified at deployment time in the constructor for `Ownable`. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        return _pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        if (pendingOwner() != sender) {
            revert OwnableUnauthorizedAccount(sender);
        }
        _transferOwnership(sender);
    }
}

File 4 of 6 : Multicall.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Multicall.sol)

pragma solidity ^0.8.20;

import {Address} from "./Address.sol";
import {Context} from "./Context.sol";

/**
 * @dev Provides a function to batch together multiple calls in a single external call.
 *
 * Consider any assumption about calldata validation performed by the sender may be violated if it's not especially
 * careful about sending transactions invoking {multicall}. For example, a relay address that filters function
 * selectors won't filter calls nested within a {multicall} operation.
 *
 * NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {_msgSender}).
 * If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data`
 * to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of
 * {_msgSender} are not propagated to subcalls.
 */
abstract contract Multicall is Context {
    /**
     * @dev Receives and executes a batch of function calls on this contract.
     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall
     */
    function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) {
        bytes memory context = msg.sender == _msgSender()
            ? new bytes(0)
            : msg.data[msg.data.length - _contextSuffixLength():];

        results = new bytes[](data.length);
        for (uint256 i = 0; i < data.length; i++) {
            results[i] = Address.functionDelegateCall(address(this), bytes.concat(data[i], context));
        }
        return results;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/openzeppelin-contracts-upgradeable/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/lib/halmos-cheatcodes/src/",
    "murky/=lib/murky/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": true
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"RenounceOwnershipDisabled","type":"error"},{"inputs":[],"name":"UnauthorizedPriceUpdate","type":"error"},{"inputs":[],"name":"UnauthorizedStrictModeAccess","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"InternalPriceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"policyManager","type":"address"}],"name":"PolicyManagerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"priceUpdater","type":"address"}],"name":"PriceUpdaterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":true,"internalType":"bytes32","name":"priceId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"staleAfter","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxConf","type":"uint256"}],"name":"PythConfigured","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"strictMode","type":"bool"}],"name":"StrictModeUpdated","type":"event"},{"inputs":[],"name":"STRC_DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pyth","type":"address"},{"internalType":"bytes32","name":"priceId","type":"bytes32"},{"internalType":"uint256","name":"staleAfter","type":"uint256"},{"internalType":"uint256","name":"maxConf","type":"uint256"}],"name":"configurePyth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxStale","type":"uint256"}],"name":"isHealthy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestPrice","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"policyManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceUpdater","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pythContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pythMaxConf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pythPriceId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pythStaleAfter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setInternalPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_policyManager","type":"address"}],"name":"setPolicyManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_priceUpdater","type":"address"}],"name":"setPriceUpdater","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setStrictMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strictMode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60803460c157601f610dab38819003918201601f19168301916001600160401b0383118484101760c55780849260209460405283398101031260c157516001600160a01b0381169081900360c157801560ae57600180546001600160a01b03199081169091555f80549182168317815560405192916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3610cd190816100da8239f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f3560e01c9081633b21f9b61461082357508063567c814b146107fb5780636fe50d1b146107e0578063715018a6146107c15780637418fc5c1461079c57806379ba50971461071c57806382ac64a0146106ff57806386ef40c01461064d5780638a32ada0146106255780638da5cb5b146105fe57806397c4a5f314610598578063a3d2a6b3146104f6578063a3e6ba94146104d0578063ab3dbf3b146104a8578063ac9650d81461027a578063adde41e114610203578063e250b7b9146101e6578063e30c3978146101be578063e4ea36f0146101a1578063f2fde38b1461012f5763fc612a8d14610103575f80fd5b3461012b575f36600319011261012b576003546040516001600160a01b039091168152602090f35b5f80fd5b3461012b57602036600319011261012b576101486108aa565b6101506109aa565b60018060a01b0316806bffffffffffffffffffffffff60a01b600154161760015560018060a01b035f54167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227005f80a3005b3461012b575f36600319011261012b576020600554604051908152f35b3461012b575f36600319011261012b576001546040516001600160a01b039091168152602090f35b3461012b575f36600319011261012b576020600754604051908152f35b3461012b57602036600319011261012b5761021c6108aa565b6102246109aa565b6001600160a01b0316801561026b57600280546001600160a01b031916821790557f5106d9fe21e5ccaebfff5e5b6191d80ca628c317ef02f88ec6abbc39e505f6c35f80a2005b63d92e233d60e01b5f5260045ffd5b3461012b57602036600319011261012b5760043567ffffffffffffffff811161012b573660238201121561012b5780600401359067ffffffffffffffff821161012b573660248360051b8301011161012b579060206040516102dc8282610928565b5f815281810190601f1983013683376102f48461094a565b946103026040519687610928565b848652601f196103118661094a565b015f5b8181106104995750503681900360421901905f5b868110156104255760248160051b830101358381121561012b57820160248101359067ffffffffffffffff821161012b5760440190803603821361012b575f918761039d84938b6040519382859383850197883783018281018881528d519283915e010185815203601f198101835282610928565b5190305af4903d15610417573d9167ffffffffffffffff8311610403576040516001936103e792906103d8601f8201601f19168c0184610928565b82523d5f8b84013e5b30610b77565b6103f1828b610962565b526103fc818a610962565b5001610328565b634e487b7160e01b5f52604160045260245ffd5b6103e76001926060906103e1565b6040805187815289518189018190525f92600582901b83018101918c8b01918b9085015b8287106104565785850386f35b90919293828080600193603f198a82030186528189518051918291828552018484015e5f838284010152601f801991011601019601920196019592919092610449565b60608882018701528501610314565b3461012b575f36600319011261012b576002546040516001600160a01b039091168152602090f35b3461012b575f36600319011261012b5760406104ea61098a565b82519182526020820152f35b3461012b57608036600319011261012b5761050f6108aa565b60243590604435606435916105226109aa565b6001600160a01b03169182158015610590575b61026b577f24b97f0a837e17acd5fad3adeadcf5957c7b5c6421c8002728d9fe906dc9e8f491604091846bffffffffffffffffffffffff60a01b600454161760045585600555816006558060075582519182526020820152a3005b508315610535565b3461012b57602036600319011261012b576105b16108aa565b6105b96109aa565b600380546001600160a01b0319166001600160a01b039290921691821790557fe3c274bc2bbd115f11eef1049298117ee17a1a81ac53a1f8c16c528c208993665f80a2005b3461012b575f36600319011261012b575f546040516001600160a01b039091168152602090f35b3461012b575f36600319011261012b576004546040516001600160a01b039091168152602090f35b3461012b57602036600319011261012b5760043580151580910361012b575f546001600160a01b0316331415806106ea575b6106db576001548160ff8260a01c1615150361069757005b60ff60a01b191660a082901b60ff60a01b16176001556040519081527fe33f145d527913d1dc4c29a3b0690149220a71017a73efeabd140e356f2b3c4990602090a1005b630ae2803360e01b5f5260045ffd5b506002546001600160a01b031633141561067f565b3461012b575f36600319011261012b576020600654604051908152f35b3461012b575f36600319011261012b57600154336001600160a01b03821603610789576001600160a01b03199081166001555f805433928116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b63118cdaa760e01b5f523360045260245ffd5b3461012b575f36600319011261012b57602060ff60015460a01c166040519015158152f35b3461012b575f36600319011261012b5763ffc0fd9360e01b5f5260045ffd5b3461012b575f36600319011261012b57602060405160648152f35b3461012b57602036600319011261012b5760206108196004356108e1565b6040519015158152f35b3461012b57602036600319011261012b5760043560018060a01b035f541633141580610895575b610886577ff51dad9a86846dbeb04c4c22b7d6e23060f41b152bd3afc8eefe2e0a614335f69181604092600855426009558152426020820152a1005b6391e5fe2d60e01b5f5260045ffd5b506003546001600160a01b031633141561084a565b600435906001600160a01b038216820361012b57565b919082018092116108cd57565b634e487b7160e01b5f52601160045260245ffd5b60ff60015460a01c1615610922576108f761098a565b919015801561091a575b6109145761090e916108c0565b42111590565b50505f90565b508115610901565b50600190565b90601f8019910116810190811067ffffffffffffffff82111761040357604052565b67ffffffffffffffff81116104035760051b60200190565b80518210156109765760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b6109926109d2565b9190806109a6575090506008549060095490565b9190565b5f546001600160a01b0316330361078957565b519067ffffffffffffffff8216820361012b57565b6004546001600160a01b031680158015610b6d575b610b665760806005546024604051809481936396834ad360e01b835260048301525afa5f9181610ad1575b50610a1e57505f905f90565b905f825160070b1315610a92576006548015159081610ab0575b50610a925760075480151580610a99575b610a7e575b50610a5882610bfe565b918215610a765767ffffffffffffffff606060649201511692049190565b505f91508190565b610a8783610bd5565b11610a92575f610a4e565b5f91508190565b5067ffffffffffffffff6020840151161515610a49565b610ac9915067ffffffffffffffff6060850151166108c0565b42115f610a38565b9091506080813d608011610b5e575b81610aed60809383610928565b8101031261012b57604051906080820182811067ffffffffffffffff8211176104035760405280518060070b810361012b578252610b2d602082016109bd565b602083015260408101518060030b810361012b576040830152610b52906060016109bd565b6060820152905f610a12565b3d9150610ae0565b505f905f90565b50600554156109e7565b90610b9b5750805115610b8c57805190602001fd5b630a12f52160e11b5f5260045ffd5b81511580610bcc575b610bac575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b15610ba4565b67ffffffffffffffff6020820151168015610914576040610bfb92015160030b90610c2a565b90565b805160070b5f811315610914576040610bfb92015160030b90610c2a565b604d81116108cd57600a0a90565b9060030b60128101601281125f83129080158216911516176108cd57603a81138015610cb9575b610cb2575f8112610c7a57610c669150610c1c565b908181029181830414901517156108cd5790565b600160ff1b146108cd57610c93905f0360111901610c1c565b908115610c9e570490565b634e487b7160e01b5f52601260045260245ffd5b5050505f90565b506039198112610c5156fea164736f6c634300081a000a000000000000000000000000fec7b585a6f14a8ab306fdf9006532d32fac24a4

Deployed Bytecode

0x6080806040526004361015610012575f80fd5b5f3560e01c9081633b21f9b61461082357508063567c814b146107fb5780636fe50d1b146107e0578063715018a6146107c15780637418fc5c1461079c57806379ba50971461071c57806382ac64a0146106ff57806386ef40c01461064d5780638a32ada0146106255780638da5cb5b146105fe57806397c4a5f314610598578063a3d2a6b3146104f6578063a3e6ba94146104d0578063ab3dbf3b146104a8578063ac9650d81461027a578063adde41e114610203578063e250b7b9146101e6578063e30c3978146101be578063e4ea36f0146101a1578063f2fde38b1461012f5763fc612a8d14610103575f80fd5b3461012b575f36600319011261012b576003546040516001600160a01b039091168152602090f35b5f80fd5b3461012b57602036600319011261012b576101486108aa565b6101506109aa565b60018060a01b0316806bffffffffffffffffffffffff60a01b600154161760015560018060a01b035f54167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227005f80a3005b3461012b575f36600319011261012b576020600554604051908152f35b3461012b575f36600319011261012b576001546040516001600160a01b039091168152602090f35b3461012b575f36600319011261012b576020600754604051908152f35b3461012b57602036600319011261012b5761021c6108aa565b6102246109aa565b6001600160a01b0316801561026b57600280546001600160a01b031916821790557f5106d9fe21e5ccaebfff5e5b6191d80ca628c317ef02f88ec6abbc39e505f6c35f80a2005b63d92e233d60e01b5f5260045ffd5b3461012b57602036600319011261012b5760043567ffffffffffffffff811161012b573660238201121561012b5780600401359067ffffffffffffffff821161012b573660248360051b8301011161012b579060206040516102dc8282610928565b5f815281810190601f1983013683376102f48461094a565b946103026040519687610928565b848652601f196103118661094a565b015f5b8181106104995750503681900360421901905f5b868110156104255760248160051b830101358381121561012b57820160248101359067ffffffffffffffff821161012b5760440190803603821361012b575f918761039d84938b6040519382859383850197883783018281018881528d519283915e010185815203601f198101835282610928565b5190305af4903d15610417573d9167ffffffffffffffff8311610403576040516001936103e792906103d8601f8201601f19168c0184610928565b82523d5f8b84013e5b30610b77565b6103f1828b610962565b526103fc818a610962565b5001610328565b634e487b7160e01b5f52604160045260245ffd5b6103e76001926060906103e1565b6040805187815289518189018190525f92600582901b83018101918c8b01918b9085015b8287106104565785850386f35b90919293828080600193603f198a82030186528189518051918291828552018484015e5f838284010152601f801991011601019601920196019592919092610449565b60608882018701528501610314565b3461012b575f36600319011261012b576002546040516001600160a01b039091168152602090f35b3461012b575f36600319011261012b5760406104ea61098a565b82519182526020820152f35b3461012b57608036600319011261012b5761050f6108aa565b60243590604435606435916105226109aa565b6001600160a01b03169182158015610590575b61026b577f24b97f0a837e17acd5fad3adeadcf5957c7b5c6421c8002728d9fe906dc9e8f491604091846bffffffffffffffffffffffff60a01b600454161760045585600555816006558060075582519182526020820152a3005b508315610535565b3461012b57602036600319011261012b576105b16108aa565b6105b96109aa565b600380546001600160a01b0319166001600160a01b039290921691821790557fe3c274bc2bbd115f11eef1049298117ee17a1a81ac53a1f8c16c528c208993665f80a2005b3461012b575f36600319011261012b575f546040516001600160a01b039091168152602090f35b3461012b575f36600319011261012b576004546040516001600160a01b039091168152602090f35b3461012b57602036600319011261012b5760043580151580910361012b575f546001600160a01b0316331415806106ea575b6106db576001548160ff8260a01c1615150361069757005b60ff60a01b191660a082901b60ff60a01b16176001556040519081527fe33f145d527913d1dc4c29a3b0690149220a71017a73efeabd140e356f2b3c4990602090a1005b630ae2803360e01b5f5260045ffd5b506002546001600160a01b031633141561067f565b3461012b575f36600319011261012b576020600654604051908152f35b3461012b575f36600319011261012b57600154336001600160a01b03821603610789576001600160a01b03199081166001555f805433928116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b63118cdaa760e01b5f523360045260245ffd5b3461012b575f36600319011261012b57602060ff60015460a01c166040519015158152f35b3461012b575f36600319011261012b5763ffc0fd9360e01b5f5260045ffd5b3461012b575f36600319011261012b57602060405160648152f35b3461012b57602036600319011261012b5760206108196004356108e1565b6040519015158152f35b3461012b57602036600319011261012b5760043560018060a01b035f541633141580610895575b610886577ff51dad9a86846dbeb04c4c22b7d6e23060f41b152bd3afc8eefe2e0a614335f69181604092600855426009558152426020820152a1005b6391e5fe2d60e01b5f5260045ffd5b506003546001600160a01b031633141561084a565b600435906001600160a01b038216820361012b57565b919082018092116108cd57565b634e487b7160e01b5f52601160045260245ffd5b60ff60015460a01c1615610922576108f761098a565b919015801561091a575b6109145761090e916108c0565b42111590565b50505f90565b508115610901565b50600190565b90601f8019910116810190811067ffffffffffffffff82111761040357604052565b67ffffffffffffffff81116104035760051b60200190565b80518210156109765760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b6109926109d2565b9190806109a6575090506008549060095490565b9190565b5f546001600160a01b0316330361078957565b519067ffffffffffffffff8216820361012b57565b6004546001600160a01b031680158015610b6d575b610b665760806005546024604051809481936396834ad360e01b835260048301525afa5f9181610ad1575b50610a1e57505f905f90565b905f825160070b1315610a92576006548015159081610ab0575b50610a925760075480151580610a99575b610a7e575b50610a5882610bfe565b918215610a765767ffffffffffffffff606060649201511692049190565b505f91508190565b610a8783610bd5565b11610a92575f610a4e565b5f91508190565b5067ffffffffffffffff6020840151161515610a49565b610ac9915067ffffffffffffffff6060850151166108c0565b42115f610a38565b9091506080813d608011610b5e575b81610aed60809383610928565b8101031261012b57604051906080820182811067ffffffffffffffff8211176104035760405280518060070b810361012b578252610b2d602082016109bd565b602083015260408101518060030b810361012b576040830152610b52906060016109bd565b6060820152905f610a12565b3d9150610ae0565b505f905f90565b50600554156109e7565b90610b9b5750805115610b8c57805190602001fd5b630a12f52160e11b5f5260045ffd5b81511580610bcc575b610bac575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b15610ba4565b67ffffffffffffffff6020820151168015610914576040610bfb92015160030b90610c2a565b90565b805160070b5f811315610914576040610bfb92015160030b90610c2a565b604d81116108cd57600a0a90565b9060030b60128101601281125f83129080158216911516176108cd57603a81138015610cb9575b610cb2575f8112610c7a57610c669150610c1c565b908181029181830414901517156108cd5790565b600160ff1b146108cd57610c93905f0360111901610c1c565b908115610c9e570490565b634e487b7160e01b5f52601260045260245ffd5b5050505f90565b506039198112610c5156fea164736f6c634300081a000a

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

000000000000000000000000fec7b585a6f14a8ab306fdf9006532d32fac24a4

-----Decoded View---------------
Arg [0] : initialOwner (address): 0xfeC7b585a6F14a8AB306fDf9006532d32faC24a4

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000fec7b585a6f14a8ab306fdf9006532d32fac24a4


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.