$BASED token contract has migrated to a new address.
ERC-20
Old Contract
Overview
Max Total Supply
100,000 $BASED
Holders
553 (0.00%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.023946809142354539 $BASEDValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
UFragments
Compiler Version
v0.4.24+commit.e67f0147
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-08-12 */ // Sources flattened with buidler v1.4.3 https://buidler.dev // File openzeppelin-eth/contracts/math/[email protected] pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on 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-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } // File zos-lib/contracts/[email protected] pragma solidity >=0.4.24 <0.6.0; /** * @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 wasInitializing = initializing; initializing = true; initialized = true; _; initializing = wasInitializing; } /// @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. uint256 cs; assembly { cs := extcodesize(address) } return cs == 0; } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } // File openzeppelin-eth/contracts/ownership/[email protected] pragma solidity ^0.4.24; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable is Initializable { address private _owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function initialize(address sender) public initializer { _owner = sender; } /** * @return the address of the owner. */ function owner() public view returns(address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner()); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns(bool) { return msg.sender == _owner; } /** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(_owner); _owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[50] private ______gap; } // File openzeppelin-eth/contracts/token/ERC20/[email protected] pragma solidity ^0.4.24; /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); } // File openzeppelin-eth/contracts/token/ERC20/[email protected] pragma solidity ^0.4.24; /** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ contract ERC20Detailed is Initializable, IERC20 { string private _name; string private _symbol; uint8 private _decimals; function initialize(string name, string symbol, uint8 decimals) public initializer { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ function name() public view returns(string) { return _name; } /** * @return the symbol of the token. */ function symbol() public view returns(string) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view returns(uint8) { return _decimals; } uint256[50] private ______gap; } // File contracts/v4/lib/SafeMathInt.sol /* MIT License Copyright (c) 2018 requestnetwork Copyright (c) 2018 Fragments, Inc. 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. */ pragma solidity 0.4.24; /** * @title SafeMathInt * @dev Math operations for int256 with overflow safety checks. */ library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { int256 c = a * b; // Detect overflow when multiplying MIN_INT256 with -1 require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256)); require((b == 0) || (c / b == a)); return c; } /** * @dev Division of two int256 variables and fails on overflow. */ function div(int256 a, int256 b) internal pure returns (int256) { // Prevent overflow when dividing MIN_INT256 by -1 require(b != -1 || a != MIN_INT256); // Solidity already throws when dividing by 0. return a / b; } /** * @dev Subtracts two int256 variables and fails on overflow. */ function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a)); return c; } /** * @dev Adds two int256 variables and fails on overflow. */ function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a)); return c; } /** * @dev Converts to absolute value, and fails on overflow. */ function abs(int256 a) internal pure returns (int256) { require(a != MIN_INT256); return a < 0 ? -a : a; } } // File contracts/v4/lib/UInt256Lib.sol pragma solidity 0.4.24; /** * @title Various utilities useful for uint256. */ library UInt256Lib { uint256 private constant MAX_INT256 = ~(uint256(1) << 255); /** * @dev Safely converts a uint256 to an int256. */ function toInt256Safe(uint256 a) internal pure returns (int256) { require(a <= MAX_INT256); return int256(a); } } // File contracts/v4/UFragments.sol pragma solidity 0.4.24; /** * @title uFragments ERC20 token * @dev This is part of an implementation of the uFragments Ideal Money protocol. * uFragments is a normal ERC20 token, but its supply can be adjusted by splitting and * combining tokens proportionally across all wallets. * * uFragment balances are internally represented with a hidden denomination, 'gons'. * We support splitting the currency in expansion and combining the currency on contraction by * changing the exchange rate between the hidden 'gons' and the public 'fragments'. */ contract UFragments is ERC20Detailed, Ownable { // PLEASE READ BEFORE CHANGING ANY ACCOUNTING OR MATH // Anytime there is division, there is a risk of numerical instability from rounding errors. In // order to minimize this risk, we adhere to the following guidelines: // 1) The conversion rate adopted is the number of gons that equals 1 fragment. // The inverse rate must not be used--TOTAL_GONS is always the numerator and _totalSupply is // always the denominator. (i.e. If you want to convert gons to fragments instead of // multiplying by the inverse rate, you should divide by the normal rate) // 2) Gon balances converted into Fragments are always rounded down (truncated). // // We make the following guarantees: // - If address 'A' transfers x Fragments to address 'B'. A's resulting external balance will // be decreased by precisely x Fragments, and B's external balance will be precisely // increased by x Fragments. // // We do not guarantee that the sum of all balances equals the result of calling totalSupply(). // This is because, for any conversion function 'f()' that has non-zero rounding error, // f(x0) + f(x1) + ... + f(xn) is not always equal to f(x0 + x1 + ... xn). using SafeMath for uint256; using SafeMathInt for int256; event LogRebase(uint256 indexed epoch, uint256 totalSupply); event LogMonetaryPolicyUpdated(address monetaryPolicy); // Used for authentication address public monetaryPolicy; modifier onlyMonetaryPolicy() { require(msg.sender == monetaryPolicy); _; } bool private rebasePausedDeprecated; bool private tokenPausedDeprecated; modifier validRecipient(address to) { require(to != address(0x0)); require(to != address(this)); _; } uint256 private constant DECIMALS = 18; uint256 private constant MAX_UINT256 = ~uint256(0); uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 100000 * uint(10)**DECIMALS; // TOTAL_GONS is a multiple of INITIAL_FRAGMENTS_SUPPLY so that _gonsPerFragment is an integer. // Use the highest value that fits in a uint256 for max granularity. uint256 private constant TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY); // MAX_SUPPLY = maximum integer < (sqrt(4*TOTAL_GONS + 1) - 1) / 2 uint256 private constant MAX_SUPPLY = ~uint128(0); // (2^128) - 1 uint256 private _totalSupply; uint256 private _gonsPerFragment; mapping(address => uint256) private _gonBalances; // This is denominated in Fragments, because the gons-fragments conversion might change before // it's fully paid. mapping (address => mapping (address => uint256)) private _allowedFragments; /** * @param monetaryPolicy_ The address of the monetary policy contract to use for authentication. */ function setMonetaryPolicy(address monetaryPolicy_) external onlyOwner { monetaryPolicy = monetaryPolicy_; emit LogMonetaryPolicyUpdated(monetaryPolicy_); } /** * @dev Notifies Fragments contract about a new rebase cycle. * @param supplyDelta The number of new fragment tokens to add into circulation via expansion. * @return The total number of fragments after the supply adjustment. */ function rebase(uint256 epoch, int256 supplyDelta) external onlyMonetaryPolicy returns (uint256) { if (supplyDelta == 0) { emit LogRebase(epoch, _totalSupply); return _totalSupply; } if (supplyDelta < 0) { _totalSupply = _totalSupply.sub(uint256(supplyDelta.abs())); } else { _totalSupply = _totalSupply.add(uint256(supplyDelta)); } if (_totalSupply > MAX_SUPPLY) { _totalSupply = MAX_SUPPLY; } _gonsPerFragment = TOTAL_GONS.div(_totalSupply); // From this point forward, _gonsPerFragment is taken as the source of truth. // We recalculate a new _totalSupply to be in agreement with the _gonsPerFragment // conversion rate. // This means our applied supplyDelta can deviate from the requested supplyDelta, // but this deviation is guaranteed to be < (_totalSupply^2)/(TOTAL_GONS - _totalSupply). // // In the case of _totalSupply <= MAX_UINT128 (our current supply cap), this // deviation is guaranteed to be < 1, so we can omit this step. If the supply cap is // ever increased, it must be re-included. // _totalSupply = TOTAL_GONS.div(_gonsPerFragment) emit LogRebase(epoch, _totalSupply); return _totalSupply; } function initialize(address owner_, address pool0_, address pool1_, string name_, string symbol_) public initializer { ERC20Detailed.initialize(name_, symbol_, uint8(DECIMALS)); Ownable.initialize(owner_); rebasePausedDeprecated = false; tokenPausedDeprecated = false; _totalSupply = INITIAL_FRAGMENTS_SUPPLY; _gonBalances[pool0_] = TOTAL_GONS; _gonsPerFragment = TOTAL_GONS.div(_totalSupply); uint256 value = 75000 * 10**DECIMALS; uint256 gonValue = value.mul(_gonsPerFragment); _gonBalances[pool0_] = _gonBalances[pool0_].sub(gonValue); _gonBalances[pool1_] = _gonBalances[pool1_].add(gonValue); emit Transfer(address(0x0), pool0_, _totalSupply.sub(value)); emit Transfer(address(0x0), pool1_, value); } /** * @return The total number of fragments. */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @param who The address to query. * @return The balance of the specified address. */ function balanceOf(address who) public view returns (uint256) { return _gonBalances[who].div(_gonsPerFragment); } /** * @dev Transfer tokens to a specified address. * @param to The address to transfer to. * @param value The amount to be transferred. * @return True on success, false otherwise. */ function transfer(address to, uint256 value) public validRecipient(to) returns (bool) { uint256 gonValue = value.mul(_gonsPerFragment); _gonBalances[msg.sender] = _gonBalances[msg.sender].sub(gonValue); _gonBalances[to] = _gonBalances[to].add(gonValue); emit Transfer(msg.sender, to, value); return true; } /** * @dev Function to check the amount of tokens that an owner has allowed to a spender. * @param owner_ The address which owns the funds. * @param spender The address which will spend the funds. * @return The number of tokens still available for the spender. */ function allowance(address owner_, address spender) public view returns (uint256) { return _allowedFragments[owner_][spender]; } /** * @dev Transfer tokens from one address to another. * @param from The address you want to send tokens from. * @param to The address you want to transfer to. * @param value The amount of tokens to be transferred. */ function transferFrom(address from, address to, uint256 value) public validRecipient(to) returns (bool) { _allowedFragments[from][msg.sender] = _allowedFragments[from][msg.sender].sub(value); uint256 gonValue = value.mul(_gonsPerFragment); _gonBalances[from] = _gonBalances[from].sub(gonValue); _gonBalances[to] = _gonBalances[to].add(gonValue); emit Transfer(from, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of * msg.sender. This method is included for ERC20 compatibility. * increaseAllowance and decreaseAllowance should be used instead. * Changing an allowance with this method brings the risk that someone may transfer both * the old and the new allowance - if they are both greater than zero - if a transfer * transaction is mined before the later approve() call is mined. * * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { _allowedFragments[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Increase the amount of tokens that an owner has allowed to a spender. * This method should be used instead of approve() to avoid the double approval vulnerability * described above. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _allowedFragments[msg.sender][spender] = _allowedFragments[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowedFragments[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner has allowed to a spender. * * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { uint256 oldValue = _allowedFragments[msg.sender][spender]; if (subtractedValue >= oldValue) { _allowedFragments[msg.sender][spender] = 0; } else { _allowedFragments[msg.sender][spender] = oldValue.sub(subtractedValue); } emit Approval(msg.sender, spender, _allowedFragments[msg.sender][spender]); return true; } } // File contracts/v4/UFragmentsPolicy.sol pragma solidity 0.4.24; interface IOracle { function getData() external returns (uint256, bool); } /** * @title uFragments Monetary Supply Policy * @dev This is an implementation of the uFragments Ideal Money protocol. * uFragments operates symmetrically on expansion and contraction. It will both split and * combine coins to maintain a stable unit price. * * This component regulates the token supply of the uFragments ERC20 token in response to * market oracles. */ contract UFragmentsPolicy is Ownable { using SafeMath for uint256; using SafeMathInt for int256; using UInt256Lib for uint256; event LogRebase( uint256 indexed epoch, uint256 exchangeRate, uint256 cpi, int256 requestedSupplyAdjustment, uint256 timestampSec ); UFragments public uFrags; // Provides the current CPI, as an 18 decimal fixed point number. IOracle public cpiOracle; // Market oracle provides the token/USD exchange rate as an 18 decimal fixed point number. // (eg) An oracle value of 1.5e18 it would mean 1 Ample is trading for $1.50. IOracle public marketOracle; // CPI value at the time of launch, as an 18 decimal fixed point number. uint256 private baseCpi; // If the current exchange rate is within this fractional distance from the target, no supply // update is performed. Fixed point number--same format as the rate. // (ie) abs(rate - targetRate) / targetRate < deviationThreshold, then no supply change. // DECIMALS Fixed point number. uint256 public deviationThreshold; // The rebase lag parameter, used to dampen the applied supply adjustment by 1 / rebaseLag // Check setRebaseLag comments for more details. // Natural number, no decimal places. uint256 public rebaseLag; // More than this much time must pass between rebase operations. uint256 public minRebaseTimeIntervalSec; // Block timestamp of last rebase operation uint256 public lastRebaseTimestampSec; // The rebase window begins this many seconds into the minRebaseTimeInterval period. // For example if minRebaseTimeInterval is 24hrs, it represents the time of day in seconds. uint256 public rebaseWindowOffsetSec; // The length of the time window where a rebase operation is allowed to execute, in seconds. uint256 public rebaseWindowLengthSec; // The number of rebase cycles since inception uint256 public epoch; uint256 private constant DECIMALS = 18; // Due to the expression in computeSupplyDelta(), MAX_RATE * MAX_SUPPLY must fit into an int256. // Both are 18 decimals fixed point numbers. uint256 private constant MAX_RATE = 10**6 * 10**DECIMALS; // MAX_SUPPLY = MAX_INT256 / MAX_RATE uint256 private constant MAX_SUPPLY = ~(uint256(1) << 255) / MAX_RATE; // This module orchestrates the rebase execution and downstream notification. address public orchestrator; address public deployer; modifier onlyOrchestrator() { require(msg.sender == orchestrator); _; } modifier onlyDeployer() { require(msg.sender == deployer); _; } /** * @notice Initiates a new rebase operation, provided the minimum time period has elapsed. * * @dev The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag * Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate * and targetRate is CpiOracleRate / baseCpi */ function rebase() external onlyOrchestrator { require(inRebaseWindow()); // This comparison also ensures there is no reentrancy. require(lastRebaseTimestampSec.add(minRebaseTimeIntervalSec) < now); // Snap the rebase time to the start of this window. lastRebaseTimestampSec = now.sub( now.mod(minRebaseTimeIntervalSec)).add(rebaseWindowOffsetSec); epoch = epoch.add(1); uint256 cpi; bool cpiValid; (cpi, cpiValid) = cpiOracle.getData(); require(cpiValid); uint256 targetRate = cpi.mul(10 ** DECIMALS).div(baseCpi); uint256 exchangeRate; bool rateValid; (exchangeRate, rateValid) = marketOracle.getData(); require(rateValid); if (exchangeRate > MAX_RATE) { exchangeRate = MAX_RATE; } int256 supplyDelta = computeSupplyDelta(exchangeRate, targetRate); // Apply the Dampening factor. supplyDelta = supplyDelta.div(rebaseLag.toInt256Safe()); if (supplyDelta > 0 && uFrags.totalSupply().add(uint256(supplyDelta)) > MAX_SUPPLY) { supplyDelta = (MAX_SUPPLY.sub(uFrags.totalSupply())).toInt256Safe(); } uint256 supplyAfterRebase = uFrags.rebase(epoch, supplyDelta); assert(supplyAfterRebase <= MAX_SUPPLY); emit LogRebase(epoch, exchangeRate, cpi, supplyDelta, now); } /** * @notice Sets the reference to the CPI oracle. * @param cpiOracle_ The address of the cpi oracle contract. */ function setCpiOracle(IOracle cpiOracle_) external onlyDeployer { // can be set only once require(cpiOracle == address(0)); cpiOracle = cpiOracle_; } /** * @notice Sets the reference to the market oracle. * @param marketOracle_ The address of the market oracle contract. */ function setMarketOracle(IOracle marketOracle_) external onlyDeployer { // can be set only once require(marketOracle == address(0)); marketOracle = marketOracle_; } /** * @notice Sets the reference to the orchestrator. * @param orchestrator_ The address of the orchestrator contract. */ function setOrchestrator(address orchestrator_) external onlyOwner { orchestrator = orchestrator_; } /** * @notice Sets the deviation threshold fraction. If the exchange rate given by the market * oracle is within this fractional distance from the targetRate, then no supply * modifications are made. DECIMALS fixed point number. * @param deviationThreshold_ The new exchange rate threshold fraction. */ function setDeviationThreshold(uint256 deviationThreshold_) external onlyOwner { deviationThreshold = deviationThreshold_; } /** * @notice Sets the rebase lag parameter. It is used to dampen the applied supply adjustment by 1 / rebaseLag If the rebase lag R, equals 1, the smallest value for R, then the full supply correction is applied on each rebase cycle. If it is greater than 1, then a correction of 1/R of is applied on each rebase. * @param rebaseLag_ The new rebase lag parameter. */ function setRebaseLag(uint256 rebaseLag_) external onlyOwner { require(rebaseLag_ > 0); rebaseLag = rebaseLag_; } /** * @notice Sets the parameters which control the timing and frequency of * rebase operations. * a) the minimum time period that must elapse between rebase cycles. * b) the rebase window offset parameter. * c) the rebase window length parameter. * @param minRebaseTimeIntervalSec_ More than this much time must pass between rebase * operations, in seconds. * @param rebaseWindowOffsetSec_ The number of seconds from the beginning of the rebase interval, where the rebase window begins. * @param rebaseWindowLengthSec_ The length of the rebase window in seconds. */ function setRebaseTimingParameters( uint256 minRebaseTimeIntervalSec_, uint256 rebaseWindowOffsetSec_, uint256 rebaseWindowLengthSec_) external onlyOwner { require(minRebaseTimeIntervalSec_ > 0); require(rebaseWindowOffsetSec_ < minRebaseTimeIntervalSec_); minRebaseTimeIntervalSec = minRebaseTimeIntervalSec_; rebaseWindowOffsetSec = rebaseWindowOffsetSec_; rebaseWindowLengthSec = rebaseWindowLengthSec_; } /** * @dev ZOS upgradable contract initialization method. * It is called at the time of contract creation to invoke parent class initializers and * initialize the contract's state variables. */ function initialize(address owner_, UFragments uFrags_, uint256 baseCpi_) public initializer { Ownable.initialize(owner_); deployer = msg.sender; // deviationThreshold = 0.05e18 = 5e16 deviationThreshold = 5 * 10 ** (DECIMALS-2); rebaseLag = 30; minRebaseTimeIntervalSec = 1 days; rebaseWindowOffsetSec = 72000; // 8PM UTC rebaseWindowLengthSec = 15 minutes; lastRebaseTimestampSec = 0; epoch = 0; uFrags = uFrags_; baseCpi = baseCpi_; } /** * @return If the latest block timestamp is within the rebase time window it, returns true. * Otherwise, returns false. */ function inRebaseWindow() public view returns (bool) { return ( now.mod(minRebaseTimeIntervalSec) >= rebaseWindowOffsetSec && now.mod(minRebaseTimeIntervalSec) < (rebaseWindowOffsetSec.add(rebaseWindowLengthSec)) ); } /** * @return Computes the total supply adjustment in response to the exchange rate * and the targetRate. */ function computeSupplyDelta(uint256 rate, uint256 targetRate) private view returns (int256) { if (withinDeviationThreshold(rate, targetRate)) { return 0; } // supplyDelta = totalSupply * (rate - targetRate) / targetRate int256 targetRateSigned = targetRate.toInt256Safe(); return uFrags.totalSupply().toInt256Safe() .mul(rate.toInt256Safe().sub(targetRateSigned)) .div(targetRateSigned); } /** * @param rate The current exchange rate, an 18 decimal fixed point number. * @param targetRate The target exchange rate, an 18 decimal fixed point number. * @return If the rate is within the deviation threshold from the target rate, returns true. * Otherwise, returns false. */ function withinDeviationThreshold(uint256 rate, uint256 targetRate) private view returns (bool) { uint256 absoluteDeviationThreshold = targetRate.mul(deviationThreshold) .div(10 ** DECIMALS); return (rate >= targetRate && rate.sub(targetRate) < absoluteDeviationThreshold) || (rate < targetRate && targetRate.sub(rate) < absoluteDeviationThreshold); } } // File contracts/v4/YearnRewardsI.sol pragma solidity 0.4.24; interface YearnRewardsI { function starttime() external returns (uint256); function totalRewards() external returns (uint256); } // File contracts/v4/Orchestrator.sol pragma solidity 0.4.24; /** * @title Orchestrator * @notice The orchestrator is the main entry point for rebase operations. It coordinates the policy * actions with external consumers. */ contract Orchestrator is Ownable { using SafeMath for uint256; struct Transaction { bool enabled; address destination; bytes data; } event TransactionFailed(address indexed destination, uint index, bytes data); // Stable ordering is not guaranteed. Transaction[] public transactions; UFragmentsPolicy public policy; YearnRewardsI public pool0; YearnRewardsI public pool1; ERC20Detailed public based; address public deployer; uint256 public rebaseRequiredSupply; constructor () public { deployer = msg.sender; } /** * @param policy_ Address of the UFragments policy. * @param pool0_ Address of the YearnRewards pool0. * @param pool1_ Address of the YearnRewards pool1. * @param based_ Address of the Based token. */ function initialize(address policy_, address pool0_, address pool1_, address based_, uint256 rebaseRequiredSupply_) public initializer { // only deployer can initialize require(deployer == msg.sender); Ownable.initialize(msg.sender); policy = UFragmentsPolicy(policy_); pool0 = YearnRewardsI(pool0_); pool1 = YearnRewardsI(pool1_); based = ERC20Detailed(based_); rebaseRequiredSupply = rebaseRequiredSupply_; } /** * @notice Main entry point to initiate a rebase operation. * The Orchestrator calls rebase on the policy and notifies downstream applications. * Contracts are guarded from calling, to avoid flash loan attacks on liquidity * providers. * If a transaction in the transaction list reverts, it is swallowed and the remaining * transactions are executed. */ function rebase() external { // wait for `rebaseRequiredSupply` token supply to be rewarded until rebase is possible // timeout after 4 weeks if people don't claim rewards so it's not stuck uint256 rewardsDistributed = pool0.totalRewards().add(pool1.totalRewards()); require(rewardsDistributed >= rebaseRequiredSupply || block.timestamp >= pool0.starttime() + 4 weeks); require(msg.sender == tx.origin); // solhint-disable-line avoid-tx-origin policy.rebase(); for (uint i = 0; i < transactions.length; i++) { Transaction storage t = transactions[i]; if (t.enabled) { bool result = externalCall(t.destination, t.data); if (!result) { emit TransactionFailed(t.destination, i, t.data); revert("Transaction Failed"); } } } } /** * @notice Adds a transaction that gets called for a downstream receiver of rebases * @param destination Address of contract destination * @param data Transaction data payload */ function addTransaction(address destination, bytes data) external onlyOwner { transactions.push(Transaction({ enabled: true, destination: destination, data: data })); } /** * @param index Index of transaction to remove. * Transaction ordering may have changed since adding. */ function removeTransaction(uint index) external onlyOwner { require(index < transactions.length, "index out of bounds"); if (index < transactions.length - 1) { transactions[index] = transactions[transactions.length - 1]; } transactions.length--; } /** * @param index Index of transaction. Transaction ordering may have changed since adding. * @param enabled True for enabled, false for disabled. */ function setTransactionEnabled(uint index, bool enabled) external onlyOwner { require(index < transactions.length, "index must be in range of stored tx list"); transactions[index].enabled = enabled; } /** * @return Number of transactions, both enabled and disabled, in transactions list. */ function transactionsSize() external view returns (uint256) { return transactions.length; } /** * @dev wrapper to call the encoded transactions on downstream consumers. * @param destination Address of destination contract. * @param data The encoded data payload. * @return True on success */ function externalCall(address destination, bytes data) internal returns (bool) { bool result; assembly { // solhint-disable-line no-inline-assembly // "Allocate" memory for output // (0x40 is where "free memory" pointer is stored by convention) let outputAddress := mload(0x40) // First 32 bytes are the padded length of data, so exclude that let dataAddress := add(data, 32) result := call( // 34710 is the value that solidity is currently emitting // It includes callGas (700) + callVeryLow (3, to pay for SUB) // + callValueTransferGas (9000) + callNewAccountGas // (25000, in case the destination address does not exist and needs creating) sub(gas, 34710), destination, 0, // transfer value in wei dataAddress, mload(data), // Size of the input, in bytes. Stored in position 0 of the array. outputAddress, 0 // Output is ignored, therefore the output size is zero ) } return result; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"decimals","type":"uint8"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"epoch","type":"uint256"},{"name":"supplyDelta","type":"int256"}],"name":"rebase","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"owner_","type":"address"},{"name":"pool0_","type":"address"},{"name":"pool1_","type":"address"},{"name":"name_","type":"string"},{"name":"symbol_","type":"string"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"monetaryPolicy_","type":"address"}],"name":"setMonetaryPolicy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"monetaryPolicy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner_","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"epoch","type":"uint256"},{"indexed":false,"name":"totalSupply","type":"uint256"}],"name":"LogRebase","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"monetaryPolicy","type":"address"}],"name":"LogMonetaryPolicyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}]
Contract Creation Code
608060405234801561001057600080fd5b50612482806100206000396000f30060806040526004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610122578063095ea7b3146101b25780631624f6c61461021757806318160ddd146102d357806323b872dd146102fe578063313ce5671461038357806339509351146103b457806370a0823114610419578063715018a6146104705780637a43e23f1461048757806383b43589146104d25780638b5a6a08146105e15780638da5cb5b146106245780638e27d7d71461067b5780638f32d59b146106d257806395d89b4114610701578063a457c2d714610791578063a9059cbb146107f6578063c4d66de81461085b578063dd62ed3e1461089e578063f2fde38b14610915575b600080fd5b34801561012e57600080fd5b50610137610958565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561017757808201518184015260208101905061015c565b50505050905090810190601f1680156101a45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101be57600080fd5b506101fd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109fa565b604051808215151515815260200191505060405180910390f35b34801561022357600080fd5b506102d1600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803560ff169060200190929190505050610aec565b005b3480156102df57600080fd5b506102e8610c6d565b6040518082815260200191505060405180910390f35b34801561030a57600080fd5b50610369600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c77565b604051808215151515815260200191505060405180910390f35b34801561038f57600080fd5b50610398610fb4565b604051808260ff1660ff16815260200191505060405180910390f35b3480156103c057600080fd5b506103ff600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fcb565b604051808215151515815260200191505060405180910390f35b34801561042557600080fd5b5061045a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111c7565b6040518082815260200191505060405180910390f35b34801561047c57600080fd5b50610485611224565b005b34801561049357600080fd5b506104bc60048036038101908080359060200190929190803590602001909291905050506112e0565b6040518082815260200191505060405180910390f35b3480156104de57600080fd5b506105df600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061148d565b005b3480156105ed57600080fd5b50610622600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118e7565b005b34801561063057600080fd5b506106396119a1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561068757600080fd5b506106906119cb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106de57600080fd5b506106e76119f1565b604051808215151515815260200191505060405180910390f35b34801561070d57600080fd5b50610716611a49565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561075657808201518184015260208101905061073b565b50505050905090810190601f1680156107835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561079d57600080fd5b506107dc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611aeb565b604051808215151515815260200191505060405180910390f35b34801561080257600080fd5b50610841600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d7d565b604051808215151515815260200191505060405180910390f35b34801561086757600080fd5b5061089c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611faa565b005b3480156108aa57600080fd5b506108ff600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612121565b6040518082815260200191505060405180910390f35b34801561092157600080fd5b50610956600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121a8565b005b606060338054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109f05780601f106109c5576101008083540402835291602001916109f0565b820191906000526020600020905b8154815290600101906020018083116109d357829003601f168201915b5050505050905090565b600081609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008060019054906101000a900460ff1680610b0c5750610b0b6121c7565b5b80610b2357506000809054906101000a900460ff16155b1515610bbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055508360339080519060200190610c1a9291906123b1565b508260349080519060200190610c319291906123b1565b5081603560006101000a81548160ff021916908360ff16021790555080600060016101000a81548160ff02191690831515021790555050505050565b6000609c54905090565b60008083600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610cb757600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610cf257600080fd5b610d8184609f60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d890919063ffffffff16565b609f60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e16609d54856121f990919063ffffffff16565b9150610e6a82609e60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d890919063ffffffff16565b609e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610eff82609e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b609e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a36001925050509392505050565b6000603560009054906101000a900460ff16905090565b600061105c82609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b600061121d609d54609e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461225890919063ffffffff16565b9050919050565b61122c6119f1565b151561123757600080fd5b606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a26000606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561133e57600080fd5b600082141561138b57827f72725a3b1e5bd622d6bcd1339bb31279c351abe8f541ac7fd320f24e1b1641f2609c546040518082815260200191505060405180910390a2609c549050611487565b60008212156113bc576113b16113a083612282565b609c546121d890919063ffffffff16565b609c819055506113d8565b6113d182609c5461223790919063ffffffff16565b609c819055505b6000196fffffffffffffffffffffffffffffffff16609c541115611412576000196fffffffffffffffffffffffffffffffff16609c819055505b611441609c546012600a0a620186a00260001981151561142e57fe5b066000190361225890919063ffffffff16565b609d81905550827f72725a3b1e5bd622d6bcd1339bb31279c351abe8f541ac7fd320f24e1b1641f2609c546040518082815260200191505060405180910390a2609c5490505b92915050565b60008060008060019054906101000a900460ff16806114b057506114af6121c7565b5b806114c757506000809054906101000a900460ff16155b1515611561576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055506115b485856012610aec565b6115bd88611faa565b6000609b60146101000a81548160ff0219169083151502179055506000609b60156101000a81548160ff0219169083151502179055506012600a0a620186a002609c819055506012600a0a620186a00260001981151561161957fe5b0660001903609e60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611690609c546012600a0a620186a00260001981151561167d57fe5b066000190361225890919063ffffffff16565b609d819055506012600a0a620124f80292506116b7609d54846121f990919063ffffffff16565b915061170b82609e60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d890919063ffffffff16565b609e60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506117a082609e60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b609e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61184886609c546121d890919063ffffffff16565b6040518082815260200191505060405180910390a38573ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a380600060016101000a81548160ff0219169083151502179055505050505050505050565b6118ef6119f1565b15156118fa57600080fd5b80609b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0e6961f1a1afb87eaf51fd64f22ddc10062e23aa7838eac5d0bdf140bfd3897281604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b606060348054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ae15780601f10611ab657610100808354040283529160200191611ae1565b820191906000526020600020905b815481529060010190602001808311611ac457829003601f168201915b5050505050905090565b600080609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083101515611bfd576000609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611c91565b611c1083826121d890919063ffffffff16565b609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008083600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611dbd57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611df857600080fd5b611e0d609d54856121f990919063ffffffff16565b9150611e6182609e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d890919063ffffffff16565b609e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ef682609e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b609e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a360019250505092915050565b60008060019054906101000a900460ff1680611fca5750611fc96121c7565b5b80611fe157506000809054906101000a900460ff16155b151561207b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff02191690831515021790555081606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548160ff0219169083151502179055505050565b6000609f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6121b06119f1565b15156121bb57600080fd5b6121c4816122b5565b50565b600080303b90506000811491505090565b6000808383111515156121ea57600080fd5b82840390508091505092915050565b600080600084141561220e5760009150612230565b828402905082848281151561221f57fe5b0414151561222c57600080fd5b8091505b5092915050565b600080828401905083811015151561224e57600080fd5b8091505092915050565b60008060008311151561226a57600080fd5b828481151561227557fe5b0490508091505092915050565b600060ff60019060020a02821415151561229b57600080fd5b600082126122a957816122ae565b816000035b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156122f157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106123f257805160ff1916838001178555612420565b82800160010185558215612420579182015b8281111561241f578251825591602001919060010190612404565b5b50905061242d9190612431565b5090565b61245391905b8082111561244f576000816000905550600101612437565b5090565b905600a165627a7a723058205d3c542293d3d533185dbb11dd1e9ff0aa46be8f2abedc6b5a6a14881728ca590029
Deployed Bytecode
0x60806040526004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610122578063095ea7b3146101b25780631624f6c61461021757806318160ddd146102d357806323b872dd146102fe578063313ce5671461038357806339509351146103b457806370a0823114610419578063715018a6146104705780637a43e23f1461048757806383b43589146104d25780638b5a6a08146105e15780638da5cb5b146106245780638e27d7d71461067b5780638f32d59b146106d257806395d89b4114610701578063a457c2d714610791578063a9059cbb146107f6578063c4d66de81461085b578063dd62ed3e1461089e578063f2fde38b14610915575b600080fd5b34801561012e57600080fd5b50610137610958565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561017757808201518184015260208101905061015c565b50505050905090810190601f1680156101a45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101be57600080fd5b506101fd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109fa565b604051808215151515815260200191505060405180910390f35b34801561022357600080fd5b506102d1600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803560ff169060200190929190505050610aec565b005b3480156102df57600080fd5b506102e8610c6d565b6040518082815260200191505060405180910390f35b34801561030a57600080fd5b50610369600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c77565b604051808215151515815260200191505060405180910390f35b34801561038f57600080fd5b50610398610fb4565b604051808260ff1660ff16815260200191505060405180910390f35b3480156103c057600080fd5b506103ff600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fcb565b604051808215151515815260200191505060405180910390f35b34801561042557600080fd5b5061045a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111c7565b6040518082815260200191505060405180910390f35b34801561047c57600080fd5b50610485611224565b005b34801561049357600080fd5b506104bc60048036038101908080359060200190929190803590602001909291905050506112e0565b6040518082815260200191505060405180910390f35b3480156104de57600080fd5b506105df600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061148d565b005b3480156105ed57600080fd5b50610622600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118e7565b005b34801561063057600080fd5b506106396119a1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561068757600080fd5b506106906119cb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106de57600080fd5b506106e76119f1565b604051808215151515815260200191505060405180910390f35b34801561070d57600080fd5b50610716611a49565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561075657808201518184015260208101905061073b565b50505050905090810190601f1680156107835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561079d57600080fd5b506107dc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611aeb565b604051808215151515815260200191505060405180910390f35b34801561080257600080fd5b50610841600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d7d565b604051808215151515815260200191505060405180910390f35b34801561086757600080fd5b5061089c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611faa565b005b3480156108aa57600080fd5b506108ff600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612121565b6040518082815260200191505060405180910390f35b34801561092157600080fd5b50610956600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121a8565b005b606060338054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109f05780601f106109c5576101008083540402835291602001916109f0565b820191906000526020600020905b8154815290600101906020018083116109d357829003601f168201915b5050505050905090565b600081609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008060019054906101000a900460ff1680610b0c5750610b0b6121c7565b5b80610b2357506000809054906101000a900460ff16155b1515610bbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055508360339080519060200190610c1a9291906123b1565b508260349080519060200190610c319291906123b1565b5081603560006101000a81548160ff021916908360ff16021790555080600060016101000a81548160ff02191690831515021790555050505050565b6000609c54905090565b60008083600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610cb757600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610cf257600080fd5b610d8184609f60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d890919063ffffffff16565b609f60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e16609d54856121f990919063ffffffff16565b9150610e6a82609e60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d890919063ffffffff16565b609e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610eff82609e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b609e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a36001925050509392505050565b6000603560009054906101000a900460ff16905090565b600061105c82609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b600061121d609d54609e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461225890919063ffffffff16565b9050919050565b61122c6119f1565b151561123757600080fd5b606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a26000606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561133e57600080fd5b600082141561138b57827f72725a3b1e5bd622d6bcd1339bb31279c351abe8f541ac7fd320f24e1b1641f2609c546040518082815260200191505060405180910390a2609c549050611487565b60008212156113bc576113b16113a083612282565b609c546121d890919063ffffffff16565b609c819055506113d8565b6113d182609c5461223790919063ffffffff16565b609c819055505b6000196fffffffffffffffffffffffffffffffff16609c541115611412576000196fffffffffffffffffffffffffffffffff16609c819055505b611441609c546012600a0a620186a00260001981151561142e57fe5b066000190361225890919063ffffffff16565b609d81905550827f72725a3b1e5bd622d6bcd1339bb31279c351abe8f541ac7fd320f24e1b1641f2609c546040518082815260200191505060405180910390a2609c5490505b92915050565b60008060008060019054906101000a900460ff16806114b057506114af6121c7565b5b806114c757506000809054906101000a900460ff16155b1515611561576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055506115b485856012610aec565b6115bd88611faa565b6000609b60146101000a81548160ff0219169083151502179055506000609b60156101000a81548160ff0219169083151502179055506012600a0a620186a002609c819055506012600a0a620186a00260001981151561161957fe5b0660001903609e60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611690609c546012600a0a620186a00260001981151561167d57fe5b066000190361225890919063ffffffff16565b609d819055506012600a0a620124f80292506116b7609d54846121f990919063ffffffff16565b915061170b82609e60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d890919063ffffffff16565b609e60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506117a082609e60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b609e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61184886609c546121d890919063ffffffff16565b6040518082815260200191505060405180910390a38573ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a380600060016101000a81548160ff0219169083151502179055505050505050505050565b6118ef6119f1565b15156118fa57600080fd5b80609b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0e6961f1a1afb87eaf51fd64f22ddc10062e23aa7838eac5d0bdf140bfd3897281604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b609b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b606060348054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ae15780601f10611ab657610100808354040283529160200191611ae1565b820191906000526020600020905b815481529060010190602001808311611ac457829003601f168201915b5050505050905090565b600080609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083101515611bfd576000609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611c91565b611c1083826121d890919063ffffffff16565b609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925609f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008083600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611dbd57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611df857600080fd5b611e0d609d54856121f990919063ffffffff16565b9150611e6182609e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d890919063ffffffff16565b609e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ef682609e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b609e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a360019250505092915050565b60008060019054906101000a900460ff1680611fca5750611fc96121c7565b5b80611fe157506000809054906101000a900460ff16155b151561207b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b600060019054906101000a900460ff1690506001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff02191690831515021790555081606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548160ff0219169083151502179055505050565b6000609f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6121b06119f1565b15156121bb57600080fd5b6121c4816122b5565b50565b600080303b90506000811491505090565b6000808383111515156121ea57600080fd5b82840390508091505092915050565b600080600084141561220e5760009150612230565b828402905082848281151561221f57fe5b0414151561222c57600080fd5b8091505b5092915050565b600080828401905083811015151561224e57600080fd5b8091505092915050565b60008060008311151561226a57600080fd5b828481151561227557fe5b0490508091505092915050565b600060ff60019060020a02821415151561229b57600080fd5b600082126122a957816122ae565b816000035b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156122f157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106123f257805160ff1916838001178555612420565b82800160010185558215612420579182015b8281111561241f578251825591602001919060010190612404565b5b50905061242d9190612431565b5090565b61245391905b8082111561244f576000816000905550600101612437565b5090565b905600a165627a7a723058205d3c542293d3d533185dbb11dd1e9ff0aa46be8f2abedc6b5a6a14881728ca590029
Deployed Bytecode Sourcemap
12312:10398:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7679:69;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7679:69:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;7679:69:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20984:233;;8:9:-1;5:2;;;30:1;27;20:12;5:2;20984:233:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7464:158;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7464:158:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18095:123;;8:9:-1;5:2;;;30:1;27;20:12;5:2;18095:123:0;;;;;;;;;;;;;;;;;;;;;;;19855:487;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19855:487:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7951:76;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7951:76:0;;;;;;;;;;;;;;;;;;;;;;;;;;;21590:343;;8:9:-1;5:2;;;30:1;27;20:12;5:2;21590:343:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18339:159;;8:9:-1;5:2;;;30:1;27;20:12;5:2;18339:159:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5337:116;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5337:116:0;;;;;;15750:1406;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15750:1406:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17164:858;;8:9:-1;5:2;;;30:1;27;20:12;5:2;17164:858:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15280:202;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15280:202:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;4678:72;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4678:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;13838:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13838:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;4980:85;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4980:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;7807:73;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7807:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;7807:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22195:512;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22195:512:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18724:388;;8:9:-1;5:2;;;30:1;27;20:12;5:2;18724:388:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4535:83;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4535:83:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;19419:174;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19419:174:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5620:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5620:103:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;7679:69;7715:6;7737:5;7730:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7679:69;:::o;20984:233::-;21067:4;21130:5;21089:17;:29;21107:10;21089:29;;;;;;;;;;;;;;;:38;21119:7;21089:38;;;;;;;;;;;;;;;:46;;;;21172:7;21151:36;;21160:10;21151:36;;;21181:5;21151:36;;;;;;;;;;;;;;;;;;21205:4;21198:11;;20984:233;;;;:::o;7464:158::-;3063:20;2956:12;;;;;;;;;;;:31;;;;2972:15;:13;:15::i;:::-;2956:31;:47;;;;2992:11;;;;;;;;;;;2991:12;2956:47;2948:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3086:12;;;;;;;;;;;3063:35;;3120:4;3105:12;;:19;;;;;;;;;;;;;;;;;;3145:4;3131:11;;:18;;;;;;;;;;;;;;;;;;7562:4;7554:5;:12;;;;;;;;;;;;:::i;:::-;;7583:6;7573:7;:16;;;;;;;;;;;;:::i;:::-;;7608:8;7596:9;;:20;;;;;;;;;;;;;;;;;;3183:15;3168:12;;:30;;;;;;;;;;;;;;;;;;7464:158;;;;:::o;18095:123::-;18166:7;18198:12;;18191:19;;18095:123;:::o;19855:487::-;19980:4;20099:16;19958:2;14136:3;14122:18;;:2;:18;;;;14114:27;;;;;;;;14174:4;14160:19;;:2;:19;;;;14152:28;;;;;;;;20040:46;20080:5;20040:17;:23;20058:4;20040:23;;;;;;;;;;;;;;;:35;20064:10;20040:35;;;;;;;;;;;;;;;;:39;;:46;;;;:::i;:::-;20002:17;:23;20020:4;20002:23;;;;;;;;;;;;;;;:35;20026:10;20002:35;;;;;;;;;;;;;;;:84;;;;20118:27;20128:16;;20118:5;:9;;:27;;;;:::i;:::-;20099:46;;20177:32;20200:8;20177:12;:18;20190:4;20177:18;;;;;;;;;;;;;;;;:22;;:32;;;;:::i;:::-;20156:12;:18;20169:4;20156:18;;;;;;;;;;;;;;;:53;;;;20239:30;20260:8;20239:12;:16;20252:2;20239:16;;;;;;;;;;;;;;;;:20;;:30;;;;:::i;:::-;20220:12;:16;20233:2;20220:16;;;;;;;;;;;;;;;:49;;;;20300:2;20285:25;;20294:4;20285:25;;;20304:5;20285:25;;;;;;;;;;;;;;;;;;20330:4;20323:11;;19855:487;;;;;;;:::o;7951:76::-;7991:5;8012:9;;;;;;;;;;;8005:16;;7951:76;:::o;21590:343::-;21688:4;21764:54;21807:10;21764:17;:29;21782:10;21764:29;;;;;;;;;;;;;;;:38;21794:7;21764:38;;;;;;;;;;;;;;;;:42;;:54;;;;:::i;:::-;21710:17;:29;21728:10;21710:29;;;;;;;;;;;;;;;:38;21740:7;21710:38;;;;;;;;;;;;;;;:108;;;;21855:7;21834:69;;21843:10;21834:69;;;21864:17;:29;21882:10;21864:29;;;;;;;;;;;;;;;:38;21894:7;21864:38;;;;;;;;;;;;;;;;21834:69;;;;;;;;;;;;;;;;;;21921:4;21914:11;;21590:343;;;;:::o;18339:159::-;18419:7;18451:39;18473:16;;18451:12;:17;18464:3;18451:17;;;;;;;;;;;;;;;;:21;;:39;;;;:::i;:::-;18444:46;;18339:159;;;:::o;5337:116::-;4871:9;:7;:9::i;:::-;4863:18;;;;;;;;5414:6;;;;;;;;;;;5395:26;;;;;;;;;;;;5445:1;5428:6;;:19;;;;;;;;;;;;;;;;;;5337:116::o;15750:1406::-;15865:7;13939:14;;;;;;;;;;;13925:28;;:10;:28;;;13917:37;;;;;;;;15909:1;15894:11;:16;15890:118;;;15942:5;15932:30;15949:12;;15932:30;;;;;;;;;;;;;;;;;;15984:12;;15977:19;;;;15890:118;16038:1;16024:11;:15;16020:193;;;16071:44;16096:17;:11;:15;:17::i;:::-;16071:12;;:16;;:44;;;;:::i;:::-;16056:12;:59;;;;16020:193;;;16163:38;16188:11;16163:12;;:16;;:38;;;;:::i;:::-;16148:12;:53;;;;16020:193;14793:1;14784:11;16244:10;;16229:12;;:25;16225:83;;;14793:1;14784:11;16286:10;;16271:12;:25;;;;16225:83;16339:28;16354:12;;14244:2;14376;14371:18;14362:6;:27;14301:1;14292:11;14626:38;;;;;;;;14301:1;14292:11;14611:54;16339:14;;:28;;;;:::i;:::-;16320:16;:47;;;;17098:5;17088:30;17105:12;;17088:30;;;;;;;;;;;;;;;;;;17136:12;;17129:19;;13965:1;15750:1406;;;;:::o;17164:858::-;17659:13;17706:16;3063:20;2956:12;;;;;;;;;;;:31;;;;2972:15;:13;:15::i;:::-;2956:31;:47;;;;2992:11;;;;;;;;;;;2991:12;2956:47;2948:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3086:12;;;;;;;;;;;3063:35;;3120:4;3105:12;;:19;;;;;;;;;;;;;;;;;;3145:4;3131:11;;:18;;;;;;;;;;;;;;;;;;17315:57;17340:5;17347:7;14244:2;17315:24;:57::i;:::-;17383:26;17402:6;17383:18;:26::i;:::-;17447:5;17422:22;;:30;;;;;;;;;;;;;;;;;;17487:5;17463:21;;:29;;;;;;;;;;;;;;;;;;14244:2;14376;14371:18;14362:6;:27;17505:12;:39;;;;14244:2;14376;14371:18;14362:6;:27;14301:1;14292:11;14626:38;;;;;;;;14301:1;14292:11;14611:54;17555:12;:20;17568:6;17555:20;;;;;;;;;;;;;;;:33;;;;17618:28;17633:12;;14244:2;14376;14371:18;14362:6;:27;14301:1;14292:11;14626:38;;;;;;;;14301:1;14292:11;14611:54;17618:14;;:28;;;;:::i;:::-;17599:16;:47;;;;14244:2;17683;:12;17675:5;:20;17659:36;;17725:27;17735:16;;17725:5;:9;;:27;;;;:::i;:::-;17706:46;;17786:34;17811:8;17786:12;:20;17799:6;17786:20;;;;;;;;;;;;;;;;:24;;:34;;;;:::i;:::-;17763:12;:20;17776:6;17763:20;;;;;;;;;;;;;;;:57;;;;17854:34;17879:8;17854:12;:20;17867:6;17854:20;;;;;;;;;;;;;;;;:24;;:34;;;;:::i;:::-;17831:12;:20;17844:6;17831:20;;;;;;;;;;;;;;;:57;;;;17929:6;17906:55;;17923:3;17906:55;;;17937:23;17954:5;17937:12;;:16;;:23;;;;:::i;:::-;17906:55;;;;;;;;;;;;;;;;;;18000:6;17977:37;;17994:3;17977:37;;;18008:5;17977:37;;;;;;;;;;;;;;;;;;3183:15;3168:12;;:30;;;;;;;;;;;;;;;;;;17164:858;;;;;;;;:::o;15280:202::-;4871:9;:7;:9::i;:::-;4863:18;;;;;;;;15402:15;15385:14;;:32;;;;;;;;;;;;;;;;;;15433:41;15458:15;15433:41;;;;;;;;;;;;;;;;;;;;;;15280:202;:::o;4678:72::-;4715:7;4738:6;;;;;;;;;;;4731:13;;4678:72;:::o;13838:29::-;;;;;;;;;;;;;:::o;4980:85::-;5019:4;5053:6;;;;;;;;;;;5039:20;;:10;:20;;;5032:27;;4980:85;:::o;7807:73::-;7845:6;7867:7;7860:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7807:73;:::o;22195:512::-;22298:4;22320:16;22339:17;:29;22357:10;22339:29;;;;;;;;;;;;;;;:38;22369:7;22339:38;;;;;;;;;;;;;;;;22320:57;;22411:8;22392:15;:27;;22388:205;;;22477:1;22436:17;:29;22454:10;22436:29;;;;;;;;;;;;;;;:38;22466:7;22436:38;;;;;;;;;;;;;;;:42;;;;22388:205;;;22552:29;22565:15;22552:8;:12;;:29;;;;:::i;:::-;22511:17;:29;22529:10;22511:29;;;;;;;;;;;;;;;:38;22541:7;22511:38;;;;;;;;;;;;;;;:70;;;;22388:205;22629:7;22608:69;;22617:10;22608:69;;;22638:17;:29;22656:10;22638:29;;;;;;;;;;;;;;;:38;22668:7;22638:38;;;;;;;;;;;;;;;;22608:69;;;;;;;;;;;;;;;;;;22695:4;22688:11;;22195:512;;;;;:::o;18724:388::-;18831:4;18853:16;18809:2;14136:3;14122:18;;:2;:18;;;;14114:27;;;;;;;;14174:4;14160:19;;:2;:19;;;;14152:28;;;;;;;;18872:27;18882:16;;18872:5;:9;;:27;;;;:::i;:::-;18853:46;;18937:38;18966:8;18937:12;:24;18950:10;18937:24;;;;;;;;;;;;;;;;:28;;:38;;;;:::i;:::-;18910:12;:24;18923:10;18910:24;;;;;;;;;;;;;;;:65;;;;19005:30;19026:8;19005:12;:16;19018:2;19005:16;;;;;;;;;;;;;;;;:20;;:30;;;;:::i;:::-;18986:12;:16;18999:2;18986:16;;;;;;;;;;;;;;;:49;;;;19072:2;19051:31;;19060:10;19051:31;;;19076:5;19051:31;;;;;;;;;;;;;;;;;;19100:4;19093:11;;18724:388;;;;;;:::o;4535:83::-;3063:20;2956:12;;;;;;;;;;;:31;;;;2972:15;:13;:15::i;:::-;2956:31;:47;;;;2992:11;;;;;;;;;;;2991:12;2956:47;2948:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3086:12;;;;;;;;;;;3063:35;;3120:4;3105:12;;:19;;;;;;;;;;;;;;;;;;3145:4;3131:11;;:18;;;;;;;;;;;;;;;;;;4606:6;4597;;:15;;;;;;;;;;;;;;;;;;3183;3168:12;;:30;;;;;;;;;;;;;;;;;;4535:83;;:::o;19419:174::-;19519:7;19551:17;:25;19569:6;19551:25;;;;;;;;;;;;;;;:34;19577:7;19551:34;;;;;;;;;;;;;;;;19544:41;;19419:174;;;;:::o;5620:103::-;4871:9;:7;:9::i;:::-;4863:18;;;;;;;;5689:28;5708:8;5689:18;:28::i;:::-;5620:103;:::o;3293:476::-;3340:4;3687:10;3733:7;3721:20;3715:26;;3762:1;3756:2;:7;3749:14;;3293:476;;:::o;1246:136::-;1304:7;1342:9;1333:1;1328;:6;;1320:15;;;;;;;;1358:1;1354;:5;1342:17;;1375:1;1368:8;;1246:136;;;;;:::o;344:393::-;402:7;671:9;635:1;630;:6;626:37;;;654:1;647:8;;;;626:37;687:1;683;:5;671:17;;712:1;707;703;:5;;;;;;;;:10;695:19;;;;;;;;730:1;723:8;;344:393;;;;;;:::o;1450:136::-;1508:7;1524:9;1540:1;1536;:5;1524:17;;1561:1;1556;:6;;1548:15;;;;;;;;1579:1;1572:8;;1450:136;;;;;:::o;852:276::-;910:7;1005:9;938:1;934;:5;926:14;;;;;;;;1021:1;1017;:5;;;;;;;;1005:17;;1121:1;1114:8;;852:276;;;;;:::o;11027:161::-;11100:6;9458:3;9452:1;9445:16;;;;11132:1;:15;;11124:24;;;;;;;;11170:1;11166;:5;:14;;11179:1;11166:14;;;11175:1;11174:2;;11166:14;11159:21;;11027:161;;;:::o;5863:173::-;5953:1;5933:22;;:8;:22;;;;5925:31;;;;;;;;5997:8;5968:38;;5989:6;;;;;;;;;;;5968:38;;;;;;;;;;;;6022:8;6013:6;;:17;;;;;;;;;;;;;;;;;;5863:173;:::o;12312:10398::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o
Swarm Source
bzzr://5d3c542293d3d533185dbb11dd1e9ff0aa46be8f2abedc6b5a6a14881728ca59
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.