Contract 0x606FB7969fC1b5CAd58e64b12Cf827FB65eE4875 3

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2f5362cd792b6d2a050cc521d4d9f8a85f97ec8344cb9cf3406a3df9b0dc7edfSet Price Feed451375252022-08-18 2:21:57218 days 22 hrs ago0x11314c0b1bb3844eb43ff05d1e877d36cc1a134b IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.000135798343
0x918748e1c33ea4f713f53abb457a578fc6bd6a4f9f406ac39b7ee858695f066cSet Price Feed451374822022-08-18 2:21:10218 days 22 hrs ago0x11314c0b1bb3844eb43ff05d1e877d36cc1a134b IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.000143741835
0xc655840a32953e879e78df6b0f453b504258b3264fecd8a15e09a4648608edd0Set Price Feed451374502022-08-18 2:20:35218 days 22 hrs ago0x11314c0b1bb3844eb43ff05d1e877d36cc1a134b IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.000137064273
0x82d7cba01b2a296fb8777e9bd667c1c28cb53ab657ddbf9477c0c7992db70716Set Price Feed451373302022-08-18 2:18:21218 days 22 hrs ago0x11314c0b1bb3844eb43ff05d1e877d36cc1a134b IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.000143989894
0xb7d19225a857a0e95d2a5b691f4eaaf148536c1f24c39c3250f07176f5ca30ddSet Price Feed451372742022-08-18 2:17:03218 days 22 hrs ago0x11314c0b1bb3844eb43ff05d1e877d36cc1a134b IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.000144832666
0xdd4c8ed83c3a513402fab98d4538ad2e952d54dca8628c89b972eeea63ddbdd8Transfer Ownersh...438136282022-07-29 20:02:00238 days 4 hrs ago0xf92d6d2c833434ef1cc9284f9890a17d42497ccb IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.000151873458
0xa2513bf7c3bb72117006be64227efe690f452a6a75e3488240a9369491792f34Transfer Ownersh...438134612022-07-29 19:58:22238 days 4 hrs ago0x0ed78a9de439d4aa69596402a0947819655d3c05 IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.000249414322
0x26d782ef80b4df402c5af814546628cd25e98e3666775c8eda5730facef660b6Set Direct Price411188252022-06-23 1:29:01274 days 23 hrs ago0x11314c0b1bb3844eb43ff05d1e877d36cc1a134b IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.018523069818
0x70678d4adac061ff07e1064a95b4addf7636ad49399087b11cf315b77c713740Set Price Feed411186042022-06-23 1:24:04274 days 23 hrs ago0x11314c0b1bb3844eb43ff05d1e877d36cc1a134b IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.000201995258
0xdd87e4db91232ac188500239ebf826ed5f92a6988cd5013076708080b98f021fSet Price Feed410994282022-06-22 19:16:09275 days 5 hrs ago0x11314c0b1bb3844eb43ff05d1e877d36cc1a134b IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.000593556148
0xccfff9e2d764f9bc9c8c899cdf0d5d1f8a0ad825a68efcbaaa73b13780ed13daSet Price Feed410993672022-06-22 19:14:53275 days 5 hrs ago0x11314c0b1bb3844eb43ff05d1e877d36cc1a134b IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.027916325938
0x2c563b0e14f169d8d09afb646648818085305968d0c5bc1727c51e4310e718e0Set Price Feed410993582022-06-22 19:14:42275 days 5 hrs ago0x11314c0b1bb3844eb43ff05d1e877d36cc1a134b IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.000836464053
0xb3673ab7b2dc08e337ec1dac513d2bb915e4cca51745afcdea97722710bbc3daSet Price Feed410993062022-06-22 19:13:33275 days 5 hrs ago0x11314c0b1bb3844eb43ff05d1e877d36cc1a134b IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.000836351188
0x843b2fe19e4a847c8d4799e38144473f1d3d37cb3dc6fdfae706c2fcc0b0f92eSet Price Feed410992232022-06-22 19:11:47275 days 5 hrs ago0x11314c0b1bb3844eb43ff05d1e877d36cc1a134b IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.004433784359
0x4a2356dfbb6cc819a9d42cf0372c31f51efa0da745d752664ef396a55ba75bdaInitialize Owner...410846482022-06-22 14:21:22275 days 10 hrs ago0xcbd4e556fc24c83159defd1d1bbad66fd7d2c75c IN  0x606fb7969fc1b5cad58e64b12cf827fb65ee48750 FTM0.046962746475
0xf8d46c5b3113d531d8901b4c52412bf8a7433dcee0970f81b99b6d1106325e7a0x60806040410846372022-06-22 14:20:58275 days 10 hrs ago0xcbd4e556fc24c83159defd1d1bbad66fd7d2c75c IN  Create: OkseCardPriceOracle0 FTM0.53667973367
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xf8d46c5b3113d531d8901b4c52412bf8a7433dcee0970f81b99b6d1106325e7a410846372022-06-22 14:20:58275 days 10 hrs ago 0xcbd4e556fc24c83159defd1d1bbad66fd7d2c75c  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OkseCardPriceOracle

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 6 : OkseCardPriceOracle.sol
//SPDX-License-Identifier: LICENSED
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;

import "./interfaces/ERC20Interface.sol";
import "./libraries/SafeMath.sol";
import "./interfaces/PriceOracle.sol";
import "./interfaces/AggregatorV3Interface.sol";
import "./MultiSigOwner.sol";

contract OkseCardPriceOracle is PriceOracle, MultiSigOwner {
    using SafeMath for uint256;

    mapping(address => uint256) prices;
    event PricePosted(
        address asset,
        uint256 previousPriceMantissa,
        uint256 requestedPriceMantissa,
        uint256 newPriceMantissa
    );

    mapping(address => address) priceFeeds;
    event PriceFeedChanged(
        address asset,
        address previousPriceFeed,
        address newPriceFeed
    );

    constructor() {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        //////bsc///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        if (chainId == 56) {
            priceFeeds[
                0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
            ] = 0x0567F2323251f0Aab15c8dFb1967E4e8A7D42aeE; // BNB/USD
            priceFeeds[
                0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d
            ] = 0x51597f405303C4377E36123cBc172b13269EA163; // USDC/USD
            priceFeeds[
                0x55d398326f99059fF775485246999027B3197955
            ] = 0xB97Ad0E74fa7d920791E90258A6E2085088b4320; // USDT/USD
            priceFeeds[
                0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56
            ] = 0xcBb98864Ef56E9042e7d2efef76141f15731B82f; // BUSD/USD
            priceFeeds[
                0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c
            ] = 0x264990fbd0A4796A3E3d8E37C4d5F87a3aCa5Ebf; // WBTC/USD
            priceFeeds[
                0x2170Ed0880ac9A755fd29B2688956BD959F933F8
            ] = 0x9ef1B8c0E4F7dc8bF5719Ea496883DC6401d5b2e; // ETH/USD
        }
        //// matic //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        if (chainId == 137) {
            priceFeeds[
                0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270
            ] = 0xAB594600376Ec9fD91F8e885dADF0CE036862dE0; // MATIC/USD
            priceFeeds[
                0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174
            ] = 0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7; // USDC/USD
            priceFeeds[
                0xc2132D05D31c914a87C6611C10748AEb04B58e8F
            ] = 0x0A6513e40db6EB1b165753AD52E80663aeA50545; // USDT/USD
            priceFeeds[
                0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6
            ] = 0xDE31F8bFBD8c84b5360CFACCa3539B938dd78ae6; // WBTC/USD
            priceFeeds[
                0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619
            ] = 0xF9680D99D6C9589e2a93a78A04A279e509205945; // ETH/USD
            priceFeeds[
                0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a
            ] = 0x49B0c695039243BBfEb8EcD054EB70061fd54aa0; // SUSHI/USD
            priceFeeds[
                0xa3Fa99A148fA48D14Ed51d610c367C61876997F1
            ] = 0xd8d483d813547CfB624b8Dc33a00F2fcbCd2D428; // MIMATIC/USD
        }
        //// fantom //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        if (chainId == 250) {
            priceFeeds[
                0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83
            ] = 0xf4766552D15AE4d256Ad41B6cf2933482B0680dc; // FTM/USD
            priceFeeds[
                0x04068DA6C83AFCFA0e13ba15A6696662335D5B75
            ] = 0x2553f4eeb82d5A26427b8d1106C51499CBa5D99c; // USDC/USD
            priceFeeds[
                0x049d68029688eAbF473097a2fC38ef61633A3C7A
            ] = 0xF64b636c5dFe1d3555A847341cDC449f612307d0; // fUSDT/USD
            priceFeeds[
                0x321162Cd933E2Be498Cd2267a90534A804051b11
            ] = 0x8e94C22142F4A64b99022ccDd994f4e9EC86E4B4; // WBTC/USD
            priceFeeds[
                0x74b23882a30290451A17c44f4F05243b6b58C76d
            ] = 0x11DdD3d147E5b83D01cee7070027092397d63658; // WETH/USD
            priceFeeds[
                0xae75A438b2E0cB8Bb01Ec1E1e376De11D44477CC
            ] = 0xCcc059a1a17577676c8673952Dc02070D29e5a66; // SUSHI/USD
        }
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    }

    //return usd price of asset , decimal is 8
    function getUnderlyingPrice(address market)
        public
        view
        override
        returns (uint256)
    {
        uint80 roundID;
        int256 price;
        uint256 startedAt;
        uint256 timeStamp;
        uint80 answeredInRound;

        uint256 resultPrice;

        if (prices[market] != 0) {
            resultPrice = prices[market];
        } else {
            if (priceFeeds[market] != address(0)) {
                (
                    roundID,
                    price,
                    startedAt,
                    timeStamp,
                    answeredInRound
                ) = AggregatorV3Interface(priceFeeds[market]).latestRoundData();
            } else {
                price = 0;
            }
            resultPrice = uint256(price);
        }
        uint256 defaultDecimal = 18;
        ERC20Interface token = ERC20Interface(market);
        uint256 tokenDecimal = uint256(token.decimals());
        if (defaultDecimal == tokenDecimal) {
            return resultPrice;
        } else if (defaultDecimal > tokenDecimal) {
            return resultPrice.mul(10**(defaultDecimal.sub(tokenDecimal)));
        } else {
            return resultPrice.div(10**(tokenDecimal.sub(defaultDecimal)));
        }
    }

    function assetPrices(address asset) external view returns (uint256) {
        return prices[asset];
    }

    function setDirectPrice(bytes calldata signData, bytes calldata keys)
        external
        validSignOfOwner(signData, keys, "setDirectPrice")
    {
        (, , , bytes memory params) = abi.decode(
            signData,
            (bytes4, uint256, uint256, bytes)
        );
        (address asset, uint256 price) = abi.decode(params, (address, uint256));
        setDirectPriceInternal(asset, price);
    }

    function setBatchDirectPrice(bytes calldata signData, bytes calldata keys)
        external
        validSignOfOwner(signData, keys, "setBatchDirectPrice")
    {
        (, , , bytes memory params) = abi.decode(
            signData,
            (bytes4, uint256, uint256, bytes)
        );
        (address[] memory _assets, uint256[] memory _prices) = abi.decode(
            params,
            (address[], uint256[])
        );
        require(_assets.length == _prices.length, "le");
        for (uint256 i = 0; i < _assets.length; i++) {
            setDirectPriceInternal(_assets[i], _prices[i]);
        }
    }

    function setDirectPriceInternal(address asset, uint256 price) internal {
        emit PricePosted(asset, prices[asset], price, price);
        prices[asset] = price;
    }

    function setPriceFeed(bytes calldata signData, bytes calldata keys)
        external
        validSignOfOwner(signData, keys, "setPriceFeed")
    {
        (, , , bytes memory params) = abi.decode(
            signData,
            (bytes4, uint256, uint256, bytes)
        );
        (address asset, address priceFeed) = abi.decode(
            params,
            (address, address)
        );
        emit PriceFeedChanged(asset, priceFeeds[asset], priceFeed);
        priceFeeds[asset] = priceFeed;
    }
}

File 2 of 6 : ERC20Interface.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;

interface ERC20Interface {
  /**
   * @dev Returns the amount of tokens in existence.
   */
  function totalSupply() external view returns (uint256);

  /**
   * @dev Returns the token decimals.
   */
  function decimals() external view returns (uint8);

  /**
   * @dev Returns the token symbol.
   */
  function symbol() external view returns (string memory);

  /**
  * @dev Returns the token name.
  */
  function name() external view returns (string memory);

  /**
   * @dev Returns the bep token owner.
   */
  function getOwner() external view returns (address);

  /**
   * @dev Returns the amount of tokens owned by `account`.
   */
  function balanceOf(address account) external view returns (uint256);

  /**
   * @dev Moves `amount` tokens from the caller's account to `recipient`.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * Emits a {Transfer} event.
   */
  function transfer(address recipient, uint256 amount) external returns (bool);

  /**
   * @dev Returns the remaining number of tokens that `spender` will be
   * allowed to spend on behalf of `owner` through {transferFrom}. This is
   * zero by default.
   *
   * This value changes when {approve} or {transferFrom} are called.
   */
  function allowance(address _owner, address spender) external view returns (uint256);

  /**
   * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * IMPORTANT: Beware that changing an allowance with this method brings the risk
   * that someone may use both the old and the new allowance by unfortunate
   * transaction ordering. One possible solution to mitigate this race
   * condition is to first reduce the spender's allowance to 0 and set the
   * desired value afterwards:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   *
   * Emits an {Approval} event.
   */
  function approve(address spender, uint256 amount) external returns (bool);

  /**
   * @dev Moves `amount` tokens from `sender` to `recipient` using the
   * allowance mechanism. `amount` is then deducted from the caller's
   * allowance.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * Emits a {Transfer} event.
   */
  function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

  /**
   * @dev Emitted when `value` tokens are moved from one account (`from`) to
   * another (`to`).
   *
   * Note that `value` may be zero.
   */
  event Transfer(address indexed from, address indexed to, uint256 value);

  /**
   * @dev Emitted when the allowance of a `spender` for an `owner` is set by
   * a call to {approve}. `value` is the new allowance.
   */
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 3 of 6 : SafeMath.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
  /**
   * @dev Returns the addition of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `+` operator.
   *
   * Requirements:
   * - Addition cannot overflow.
   */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    return add(a, b, "SafeMath: addition overflow");
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, errorMessage);

    return c;
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    return sub(a, b, "SafeMath: subtraction overflow");
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    require(b <= a, errorMessage);
    uint256 c = a - b;

    return c;
  }

  /**
   * @dev Returns the multiplication of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `*` operator.
   *
   * Requirements:
   * - Multiplication cannot overflow.
   */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");

    return c;
  }

  /**
   * @dev Returns the integer division of two unsigned integers. Reverts on
   * division by zero. The result is rounded towards zero.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    return div(a, b, "SafeMath: division by zero");
  }

  /**
   * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
   * division by zero. The result is rounded towards zero.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, errorMessage);
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * Reverts when dividing by zero.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    return mod(a, b, "SafeMath: modulo by zero");
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * Reverts with custom message when dividing by zero.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    require(b != 0, errorMessage);
    return a % b;
  }
}

File 4 of 6 : PriceOracle.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;

abstract contract PriceOracle {
    /// @notice Indicator that this is a PriceOracle contract (for inspection)
    bool public constant isPriceOracle = true;

    /**
      * @notice Get the underlying price of a cToken asset
      * @param market The cToken to get the underlying price of
      * @return The underlying asset price mantissa (scaled by 1e18).
      *  Zero means the price is unavailable.
      */
    function getUnderlyingPrice(address market) external virtual view returns (uint);

}

File 5 of 6 : AggregatorV3Interface.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;

interface AggregatorV3Interface {

  function decimals() external view returns (uint8);
  function description() external view returns (string memory);
  function version() external view returns (uint256);

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

}

File 6 of 6 : MultiSigOwner.sol
// SPDX-License-Identifier: LICENSED
pragma solidity ^0.7.0;
pragma abicoder v2;

// 2/3 Multi Sig Owner
contract MultiSigOwner {
    address[] public owners;
    mapping(uint256 => bool) public signatureId;
    bool private initialized;
    // events
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );
    event SignValidTimeChanged(uint256 newValue);
    modifier validSignOfOwner(
        bytes calldata signData,
        bytes calldata keys,
        string memory functionName
    ) {
        require(isOwner(msg.sender), "on");
        address signer = getSigner(signData, keys);
        require(
            signer != msg.sender && isOwner(signer) && signer != address(0),
            "is"
        );
        (bytes4 method, uint256 id, uint256 validTime, ) = abi.decode(
            signData,
            (bytes4, uint256, uint256, bytes)
        );
        require(
            signatureId[id] == false &&
                method == bytes4(keccak256(bytes(functionName))),
            "sru"
        );
        require(validTime > block.timestamp, "ep");
        signatureId[id] = true;
        _;
    }

    function isOwner(address addr) public view returns (bool) {
        bool _isOwner = false;
        for (uint256 i = 0; i < owners.length; i++) {
            if (owners[i] == addr) {
                _isOwner = true;
            }
        }
        return _isOwner;
    }

    constructor() {}

    function initializeOwners(address[3] memory _owners) public {
        require(
            !initialized &&
                _owners[0] != address(0) &&
                _owners[1] != address(0) &&
                _owners[2] != address(0),
            "ai"
        );
        owners = [_owners[0], _owners[1], _owners[2]];
        initialized = true;
    }

    function getSigner(bytes calldata _data, bytes calldata keys)
        public
        view
        returns (address)
    {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        (uint8 v, bytes32 r, bytes32 s) = abi.decode(
            keys,
            (uint8, bytes32, bytes32)
        );
        return
            ecrecover(
                toEthSignedMessageHash(
                    keccak256(abi.encodePacked(this, chainId, _data))
                ),
                v,
                r,
                s
            );
    }

    function encodePackedData(bytes calldata _data)
        public
        view
        returns (bytes32)
    {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        return keccak256(abi.encodePacked(this, chainId, _data));
    }

    function toEthSignedMessageHash(bytes32 hash)
        internal
        pure
        returns (bytes32)
    {
        return
            keccak256(
                abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)
            );
    }

    // Set functions
    // verified
    function transferOwnership(bytes calldata signData, bytes calldata keys)
        public
        validSignOfOwner(signData, keys, "transferOwnership")
    {
        (, , , bytes memory params) = abi.decode(
            signData,
            (bytes4, uint256, uint256, bytes)
        );
        address newOwner = abi.decode(params, (address));
        uint256 index;
        for (uint256 i = 0; i < owners.length; i++) {
            if (owners[i] == msg.sender) {
                index = i;
            }
        }
        address oldOwner = owners[index];
        owners[index] = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "metadata": {
    "bytecodeHash": "none",
    "useLiteralContent": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"address","name":"previousPriceFeed","type":"address"},{"indexed":false,"internalType":"address","name":"newPriceFeed","type":"address"}],"name":"PriceFeedChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousPriceMantissa","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"requestedPriceMantissa","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPriceMantissa","type":"uint256"}],"name":"PricePosted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"SignValidTimeChanged","type":"event"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"assetPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"encodePackedData","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes","name":"keys","type":"bytes"}],"name":"getSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"market","type":"address"}],"name":"getUnderlyingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[3]","name":"_owners","type":"address[3]"}],"name":"initializeOwners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPriceOracle","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"owners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signData","type":"bytes"},{"internalType":"bytes","name":"keys","type":"bytes"}],"name":"setBatchDirectPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signData","type":"bytes"},{"internalType":"bytes","name":"keys","type":"bytes"}],"name":"setDirectPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signData","type":"bytes"},{"internalType":"bytes","name":"keys","type":"bytes"}],"name":"setPriceFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"signatureId","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signData","type":"bytes"},{"internalType":"bytes","name":"keys","type":"bytes"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b504660388114156101b35760046020527f1acf883629f7ed31fc27a2a0d2390e0929c545d19e7d64611602179e5f371fc380546001600160a01b0319908116730567f2323251f0aab15c8dfb1967e4e8a7d42aee179091557fe7531ef9abb867ffffe9c0dc73f8bc2e15cf41f7bf2ce99fbae639d4d5c15951805482167351597f405303c4377e36123cbc172b13269ea1631790557f7ef95397d98fffb4a12a466d73a89d3cf49fa95ff4ba0aa1db6aaf272b7982158054821673b97ad0e74fa7d920791e90258a6e2085088b43201790557fa385b31964328f61c2cdab127c54249f573b192161d52b1f3d552db32224bd428054821673cbb98864ef56e9042e7d2efef76141f15731b82f1790557f020d60ee64c79b1375e5b7d880a4827df313abb64d06701957dd261da203f45e8054821673264990fbd0a4796a3e3d8e37c4d5f87a3aca5ebf179055732170ed0880ac9a755fd29b2688956bd959f933f86000527fc6506420c2e525e11abab334c5da9ffdfef09d269838135bdaff4ded0cbdcfbe8054909116739ef1b8c0e4f7dc8bf5719ea496883dc6401d5b2e1790555b80608914156103915760046020527f3e73a25e817bd097e8eaf0ac0076d088e058dae47a20d23b0f0cc945791a958880546001600160a01b031990811673ab594600376ec9fd91f8e885dadf0ce036862de0179091557f3d6c902089d5053230afb20d03add215c708a8333f93f9395a50fea0c3493a618054821673fe4a8cc5b5b2366c1b58bea3858e81843581b2f71790557fb19cf2e52982b41c5e63c8d2b213089d6b958993eb55c34ad5b9543558dda2fa80548216730a6513e40db6eb1b165753ad52e80663aea505451790557f4655629ab7fde6a4c7d505e4f879f599cb39edaf37d2017a04c0c67e011b69f98054821673de31f8bfbd8c84b5360cfacca3539b938dd78ae61790557f69bc9a80c51a557b6c5a4b7c71ffdcd97cc91b2bda5dc1b0da50dd9e6ab212398054821673f9680d99d6c9589e2a93a78a04a279e5092059451790557f8f67c9166672753481b743e70d49ed1e0464ddaeb739a5cd718076f135074cc6805482167349b0c695039243bbfeb8ecd054eb70061fd54aa017905573a3fa99a148fa48d14ed51d610c367c61876997f16000527f20e02f917f07e17fb180b6093b6423142e105bf752801ba208c36be43824768b805490911673d8d483d813547cfb624b8dc33a00f2fcbcd2d4281790555b8060fa14156105325760046020527f0b9faaabb35afcb5b88fd7f020fd7dfd8a958e160264ae061d1e9bb4e5d6675180546001600160a01b031990811673f4766552d15ae4d256ad41b6cf2933482b0680dc179091557f3b7092b3eb898e18f44882f95a8634f1ba4b032c0d87f900d85e0f87543b6bd980548216732553f4eeb82d5a26427b8d1106c51499cba5d99c1790557f637dbce3a8159991551711c7adbf6bfe1abbe71372e794a5ba29e20a3ea920c28054821673f64b636c5dfe1d3555a847341cdc449f612307d01790557f0369097c5e974ef9a3fc85f421fd301a694a7c2e04ac79523a86359c300542ad80548216738e94c22142f4a64b99022ccdd994f4e9ec86e4b41790557f581cbbe5fc00e4850b1816bf3ebe10fc9d4faf709e3aeb25b014f03aea5ecd6c805482167311ddd3d147e5b83d01cee7070027092397d6365817905573ae75a438b2e0cb8bb01ec1e1e376de11d44477cc6000527f47b0a9bccdd4e05f323849d9b69a2807df6d3d074c44cc985561ddaac7fce297805490911673ccc059a1a17577676c8673952dc02070d29e5a661790555b50611816806105426000396000f3fe608060405234801561001057600080fd5b50600436106100bf5760003560e01c806368af81e61161007c57806368af81e61461015d5780636f9e4f0b1461017057806371340e471461018357806375e16b1714610196578063b2b9f0ed146101a9578063d1f21f4f146101bc578063fc57d4df146101cf576100bf565b8063025e7c27146100c45780632f54bf6e146100ed57806333a80e7f1461010d5780635e9a523c14610122578063656503ca1461014257806366331bba14610155575b600080fd5b6100d76100d236600461152e565b6101e2565b6040516100e49190611649565b60405180910390f35b6101006100fb3660046111ea565b61020c565b6040516100e491906116a6565b61012061011b3660046114c6565b610263565b005b6101356101303660046111ea565b610478565b6040516100e491906116b1565b6101206101503660046114c6565b610493565b610100610628565b61013561016b366004611487565b61062d565b61012061017e366004611288565b610669565b6101206101913660046114c6565b610721565b6100d76101a43660046114c6565b610917565b6101006101b736600461152e565b6109c0565b6101206101ca3660046114c6565b6109d5565b6101356101dd3660046111ea565b610c34565b600081815481106101f257600080fd5b6000918252602090912001546001600160a01b0316905081565b600080805b60005481101561025a57836001600160a01b03166000828154811061023257fe5b6000918252602090912001546001600160a01b0316141561025257600191505b600101610211565b5090505b919050565b838383836040518060400160405280600c81526020016b1cd95d141c9a58d95199595960a21b8152506102953361020c565b6102ba5760405162461bcd60e51b81526004016102b1906116f4565b60405180910390fd5b60006102c886868686610917565b90506001600160a01b03811633148015906102e757506102e78161020c565b80156102fb57506001600160a01b03811615155b6103175760405162461bcd60e51b81526004016102b19061172c565b60008080610327888a018a6113cf565b50600082815260016020526040902054929550909350915060ff161580156103615750845160208601206001600160e01b03198481169116145b61037d5760405162461bcd60e51b81526004016102b190611764565b42811161039c5760405162461bcd60e51b81526004016102b190611710565b60008281526001602081905260408220805460ff191690911790556103c38d8f018f6113cf565b9350505050600080828060200190518101906103df9190611222565b6001600160a01b03808316600090815260046020526040908190205490519395509193507fe1fa38e9855b53a19aafc2f021c7981bc99455513b8684a8ec1f5233e7c123d8926104349286921690859061165d565b60405180910390a16001600160a01b03918216600090815260046020526040902080546001600160a01b031916919092161790555050505050505050505050505050565b6001600160a01b031660009081526003602052604090205490565b838383836040518060400160405280600e81526020016d736574446972656374507269636560901b8152506104c73361020c565b6104e35760405162461bcd60e51b81526004016102b1906116f4565b60006104f186868686610917565b90506001600160a01b038116331480159061051057506105108161020c565b801561052457506001600160a01b03811615155b6105405760405162461bcd60e51b81526004016102b19061172c565b60008080610550888a018a6113cf565b50600082815260016020526040902054929550909350915060ff1615801561058a5750845160208601206001600160e01b03198481169116145b6105a65760405162461bcd60e51b81526004016102b190611764565b4281116105c55760405162461bcd60e51b81526004016102b190611710565b60008281526001602081905260408220805460ff191690911790556105ec8d8f018f6113cf565b935050505060008082806020019051810190610608919061125b565b915091506106168282610e21565b50505050505050505050505050505050565b600181565b60405160009046906106499030908390879087906020016115e5565b604051602081830303815290604052805190602001209150505b92915050565b60025460ff16158015610685575080516001600160a01b031615155b801561069d575060208101516001600160a01b031615155b80156106b5575060408101516001600160a01b031615155b6106d15760405162461bcd60e51b81526004016102b190611748565b6040805160608101825282516001600160a01b0390811682526020808501518216908301528383015116918101919091526107109060009060036110a4565b50506002805460ff19166001179055565b83838383604051806040016040528060138152602001727365744261746368446972656374507269636560681b81525061075a3361020c565b6107765760405162461bcd60e51b81526004016102b1906116f4565b600061078486868686610917565b90506001600160a01b03811633148015906107a357506107a38161020c565b80156107b757506001600160a01b03811615155b6107d35760405162461bcd60e51b81526004016102b19061172c565b600080806107e3888a018a6113cf565b50600082815260016020526040902054929550909350915060ff1615801561081d5750845160208601206001600160e01b03198481169116145b6108395760405162461bcd60e51b81526004016102b190611764565b4281116108585760405162461bcd60e51b81526004016102b190611710565b60008281526001602081905260408220805460ff1916909117905561087f8d8f018f6113cf565b93505050506000808280602001905181019061089b919061130d565b9150915080518251146108c05760405162461bcd60e51b81526004016102b1906116d8565b60005b8251811015610904576108fc8382815181106108db57fe5b60200260200101518383815181106108ef57fe5b6020026020010151610e21565b6001016108c3565b5050505050505050505050505050505050565b600046818080610929868801886115b1565b925092509250600161096630868c8c60405160200161094b94939291906115e5565b60405160208183030381529060405280519060200120610e94565b8484846040516000815260200160405260405161098694939291906116ba565b6020604051602081039080840390855afa1580156109a8573d6000803e3d6000fd5b5050604051601f1901519a9950505050505050505050565b60016020526000908152604090205460ff1681565b838383836040518060400160405280601181526020017007472616e736665724f776e65727368697607c1b815250610a0c3361020c565b610a285760405162461bcd60e51b81526004016102b1906116f4565b6000610a3686868686610917565b90506001600160a01b0381163314801590610a555750610a558161020c565b8015610a6957506001600160a01b03811615155b610a855760405162461bcd60e51b81526004016102b19061172c565b60008080610a95888a018a6113cf565b50600082815260016020526040902054929550909350915060ff16158015610acf5750845160208601206001600160e01b03198481169116145b610aeb5760405162461bcd60e51b81526004016102b190611764565b428111610b0a5760405162461bcd60e51b81526004016102b190611710565b60008281526001602081905260408220805460ff19169091179055610b318d8f018f6113cf565b9350505050600081806020019051810190610b4c9190611206565b90506000805b600054811015610b9a57336001600160a01b031660008281548110610b7357fe5b6000918252602090912001546001600160a01b03161415610b92578091505b600101610b52565b506000808281548110610ba957fe5b600091825260208220015481546001600160a01b03909116925084919084908110610bd057fe5b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051858316928416917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050505050505050505050505050505050565b6001600160a01b03811660009081526003602052604081205481908190819081908190819015610c7d57506001600160a01b038716600090815260036020526040902054610d3f565b6001600160a01b038881166000908152600460205260409020541615610d37576001600160a01b03808916600090815260046020819052604091829020548251633fabe5a360e21b8152925193169263feaf968c928083019260a09291829003018186803b158015610cee57600080fd5b505afa158015610d02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d269190611546565b939950919750955093509150610d3c565b600094505b50835b60006012905060008990506000816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610d8557600080fd5b505afa158015610d99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbd9190611595565b60ff16905080831415610ddb5783995050505050505050505061025e565b80831115610e0a57610dfa610df08483610ec4565b8590600a0a610f0d565b995050505050505050505061025e565b610dfa610e178285610ec4565b8590600a0a610f66565b6001600160a01b038216600090815260036020526040908190205490517fdd71a1d19fcba687442a1d5c58578f1e409af71a79d10fd95a4d66efd8fa9ae791610e709185919085908190611680565b60405180910390a16001600160a01b03909116600090815260036020526040902055565b600081604051602001610ea79190611618565b604051602081830303815290604052805190602001209050919050565b6000610f0683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fa8565b9392505050565b600082610f1c57506000610663565b82820282848281610f2957fe5b0414610f065760405162461bcd60e51b81526004018080602001828103825260218152602001806117e96021913960400191505060405180910390fd5b6000610f0683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061103f565b600081848411156110375760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ffc578181015183820152602001610fe4565b50505050905090810190601f1680156110295780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000818361108e5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610ffc578181015183820152602001610fe4565b50600083858161109a57fe5b0495945050505050565b8280548282559060005260206000209081019282156110f9579160200282015b828111156110f957825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906110c4565b50611105929150611109565b5090565b5b80821115611105576000815560010161110a565b600082601f83011261112e578081fd5b8151602061114361113e836117a4565b611781565b828152818101908583018385028701840188101561115f578586fd5b855b8581101561117d57815184529284019290840190600101611161565b5090979650505050505050565b60008083601f84011261119b578182fd5b5081356001600160401b038111156111b1578182fd5b6020830191508360208285010111156111c957600080fd5b9250929050565b805169ffffffffffffffffffff8116811461025e57600080fd5b6000602082840312156111fb578081fd5b8135610f06816117c1565b600060208284031215611217578081fd5b8151610f06816117c1565b60008060408385031215611234578081fd5b825161123f816117c1565b6020840151909250611250816117c1565b809150509250929050565b6000806040838503121561126d578182fd5b8251611278816117c1565b6020939093015192949293505050565b600060608284031215611299578081fd5b82601f8301126112a7578081fd5b604051606081018181106001600160401b03821117156112c357fe5b6040528083606081018610156112d7578384fd5b835b60038110156113025781356112ed816117c1565b835260209283019291909101906001016112d9565b509195945050505050565b6000806040838503121561131f578182fd5b82516001600160401b0380821115611335578384fd5b818501915085601f830112611348578384fd5b8151602061135861113e836117a4565b82815281810190858301838502870184018b1015611374578889fd5b8896505b8487101561139f57805161138b816117c1565b835260019690960195918301918301611378565b50918801519196509093505050808211156113b8578283fd5b506113c58582860161111e565b9150509250929050565b600080600080608085870312156113e4578182fd5b84356001600160e01b0319811681146113fb578283fd5b935060208581013593506040860135925060608601356001600160401b0380821115611425578384fd5b818801915088601f830112611438578384fd5b81358181111561144457fe5b611456601f8201601f19168501611781565b9150808252898482850101111561146b578485fd5b8084840185840137810190920192909252939692955090935050565b60008060208385031215611499578182fd5b82356001600160401b038111156114ae578283fd5b6114ba8582860161118a565b90969095509350505050565b600080600080604085870312156114db578182fd5b84356001600160401b03808211156114f1578384fd5b6114fd8883890161118a565b90965094506020870135915080821115611515578384fd5b506115228782880161118a565b95989497509550505050565b60006020828403121561153f578081fd5b5035919050565b600080600080600060a0868803121561155d578283fd5b611566866111d0565b9450602086015193506040860151925060608601519150611589608087016111d0565b90509295509295909350565b6000602082840312156115a6578081fd5b8151610f06816117d9565b6000806000606084860312156115c5578081fd5b83356115d0816117d9565b95602085013595506040909401359392505050565b60006bffffffffffffffffffffffff198660601b1682528460148301528284603484013791016034019081529392505050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6001600160a01b0391909116815260200190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b901515815260200190565b90815260200190565b93845260ff9290921660208401526040830152606082015260800190565b6020808252600290820152616c6560f01b604082015260600190565b60208082526002908201526137b760f11b604082015260600190565b602080825260029082015261065760f41b604082015260600190565b602080825260029082015261697360f01b604082015260600190565b602080825260029082015261616960f01b604082015260600190565b60208082526003908201526273727560e81b604082015260600190565b6040518181016001600160401b038111828210171561179c57fe5b604052919050565b60006001600160401b038211156117b757fe5b5060209081020190565b6001600160a01b03811681146117d657600080fd5b50565b60ff811681146117d657600080fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c6343000706000a

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.