Address Details
contract

0x3dFE0D3EAAea51BeafC8E17b701d0a90DF189D2E

Contract Name
PriceFallback
Creator
0x007e71–f37016 at 0x134854–ffb62a
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
60 Transactions
Transfers
0 Transfers
Gas Used
2,632,944
Last Balance Update
15014565
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
PriceFallback




Optimization enabled
false
Compiler version
v0.8.14+commit.80d49f37




EVM Version
london




Verified at
2022-10-06T04:52:16.813411Z

contracts/core/PriceFallback.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

import "../interfaces/IPriceFeed.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

/// @notice Dynamic error for price getters
/// @dev Emitted when address of token is not authorized
error TokenNotAuthorized(bytes32 symbol);

/// @notice Dynamic error for price getters
/// @dev Emitted when got old price data
error OldPriceData(bytes32 symbol);

/// @title RedStone Oracle Fallback contract
/// @author Moola Markets
/// @notice Utility contract to get price from price feed
/// @custom:contract Ownable implementation of admin modifiers
contract PriceFallback is Ownable {
  /// @notice Price feed address
  IPriceFeed public feed;

  /// @notice Map that authorizes assets (address to hash-symbol)
  mapping(address => bytes32) public addressToSymbol;

  /// @notice Hash-symbol for CELO
  bytes32 public constant CELO = bytes32("CELO");

  /// @notice Timestmap of each price update lifecycle
  uint256 public timestampDelay = 1 minutes;

  /// @notice Event emitted after feed is reset
  /// @param previous Previous price feed
  /// @param feed New price feed
  event ResetPriceFeed(address previous, address feed);
  /// @notice Event emmited after asset is authorized
  /// @param symbol Hash-symbol of asset
  /// @param asset Address of asset
  event AddedAsset(bytes32 symbol, address asset);

  /// @notice Event emmited after asset is deauthorized
  /// @param symbol Hash-symbol of asset
  /// @param asset Address of asset
  event DeletedAsset(bytes32 symbol, address asset);

  /// @notice Ecent emitted after timestamp delay is being changed
  /// @param time New delay in seconds
  event TimestampDelayChanged(uint256 time);

  /// @notice Initialize fallback
  /// @param _feed Price feed address
  constructor(IPriceFeed _feed) {
    feed = _feed;
  }

  /// @notice Authorize new asset
  /// @param _asset Address of not authorized asset
  /// @param _symbol Hash of symbol of asset
  function addAsset(address _asset, bytes32 _symbol) external onlyOwner {
    require(
      addressToSymbol[_asset] == bytes32(0),
      "Asset is already authorized"
    );
    addressToSymbol[_asset] = _symbol;
    emit AddedAsset(_symbol, _asset);
  }

  /// @notice Deauthorize asset
  /// @param _asset Address of authorized asset
  function deleteAsset(address _asset) external onlyOwner {
    bytes32 symbol = addressToSymbol[_asset];
    if (symbol != bytes32(0)) {
      addressToSymbol[_asset] = bytes32(0);
      emit DeletedAsset(symbol, _asset);
      return;
    }
    revert TokenNotAuthorized(symbol);
  }

  /// @notice Set new feed
  /// @param _feed address of new feed
  /// @dev Feed must be compatible with IPriceFeed interface
  function resetPriceFeed(address _feed) external onlyOwner {
    require(_feed != address(0), "Null address provided");
    address previous = address(feed);
    feed = IPriceFeed(_feed);
    emit ResetPriceFeed(previous, _feed);
  }

  /// @notice Set new timestamp delay
  /// @param _seconds New timestamp in seconds
  function changeTimestampDelay(uint256 _seconds) external onlyOwner {
    timestampDelay = _seconds;
    emit TimestampDelayChanged(timestampDelay);
  }

  /// @notice Get current price of asset (in CELO)
  /// @param _asset Address of asset
  function getAssetPrice(address _asset) public view returns (uint256) {
    bytes32 symbol = addressToSymbol[_asset];
    if (symbol != bytes32(0)) {
      uint256 last = feed.lastPriceUpdate(symbol);
      require(last > 0, "The price has never been set");
      if (block.timestamp < timestampDelay + last) {
        last = feed.lastPriceUpdate(CELO);
        require(last > 0, "The price has never been set");
        if (block.timestamp < timestampDelay + last) {
          return (feed.getPrice(symbol) * 1e18) / feed.getPrice(CELO);
        }
      }
      revert OldPriceData(symbol);
    }
    revert TokenNotAuthorized(symbol);
  }

  /// @notice Get current price of several assets (in CELO)
  /// @param _assets Addresses of assets
  function getAssetPriceExt(address[] memory _assets)
    external
    view
    returns (uint256[] memory)
  {
    uint256[] memory prices = new uint256[](_assets.length);
    for (uint256 i; i < _assets.length; i++) {
      prices[i] = getAssetPrice(_assets[i]);
    }
    return prices;
  }
}
        

/_openzeppelin/contracts/access/Ownable.sol

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

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

/_openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

/contracts/interfaces/IPriceFeed.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

interface IPriceFeed {
  function getPrice(bytes32 symbol) external view returns (uint256);

  function lastPriceUpdate(bytes32 symbol) external view returns (uint256);
}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_feed","internalType":"contract IPriceFeed"}]},{"type":"error","name":"OldPriceData","inputs":[{"type":"bytes32","name":"symbol","internalType":"bytes32"}]},{"type":"error","name":"TokenNotAuthorized","inputs":[{"type":"bytes32","name":"symbol","internalType":"bytes32"}]},{"type":"event","name":"AddedAsset","inputs":[{"type":"bytes32","name":"symbol","internalType":"bytes32","indexed":false},{"type":"address","name":"asset","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"DeletedAsset","inputs":[{"type":"bytes32","name":"symbol","internalType":"bytes32","indexed":false},{"type":"address","name":"asset","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ResetPriceFeed","inputs":[{"type":"address","name":"previous","internalType":"address","indexed":false},{"type":"address","name":"feed","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"TimestampDelayChanged","inputs":[{"type":"uint256","name":"time","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"CELO","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addAsset","inputs":[{"type":"address","name":"_asset","internalType":"address"},{"type":"bytes32","name":"_symbol","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"addressToSymbol","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeTimestampDelay","inputs":[{"type":"uint256","name":"_seconds","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deleteAsset","inputs":[{"type":"address","name":"_asset","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IPriceFeed"}],"name":"feed","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getAssetPrice","inputs":[{"type":"address","name":"_asset","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getAssetPriceExt","inputs":[{"type":"address[]","name":"_assets","internalType":"address[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"resetPriceFeed","inputs":[{"type":"address","name":"_feed","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"timestampDelay","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
              

Contract Creation Code

0x6080604052603c6003553480156200001657600080fd5b506040516200197f3803806200197f83398181016040528101906200003c9190620001ee565b6200005c62000050620000a460201b60201c565b620000ac60201b60201c565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505062000220565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001a28262000175565b9050919050565b6000620001b68262000195565b9050919050565b620001c881620001a9565b8114620001d457600080fd5b50565b600081519050620001e881620001bd565b92915050565b60006020828403121562000207576200020662000170565b5b60006200021784828501620001d7565b91505092915050565b61174f80620002306000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c578063b6e5beca11610066578063b6e5beca14610200578063f2fde38b1461021c578063f60e673e14610238578063f8ffc6e614610256576100cf565b8063715018a6146101a85780638da5cb5b146101b2578063b3596f07146101d0576100cf565b80630ba07750146100d457806315e09f3c146100f0578063163eb80d1461010c57806337a7b7d81461013c5780636a9d60971461015a5780636dff850c14610178575b600080fd5b6100ee60048036038101906100e99190610e32565b610272565b005b61010a60048036038101906101059190610e72565b61037f565b005b61012660048036038101906101219190610e72565b61049b565b6040516101339190610eae565b60405180910390f35b6101446104b3565b6040516101519190610f28565b60405180910390f35b6101626104d9565b60405161016f9190610f5c565b60405180910390f35b610192600480360381019061018d91906110d0565b6104df565b60405161019f91906111d7565b60405180910390f35b6101b061059a565b005b6101ba6105ae565b6040516101c79190611208565b60405180910390f35b6101ea60048036038101906101e59190610e72565b6105d7565b6040516101f79190610f5c565b60405180910390f35b61021a6004803603810190610215919061124f565b610a32565b005b61023660048036038101906102319190610e72565b610a7d565b005b610240610b00565b60405161024d9190610eae565b60405180910390f35b610270600480360381019061026b9190610e72565b610b24565b005b61027a610c40565b6000801b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146102fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f5906112d9565b60405180910390fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f5492b9bf82f630e2eb238760ff6780a294716174735cf447450f3d91074d306b81836040516103739291906112f9565b60405180910390a15050565b610387610c40565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000801b811461045b576000801b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fae71560ea05e0ba76fdbc3a999f11fc485da9a41b93a465f3e061e2326fb8a88818360405161044d9291906112f9565b60405180910390a150610498565b806040517f925e239100000000000000000000000000000000000000000000000000000000815260040161048f9190610eae565b60405180910390fd5b50565b60026020528060005260406000206000915090505481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60606000825167ffffffffffffffff8111156104fe576104fd610f8d565b5b60405190808252806020026020018201604052801561052c5781602001602082028036833780820191505090505b50905060005b83518110156105905761055e84828151811061055157610550611322565b5b60200260200101516105d7565b82828151811061057157610570611322565b5b602002602001018181525050808061058890611380565b915050610532565b5080915050919050565b6105a2610c40565b6105ac6000610cbe565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000801b81146109f0576000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fb512cb3836040518263ffffffff1660e01b81526004016106839190610eae565b602060405180830381865afa1580156106a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c491906113dd565b905060008111610709576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070090611456565b60405180910390fd5b806003546107179190611476565b4210156109b357600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fb512cb37f43454c4f000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016107999190610eae565b602060405180830381865afa1580156107b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107da91906113dd565b90506000811161081f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081690611456565b60405180910390fd5b8060035461082d9190611476565b4210156109b257600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166331d98b3f7f43454c4f000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016108af9190610eae565b602060405180830381865afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f091906113dd565b670de0b6b3a7640000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166331d98b3f856040518263ffffffff1660e01b81526004016109549190610eae565b602060405180830381865afa158015610971573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099591906113dd565b61099f91906114cc565b6109a99190611555565b92505050610a2d565b5b816040517f5ff077110000000000000000000000000000000000000000000000000000000081526004016109e79190610eae565b60405180910390fd5b806040517f925e2391000000000000000000000000000000000000000000000000000000008152600401610a249190610eae565b60405180910390fd5b919050565b610a3a610c40565b806003819055507fda07c1e22fe685d2831f3c9b58f6dcf231f18673511f4fa095b15e3547636ee7600354604051610a729190610f5c565b60405180910390a150565b610a85610c40565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610af4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aeb906115f8565b60405180910390fd5b610afd81610cbe565b50565b7f43454c4f0000000000000000000000000000000000000000000000000000000081565b610b2c610c40565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9290611664565b60405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507faddba7498a985f17d6193cb6b22891d24826dfd117959116f911cceb91ff12608183604051610c34929190611684565b60405180910390a15050565b610c48610d82565b73ffffffffffffffffffffffffffffffffffffffff16610c666105ae565b73ffffffffffffffffffffffffffffffffffffffff1614610cbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb3906116f9565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610dc982610d9e565b9050919050565b610dd981610dbe565b8114610de457600080fd5b50565b600081359050610df681610dd0565b92915050565b6000819050919050565b610e0f81610dfc565b8114610e1a57600080fd5b50565b600081359050610e2c81610e06565b92915050565b60008060408385031215610e4957610e48610d94565b5b6000610e5785828601610de7565b9250506020610e6885828601610e1d565b9150509250929050565b600060208284031215610e8857610e87610d94565b5b6000610e9684828501610de7565b91505092915050565b610ea881610dfc565b82525050565b6000602082019050610ec36000830184610e9f565b92915050565b6000819050919050565b6000610eee610ee9610ee484610d9e565b610ec9565b610d9e565b9050919050565b6000610f0082610ed3565b9050919050565b6000610f1282610ef5565b9050919050565b610f2281610f07565b82525050565b6000602082019050610f3d6000830184610f19565b92915050565b6000819050919050565b610f5681610f43565b82525050565b6000602082019050610f716000830184610f4d565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610fc582610f7c565b810181811067ffffffffffffffff82111715610fe457610fe3610f8d565b5b80604052505050565b6000610ff7610d8a565b90506110038282610fbc565b919050565b600067ffffffffffffffff82111561102357611022610f8d565b5b602082029050602081019050919050565b600080fd5b600061104c61104784611008565b610fed565b9050808382526020820190506020840283018581111561106f5761106e611034565b5b835b8181101561109857806110848882610de7565b845260208401935050602081019050611071565b5050509392505050565b600082601f8301126110b7576110b6610f77565b5b81356110c7848260208601611039565b91505092915050565b6000602082840312156110e6576110e5610d94565b5b600082013567ffffffffffffffff81111561110457611103610d99565b5b611110848285016110a2565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61114e81610f43565b82525050565b60006111608383611145565b60208301905092915050565b6000602082019050919050565b600061118482611119565b61118e8185611124565b935061119983611135565b8060005b838110156111ca5781516111b18882611154565b97506111bc8361116c565b92505060018101905061119d565b5085935050505092915050565b600060208201905081810360008301526111f18184611179565b905092915050565b61120281610dbe565b82525050565b600060208201905061121d60008301846111f9565b92915050565b61122c81610f43565b811461123757600080fd5b50565b60008135905061124981611223565b92915050565b60006020828403121561126557611264610d94565b5b60006112738482850161123a565b91505092915050565b600082825260208201905092915050565b7f417373657420697320616c726561647920617574686f72697a65640000000000600082015250565b60006112c3601b8361127c565b91506112ce8261128d565b602082019050919050565b600060208201905081810360008301526112f2816112b6565b9050919050565b600060408201905061130e6000830185610e9f565b61131b60208301846111f9565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061138b82610f43565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036113bd576113bc611351565b5b600182019050919050565b6000815190506113d781611223565b92915050565b6000602082840312156113f3576113f2610d94565b5b6000611401848285016113c8565b91505092915050565b7f54686520707269636520686173206e65766572206265656e2073657400000000600082015250565b6000611440601c8361127c565b915061144b8261140a565b602082019050919050565b6000602082019050818103600083015261146f81611433565b9050919050565b600061148182610f43565b915061148c83610f43565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156114c1576114c0611351565b5b828201905092915050565b60006114d782610f43565b91506114e283610f43565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561151b5761151a611351565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061156082610f43565b915061156b83610f43565b92508261157b5761157a611526565b5b828204905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006115e260268361127c565b91506115ed82611586565b604082019050919050565b60006020820190508181036000830152611611816115d5565b9050919050565b7f4e756c6c20616464726573732070726f76696465640000000000000000000000600082015250565b600061164e60158361127c565b915061165982611618565b602082019050919050565b6000602082019050818103600083015261167d81611641565b9050919050565b600060408201905061169960008301856111f9565b6116a660208301846111f9565b9392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006116e360208361127c565b91506116ee826116ad565b602082019050919050565b60006020820190508181036000830152611712816116d6565b905091905056fea2646970667358221220c04b99b91cf985500cb83945ca96f9d7bbd64338a8b1b8d9abf6b514c1a038b864736f6c634300080e003300000000000000000000000066f2794516ae2a0d415a534a2c29b272039050e9

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c578063b6e5beca11610066578063b6e5beca14610200578063f2fde38b1461021c578063f60e673e14610238578063f8ffc6e614610256576100cf565b8063715018a6146101a85780638da5cb5b146101b2578063b3596f07146101d0576100cf565b80630ba07750146100d457806315e09f3c146100f0578063163eb80d1461010c57806337a7b7d81461013c5780636a9d60971461015a5780636dff850c14610178575b600080fd5b6100ee60048036038101906100e99190610e32565b610272565b005b61010a60048036038101906101059190610e72565b61037f565b005b61012660048036038101906101219190610e72565b61049b565b6040516101339190610eae565b60405180910390f35b6101446104b3565b6040516101519190610f28565b60405180910390f35b6101626104d9565b60405161016f9190610f5c565b60405180910390f35b610192600480360381019061018d91906110d0565b6104df565b60405161019f91906111d7565b60405180910390f35b6101b061059a565b005b6101ba6105ae565b6040516101c79190611208565b60405180910390f35b6101ea60048036038101906101e59190610e72565b6105d7565b6040516101f79190610f5c565b60405180910390f35b61021a6004803603810190610215919061124f565b610a32565b005b61023660048036038101906102319190610e72565b610a7d565b005b610240610b00565b60405161024d9190610eae565b60405180910390f35b610270600480360381019061026b9190610e72565b610b24565b005b61027a610c40565b6000801b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146102fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f5906112d9565b60405180910390fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f5492b9bf82f630e2eb238760ff6780a294716174735cf447450f3d91074d306b81836040516103739291906112f9565b60405180910390a15050565b610387610c40565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000801b811461045b576000801b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fae71560ea05e0ba76fdbc3a999f11fc485da9a41b93a465f3e061e2326fb8a88818360405161044d9291906112f9565b60405180910390a150610498565b806040517f925e239100000000000000000000000000000000000000000000000000000000815260040161048f9190610eae565b60405180910390fd5b50565b60026020528060005260406000206000915090505481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60606000825167ffffffffffffffff8111156104fe576104fd610f8d565b5b60405190808252806020026020018201604052801561052c5781602001602082028036833780820191505090505b50905060005b83518110156105905761055e84828151811061055157610550611322565b5b60200260200101516105d7565b82828151811061057157610570611322565b5b602002602001018181525050808061058890611380565b915050610532565b5080915050919050565b6105a2610c40565b6105ac6000610cbe565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000801b81146109f0576000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fb512cb3836040518263ffffffff1660e01b81526004016106839190610eae565b602060405180830381865afa1580156106a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c491906113dd565b905060008111610709576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070090611456565b60405180910390fd5b806003546107179190611476565b4210156109b357600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fb512cb37f43454c4f000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016107999190610eae565b602060405180830381865afa1580156107b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107da91906113dd565b90506000811161081f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081690611456565b60405180910390fd5b8060035461082d9190611476565b4210156109b257600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166331d98b3f7f43454c4f000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016108af9190610eae565b602060405180830381865afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f091906113dd565b670de0b6b3a7640000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166331d98b3f856040518263ffffffff1660e01b81526004016109549190610eae565b602060405180830381865afa158015610971573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099591906113dd565b61099f91906114cc565b6109a99190611555565b92505050610a2d565b5b816040517f5ff077110000000000000000000000000000000000000000000000000000000081526004016109e79190610eae565b60405180910390fd5b806040517f925e2391000000000000000000000000000000000000000000000000000000008152600401610a249190610eae565b60405180910390fd5b919050565b610a3a610c40565b806003819055507fda07c1e22fe685d2831f3c9b58f6dcf231f18673511f4fa095b15e3547636ee7600354604051610a729190610f5c565b60405180910390a150565b610a85610c40565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610af4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aeb906115f8565b60405180910390fd5b610afd81610cbe565b50565b7f43454c4f0000000000000000000000000000000000000000000000000000000081565b610b2c610c40565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9290611664565b60405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507faddba7498a985f17d6193cb6b22891d24826dfd117959116f911cceb91ff12608183604051610c34929190611684565b60405180910390a15050565b610c48610d82565b73ffffffffffffffffffffffffffffffffffffffff16610c666105ae565b73ffffffffffffffffffffffffffffffffffffffff1614610cbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb3906116f9565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610dc982610d9e565b9050919050565b610dd981610dbe565b8114610de457600080fd5b50565b600081359050610df681610dd0565b92915050565b6000819050919050565b610e0f81610dfc565b8114610e1a57600080fd5b50565b600081359050610e2c81610e06565b92915050565b60008060408385031215610e4957610e48610d94565b5b6000610e5785828601610de7565b9250506020610e6885828601610e1d565b9150509250929050565b600060208284031215610e8857610e87610d94565b5b6000610e9684828501610de7565b91505092915050565b610ea881610dfc565b82525050565b6000602082019050610ec36000830184610e9f565b92915050565b6000819050919050565b6000610eee610ee9610ee484610d9e565b610ec9565b610d9e565b9050919050565b6000610f0082610ed3565b9050919050565b6000610f1282610ef5565b9050919050565b610f2281610f07565b82525050565b6000602082019050610f3d6000830184610f19565b92915050565b6000819050919050565b610f5681610f43565b82525050565b6000602082019050610f716000830184610f4d565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610fc582610f7c565b810181811067ffffffffffffffff82111715610fe457610fe3610f8d565b5b80604052505050565b6000610ff7610d8a565b90506110038282610fbc565b919050565b600067ffffffffffffffff82111561102357611022610f8d565b5b602082029050602081019050919050565b600080fd5b600061104c61104784611008565b610fed565b9050808382526020820190506020840283018581111561106f5761106e611034565b5b835b8181101561109857806110848882610de7565b845260208401935050602081019050611071565b5050509392505050565b600082601f8301126110b7576110b6610f77565b5b81356110c7848260208601611039565b91505092915050565b6000602082840312156110e6576110e5610d94565b5b600082013567ffffffffffffffff81111561110457611103610d99565b5b611110848285016110a2565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61114e81610f43565b82525050565b60006111608383611145565b60208301905092915050565b6000602082019050919050565b600061118482611119565b61118e8185611124565b935061119983611135565b8060005b838110156111ca5781516111b18882611154565b97506111bc8361116c565b92505060018101905061119d565b5085935050505092915050565b600060208201905081810360008301526111f18184611179565b905092915050565b61120281610dbe565b82525050565b600060208201905061121d60008301846111f9565b92915050565b61122c81610f43565b811461123757600080fd5b50565b60008135905061124981611223565b92915050565b60006020828403121561126557611264610d94565b5b60006112738482850161123a565b91505092915050565b600082825260208201905092915050565b7f417373657420697320616c726561647920617574686f72697a65640000000000600082015250565b60006112c3601b8361127c565b91506112ce8261128d565b602082019050919050565b600060208201905081810360008301526112f2816112b6565b9050919050565b600060408201905061130e6000830185610e9f565b61131b60208301846111f9565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061138b82610f43565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036113bd576113bc611351565b5b600182019050919050565b6000815190506113d781611223565b92915050565b6000602082840312156113f3576113f2610d94565b5b6000611401848285016113c8565b91505092915050565b7f54686520707269636520686173206e65766572206265656e2073657400000000600082015250565b6000611440601c8361127c565b915061144b8261140a565b602082019050919050565b6000602082019050818103600083015261146f81611433565b9050919050565b600061148182610f43565b915061148c83610f43565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156114c1576114c0611351565b5b828201905092915050565b60006114d782610f43565b91506114e283610f43565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561151b5761151a611351565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061156082610f43565b915061156b83610f43565b92508261157b5761157a611526565b5b828204905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006115e260268361127c565b91506115ed82611586565b604082019050919050565b60006020820190508181036000830152611611816115d5565b9050919050565b7f4e756c6c20616464726573732070726f76696465640000000000000000000000600082015250565b600061164e60158361127c565b915061165982611618565b602082019050919050565b6000602082019050818103600083015261167d81611641565b9050919050565b600060408201905061169960008301856111f9565b6116a660208301846111f9565b9392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006116e360208361127c565b91506116ee826116ad565b602082019050919050565b60006020820190508181036000830152611712816116d6565b905091905056fea2646970667358221220c04b99b91cf985500cb83945ca96f9d7bbd64338a8b1b8d9abf6b514c1a038b864736f6c634300080e0033