Contract 0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e

Contract Overview

Balance:
0 AVAX

AVAX Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xebe84d376ff01d2068f0d7895aed11b3d8c4b835fe9370c11839e8063e47bd1dPost Price List149857962022-05-21 12:12:2343 secs ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.001122309 27
0x6ca406beff1cbc23eaeaa0d12fc136252f06e5668c9c6e22a4b69e6d82aee60bPost Price149857612022-05-21 12:11:121 min ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.000957488 28
0x56ad8473b30630aa7a1181c0af147fda8c0f2224e5050f6617ab3eff4af302c3Post Price149857432022-05-21 12:10:372 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.000957488 28
0xe5e4f06c0c94374afb98678d5d1bcbcea69e61d563e522b56f2abfd29d765ff3Post Price List149857242022-05-21 12:09:573 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.001163876 28
0xc6dbedf1ab0b49ddd7477fd909a26664a5b7db7c72a591c0f5e04f6d6410818aPost Price149857102022-05-21 12:09:303 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.00122883326 35.935
0x121727ab5b7f3d379cc5a3f50f70929256f124450b87dc0cd1cb59aa547a3548Post Price149856882022-05-21 12:08:464 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.000951425049 27.8227
0x7e6c5e04421ff739f79e463266e6f601fd61e9d2ce09464413987e6c7b17b4abPost Price149856832022-05-21 12:08:374 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.000923292 27
0x232d910b66eecfe11eaa1816cfef0642f4684771328974ba0bfeb2e7e7fb6238Post Price List149856702022-05-21 12:08:104 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.001342691398 28.220252596
0x2f85f35014b297842b5454381a4578b26a8622dcd59b5c54f7163d417e45ed52Post Price149856682022-05-21 12:08:065 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.000957488 28
0x5e2454d948850fb0a221df8f8ac4738110614b6b0be53e29efe94ca3e5b83839Post Price149856562022-05-21 12:07:425 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.000948529297 27.738019
0x611a799a3adef8be1ffe76db35d735a864ea888ef4cccd30c620059a9b1a0bfbPost Price149856062022-05-21 12:06:007 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.000772092 27
0x0d376894f83040c1791cfabcd69690e7b7e6bc7315534a5f1bab43e7ad8b9991Post Price List149856062022-05-21 12:06:007 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.001399728615 29.42646405
0xb2178de2ff6d205a3ccf3bc0648f5eea2c478f2020152d275efd736ef9929910Post Price149855792022-05-21 12:05:058 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.000923292 27
0x54f50bad64516564b46f6c005b0c664a151563f451be8556f76c54108f802b19Post Price149855482022-05-21 12:04:019 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.000951425049 27.8227
0x169cbd44afe945bc80a3a9064373384e44ff019de3ed3246fb976e2c6011d391Post Price List149855472022-05-21 12:04:009 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.001164884 28
0xa8c18597ad148f077b5925996221101e389dc33659edcf7ce10d9c78e1af4f04Post Price List149855202022-05-21 12:03:089 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.002784185 67
0x805c1d1131c873adbee561dae9d5eef27f69a601f12dd9047cbea5418f1c5e8dPost Price List149854432022-05-21 12:00:3212 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.001283985 27
0xf4962610e75870c05ad3fd9a29c1db1ec199168ebee8ca840930215301627bc0Post Price149854402022-05-21 12:00:2712 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.000923292 27
0x7b4a18da8bf761852ab7ce831553c8cd33c07dbfcc13c4d734c201c5632ff742Post Price149854282022-05-21 12:00:0313 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.00097928795 28.6375
0xf69f9b58a6690323ebb927b4b4592d751fd1a7de556e76eba38ad5a945149c76Post Price List149852962022-05-21 11:55:4017 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.001122309 27
0x40cbdccab11ae063b540ca6dde6c55fa1769ee10b7cf1011fb43594c0fe3a226Post Price List149852032022-05-21 11:52:3020 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.001122309 27
0x9374848b6626f88a3054186cf2fc636623192b9bfc95173a0a86b954f057b9a4Post Price List149851922022-05-21 11:52:0720 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.001284309 27
0x0bc217b8471bbfe6ab53c2820df6df55975d0da81d50212f2346e98d2d877a2ePost Price149851832022-05-21 11:51:4921 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.001309002093 38.27939215
0x956809eb15207573bf6af9917ec235a8060a8b03f41fd5508a2c0fbee25623f7Post Price149851372022-05-21 11:50:1722 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.001191965471 34.8568684
0x5c210bf0f394467f4b96fcbd56f95b12d6bdf9673784480cd91c185267901ee5Post Price149851162022-05-21 11:49:3423 mins ago0x491e59c255c790d4e3a53cec2632524088f1aaa4 IN  0x25a4d4a094a084c7ad45ac273cf7d6b6bfae7d4e0 AVAX0.000951425049 27.8227
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Wooracle

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 3 : Wooracle_Avax.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

import './libraries/InitializableOwnable.sol';
import './interfaces/IWooracle.sol';

/// @title Wooracle implementation in Avalanche chain.
/// @notice Will be maintained and updated periodically by Woo.network in multichains.
contract Wooracle is InitializableOwnable, IWooracle {
    /* ----- State variables ----- */

    struct TokenInfo {
        uint256 price;  // 18 - base_decimal + quote_decimal
        uint256 coeff;  // 36 - quote
        uint256 spread; // 18
    }

    mapping(address => TokenInfo) public infos;

    address public override quoteToken;
    uint256 public override timestamp;

    uint256 public staleDuration;

    constructor() public {
        initOwner(msg.sender);
        staleDuration = uint256(300);
    }

    /* ----- External Functions ----- */

    /// @dev Set the quote token address.
    /// @param newQuoteToken token address
    function setQuoteToken(address newQuoteToken) external onlyOwner {
        quoteToken = newQuoteToken;
    }

    /// @dev Set the staleDuration.
    /// @param newStaleDuration the new stale duration
    function setStaleDuration(uint256 newStaleDuration) external onlyOwner {
        staleDuration = newStaleDuration;
    }

    /// @dev Update the base token prices.
    /// @param base the baseToken address
    /// @param newPrice the new prices for the base token
    function postPrice(address base, uint256 newPrice) external onlyOwner {
        infos[base].price = newPrice;
        timestamp = block.timestamp;
    }

    /// @dev batch update baseTokens prices
    /// @param bases list of baseToken address
    /// @param newPrices the updated prices list
    function postPriceList(address[] calldata bases, uint256[] calldata newPrices) external onlyOwner {
        uint256 length = bases.length;
        require(length == newPrices.length, 'Wooracle: length_INVALID');

        for (uint256 i = 0; i < length; i++) {
            infos[bases[i]].price = newPrices[i];
        }

        timestamp = block.timestamp;
    }

    /// @dev update the spreads info.
    /// @param base baseToken address
    /// @param newSpread the new spreads
    function postSpread(address base, uint256 newSpread) external onlyOwner {
        infos[base].spread = newSpread;
        timestamp = block.timestamp;
    }

    /// @dev batch update the spreads info.
    /// @param bases list of baseToken address
    /// @param newSpreads list of spreads info
    function postSpreadList(address[] calldata bases, uint256[] calldata newSpreads) external onlyOwner {
        uint256 length = bases.length;
        require(length == newSpreads.length, 'Wooracle: length_INVALID');

        for (uint256 i = 0; i < length; i++) {
            infos[bases[i]].spread = newSpreads[i];
        }

        timestamp = block.timestamp;
    }

    /// @dev update the state of the given base token.
    /// @param base baseToken address
    /// @param newPrice the new prices
    /// @param newSpread the new spreads
    /// @param newCoeff the new slippage coefficent
    function postState(
        address base,
        uint256 newPrice,
        uint256 newSpread,
        uint256 newCoeff
    ) external onlyOwner {
        _setState(base, newPrice, newSpread, newCoeff);
        timestamp = block.timestamp;
    }

    /// @dev batch update the prices, spreads and slipagge coeffs info.
    /// @param bases list of baseToken address
    /// @param newPrices the prices list
    /// @param newSpreads the spreads list
    /// @param newCoeffs the slippage coefficent list
    function postStateList(
        address[] calldata bases,
        uint256[] calldata newPrices,
        uint256[] calldata newSpreads,
        uint256[] calldata newCoeffs
    ) external onlyOwner {
        uint256 length = bases.length;
        require(
            length == newPrices.length && length == newSpreads.length && length == newCoeffs.length,
            'Wooracle: length_INVALID'
        );

        for (uint256 i = 0; i < length; i++) {
            _setState(bases[i], newPrices[i], newSpreads[i], newCoeffs[i]);
        }
        timestamp = block.timestamp;
    }

    /// @inheritdoc IWooracle
    function price(address base) external view override returns (uint256 priceNow, bool feasible) {
        priceNow = infos[base].price;
        feasible = priceNow != 0 && block.timestamp <= (timestamp + staleDuration * 1 seconds);
    }

    function getPrice(address base) external view override returns (uint256) {
        return infos[base].price;
    }

    function getSpread(address base) external view override returns (uint256) {
        return infos[base].spread;
    }

    function getCoeff(address base) external view override returns (uint256) {
        return infos[base].coeff;
    }

    /// @inheritdoc IWooracle
    function state(address base)
        external
        view
        override
        returns (
            uint256 priceNow,
            uint256 spreadNow,
            uint256 coeffNow,
            bool feasible
        )
    {
        TokenInfo storage info = infos[base];
        priceNow = info.price;
        spreadNow = info.spread;
        coeffNow = info.coeff;
        feasible = priceNow != 0 && block.timestamp <= (timestamp + staleDuration * 1 seconds);
    }

    function isFeasible(address base) public view override returns (bool) {
        return infos[base].price != 0 && block.timestamp <= (timestamp + staleDuration * 1 seconds);
    }

    /* ----- Private Functions ----- */

    function _setState(
        address base,
        uint256 newPrice,
        uint256 newSpread,
        uint256 newCoeff
    ) private {
        TokenInfo storage info = infos[base];
        info.price = newPrice;
        info.spread = newSpread;
        info.coeff = newCoeff;
    }
}

File 2 of 3 : InitializableOwnable.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

/**
 * @title Ownable initializable contract.
 *
 * @notice Ownership related functions
 */
contract InitializableOwnable {
    address public _OWNER_;
    address public _NEW_OWNER_;
    bool internal _INITIALIZED_;

    // ============ Events ============

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

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

    // ============ Modifiers ============

    modifier notInitialized() {
        require(!_INITIALIZED_, 'InitializableOwnable: SHOULD_NOT_BE_INITIALIZED');
        _;
    }

    modifier onlyOwner() {
        require(msg.sender == _OWNER_, 'InitializableOwnable: NOT_OWNER');
        _;
    }

    // ============ Functions ============

    /// @dev Init _OWNER_ from newOwner and set _INITIALIZED_ as true
    /// @param newOwner new owner address
    function initOwner(address newOwner) public notInitialized {
        _INITIALIZED_ = true;
        _OWNER_ = newOwner;
    }

    /// @dev Set _NEW_OWNER_ from newOwner
    /// @param newOwner new owner address
    function transferOwnership(address newOwner) public onlyOwner {
        emit OwnershipTransferPrepared(_OWNER_, newOwner);
        _NEW_OWNER_ = newOwner;
    }

    /// @dev Set _OWNER_ from _NEW_OWNER_ and set _NEW_OWNER_ equal zero address
    function claimOwnership() public {
        require(msg.sender == _NEW_OWNER_, 'InitializableOwnable: INVALID_CLAIM');
        emit OwnershipTransferred(_OWNER_, _NEW_OWNER_);
        _OWNER_ = _NEW_OWNER_;
        _NEW_OWNER_ = address(0);
    }
}

File 3 of 3 : IWooracle.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

/// @title The oracle interface by Woo.Network.
/// @notice update and posted the latest price info by Woo.
interface IWooracle {
    /// @dev the quote token for Wooracle's pricing.
    /// @return the quote token
    function quoteToken() external view returns (address);

    /// @dev the price for the given base token
    /// @param base baseToken address
    /// @return priceNow the current price of base token
    /// @return feasible whether the current price is feasible and valid
    function price(address base) external view returns (uint256 priceNow, bool feasible);

    function getPrice(address base) external view returns (uint256);

    function getSpread(address base) external view returns (uint256);

    function getCoeff(address base) external view returns (uint256);

    /// @dev returns the state for the given base token.
    /// @param base baseToken address
    /// @return priceNow the current price of base token
    /// @return spreadNow the current spread of base token
    /// @return coeffNow the slippage coefficient of base token
    /// @return feasible whether the current state is feasible and valid
    function state(address base)
        external
        view
        returns (
            uint256 priceNow,
            uint256 spreadNow,
            uint256 coeffNow,
            bool feasible
        );

    /// @dev returns the last updated timestamp
    /// @return the last updated timestamp
    function timestamp() external view returns (uint256);

    /// @dev returns whether the base token price is valid.
    /// @param base baseToken address
    /// @return whether the base token price is valid.
    function isFeasible(address base) external view returns (bool);
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

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":"OwnershipTransferPrepared","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"},{"inputs":[],"name":"_NEW_OWNER_","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_OWNER_","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"getCoeff","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"getSpread","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"infos","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"coeff","type":"uint256"},{"internalType":"uint256","name":"spread","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"initOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"isFeasible","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"},{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"postPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"bases","type":"address[]"},{"internalType":"uint256[]","name":"newPrices","type":"uint256[]"}],"name":"postPriceList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"},{"internalType":"uint256","name":"newSpread","type":"uint256"}],"name":"postSpread","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"bases","type":"address[]"},{"internalType":"uint256[]","name":"newSpreads","type":"uint256[]"}],"name":"postSpreadList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"},{"internalType":"uint256","name":"newPrice","type":"uint256"},{"internalType":"uint256","name":"newSpread","type":"uint256"},{"internalType":"uint256","name":"newCoeff","type":"uint256"}],"name":"postState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"bases","type":"address[]"},{"internalType":"uint256[]","name":"newPrices","type":"uint256[]"},{"internalType":"uint256[]","name":"newSpreads","type":"uint256[]"},{"internalType":"uint256[]","name":"newCoeffs","type":"uint256[]"}],"name":"postStateList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"price","outputs":[{"internalType":"uint256","name":"priceNow","type":"uint256"},{"internalType":"bool","name":"feasible","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quoteToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newQuoteToken","type":"address"}],"name":"setQuoteToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newStaleDuration","type":"uint256"}],"name":"setStaleDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staleDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"base","type":"address"}],"name":"state","outputs":[{"internalType":"uint256","name":"priceNow","type":"uint256"},{"internalType":"uint256","name":"spreadNow","type":"uint256"},{"internalType":"uint256","name":"coeffNow","type":"uint256"},{"internalType":"bool","name":"feasible","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061001a33610025565b61012c6005556100dd565b600154600160a01b900460ff16156100585760405162461bcd60e51b815260040161004f9061008e565b60405180910390fd5b6001805460ff60a01b1916600160a01b179055600080546001600160a01b039092166001600160a01b0319909216919091179055565b6020808252602f908201527f496e697469616c697a61626c654f776e61626c653a2053484f554c445f4e4f5460408201526e17d09157d253925512505312569151608a1b606082015260800190565b610da2806100ec6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80636eb54beb116100c3578063aa5fd4491161007c578063aa5fd449146102ab578063aea91078146102be578063b80777ea146102df578063c6ddb642146102e7578063cc6864b114610309578063f2fde38b146103115761014d565b80636eb54beb146102445780638456db1514610257578063909dd4d71461025f57806393e45a391461027257806399235fd4146102855780639b4bd754146102985761014d565b806341976e091161011557806341976e09146101c3578063439bba33146101e35780634e71e0c81461020357806350a4a5c91461020b5780635684c91e1461021e5780636b7cb1ac146102315761014d565b80630d0092971461015257806316048bc4146101675780631cfb886d14610185578063217a4b701461019857806331e658a5146101a0575b600080fd5b610165610160366004610a30565b610324565b005b61016f61038d565b60405161017c9190610c01565b60405180910390f35b610165610193366004610a30565b61039c565b61016f6103e8565b6101b36101ae366004610a30565b6103f7565b60405161017c9493929190610d4f565b6101d66101d1366004610a30565b610440565b60405161017c9190610d20565b6101f66101f1366004610a30565b61045b565b60405161017c9190610c15565b61016561048e565b610165610219366004610a52565b61051c565b61016561022c366004610ac1565b61056a565b61016561023f366004610ac1565b610625565b610165610252366004610a7c565b6106d7565b61016f610717565b61016561026d366004610b2a565b610726565b6101d6610280366004610a30565b61080b565b610165610293366004610be9565b610829565b6101d66102a6366004610a30565b610858565b6101656102b9366004610a52565b610877565b6102d16102cc366004610a30565b6108c1565b60405161017c929190610d29565b6101d66108f7565b6102fa6102f5366004610a30565b6108fd565b60405161017c93929190610d39565b6101d661091d565b61016561031f366004610a30565b610923565b600154600160a01b900460ff16156103575760405162461bcd60e51b815260040161034e90610c8e565b60405180910390fd5b6001805460ff60a01b1916600160a01b179055600080546001600160a01b039092166001600160a01b0319909216919091179055565b6000546001600160a01b031681565b6000546001600160a01b031633146103c65760405162461bcd60e51b815260040161034e90610c57565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b6001600160a01b038116600090815260026020819052604082208054918101546001820154929390929184158015906104365750600554600454014211155b9150509193509193565b6001600160a01b031660009081526002602052604090205490565b6001600160a01b038116600090815260026020526040812054158015906104885750600554600454014211155b92915050565b6001546001600160a01b031633146104b85760405162461bcd60e51b815260040161034e90610cdd565b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031633146105465760405162461bcd60e51b815260040161034e90610c57565b6001600160a01b039091166000908152600260208190526040909120015542600455565b6000546001600160a01b031633146105945760405162461bcd60e51b815260040161034e90610c57565b828181146105b45760405162461bcd60e51b815260040161034e90610c20565b60005b81811015610619578383828181106105cb57fe5b90506020020135600260008888858181106105e257fe5b90506020020160208101906105f79190610a30565b6001600160a01b031681526020810191909152604001600020556001016105b7565b50504260045550505050565b6000546001600160a01b0316331461064f5760405162461bcd60e51b815260040161034e90610c57565b8281811461066f5760405162461bcd60e51b815260040161034e90610c20565b60005b818110156106195783838281811061068657fe5b905060200201356002600088888581811061069d57fe5b90506020020160208101906106b29190610a30565b6001600160a01b03168152602081019190915260400160002060020155600101610672565b6000546001600160a01b031633146107015760405162461bcd60e51b815260040161034e90610c57565b61070d848484846109a8565b5050426004555050565b6001546001600160a01b031681565b6000546001600160a01b031633146107505760405162461bcd60e51b815260040161034e90610c57565b86858114801561075f57508084145b801561076a57508082145b6107865760405162461bcd60e51b815260040161034e90610c20565b60005b818110156107fb576107f38a8a838181106107a057fe5b90506020020160208101906107b59190610a30565b8989848181106107c157fe5b905060200201358888858181106107d457fe5b905060200201358787868181106107e757fe5b905060200201356109a8565b600101610789565b5050426004555050505050505050565b6001600160a01b031660009081526002602052604090206001015490565b6000546001600160a01b031633146108535760405162461bcd60e51b815260040161034e90610c57565b600555565b6001600160a01b03166000908152600260208190526040909120015490565b6000546001600160a01b031633146108a15760405162461bcd60e51b815260040161034e90610c57565b6001600160a01b0390911660009081526002602052604090205542600455565b6001600160a01b0381166000908152600260205260408120549081158015906108f05750600554600454014211155b9050915091565b60045481565b600260208190526000918252604090912080546001820154919092015483565b60055481565b6000546001600160a01b0316331461094d5760405162461bcd60e51b815260040161034e90610c57565b600080546040516001600160a01b03808516939216917fdcf55418cee3220104fef63f979ff3c4097ad240c0c43dcb33ce837748983e6291a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03909316600090815260026020819052604090912092835582015560010155565b80356001600160a01b038116811461048857600080fd5b60008083601f8401126109f8578182fd5b50813567ffffffffffffffff811115610a0f578182fd5b6020830191508360208083028501011115610a2957600080fd5b9250929050565b600060208284031215610a41578081fd5b610a4b83836109d0565b9392505050565b60008060408385031215610a64578081fd5b610a6e84846109d0565b946020939093013593505050565b60008060008060808587031215610a91578182fd5b84356001600160a01b0381168114610aa7578283fd5b966020860135965060408601359560600135945092505050565b60008060008060408587031215610ad6578384fd5b843567ffffffffffffffff80821115610aed578586fd5b610af9888389016109e7565b90965094506020870135915080821115610b11578384fd5b50610b1e878288016109e7565b95989497509550505050565b6000806000806000806000806080898b031215610b45578384fd5b883567ffffffffffffffff80821115610b5c578586fd5b610b688c838d016109e7565b909a50985060208b0135915080821115610b80578586fd5b610b8c8c838d016109e7565b909850965060408b0135915080821115610ba4578586fd5b610bb08c838d016109e7565b909650945060608b0135915080821115610bc8578384fd5b50610bd58b828c016109e7565b999c989b5096995094979396929594505050565b600060208284031215610bfa578081fd5b5035919050565b6001600160a01b0391909116815260200190565b901515815260200190565b60208082526018908201527f576f6f7261636c653a206c656e6774685f494e56414c49440000000000000000604082015260600190565b6020808252601f908201527f496e697469616c697a61626c654f776e61626c653a204e4f545f4f574e455200604082015260600190565b6020808252602f908201527f496e697469616c697a61626c654f776e61626c653a2053484f554c445f4e4f5460408201526e17d09157d253925512505312569151608a1b606082015260800190565b60208082526023908201527f496e697469616c697a61626c654f776e61626c653a20494e56414c49445f434c60408201526241494d60e81b606082015260800190565b90815260200190565b9182521515602082015260400190565b9283526020830191909152604082015260600190565b93845260208401929092526040830152151560608201526080019056fea26469706673582212209bccdde24b23f608d704cf3f9d2041a54e69280b287871f843126e687224237864736f6c634300060c0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.