Address io1h7fp85zxctq7va6a5gmrl3rlzrzywyj4qs8mzn

Contract Overview

Balance:
0 IOTX

IOTX Value:
$ 0

Token:
Txn Hash
Block
From
To
Value [Txn Fee]
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OracleProxy

Compiler Version
v0.6.4+commit.1dca32f3

Optimization Enabled:
Yes with 200 runs

Other Settings:
petersburg evmVersion, None license

Contract Source Code (Solidity)

pragma solidity 0.6.4;
pragma experimental ABIEncoderV2;


// SPDX-License-Identifier: MIT
library EthAddressLib {
    /**
     * @dev returns the address used within the protocol to identify ETH
     * @return the address assigned to ETH
     */
    function ethAddress() internal pure returns (address) {
        return 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
    }
}

// SPDX-License-Identifier: MIT
interface IOracleProxy {
    function get(address token) external view returns (uint256, bool);
}

// SPDX-License-Identifier: MIT
interface IPriceOracles {
    function get(address token) external view returns (uint256, bool);
}

// SPDX-License-Identifier: MIT
/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @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.
     */
    function decimals() external view returns (uint8);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
}

// SPDX-License-Identifier: MIT
/**
 * @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) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        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) {
        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;
    }

    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a <= b ? a : b;
    }

    function abs(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a < b) {
            return b - a;
        }
        return a - b;
    }
}

// SPDX-License-Identifier: MIT
/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(
            address(this).balance >= amount,
            "Address: insufficient balance"
        );

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{value: amount}("");
        require(
            success,
            "Address: unable to send value, recipient may have reverted"
        );
    }

    /**
     * @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, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * 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.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data)
        internal
        returns (bytes memory)
    {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @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`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return
            functionCallWithValue(
                target,
                data,
                value,
                "Address: low-level call with value failed"
            );
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(
            address(this).balance >= value,
            "Address: insufficient balance for call"
        );
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 weiValue,
        string memory errorMessage
    ) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(
            data
        );
        if (success) {
            return returndata;
        } else {
            // 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// SPDX-License-Identifier: MIT
/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.transfer.selector, to, value)
        );
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.transferFrom.selector, from, to, value)
        );
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.approve.selector, spender, value)
        );
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(
            value
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(
                token.approve.selector,
                spender,
                newAllowance
            )
        );
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(
            value,
            "SafeERC20: decreased allowance below zero"
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(
                token.approve.selector,
                spender,
                newAllowance
            )
        );
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(
            data,
            "SafeERC20: low-level call failed"
        );
        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(
                abi.decode(returndata, (bool)),
                "SafeERC20: ERC20 operation did not succeed"
            );
        }
    }
}

/**
 * @title Initializable
 *
 * @dev Helper contract to support initializer functions. To use it, replace
 * the constructor with a function that has the `initializer` modifier.
 * WARNING: Unlike constructors, initializer functions must be manually
 * invoked. This applies both to deploying an Initializable contract, as well
 * as extending an Initializable contract via inheritance.
 * WARNING: When used with inheritance, manual care must be taken to not invoke
 * a parent initializer twice, or ensure that all initializers are idempotent,
 * because this is not dealt with automatically as with constructors.
 */
contract Initializable {

  /**
   * @dev Indicates that the contract has been initialized.
   */
  bool private initialized;

  /**
   * @dev Indicates that the contract is in the process of being initialized.
   */
  bool private initializing;

  /**
   * @dev Modifier to use in the initializer function of a contract.
   */
  modifier initializer() {
    require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized");

    bool isTopLevelCall = !initializing;
    if (isTopLevelCall) {
      initializing = true;
      initialized = true;
    }

    _;

    if (isTopLevelCall) {
      initializing = false;
    }
  }

  /// @dev Returns true if and only if the function is running in the constructor
  function isConstructor() private view returns (bool) {
    // extcodesize checks the size of the code stored in an address, and
    // address returns the current address. Since the code is still not
    // deployed when running a constructor, any checks on its code size will
    // yield zero, making it an effective way to detect if a contract is
    // under construction or not.
    address self = address(this);
    uint256 cs;
    assembly { cs := extcodesize(self) }
    return cs == 0;
  }

  // Reserved storage space to allow for layout changes in the future.
  uint256[50] private ______gap;
}

// SPDX-License-Identifier: MIT
contract OracleProxy is Initializable, IOracleProxy {
    using SafeERC20 for IERC20;
    using SafeMath for uint256;

    address public multiSig;
    address public admin;
    address public proposedAdmin;
    
    //token价格来源, token地址=> 底层预言机或者底层预言机封装,The address to query price data, or zero if not supported.
    mapping (address => address) public oracles;//fortube oracle or chainlinkwrapper

    address public chainlinkWrapper;// oracles[token] == 0 ==> chainlink wrapper, otherwise fortube
    
    /// The governor sets oracle information for a token.
    event SetOracle(address _token, address _oracle);
    event SetOracles(address[] _tokens, address[] _oracles);
    event SetOraclesTo(address[] _tokens, address _oracle);
    event SetChainlinkWrapper(address _chainlinkWrapper);

    function initialize(address _multiSig)
        public
        initializer
    {
        multiSig = _multiSig;
        admin = msg.sender;
    }

    // constructor(address _multiSig) public
    // {
    //     multiSig = _multiSig;
    //     admin = msg.sender;
    // }

    receive() external payable {}

    modifier onlyAdmin {
        require(msg.sender == admin, "require admin");
        _;
    }

    modifier onlyMultiSig {
        require(msg.sender == multiSig, "require multiSig");
        _;
    }

    function setMultiSig(address _multiSig) external onlyMultiSig {
        multiSig = _multiSig;
    }

    function setAdmin(address _admin) external onlyMultiSig {
        admin = _admin;
    }
    
    function setOracle(address _token, address _oracle) public onlyAdmin {
        oracles[_token] = _oracle;
        emit SetOracle(_token, _oracle);
    }

    function setOracles(address[] calldata _tokens, address[] calldata _oracles) external onlyAdmin {
        require(_tokens.length == _oracles.length, "inconsistent length");

        for (uint i = 0; i < _tokens.length; i++) {
            setOracle(_tokens[i], _oracles[i]);
        }

        emit SetOracles(_tokens, _oracles);
    }

    function setOraclesTo(address[] calldata _tokens, address _oracle) external onlyAdmin {
        for (uint i = 0; i < _tokens.length; i++) {
            setOracle(_tokens[i], _oracle);
        }
        emit SetOraclesTo(_tokens, _oracle);
    }

    function get(address token) public override view returns (uint, bool) {
        if (oracles[token] != address(0)) {
            return IPriceOracles(oracles[token]).get(token);//fortube
        }
        return IPriceOracles(chainlinkWrapper).get(token);
    }

    function setChainlinkWrapper(address _chainlinkWrapper) external onlyAdmin {
        chainlinkWrapper = _chainlinkWrapper;

        emit SetChainlinkWrapper(_chainlinkWrapper);
    }

    struct Price {
        uint256 px;
        bool ok;
    }

    function gets(address[] calldata tokens) external view returns (Price[] memory) {
        uint n = tokens.length;
        Price[] memory res = new Price[](n);
        for (uint i = 0; i < n; i++) {
            (res[i].px, res[i].ok) = get(tokens[i]);
        }

        return res;
    }
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_chainlinkWrapper","type":"address"}],"name":"SetChainlinkWrapper","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"address","name":"_oracle","type":"address"}],"name":"SetOracle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_tokens","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"_oracles","type":"address[]"}],"name":"SetOracles","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_tokens","type":"address[]"},{"indexed":false,"internalType":"address","name":"_oracle","type":"address"}],"name":"SetOraclesTo","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainlinkWrapper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"get","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"gets","outputs":[{"components":[{"internalType":"uint256","name":"px","type":"uint256"},{"internalType":"bool","name":"ok","type":"bool"}],"internalType":"struct OracleProxy.Price[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_multiSig","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"multiSig","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"oracles","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposedAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_chainlinkWrapper","type":"address"}],"name":"setChainlinkWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_multiSig","type":"address"}],"name":"setMultiSig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_oracle","type":"address"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"address[]","name":"_oracles","type":"address[]"}],"name":"setOracles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"address","name":"_oracle","type":"address"}],"name":"setOraclesTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

Contract Creation Code

6080604052600436106100e15760003560e01c8063704b6c021161007f578063aead054611610059578063aead05461461023c578063c2bc2efc14610251578063c4d66de81461027f578063f851a4401461029f576100e8565b8063704b6c02146101dc57806378d5f781146101fc578063addd50991461021c576100e8565b806332f751ec116100bb57806332f751ec1461016557806336e0004a14610187578063513e29711461019c5780635c38eb3a146101bc576100e8565b806310c089c6146100ed578063209656071461010f578063284d30ef14610145576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b5061010d610108366004610a12565b6102b4565b005b34801561011b57600080fd5b5061012f61012a3660046109d2565b610365565b60405161013c9190610bd5565b60405180910390f35b34801561015157600080fd5b5061010d61016036600461097c565b610423565b34801561017157600080fd5b5061017a61046f565b60405161013c9190610b49565b34801561019357600080fd5b5061017a61047e565b3480156101a857600080fd5b5061010d6101b736600461097c565b61048d565b3480156101c857600080fd5b5061010d6101d736600461099e565b61050d565b3480156101e857600080fd5b5061010d6101f736600461097c565b6105a4565b34801561020857600080fd5b5061010d610217366004610a65565b6105f0565b34801561022857600080fd5b5061017a61023736600461097c565b6106d5565b34801561024857600080fd5b5061017a6106f0565b34801561025d57600080fd5b5061027161026c36600461097c565b6106ff565b60405161013c929190610cf2565b34801561028b57600080fd5b5061010d61029a36600461097c565b610843565b3480156102ab57600080fd5b5061017a6108f0565b6034546001600160a01b031633146102e75760405162461bcd60e51b81526004016102de90610c9e565b60405180910390fd5b60005b828110156103245761031c84848381811061030157fe5b9050602002016020810190610316919061097c565b8361050d565b6001016102ea565b507f9f61017da7b9418778e3541bae995f08c010b36792bafa8b17a9280076d0d2c083838360405161035893929190610b77565b60405180910390a1505050565b604080518281526020808402820101909152606090829082908280156103a557816020015b610392610905565b81526020019060019003908161038a5790505b50905060005b82811015610418576103d78686838181106103c257fe5b905060200201602081019061026c919061097c565b8383815181106103e357fe5b60200260200101516000018484815181106103fa57fe5b602090810291909101810151921515920191909152526001016103ab565b509150505b92915050565b6033546001600160a01b0316331461044d5760405162461bcd60e51b81526004016102de90610c26565b603380546001600160a01b0319166001600160a01b0392909216919091179055565b6035546001600160a01b031681565b6033546001600160a01b031681565b6034546001600160a01b031633146104b75760405162461bcd60e51b81526004016102de90610c9e565b603780546001600160a01b0319166001600160a01b0383161790556040517fe9c45b9cefeac763c6d9e8ffb5d1ec0f3e345b38da02f56068a93bbb3daf5d3f90610502908390610b49565b60405180910390a150565b6034546001600160a01b031633146105375760405162461bcd60e51b81526004016102de90610c9e565b6001600160a01b038281166000908152603660205260409081902080546001600160a01b03191692841692909217909155517fb7261e9c33aa7c56209c3bf60b424a8f9551ce28876c0ab3d0c487695e943487906105989084908490610b5d565b60405180910390a15050565b6033546001600160a01b031633146105ce5760405162461bcd60e51b81526004016102de90610c26565b603480546001600160a01b0319166001600160a01b0392909216919091179055565b6034546001600160a01b0316331461061a5760405162461bcd60e51b81526004016102de90610c9e565b8281146106395760405162461bcd60e51b81526004016102de90610cc5565b60005b838110156106915761068985858381811061065357fe5b9050602002016020810190610668919061097c565b84848481811061067457fe5b90506020020160208101906101d7919061097c565b60010161063c565b507f02df5b259099661c74a209dabbd905de6d5542960b7a48f552bdeaa64e1d4e39848484846040516106c79493929190610ba3565b60405180910390a150505050565b6036602052600090815260409020546001600160a01b031681565b6037546001600160a01b031681565b6001600160a01b038181166000908152603660205260408120549091829116156107ba576001600160a01b03808416600090815260366020526040908190205490516330af0bbf60e21b815291169063c2bc2efc90610762908690600401610b49565b604080518083038186803b15801561077957600080fd5b505afa15801561078d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b19190610ace565b9150915061083e565b6037546040516330af0bbf60e21b81526001600160a01b039091169063c2bc2efc906107ea908690600401610b49565b604080518083038186803b15801561080157600080fd5b505afa158015610815573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108399190610ace565b915091505b915091565b600054610100900460ff168061085c575061085c6108ff565b8061086a575060005460ff16155b6108865760405162461bcd60e51b81526004016102de90610c50565b600054610100900460ff161580156108b1576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b0384166001600160a01b031991821617909155603480549091163317905580156108ec576000805461ff00191690555b5050565b6034546001600160a01b031681565b303b1590565b604080518082019091526000808252602082015290565b80356001600160a01b038116811461041d57600080fd5b60008083601f840112610944578182fd5b50813567ffffffffffffffff81111561095b578182fd5b602083019150836020808302850101111561097557600080fd5b9250929050565b60006020828403121561098d578081fd5b610997838361091c565b9392505050565b600080604083850312156109b0578081fd5b6109ba848461091c565b91506109c9846020850161091c565b90509250929050565b600080602083850312156109e4578182fd5b823567ffffffffffffffff8111156109fa578283fd5b610a0685828601610933565b90969095509350505050565b600080600060408486031215610a26578081fd5b833567ffffffffffffffff811115610a3c578182fd5b610a4886828701610933565b9094509250610a5c9050856020860161091c565b90509250925092565b60008060008060408587031215610a7a578081fd5b843567ffffffffffffffff80821115610a91578283fd5b610a9d88838901610933565b90965094506020870135915080821115610ab5578283fd5b50610ac287828801610933565b95989497509550505050565b60008060408385031215610ae0578182fd5b8251915060208301518015158114610af6578182fd5b809150509250929050565b60008284526020808501945082825b85811015610b3e578183016001600160a01b03610b2d828561091c565b168852968301969150600101610b10565b509495945050505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b600060408252610b8b604083018587610b01565b905060018060a01b0383166020830152949350505050565b600060408252610bb7604083018688610b01565b8281036020840152610bca818587610b01565b979650505050505050565b602080825282518282018190526000919060409081850190868401855b82811015610c19578151805185528601511515868501529284019290850190600101610bf2565b5091979650505050505050565b60208082526010908201526f72657175697265206d756c746953696760801b604082015260600190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600d908201526c3932b8bab4b9329030b236b4b760991b604082015260600190565b6020808252601390820152720d2dcc6dedce6d2e6e8cadce840d8cadccee8d606b1b604082015260600190565b918252151560208201526040019056fea2646970667358221220f2131d18693549bc903d7113815558b47ee1855cffd124f97ceb7330351f647564736f6c63430006040033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
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.