Feature Tip: Add private address tag to any address under My Name Tag !
Synthetix: Exchange Rates contract has migrated to a new address.
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 28,047 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Update Rates | 10364785 | 1588 days ago | IN | 0 ETH | 0.05406685 | ||||
Update Rates | 10364771 | 1588 days ago | IN | 0 ETH | 0.07564554 | ||||
Update Rates | 10364729 | 1588 days ago | IN | 0 ETH | 0.02434938 | ||||
Update Rates | 10364679 | 1588 days ago | IN | 0 ETH | 0.05636487 | ||||
Update Rates | 10364639 | 1588 days ago | IN | 0 ETH | 0.0175459 | ||||
Update Rates | 10364587 | 1588 days ago | IN | 0 ETH | 0.0113296 | ||||
Update Rates | 10364540 | 1588 days ago | IN | 0 ETH | 0.05151722 | ||||
Update Rates | 10364507 | 1588 days ago | IN | 0 ETH | 0.02865448 | ||||
Update Rates | 10364452 | 1588 days ago | IN | 0 ETH | 0.02030189 | ||||
Update Rates | 10364412 | 1588 days ago | IN | 0 ETH | 0.04706664 | ||||
Update Rates | 10364375 | 1588 days ago | IN | 0 ETH | 0.0320812 | ||||
Update Rates | 10364320 | 1588 days ago | IN | 0 ETH | 0.02412401 | ||||
Update Rates | 10364257 | 1588 days ago | IN | 0 ETH | 0.03877422 | ||||
Update Rates | 10364217 | 1588 days ago | IN | 0 ETH | 0.00848817 | ||||
Update Rates | 10364179 | 1588 days ago | IN | 0 ETH | 0.03067701 | ||||
Update Rates | 10364096 | 1588 days ago | IN | 0 ETH | 0.0245001 | ||||
Update Rates | 10364064 | 1588 days ago | IN | 0 ETH | 0.01221135 | ||||
Update Rates | 10364019 | 1588 days ago | IN | 0 ETH | 0.03764302 | ||||
Update Rates | 10363928 | 1588 days ago | IN | 0 ETH | 0.0062556 | ||||
Update Rates | 10363911 | 1588 days ago | IN | 0 ETH | 0.03622887 | ||||
Update Rates | 10363879 | 1588 days ago | IN | 0 ETH | 0.03245081 | ||||
Update Rates | 10363825 | 1588 days ago | IN | 0 ETH | 0.0415674 | ||||
Update Rates | 10363799 | 1588 days ago | IN | 0 ETH | 0.02058915 | ||||
Update Rates | 10363763 | 1588 days ago | IN | 0 ETH | 0.02730852 | ||||
Update Rates | 10363721 | 1588 days ago | IN | 0 ETH | 0.02365527 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ExchangeRates
Compiler Version
v0.4.25+commit.59dbf8f1
Optimization Enabled:
Yes with 20000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-02-20 */ /* * Synthetix - ExchangeRates.sol * * https://github.com/Synthetixio/synthetix * https://synthetix.io * * MIT License * =========== * * Copyright (c) 2020 Synthetix * * 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 */ /* =============================================== * Flattened with Solidifier by Coinage * * https://solidifier.coina.ge * =============================================== */ 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, "SafeMath.mul Error"); 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, "SafeMath.div Error"); // 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, "SafeMath.sub Error"); 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, "SafeMath.add Error"); 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, "SafeMath.mod Error"); return a % b; } } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: SafeDecimalMath.sol version: 2.0 author: Kevin Brown Gavin Conway date: 2018-10-18 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- A library providing safe mathematical operations for division and multiplication with the capability to round or truncate the results to the nearest increment. Operations can return a standard precision or high precision decimal. High precision decimals are useful for example when attempting to calculate percentages or fractions accurately. ----------------------------------------------------------------- */ /** * @title Safely manipulate unsigned fixed-point decimals at a given precision level. * @dev Functions accepting uints in this contract and derived contracts * are taken to be such fixed point decimals of a specified precision (either standard * or high). */ library SafeDecimalMath { using SafeMath for uint; /* Number of decimal places in the representations. */ uint8 public constant decimals = 18; uint8 public constant highPrecisionDecimals = 27; /* The number representing 1.0. */ uint public constant UNIT = 10**uint(decimals); /* The number representing 1.0 for higher fidelity numbers. */ uint public constant PRECISE_UNIT = 10**uint(highPrecisionDecimals); uint private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint(highPrecisionDecimals - decimals); /** * @return Provides an interface to UNIT. */ function unit() external pure returns (uint) { return UNIT; } /** * @return Provides an interface to PRECISE_UNIT. */ function preciseUnit() external pure returns (uint) { return PRECISE_UNIT; } /** * @return The result of multiplying x and y, interpreting the operands as fixed-point * decimals. * * @dev A unit factor is divided out after the product of x and y is evaluated, * so that product must be less than 2**256. As this is an integer division, * the internal division always rounds down. This helps save on gas. Rounding * is more expensive on gas. */ function multiplyDecimal(uint x, uint y) internal pure returns (uint) { /* Divide by UNIT to remove the extra factor introduced by the product. */ return x.mul(y) / UNIT; } /** * @return The result of safely multiplying x and y, interpreting the operands * as fixed-point decimals of the specified precision unit. * * @dev The operands should be in the form of a the specified unit factor which will be * divided out after the product of x and y is evaluated, so that product must be * less than 2**256. * * Unlike multiplyDecimal, this function rounds the result to the nearest increment. * Rounding is useful when you need to retain fidelity for small decimal numbers * (eg. small fractions or percentages). */ function _multiplyDecimalRound(uint x, uint y, uint precisionUnit) private pure returns (uint) { /* Divide by UNIT to remove the extra factor introduced by the product. */ uint quotientTimesTen = x.mul(y) / (precisionUnit / 10); if (quotientTimesTen % 10 >= 5) { quotientTimesTen += 10; } return quotientTimesTen / 10; } /** * @return The result of safely multiplying x and y, interpreting the operands * as fixed-point decimals of a precise unit. * * @dev The operands should be in the precise unit factor which will be * divided out after the product of x and y is evaluated, so that product must be * less than 2**256. * * Unlike multiplyDecimal, this function rounds the result to the nearest increment. * Rounding is useful when you need to retain fidelity for small decimal numbers * (eg. small fractions or percentages). */ function multiplyDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) { return _multiplyDecimalRound(x, y, PRECISE_UNIT); } /** * @return The result of safely multiplying x and y, interpreting the operands * as fixed-point decimals of a standard unit. * * @dev The operands should be in the standard unit factor which will be * divided out after the product of x and y is evaluated, so that product must be * less than 2**256. * * Unlike multiplyDecimal, this function rounds the result to the nearest increment. * Rounding is useful when you need to retain fidelity for small decimal numbers * (eg. small fractions or percentages). */ function multiplyDecimalRound(uint x, uint y) internal pure returns (uint) { return _multiplyDecimalRound(x, y, UNIT); } /** * @return The result of safely dividing x and y. The return value is a high * precision decimal. * * @dev y is divided after the product of x and the standard precision unit * is evaluated, so the product of x and UNIT must be less than 2**256. As * this is an integer division, the result is always rounded down. * This helps save on gas. Rounding is more expensive on gas. */ function divideDecimal(uint x, uint y) internal pure returns (uint) { /* Reintroduce the UNIT factor that will be divided out by y. */ return x.mul(UNIT).div(y); } /** * @return The result of safely dividing x and y. The return value is as a rounded * decimal in the precision unit specified in the parameter. * * @dev y is divided after the product of x and the specified precision unit * is evaluated, so the product of x and the specified precision unit must * be less than 2**256. The result is rounded to the nearest increment. */ function _divideDecimalRound(uint x, uint y, uint precisionUnit) private pure returns (uint) { uint resultTimesTen = x.mul(precisionUnit * 10).div(y); if (resultTimesTen % 10 >= 5) { resultTimesTen += 10; } return resultTimesTen / 10; } /** * @return The result of safely dividing x and y. The return value is as a rounded * standard precision decimal. * * @dev y is divided after the product of x and the standard precision unit * is evaluated, so the product of x and the standard precision unit must * be less than 2**256. The result is rounded to the nearest increment. */ function divideDecimalRound(uint x, uint y) internal pure returns (uint) { return _divideDecimalRound(x, y, UNIT); } /** * @return The result of safely dividing x and y. The return value is as a rounded * high precision decimal. * * @dev y is divided after the product of x and the high precision unit * is evaluated, so the product of x and the high precision unit must * be less than 2**256. The result is rounded to the nearest increment. */ function divideDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) { return _divideDecimalRound(x, y, PRECISE_UNIT); } /** * @dev Convert a standard decimal representation to a high precision one. */ function decimalToPreciseDecimal(uint i) internal pure returns (uint) { return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR); } /** * @dev Convert a high precision decimal to a standard decimal representation. */ function preciseDecimalToDecimal(uint i) internal pure returns (uint) { uint quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10); if (quotientTimesTen % 10 >= 5) { quotientTimesTen += 10; } return quotientTimesTen / 10; } } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: Owned.sol version: 1.1 author: Anton Jurisevic Dominic Romanowski date: 2018-2-26 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- An Owned contract, to be inherited by other contracts. Requires its owner to be explicitly set in the constructor. Provides an onlyOwner access modifier. To change owner, the current owner must nominate the next owner, who then has to accept the nomination. The nomination can be cancelled before it is accepted by the new owner by having the previous owner change the nomination (setting it to 0). ----------------------------------------------------------------- */ /** * @title A contract with an owner. * @notice Contract ownership can be transferred by first nominating the new owner, * who must then accept the ownership, which prevents accidental incorrect ownership transfers. */ contract Owned { address public owner; address public nominatedOwner; /** * @dev Owned Constructor */ constructor(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } /** * @notice Nominate a new owner of this contract. * @dev Only the current owner may nominate a new owner. */ function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } /** * @notice Accept the nomination to be owner. */ function acceptOwnership() external { require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } modifier onlyOwner { require(msg.sender == owner, "Only the contract owner may perform this action"); _; } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: SelfDestructible.sol version: 1.2 author: Anton Jurisevic date: 2018-05-29 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- This contract allows an inheriting contract to be destroyed after its owner indicates an intention and then waits for a period without changing their mind. All ether contained in the contract is forwarded to a nominated beneficiary upon destruction. ----------------------------------------------------------------- */ /** * @title A contract that can be destroyed by its owner after a delay elapses. */ contract SelfDestructible is Owned { uint public initiationTime; bool public selfDestructInitiated; address public selfDestructBeneficiary; uint public constant SELFDESTRUCT_DELAY = 4 weeks; /** * @dev Constructor * @param _owner The account which controls this contract. */ constructor(address _owner) public Owned(_owner) { require(_owner != address(0), "Owner must not be zero"); selfDestructBeneficiary = _owner; emit SelfDestructBeneficiaryUpdated(_owner); } /** * @notice Set the beneficiary address of this contract. * @dev Only the contract owner may call this. The provided beneficiary must be non-null. * @param _beneficiary The address to pay any eth contained in this contract to upon self-destruction. */ function setSelfDestructBeneficiary(address _beneficiary) external onlyOwner { require(_beneficiary != address(0), "Beneficiary must not be zero"); selfDestructBeneficiary = _beneficiary; emit SelfDestructBeneficiaryUpdated(_beneficiary); } /** * @notice Begin the self-destruction counter of this contract. * Once the delay has elapsed, the contract may be self-destructed. * @dev Only the contract owner may call this. */ function initiateSelfDestruct() external onlyOwner { initiationTime = now; selfDestructInitiated = true; emit SelfDestructInitiated(SELFDESTRUCT_DELAY); } /** * @notice Terminate and reset the self-destruction timer. * @dev Only the contract owner may call this. */ function terminateSelfDestruct() external onlyOwner { initiationTime = 0; selfDestructInitiated = false; emit SelfDestructTerminated(); } /** * @notice If the self-destruction delay has elapsed, destroy this contract and * remit any ether it owns to the beneficiary address. * @dev Only the contract owner may call this. */ function selfDestruct() external onlyOwner { require(selfDestructInitiated, "Self Destruct not yet initiated"); require(initiationTime + SELFDESTRUCT_DELAY < now, "Self destruct delay not met"); address beneficiary = selfDestructBeneficiary; emit SelfDestructed(beneficiary); selfdestruct(beneficiary); } event SelfDestructTerminated(); event SelfDestructed(address beneficiary); event SelfDestructInitiated(uint selfDestructDelay); event SelfDestructBeneficiaryUpdated(address newBeneficiary); } interface AggregatorInterface { function latestAnswer() external view returns (int256); function latestTimestamp() external view returns (uint256); function latestRound() external view returns (uint256); function getAnswer(uint256 roundId) external view returns (int256); function getTimestamp(uint256 roundId) external view returns (uint256); event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp); event NewRound(uint256 indexed roundId, address indexed startedBy); } // AggregatorInterface from Chainlink represents a decentralized pricing network for a single currency key /** * @title The repository for exchange rates */ contract ExchangeRates is SelfDestructible { using SafeMath for uint; using SafeDecimalMath for uint; struct RateAndUpdatedTime { uint216 rate; uint40 time; } // Exchange rates and update times stored by currency code, e.g. 'SNX', or 'sUSD' mapping(bytes32 => mapping(uint => RateAndUpdatedTime)) private _rates; // The address of the oracle which pushes rate updates to this contract address public oracle; // Decentralized oracle networks that feed into pricing aggregators mapping(bytes32 => AggregatorInterface) public aggregators; // List of aggregator keys for convenient iteration bytes32[] public aggregatorKeys; // Do not allow the oracle to submit times any further forward into the future than this constant. uint private constant ORACLE_FUTURE_LIMIT = 10 minutes; // How long will the contract assume the rate of any asset is correct uint public rateStalePeriod = 3 hours; // For inverted prices, keep a mapping of their entry, limits and frozen status struct InversePricing { uint entryPoint; uint upperLimit; uint lowerLimit; bool frozen; } mapping(bytes32 => InversePricing) public inversePricing; bytes32[] public invertedKeys; mapping(bytes32 => uint) currentRoundForRate; // // ========== CONSTRUCTOR ========== /** * @dev Constructor * @param _owner The owner of this contract. * @param _oracle The address which is able to update rate information. * @param _currencyKeys The initial currency keys to store (in order). * @param _newRates The initial currency amounts for each currency (in order). */ constructor( // SelfDestructible (Ownable) address _owner, // Oracle values - Allows for rate updates address _oracle, bytes32[] _currencyKeys, uint[] _newRates ) public /* Owned is initialised in SelfDestructible */ SelfDestructible(_owner) { require(_currencyKeys.length == _newRates.length, "Currency key length and rate length must match."); oracle = _oracle; // The sUSD rate is always 1 and is never stale. _setRate("sUSD", SafeDecimalMath.unit(), now); internalUpdateRates(_currencyKeys, _newRates, now); } /* ========== SETTERS ========== */ /** * @notice Set the Oracle that pushes the rate information to this contract * @param _oracle The new oracle address */ function setOracle(address _oracle) external onlyOwner { oracle = _oracle; emit OracleUpdated(oracle); } /** * @notice Set the stale period on the updated rate variables * @param _time The new rateStalePeriod */ function setRateStalePeriod(uint _time) external onlyOwner { rateStalePeriod = _time; emit RateStalePeriodUpdated(rateStalePeriod); } /* ========== MUTATIVE FUNCTIONS ========== */ /** * @notice Set the rates stored in this contract * @param currencyKeys The currency keys you wish to update the rates for (in order) * @param newRates The rates for each currency (in order) * @param timeSent The timestamp of when the update was sent, specified in seconds since epoch (e.g. the same as the now keyword in solidity). * This is useful because transactions can take a while to confirm, so this way we know how old the oracle's datapoint was exactly even * if it takes a long time for the transaction to confirm. */ function updateRates(bytes32[] currencyKeys, uint[] newRates, uint timeSent) external onlyOracle returns (bool) { return internalUpdateRates(currencyKeys, newRates, timeSent); } /** * @notice Delete a rate stored in the contract * @param currencyKey The currency key you wish to delete the rate for */ function deleteRate(bytes32 currencyKey) external onlyOracle { require(getRate(currencyKey) > 0, "Rate is zero"); delete _rates[currencyKey][currentRoundForRate[currencyKey]]; currentRoundForRate[currencyKey]--; emit RateDeleted(currencyKey); } /** * @notice Set an inverse price up for the currency key. * * An inverse price is one which has an entryPoint, an uppper and a lower limit. Each update, the * rate is calculated as double the entryPrice minus the current rate. If this calculation is * above or below the upper or lower limits respectively, then the rate is frozen, and no more * rate updates will be accepted. * * @param currencyKey The currency to update * @param entryPoint The entry price point of the inverted price * @param upperLimit The upper limit, at or above which the price will be frozen * @param lowerLimit The lower limit, at or below which the price will be frozen * @param freeze Whether or not to freeze this rate immediately. Note: no frozen event will be configured * @param freezeAtUpperLimit When the freeze flag is true, this flag indicates whether the rate * to freeze at is the upperLimit or lowerLimit.. */ function setInversePricing( bytes32 currencyKey, uint entryPoint, uint upperLimit, uint lowerLimit, bool freeze, bool freezeAtUpperLimit ) external onlyOwner { require(entryPoint > 0, "entryPoint must be above 0"); require(lowerLimit > 0, "lowerLimit must be above 0"); require(upperLimit > entryPoint, "upperLimit must be above the entryPoint"); require(upperLimit < entryPoint.mul(2), "upperLimit must be less than double entryPoint"); require(lowerLimit < entryPoint, "lowerLimit must be below the entryPoint"); if (inversePricing[currencyKey].entryPoint <= 0) { // then we are adding a new inverse pricing, so add this invertedKeys.push(currencyKey); } inversePricing[currencyKey].entryPoint = entryPoint; inversePricing[currencyKey].upperLimit = upperLimit; inversePricing[currencyKey].lowerLimit = lowerLimit; inversePricing[currencyKey].frozen = freeze; emit InversePriceConfigured(currencyKey, entryPoint, upperLimit, lowerLimit); // When indicating to freeze, we need to know the rate to freeze it at - either upper or lower // this is useful in situations where ExchangeRates is updated and there are existing inverted // rates already frozen in the current contract that need persisting across the upgrade if (freeze) { emit InversePriceFrozen(currencyKey); _setRate(currencyKey, freezeAtUpperLimit ? upperLimit : lowerLimit, now); } } /** * @notice Remove an inverse price for the currency key * @param currencyKey The currency to remove inverse pricing for */ function removeInversePricing(bytes32 currencyKey) external onlyOwner { require(inversePricing[currencyKey].entryPoint > 0, "No inverted price exists"); inversePricing[currencyKey].entryPoint = 0; inversePricing[currencyKey].upperLimit = 0; inversePricing[currencyKey].lowerLimit = 0; inversePricing[currencyKey].frozen = false; // now remove inverted key from array bool wasRemoved = removeFromArray(currencyKey, invertedKeys); if (wasRemoved) { emit InversePriceConfigured(currencyKey, 0, 0, 0); } } /** * @notice Add a pricing aggregator for the given key. Note: existing aggregators may be overridden. * @param currencyKey The currency key to add an aggregator for */ function addAggregator(bytes32 currencyKey, address aggregatorAddress) external onlyOwner { AggregatorInterface aggregator = AggregatorInterface(aggregatorAddress); require(aggregator.latestTimestamp() >= 0, "Given Aggregator is invalid"); if (aggregators[currencyKey] == address(0)) { aggregatorKeys.push(currencyKey); } aggregators[currencyKey] = aggregator; emit AggregatorAdded(currencyKey, aggregator); } /** * @notice Remove a pricing aggregator for the given key * @param currencyKey The currency key to remove an aggregator for */ function removeAggregator(bytes32 currencyKey) external onlyOwner { address aggregator = aggregators[currencyKey]; require(aggregator != address(0), "No aggregator exists for key"); delete aggregators[currencyKey]; bool wasRemoved = removeFromArray(currencyKey, aggregatorKeys); if (wasRemoved) { emit AggregatorRemoved(currencyKey, aggregator); } } function getLastRoundIdBeforeElapsedSecs( bytes32 currencyKey, uint startingRoundId, uint startingTimestamp, uint timediff ) external view returns (uint) { uint roundId = startingRoundId; uint nextTimestamp = 0; while (true) { (, nextTimestamp) = getRateAndTimestampAtRound(currencyKey, roundId + 1); // if there's no new round, then the previous roundId was the latest if (nextTimestamp == 0 || nextTimestamp > startingTimestamp + timediff) { return roundId; } roundId++; } return roundId; } function getCurrentRoundId(bytes32 currencyKey) external view returns (uint) { if (aggregators[currencyKey] != address(0)) { AggregatorInterface aggregator = aggregators[currencyKey]; return aggregator.latestRound(); } else { return currentRoundForRate[currencyKey]; } } function effectiveValueAtRound( bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, uint roundIdForSrc, uint roundIdForDest ) external view rateNotStale(sourceCurrencyKey) rateNotStale(destinationCurrencyKey) returns (uint) { // If there's no change in the currency, then just return the amount they gave us if (sourceCurrencyKey == destinationCurrencyKey) return sourceAmount; (uint srcRate, ) = getRateAndTimestampAtRound(sourceCurrencyKey, roundIdForSrc); (uint destRate, ) = getRateAndTimestampAtRound(destinationCurrencyKey, roundIdForDest); // Calculate the effective value by going from source -> USD -> destination return sourceAmount.multiplyDecimalRound(srcRate).divideDecimalRound(destRate); } function rateAndTimestampAtRound(bytes32 currencyKey, uint roundId) external view returns (uint rate, uint time) { return getRateAndTimestampAtRound(currencyKey, roundId); } /* ========== VIEWS ========== */ /** * @notice Retrieves the timestamp the given rate was last updated. */ function lastRateUpdateTimes(bytes32 currencyKey) public view returns (uint256) { return getRateAndUpdatedTime(currencyKey).time; } /** * @notice Retrieve the last update time for a list of currencies */ function lastRateUpdateTimesForCurrencies(bytes32[] currencyKeys) public view returns (uint[]) { uint[] memory lastUpdateTimes = new uint[](currencyKeys.length); for (uint i = 0; i < currencyKeys.length; i++) { lastUpdateTimes[i] = lastRateUpdateTimes(currencyKeys[i]); } return lastUpdateTimes; } /** * @notice A function that lets you easily convert an amount in a source currency to an amount in the destination currency * @param sourceCurrencyKey The currency the amount is specified in * @param sourceAmount The source amount, specified in UNIT base * @param destinationCurrencyKey The destination currency */ function effectiveValue(bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey) public view rateNotStale(sourceCurrencyKey) rateNotStale(destinationCurrencyKey) returns (uint) { // If there's no change in the currency, then just return the amount they gave us if (sourceCurrencyKey == destinationCurrencyKey) return sourceAmount; // Calculate the effective value by going from source -> USD -> destination return sourceAmount.multiplyDecimalRound(getRate(sourceCurrencyKey)).divideDecimalRound( getRate(destinationCurrencyKey) ); } /** * @notice Retrieve the rate for a specific currency */ function rateForCurrency(bytes32 currencyKey) external view returns (uint) { return getRateAndUpdatedTime(currencyKey).rate; } /** * @notice Retrieve the rates for a list of currencies */ function ratesForCurrencies(bytes32[] currencyKeys) external view returns (uint[]) { uint[] memory _localRates = new uint[](currencyKeys.length); for (uint i = 0; i < currencyKeys.length; i++) { _localRates[i] = getRate(currencyKeys[i]); } return _localRates; } /** * @notice Retrieve the rates and isAnyStale for a list of currencies */ function ratesAndStaleForCurrencies(bytes32[] currencyKeys) external view returns (uint[], bool) { uint[] memory _localRates = new uint[](currencyKeys.length); bool anyRateStale = false; uint period = rateStalePeriod; for (uint i = 0; i < currencyKeys.length; i++) { RateAndUpdatedTime memory rateAndUpdateTime = getRateAndUpdatedTime(currencyKeys[i]); _localRates[i] = uint256(rateAndUpdateTime.rate); if (!anyRateStale) { anyRateStale = (currencyKeys[i] != "sUSD" && uint256(rateAndUpdateTime.time).add(period) < now); } } return (_localRates, anyRateStale); } /** * @notice Check if a specific currency's rate hasn't been updated for longer than the stale period. */ function rateIsStale(bytes32 currencyKey) public view returns (bool) { // sUSD is a special case and is never stale. if (currencyKey == "sUSD") return false; return lastRateUpdateTimes(currencyKey).add(rateStalePeriod) < now; } /** * @notice Check if any rate is frozen (cannot be exchanged into) */ function rateIsFrozen(bytes32 currencyKey) external view returns (bool) { return inversePricing[currencyKey].frozen; } /** * @notice Check if any of the currency rates passed in haven't been updated for longer than the stale period. */ function anyRateIsStale(bytes32[] currencyKeys) external view returns (bool) { // Loop through each key and check whether the data point is stale. uint256 i = 0; while (i < currencyKeys.length) { // sUSD is a special case and is never false if (currencyKeys[i] != "sUSD" && lastRateUpdateTimes(currencyKeys[i]).add(rateStalePeriod) < now) { return true; } i += 1; } return false; } /* ========== INTERNAL FUNCTIONS ========== */ function _setRate(bytes32 currencyKey, uint256 rate, uint256 time) internal { // Note: this will effectively start the rounds at 1, which matches Chainlink's Agggregators currentRoundForRate[currencyKey]++; _rates[currencyKey][currentRoundForRate[currencyKey]] = RateAndUpdatedTime({ rate: uint216(rate), time: uint40(time) }); } /** * @notice Internal function which sets the rates stored in this contract * @param currencyKeys The currency keys you wish to update the rates for (in order) * @param newRates The rates for each currency (in order) * @param timeSent The timestamp of when the update was sent, specified in seconds since epoch (e.g. the same as the now keyword in solidity).contract * This is useful because transactions can take a while to confirm, so this way we know how old the oracle's datapoint was exactly even * if it takes a long time for the transaction to confirm. */ function internalUpdateRates(bytes32[] currencyKeys, uint[] newRates, uint timeSent) internal returns (bool) { require(currencyKeys.length == newRates.length, "Currency key array length must match rates array length."); require(timeSent < (now + ORACLE_FUTURE_LIMIT), "Time is too far into the future"); // Loop through each key and perform update. for (uint i = 0; i < currencyKeys.length; i++) { bytes32 currencyKey = currencyKeys[i]; // Should not set any rate to zero ever, as no asset will ever be // truely worthless and still valid. In this scenario, we should // delete the rate and remove it from the system. require(newRates[i] != 0, "Zero is not a valid rate, please call deleteRate instead."); require(currencyKey != "sUSD", "Rate of sUSD cannot be updated, it's always UNIT."); // We should only update the rate if it's at least the same age as the last rate we've got. if (timeSent < lastRateUpdateTimes(currencyKey)) { continue; } newRates[i] = rateOrInverted(currencyKey, newRates[i]); // Ok, go ahead with the update. _setRate(currencyKey, newRates[i], timeSent); } emit RatesUpdated(currencyKeys, newRates); return true; } /** * @notice Internal function to get the inverted rate, if any, and mark an inverted * key as frozen if either limits are reached. * * Inverted rates are ones that take a regular rate, perform a simple calculation (double entryPrice and * subtract the rate) on them and if the result of the calculation is over or under predefined limits, it freezes the * rate at that limit, preventing any future rate updates. * * For example, if we have an inverted rate iBTC with the following parameters set: * - entryPrice of 200 * - upperLimit of 300 * - lower of 100 * * if this function is invoked with params iETH and 184 (or rather 184e18), * then the rate would be: 200 * 2 - 184 = 216. 100 < 216 < 200, so the rate would be 216, * and remain unfrozen. * * If this function is then invoked with params iETH and 301 (or rather 301e18), * then the rate would be: 200 * 2 - 301 = 99. 99 < 100, so the rate would be 100 and the * rate would become frozen, no longer accepting future price updates until the synth is unfrozen * by the owner function: setInversePricing(). * * @param currencyKey The price key to lookup * @param rate The rate for the given price key */ function rateOrInverted(bytes32 currencyKey, uint rate) internal returns (uint) { // if an inverse mapping exists, adjust the price accordingly InversePricing storage inverse = inversePricing[currencyKey]; if (inverse.entryPoint <= 0) { return rate; } // set the rate to the current rate initially (if it's frozen, this is what will be returned) uint newInverseRate = getRate(currencyKey); // get the new inverted rate if not frozen if (!inverse.frozen) { uint doubleEntryPoint = inverse.entryPoint.mul(2); if (doubleEntryPoint <= rate) { // avoid negative numbers for unsigned ints, so set this to 0 // which by the requirement that lowerLimit be > 0 will // cause this to freeze the price to the lowerLimit newInverseRate = 0; } else { newInverseRate = doubleEntryPoint.sub(rate); } // now if new rate hits our limits, set it to the limit and freeze if (newInverseRate >= inverse.upperLimit) { newInverseRate = inverse.upperLimit; } else if (newInverseRate <= inverse.lowerLimit) { newInverseRate = inverse.lowerLimit; } if (newInverseRate == inverse.upperLimit || newInverseRate == inverse.lowerLimit) { inverse.frozen = true; emit InversePriceFrozen(currencyKey); } } return newInverseRate; } function getRateAndUpdatedTime(bytes32 currencyKey) internal view returns (RateAndUpdatedTime) { if (aggregators[currencyKey] != address(0)) { return RateAndUpdatedTime({ rate: uint216(aggregators[currencyKey].latestAnswer() * 1e10), time: uint40(aggregators[currencyKey].latestTimestamp()) }); } else { return _rates[currencyKey][currentRoundForRate[currencyKey]]; } } /** * @notice Remove a single value from an array by iterating through until it is found. * @param entry The entry to find * @param array The array to mutate * @return bool Whether or not the entry was found and removed */ function removeFromArray(bytes32 entry, bytes32[] storage array) internal returns (bool) { for (uint i = 0; i < array.length; i++) { if (array[i] == entry) { delete array[i]; // Copy the last key into the place of the one we just deleted // If there's only one key, this is array[0] = array[0]. // If we're deleting the last one, it's also a NOOP in the same way. array[i] = array[array.length - 1]; // Decrease the size of the array by one. array.length--; return true; } } return false; } function getRateAndTimestampAtRound(bytes32 currencyKey, uint roundId) internal view returns (uint rate, uint time) { if (aggregators[currencyKey] != address(0)) { AggregatorInterface aggregator = aggregators[currencyKey]; return (uint(aggregator.getAnswer(roundId) * 1e10), aggregator.getTimestamp(roundId)); } else { RateAndUpdatedTime storage update = _rates[currencyKey][roundId]; return (update.rate, update.time); } } function getRate(bytes32 currencyKey) internal view returns (uint256) { return getRateAndUpdatedTime(currencyKey).rate; } /* ========== MODIFIERS ========== */ modifier rateNotStale(bytes32 currencyKey) { require(!rateIsStale(currencyKey), "Rate stale or nonexistant currency"); _; } modifier onlyOracle { require(msg.sender == oracle, "Only the oracle can perform this action"); _; } /* ========== EVENTS ========== */ event OracleUpdated(address newOracle); event RateStalePeriodUpdated(uint rateStalePeriod); event RatesUpdated(bytes32[] currencyKeys, uint[] newRates); event RateDeleted(bytes32 currencyKey); event InversePriceConfigured(bytes32 currencyKey, uint entryPoint, uint upperLimit, uint lowerLimit); event InversePriceFrozen(bytes32 currencyKey); event AggregatorAdded(bytes32 currencyKey, address aggregator); event AggregatorRemoved(bytes32 currencyKey, address aggregator); }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"currencyKey","type":"bytes32"}],"name":"rateIsStale","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"currencyKeys","type":"bytes32[]"}],"name":"lastRateUpdateTimesForCurrencies","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rateStalePeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"currencyKey","type":"bytes32"},{"name":"startingRoundId","type":"uint256"},{"name":"startingTimestamp","type":"uint256"},{"name":"timediff","type":"uint256"}],"name":"getLastRoundIdBeforeElapsedSecs","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"initiationTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"setSelfDestructBeneficiary","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"sourceCurrencyKey","type":"bytes32"},{"name":"sourceAmount","type":"uint256"},{"name":"destinationCurrencyKey","type":"bytes32"},{"name":"roundIdForSrc","type":"uint256"},{"name":"roundIdForDest","type":"uint256"}],"name":"effectiveValueAtRound","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"currencyKey","type":"bytes32"}],"name":"removeAggregator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"currencyKeys","type":"bytes32[]"}],"name":"anyRateIsStale","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"invertedKeys","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"terminateSelfDestruct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"currencyKey","type":"bytes32"},{"name":"aggregatorAddress","type":"address"}],"name":"addAggregator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"currencyKey","type":"bytes32"}],"name":"deleteRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"aggregatorKeys","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"sourceCurrencyKey","type":"bytes32"},{"name":"sourceAmount","type":"uint256"},{"name":"destinationCurrencyKey","type":"bytes32"}],"name":"effectiveValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"aggregators","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"inversePricing","outputs":[{"name":"entryPoint","type":"uint256"},{"name":"upperLimit","type":"uint256"},{"name":"lowerLimit","type":"uint256"},{"name":"frozen","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_time","type":"uint256"}],"name":"setRateStalePeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"currencyKey","type":"bytes32"}],"name":"getCurrentRoundId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_oracle","type":"address"}],"name":"setOracle","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"oracle","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"selfDestruct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"SELFDESTRUCT_DELAY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"currencyKey","type":"bytes32"}],"name":"rateForCurrency","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"currencyKey","type":"bytes32"}],"name":"rateIsFrozen","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"currencyKey","type":"bytes32"},{"name":"entryPoint","type":"uint256"},{"name":"upperLimit","type":"uint256"},{"name":"lowerLimit","type":"uint256"},{"name":"freeze","type":"bool"},{"name":"freezeAtUpperLimit","type":"bool"}],"name":"setInversePricing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"selfDestructInitiated","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"currencyKeys","type":"bytes32[]"}],"name":"ratesAndStaleForCurrencies","outputs":[{"name":"","type":"uint256[]"},{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"initiateSelfDestruct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"currencyKeys","type":"bytes32[]"},{"name":"newRates","type":"uint256[]"},{"name":"timeSent","type":"uint256"}],"name":"updateRates","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"currencyKeys","type":"bytes32[]"}],"name":"ratesForCurrencies","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"selfDestructBeneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"currencyKey","type":"bytes32"}],"name":"removeInversePricing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"currencyKey","type":"bytes32"}],"name":"lastRateUpdateTimes","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"currencyKey","type":"bytes32"},{"name":"roundId","type":"uint256"}],"name":"rateAndTimestampAtRound","outputs":[{"name":"rate","type":"uint256"},{"name":"time","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_owner","type":"address"},{"name":"_oracle","type":"address"},{"name":"_currencyKeys","type":"bytes32[]"},{"name":"_newRates","type":"uint256[]"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOracle","type":"address"}],"name":"OracleUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"rateStalePeriod","type":"uint256"}],"name":"RateStalePeriodUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"currencyKeys","type":"bytes32[]"},{"indexed":false,"name":"newRates","type":"uint256[]"}],"name":"RatesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"currencyKey","type":"bytes32"}],"name":"RateDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"currencyKey","type":"bytes32"},{"indexed":false,"name":"entryPoint","type":"uint256"},{"indexed":false,"name":"upperLimit","type":"uint256"},{"indexed":false,"name":"lowerLimit","type":"uint256"}],"name":"InversePriceConfigured","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"currencyKey","type":"bytes32"}],"name":"InversePriceFrozen","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"currencyKey","type":"bytes32"},{"indexed":false,"name":"aggregator","type":"address"}],"name":"AggregatorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"currencyKey","type":"bytes32"},{"indexed":false,"name":"aggregator","type":"address"}],"name":"AggregatorRemoved","type":"event"},{"anonymous":false,"inputs":[],"name":"SelfDestructTerminated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"beneficiary","type":"address"}],"name":"SelfDestructed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"selfDestructDelay","type":"uint256"}],"name":"SelfDestructInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newBeneficiary","type":"address"}],"name":"SelfDestructBeneficiaryUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"}]
Contract Creation Code
6080604052612a306008553480156200001757600080fd5b50604051620043a8380380620043a883398101604090815281516020830151918301516060840151919390810191018380600160a060020a0381161515620000c057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b60008054600160a060020a031916600160a060020a038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150600160a060020a03811615156200019157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f776e6572206d757374206e6f74206265207a65726f00000000000000000000604482015290519081900360640190fd5b60038054600160a060020a038316610100810261010060a860020a03199092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c539181900360200190a15080518251146200028257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f43757272656e6379206b6579206c656e67746820616e642072617465206c656e60448201527f677468206d757374206d617463682e0000000000000000000000000000000000606482015290519081900360840190fd5b82600560006101000a815481600160a060020a030219169083600160a060020a031602179055506200036d7f73555344000000000000000000000000000000000000000000000000000000007384d626b2bb4d0f064067e4bf80fce7055d8f3e7b63907af6c06040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156200032f57600080fd5b505af415801562000344573d6000803e3d6000fd5b505050506040513d60208110156200035b57600080fd5b5051426401000000006200038e810204565b6200038382824264010000000062000437810204565b505050505062000cf5565b6000838152600b6020908152604080832080546001019081905581518083018352600160d860020a03968716815264ffffffffff9586168185019081529785526004845282852091855292529091209051815494519092167b01000000000000000000000000000000000000000000000000000000029183167fffffffffff00000000000000000000000000000000000000000000000000000090941693909317909116179055565b600080600084518651141515620004d557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f43757272656e6379206b6579206172726179206c656e677468206d757374206d60448201527f61746368207261746573206172726179206c656e6774682e0000000000000000606482015290519081900360840190fd5b426102580184106200054857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f54696d6520697320746f6f2066617220696e746f207468652066757475726500604482015290519081900360640190fd5b600091505b8551821015620007855785828151811015156200056657fe5b90602001906020020151905084828151811015156200058157fe5b6020908102909101015115156200061f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f5a65726f206973206e6f7420612076616c696420726174652c20706c6561736560448201527f2063616c6c2064656c6574655261746520696e73746561642e00000000000000606482015290519081900360840190fd5b7f7355534400000000000000000000000000000000000000000000000000000000811415620006d557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f52617465206f6620735553442063616e6e6f7420626520757064617465642c2060448201527f6974277320616c7761797320554e49542e000000000000000000000000000000606482015290519081900360840190fd5b620006e98164010000000062000850810204565b841015620006f75762000779565b6200072a8186848151811015156200070b57fe5b9060200190602002015162000879640100000000026401000000009004565b85838151811015156200073957fe5b602090810290910101528451620007799082908790859081106200075957fe5b90602001906020020151866200038e640100000000026401000000009004565b6001909101906200054d565b7f1bc0fc8997efa076f59b5ef02c315bc5390f7a6d24d661ce12128c01a3b0ba578686604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015620007ee578181015183820152602001620007d4565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156200082f57818101518382015260200162000815565b5050505090500194505050505060405180910390a150600195945050505050565b60006200086682640100000000620009aa810204565b6020015164ffffffffff1690505b919050565b600082815260096020526040812080548290819081106200089d57849350620009a1565b620008b18664010000000062000b9f810204565b600384015490925060ff1615156200099d578254620008e090600264010000000062002e6362000bc582021704565b9050848111620008f4576000915062000911565b6200090e8186640100000000620035a762000c6482021704565b91505b600183015482106200092a57826001015491506200093e565b600283015482116200093e57826002015491505b8260010154821480620009545750826002015482145b156200099d5760038301805460ff191660011790556040805187815290517f4b3d3f51dab37576ab4ca08ebdb81d4a4c587f25df5cc1f9a620a7faff84aba89181900360200190a15b8193505b50505092915050565b620009b462000cde565b600082815260066020526040902054600160a060020a03161562000b385760408051808201808352600085815260066020908152848220547f50d25bcd00000000000000000000000000000000000000000000000000000000909352935192938493600160a060020a03909316926350d25bcd92604480870193929182880390910190829087803b15801562000a4957600080fd5b505af115801562000a5e573d6000803e3d6000fd5b505050506040513d602081101562000a7557600080fd5b50516402540be40002600160d860020a0316815260008481526006602090815260408083205481517f8205bf6a000000000000000000000000000000000000000000000000000000008152915194830194600160a060020a0390911693638205bf6a93600480850194919392918390030190829087803b15801562000af957600080fd5b505af115801562000b0e573d6000803e3d6000fd5b505050506040513d602081101562000b2557600080fd5b505164ffffffffff169052905062000874565b506000818152600460209081526040808320600b8352818420548452825291829020825180840190935254600160d860020a03811683527b01000000000000000000000000000000000000000000000000000000900464ffffffffff169082015262000874565b600062000bb582640100000000620009aa810204565b51600160d860020a031692915050565b60008083151562000bda576000915062000c5d565b5082820282848281151562000beb57fe5b041462000c5957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f536166654d6174682e6d756c204572726f720000000000000000000000000000604482015290519081900360640190fd5b8091505b5092915050565b6000808383111562000cd757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f536166654d6174682e737562204572726f720000000000000000000000000000604482015290519081900360640190fd5b5050900390565b604080518082019091526000808252602082015290565b6136a38062000d056000396000f3006080604052600436106101e15763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416629919c081146101e657806305a046e5146102125780630ee4951b146102b7578063109e46a2146102de5780631627540c146102ff57806317c70de41461032f57806320714f8814610344578063266da16b146103725780632bed9e0c146103965780632d227674146103ae5780632ea913d4146103ce5780633278c960146103e65780633f0e084f146103fb578063459388491461042c5780634f72def61461044457806353a47bb71461045c578063654a60ac1461049a5780637103353e146104b8578063728dec29146104d057806379ba50971461051057806379cb657a146105255780637a018a1e1461053d5780637adbf973146105555780637dc0d1d0146105835780638da5cb5b146105985780639cb8a26a146105ad578063a461fc82146105c2578063ac82f608146105d7578063af3aea86146105ef578063b199c76414610607578063b8225dec14610632578063babcb42314610647578063bd32aa44146106c6578063bfa005ce146106db578063c2c8a6761461070a578063c58aaae61461072a578063c8e6f3951461073f578063ce8480ea14610757578063fdadbc7e1461076f575b600080fd5b3480156101f257600080fd5b506101fe6004356107a3565b604080519115158252519081900360200190f35b34801561021e57600080fd5b5060408051602060048035808201358381028086018501909652808552610267953695939460249493850192918291850190849080828437509497506107fa9650505050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102a357818101518382015260200161028b565b505050509050019250505060405180910390f35b3480156102c357600080fd5b506102cc610882565b60408051918252519081900360200190f35b3480156102ea57600080fd5b506102cc600435602435604435606435610888565b34801561030b57600080fd5b5061032d73ffffffffffffffffffffffffffffffffffffffff600435166108cd565b005b34801561033b57600080fd5b506102cc6109f2565b34801561035057600080fd5b5061032d73ffffffffffffffffffffffffffffffffffffffff600435166109f8565b34801561037e57600080fd5b506102cc600435602435604435606435608435610ba8565b3480156103a257600080fd5b5061032d600435610d3f565b3480156103ba57600080fd5b506101fe6004803560248101910135610f20565b3480156103da57600080fd5b506102cc600435610fbb565b3480156103f257600080fd5b5061032d610fda565b34801561040757600080fd5b5061032d60043573ffffffffffffffffffffffffffffffffffffffff602435166110de565b34801561043857600080fd5b5061032d60043561137c565b34801561045057600080fd5b506102cc600435611527565b34801561046857600080fd5b50610471611535565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156104a657600080fd5b506102cc600435602435604435611551565b3480156104c457600080fd5b506104716004356116cc565b3480156104dc57600080fd5b506104e86004356116f4565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b34801561051c57600080fd5b5061032d61171e565b34801561053157600080fd5b5061032d60043561186f565b34801561054957600080fd5b506102cc600435611956565b34801561056157600080fd5b5061032d73ffffffffffffffffffffffffffffffffffffffff60043516611a47565b34801561058f57600080fd5b50610471611b72565b3480156105a457600080fd5b50610471611b8e565b3480156105b957600080fd5b5061032d611baa565b3480156105ce57600080fd5b506102cc611db3565b3480156105e357600080fd5b506102cc600435611dba565b3480156105fb57600080fd5b506101fe600435611de9565b34801561061357600080fd5b5061032d600435602435604435606435608435151560a4351515611e01565b34801561063e57600080fd5b506101fe61228e565b34801561065357600080fd5b506106676004803560248101910135612297565b604051808060200183151515158152602001828103825284818151815260200191508051906020019060200280838360005b838110156106b1578181015183820152602001610699565b50505050905001935050505060405180910390f35b3480156106d257600080fd5b5061032d6123d0565b3480156106e757600080fd5b506101fe60246004803582810192908201359181359182019101356044356124e3565b34801561071657600080fd5b5061026760048035602481019101356125ff565b34801561073657600080fd5b50610471612688565b34801561074b57600080fd5b5061032d6004356126a9565b34801561076357600080fd5b506102cc600435612879565b34801561077b57600080fd5b5061078a600435602435612895565b6040805192835260208301919091528051918290030190f35b60007f73555344000000000000000000000000000000000000000000000000000000008214156107d5575060006107f5565b426107f16008546107e585612879565b9063ffffffff6128ad16565b1090505b919050565b6060806000835160405190808252806020026020018201604052801561082a578160200160208202803883390190505b509150600090505b835181101561087b5761085b848281518110151561084c57fe5b90602001906020020151612879565b828281518110151561086957fe5b60209081029091010152600101610832565b5092915050565b60085481565b600083815b61089a8783600101612928565b9150508015806108ab575083850181115b156108b8578192506108c3565b60019091019061088d565b5050949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461097957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b60025481565b60005473ffffffffffffffffffffffffffffffffffffffff163314610aa457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b73ffffffffffffffffffffffffffffffffffffffff81161515610b2857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f42656e6566696369617279206d757374206e6f74206265207a65726f00000000604482015290519081900360640190fd5b6003805473ffffffffffffffffffffffffffffffffffffffff831661010081027fffffffffffffffffffffff0000000000000000000000000000000000000000ff9092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c539181900360200190a150565b600080600087610bb7816107a3565b15610c4957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52617465207374616c65206f72206e6f6e6578697374616e742063757272656e60448201527f6379000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b86610c53816107a3565b15610ce557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52617465207374616c65206f72206e6f6e6578697374616e742063757272656e60448201527f6379000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b89881415610cf557889450610d32565b610cff8a88612928565b509350610d0c8887612928565b509250610d2f83610d238b8763ffffffff612b2316565b9063ffffffff612b3816565b94505b5050505095945050505050565b60008054819073ffffffffffffffffffffffffffffffffffffffff163314610dee57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60008381526006602052604090205473ffffffffffffffffffffffffffffffffffffffff169150811515610e8357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4e6f2061676772656761746f722065786973747320666f72206b657900000000604482015290519081900360640190fd5b600083815260066020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610ec2836007612b4d565b90508015610f1b576040805184815273ffffffffffffffffffffffffffffffffffffffff8416602082015281517fec70e890fc7db7de4059b114c9093a1f41283d18ffcfbcac45566feea4d4f777929181900390910190a15b505050565b6000805b82811015610fb157838382818110610f3857fe5b9050602002013560001916600019167f735553440000000000000000000000000000000000000000000000000000000014158015610f9b575042610f996008546107e58787868181101515610f8957fe5b9050602002013560001916612879565b105b15610fa9576001915061087b565b600101610f24565b5060009392505050565b600a805482908110610fc957fe5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff16331461108657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60006002819055600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f6adcc7125002935e0aa31697538ebbd65cfddf20431eb6ecdcfc3e238bfd082c9190a1565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461118b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b81905060008173ffffffffffffffffffffffffffffffffffffffff16638205bf6a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156111f457600080fd5b505af1158015611208573d6000803e3d6000fd5b505050506040513d602081101561121e57600080fd5b5051101561128d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f476976656e2041676772656761746f7220697320696e76616c69640000000000604482015290519081900360640190fd5b60008381526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1615156112ee57600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688018390555b60008381526006602090815260409182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851690811790915582518681529182015281517f0bcae573430f69c5361e5d76534d3f61d2d803958778680cd74be9dc6299bc63929181900390910190a1505050565b60055473ffffffffffffffffffffffffffffffffffffffff16331461142857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4f6e6c7920746865206f7261636c652063616e20706572666f726d207468697360448201527f20616374696f6e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600061143382611dba565b1161149f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f52617465206973207a65726f0000000000000000000000000000000000000000604482015290519081900360640190fd5b6000818152600460209081526040808320600b808452828520805486529184528285208590559385905292825282547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909255815183815291517fe69d655565c7ff1353d8eaeea62fb7904fa9696987431ec351be288c865f1ae19281900390910190a150565b6007805482908110610fc957fe5b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60008361155d816107a3565b156115ef57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52617465207374616c65206f72206e6f6e6578697374616e742063757272656e60448201527f6379000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b826115f9816107a3565b1561168b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52617465207374616c65206f72206e6f6e6578697374616e742063757272656e60448201527f6379000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b8584141561169b578492506116c3565b6116c06116a785611dba565b610d236116b389611dba565b889063ffffffff612b2316565b92505b50509392505050565b60066020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60096020526000908152604090208054600182015460028301546003909301549192909160ff1684565b60015473ffffffffffffffffffffffffffffffffffffffff1633146117ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e6572736869700000000000000000000000606482015290519081900360840190fd5b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461191b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60088190556040805182815290517f16529d8c407b08938da67de7fa4319199baffce4f5d1971f812cc770b0237e669181900360200190a150565b600081815260066020526040812054819073ffffffffffffffffffffffffffffffffffffffff1615611a2f575060008281526006602090815260408083205481517f668a0f02000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff90911693849363668a0f02936004808201949293918390030190829087803b1580156119fc57600080fd5b505af1158015611a10573d6000803e3d6000fd5b505050506040513d6020811015611a2657600080fd5b50519150611a41565b6000838152600b602052604090205491505b50919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611af357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116919091179182905560408051929091168252517f3df77beb5db05fcdd70a30fc8adf3f83f9501b68579455adbd100b8180940394916020908290030190a150565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff163314611c5757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60035460ff161515611cca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53656c66204465737472756374206e6f742079657420696e6974696174656400604482015290519081900360640190fd5b426224ea0060025401101515611d4157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f53656c662064657374727563742064656c6179206e6f74206d65740000000000604482015290519081900360640190fd5b506003546040805173ffffffffffffffffffffffffffffffffffffffff61010090930492909216808352905190917f8a09e1677ced846cb537dc2b172043bd05a1a81ad7e0033a7ef8ba762df990b7919081900360200190a18073ffffffffffffffffffffffffffffffffffffffff16ff5b6224ea0081565b6000611dc582612c2a565b517affffffffffffffffffffffffffffffffffffffffffffffffffffff1692915050565b60009081526009602052604090206003015460ff1690565b60005473ffffffffffffffffffffffffffffffffffffffff163314611ead57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60008511611f1c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f656e747279506f696e74206d7573742062652061626f76652030000000000000604482015290519081900360640190fd5b60008311611f8b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6c6f7765724c696d6974206d7573742062652061626f76652030000000000000604482015290519081900360640190fd5b84841161201f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f75707065724c696d6974206d7573742062652061626f76652074686520656e7460448201527f7279506f696e7400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b61203085600263ffffffff612e6316565b84106120c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f75707065724c696d6974206d757374206265206c657373207468616e20646f7560448201527f626c6520656e747279506f696e74000000000000000000000000000000000000606482015290519081900360840190fd5b84831061215757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f6c6f7765724c696d6974206d7573742062652062656c6f772074686520656e7460448201527f7279506f696e7400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600086815260096020526040812054116121a157600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8018690555b600086815260096020908152604091829020878155600181018790556002810186905560030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151517905581518881529081018790528082018690526060810185905290517f37efb38e92b0f94698f6df0c9070e2f00946862a042ac09e34ae8c547684240a916080908290030190a18115612286576040805187815290517f4b3d3f51dab37576ab4ca08ebdb81d4a4c587f25df5cc1f9a620a7faff84aba89181900360200190a1612286868261227e5784612280565b855b42612ef3565b505050505050565b60035460ff1681565b60606000606060008060006122aa613620565b604080518981526020808b028201019091528880156122d3578160200160208202803883390190505b509450600093506008549250600091505b878210156123c15761230b8989848181106122fb57fe5b9050602002013560001916612c2a565b905080600001517affffffffffffffffffffffffffffffffffffffffffffffffffffff16858381518110151561233d57fe5b602090810290910101528315156123b65788888381811061235a57fe5b9050602002013560001916600019167f7355534400000000000000000000000000000000000000000000000000000000141580156123b35750602081015142906123b19064ffffffffff168563ffffffff6128ad16565b105b93505b6001909101906122e4565b50929791965090945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461247c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b42600255600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055604080516224ea00815290517fcbd94ca75b8dc45c9d80c77e851670e78843c0d75180cb81db3e2158228fa9a69181900360200190a1565b60055460009073ffffffffffffffffffffffffffffffffffffffff16331461259257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4f6e6c7920746865206f7261636c652063616e20706572666f726d207468697360448201527f20616374696f6e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6125f58686808060200260200160405190810160405280939291908181526020018383602002808284375050604080516020808c0282810182019093528b82529095508b94508a935083925085019084908082843750899450612fb09350505050565b9695505050505050565b606080600084849050604051908082528060200260200182016040528015612631578160200160208202803883390190505b509150600090505b838110156126805761266085858381811061265057fe5b9050602002013560001916611dba565b828281518110151561266e57fe5b60209081029091010152600101612639565b509392505050565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461275657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b600082815260096020526040812054116127d157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4e6f20696e766572746564207072696365206578697374730000000000000000604482015290519081900360640190fd5b600082815260096020526040812081815560018101829055600281019190915560030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905561282582600a612b4d565b905080156128755760408051838152600060208201819052818301819052606082015290517f37efb38e92b0f94698f6df0c9070e2f00946862a042ac09e34ae8c547684240a9181900360800190a15b5050565b600061288482612c2a565b6020015164ffffffffff1692915050565b6000806128a28484612928565b915091509250929050565b60008282018381101561292157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f536166654d6174682e616464204572726f720000000000000000000000000000604482015290519081900360640190fd5b9392505050565b60008281526006602052604081205481908190819073ffffffffffffffffffffffffffffffffffffffff1615612ab55760008681526006602090815260408083205481517fb5ab58dc000000000000000000000000000000000000000000000000000000008152600481018a9052915173ffffffffffffffffffffffffffffffffffffffff9091169550859363b5ab58dc93602480850194919392918390030190829087803b1580156129da57600080fd5b505af11580156129ee573d6000803e3d6000fd5b505050506040513d6020811015612a0457600080fd5b5051604080517fb633620c0000000000000000000000000000000000000000000000000000000081526004810188905290516402540be4009092029173ffffffffffffffffffffffffffffffffffffffff85169163b633620c9160248083019260209291908290030181600087803b158015612a7f57600080fd5b505af1158015612a93573d6000803e3d6000fd5b505050506040513d6020811015612aa957600080fd5b50519094509250612b1a565b506000858152600460209081526040808320878452909152902080547affffffffffffffffffffffffffffffffffffffffffffffffffffff811694507b01000000000000000000000000000000000000000000000000000000900464ffffffffff1692505b50509250929050565b60006129218383670de0b6b3a764000061338b565b60006129218383670de0b6b3a76400006133ca565b6000805b8254811015610fb15782548490849083908110612b6a57fe5b6000918252602090912001541415612c22578281815481101515612b8a57fe5b6000918252602082200155825483907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110612bc557fe5b90600052602060002001548382815481101515612bde57fe5b6000918252602090912001558254612c18847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8301613637565b506001915061087b565b600101612b51565b612c32613620565b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1615612de95760408051808201808352600085815260066020908152848220547f50d25bcd0000000000000000000000000000000000000000000000000000000090935293519293849373ffffffffffffffffffffffffffffffffffffffff909316926350d25bcd92604480870193929182880390910190829087803b158015612cdf57600080fd5b505af1158015612cf3573d6000803e3d6000fd5b505050506040513d6020811015612d0957600080fd5b50516402540be400027affffffffffffffffffffffffffffffffffffffffffffffffffffff16815260008481526006602090815260408083205481517f8205bf6a00000000000000000000000000000000000000000000000000000000815291519483019473ffffffffffffffffffffffffffffffffffffffff90911693638205bf6a93600480850194919392918390030190829087803b158015612dad57600080fd5b505af1158015612dc1573d6000803e3d6000fd5b505050506040513d6020811015612dd757600080fd5b505164ffffffffff16905290506107f5565b506000818152600460209081526040808320600b83528184205484528252918290208251808401909352547affffffffffffffffffffffffffffffffffffffffffffffffffffff811683527b01000000000000000000000000000000000000000000000000000000900464ffffffffff16908201526107f5565b600080831515612e76576000915061087b565b50828202828482811515612e8657fe5b041461292157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f536166654d6174682e6d756c204572726f720000000000000000000000000000604482015290519081900360640190fd5b6000838152600b60209081526040808320805460010190819055815180830183527affffffffffffffffffffffffffffffffffffffffffffffffffffff968716815264ffffffffff9586168185019081529785526004845282852091855292529091209051815494519092167b01000000000000000000000000000000000000000000000000000000029183167fffffffffff00000000000000000000000000000000000000000000000000000090941693909317909116179055565b60008060008451865114151561304d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f43757272656e6379206b6579206172726179206c656e677468206d757374206d60448201527f61746368207261746573206172726179206c656e6774682e0000000000000000606482015290519081900360840190fd5b426102580184106130bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f54696d6520697320746f6f2066617220696e746f207468652066757475726500604482015290519081900360640190fd5b600091505b85518210156132c45785828151811015156130db57fe5b90602001906020020151905084828151811015156130f557fe5b60209081029091010151151561319257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f5a65726f206973206e6f7420612076616c696420726174652c20706c6561736560448201527f2063616c6c2064656c6574655261746520696e73746561642e00000000000000606482015290519081900360840190fd5b7f735553440000000000000000000000000000000000000000000000000000000081141561324757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f52617465206f6620735553442063616e6e6f7420626520757064617465642c2060448201527f6974277320616c7761797320554e49542e000000000000000000000000000000606482015290519081900360840190fd5b61325081612879565b84101561325c576132b9565b61327d81868481518110151561326e57fe5b906020019060200201516133fc565b858381518110151561328b57fe5b6020908102909101015284516132b99082908790859081106132a957fe5b9060200190602002015186612ef3565b6001909101906130c4565b7f1bc0fc8997efa076f59b5ef02c315bc5390f7a6d24d661ce12128c01a3b0ba578686604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561332b578181015183820152602001613313565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561336a578181015183820152602001613352565b5050505090500194505050505060405180910390a150600195945050505050565b600080600a83046133a2868663ffffffff612e6316565b8115156133ab57fe5b0490506005600a825b06106133be57600a015b600a9004949350505050565b6000806133f0846133e487600a870263ffffffff612e6316565b9063ffffffff61352216565b90506005600a826133b4565b6000828152600960205260408120805482908190811061341e57849350613519565b61342786611dba565b600384015490925060ff16151561351557825461344b90600263ffffffff612e6316565b905084811161345d5760009150613470565b61346d818663ffffffff6135a716565b91505b60018301548210613487578260010154915061349a565b6002830154821161349a57826002015491505b82600101548214806134af5750826002015482145b15613515576003830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040805187815290517f4b3d3f51dab37576ab4ca08ebdb81d4a4c587f25df5cc1f9a620a7faff84aba89181900360200190a15b8193505b50505092915050565b60008080831161359357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f536166654d6174682e646976204572726f720000000000000000000000000000604482015290519081900360640190fd5b828481151561359e57fe5b04949350505050565b6000808383111561361957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f536166654d6174682e737562204572726f720000000000000000000000000000604482015290519081900360640190fd5b5050900390565b604080518082019091526000808252602082015290565b815481835581811115610f1b57600083815260209020610f1b91810190830161367491905b80821115613670576000815560010161365c565b5090565b905600a165627a7a72305820092d454032d37016776fc256a5acbaea9ea0f4a289e39f1a3328ce8526920f070029000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882000000000000000000000000ac1ed4fabbd5204e02950d68b6fc8c446ac95362000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001534e58000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000c74a38bbfe81670
Deployed Bytecode
0x6080604052600436106101e15763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416629919c081146101e657806305a046e5146102125780630ee4951b146102b7578063109e46a2146102de5780631627540c146102ff57806317c70de41461032f57806320714f8814610344578063266da16b146103725780632bed9e0c146103965780632d227674146103ae5780632ea913d4146103ce5780633278c960146103e65780633f0e084f146103fb578063459388491461042c5780634f72def61461044457806353a47bb71461045c578063654a60ac1461049a5780637103353e146104b8578063728dec29146104d057806379ba50971461051057806379cb657a146105255780637a018a1e1461053d5780637adbf973146105555780637dc0d1d0146105835780638da5cb5b146105985780639cb8a26a146105ad578063a461fc82146105c2578063ac82f608146105d7578063af3aea86146105ef578063b199c76414610607578063b8225dec14610632578063babcb42314610647578063bd32aa44146106c6578063bfa005ce146106db578063c2c8a6761461070a578063c58aaae61461072a578063c8e6f3951461073f578063ce8480ea14610757578063fdadbc7e1461076f575b600080fd5b3480156101f257600080fd5b506101fe6004356107a3565b604080519115158252519081900360200190f35b34801561021e57600080fd5b5060408051602060048035808201358381028086018501909652808552610267953695939460249493850192918291850190849080828437509497506107fa9650505050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102a357818101518382015260200161028b565b505050509050019250505060405180910390f35b3480156102c357600080fd5b506102cc610882565b60408051918252519081900360200190f35b3480156102ea57600080fd5b506102cc600435602435604435606435610888565b34801561030b57600080fd5b5061032d73ffffffffffffffffffffffffffffffffffffffff600435166108cd565b005b34801561033b57600080fd5b506102cc6109f2565b34801561035057600080fd5b5061032d73ffffffffffffffffffffffffffffffffffffffff600435166109f8565b34801561037e57600080fd5b506102cc600435602435604435606435608435610ba8565b3480156103a257600080fd5b5061032d600435610d3f565b3480156103ba57600080fd5b506101fe6004803560248101910135610f20565b3480156103da57600080fd5b506102cc600435610fbb565b3480156103f257600080fd5b5061032d610fda565b34801561040757600080fd5b5061032d60043573ffffffffffffffffffffffffffffffffffffffff602435166110de565b34801561043857600080fd5b5061032d60043561137c565b34801561045057600080fd5b506102cc600435611527565b34801561046857600080fd5b50610471611535565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156104a657600080fd5b506102cc600435602435604435611551565b3480156104c457600080fd5b506104716004356116cc565b3480156104dc57600080fd5b506104e86004356116f4565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b34801561051c57600080fd5b5061032d61171e565b34801561053157600080fd5b5061032d60043561186f565b34801561054957600080fd5b506102cc600435611956565b34801561056157600080fd5b5061032d73ffffffffffffffffffffffffffffffffffffffff60043516611a47565b34801561058f57600080fd5b50610471611b72565b3480156105a457600080fd5b50610471611b8e565b3480156105b957600080fd5b5061032d611baa565b3480156105ce57600080fd5b506102cc611db3565b3480156105e357600080fd5b506102cc600435611dba565b3480156105fb57600080fd5b506101fe600435611de9565b34801561061357600080fd5b5061032d600435602435604435606435608435151560a4351515611e01565b34801561063e57600080fd5b506101fe61228e565b34801561065357600080fd5b506106676004803560248101910135612297565b604051808060200183151515158152602001828103825284818151815260200191508051906020019060200280838360005b838110156106b1578181015183820152602001610699565b50505050905001935050505060405180910390f35b3480156106d257600080fd5b5061032d6123d0565b3480156106e757600080fd5b506101fe60246004803582810192908201359181359182019101356044356124e3565b34801561071657600080fd5b5061026760048035602481019101356125ff565b34801561073657600080fd5b50610471612688565b34801561074b57600080fd5b5061032d6004356126a9565b34801561076357600080fd5b506102cc600435612879565b34801561077b57600080fd5b5061078a600435602435612895565b6040805192835260208301919091528051918290030190f35b60007f73555344000000000000000000000000000000000000000000000000000000008214156107d5575060006107f5565b426107f16008546107e585612879565b9063ffffffff6128ad16565b1090505b919050565b6060806000835160405190808252806020026020018201604052801561082a578160200160208202803883390190505b509150600090505b835181101561087b5761085b848281518110151561084c57fe5b90602001906020020151612879565b828281518110151561086957fe5b60209081029091010152600101610832565b5092915050565b60085481565b600083815b61089a8783600101612928565b9150508015806108ab575083850181115b156108b8578192506108c3565b60019091019061088d565b5050949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461097957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b60025481565b60005473ffffffffffffffffffffffffffffffffffffffff163314610aa457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b73ffffffffffffffffffffffffffffffffffffffff81161515610b2857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f42656e6566696369617279206d757374206e6f74206265207a65726f00000000604482015290519081900360640190fd5b6003805473ffffffffffffffffffffffffffffffffffffffff831661010081027fffffffffffffffffffffff0000000000000000000000000000000000000000ff9092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c539181900360200190a150565b600080600087610bb7816107a3565b15610c4957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52617465207374616c65206f72206e6f6e6578697374616e742063757272656e60448201527f6379000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b86610c53816107a3565b15610ce557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52617465207374616c65206f72206e6f6e6578697374616e742063757272656e60448201527f6379000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b89881415610cf557889450610d32565b610cff8a88612928565b509350610d0c8887612928565b509250610d2f83610d238b8763ffffffff612b2316565b9063ffffffff612b3816565b94505b5050505095945050505050565b60008054819073ffffffffffffffffffffffffffffffffffffffff163314610dee57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60008381526006602052604090205473ffffffffffffffffffffffffffffffffffffffff169150811515610e8357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4e6f2061676772656761746f722065786973747320666f72206b657900000000604482015290519081900360640190fd5b600083815260066020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610ec2836007612b4d565b90508015610f1b576040805184815273ffffffffffffffffffffffffffffffffffffffff8416602082015281517fec70e890fc7db7de4059b114c9093a1f41283d18ffcfbcac45566feea4d4f777929181900390910190a15b505050565b6000805b82811015610fb157838382818110610f3857fe5b9050602002013560001916600019167f735553440000000000000000000000000000000000000000000000000000000014158015610f9b575042610f996008546107e58787868181101515610f8957fe5b9050602002013560001916612879565b105b15610fa9576001915061087b565b600101610f24565b5060009392505050565b600a805482908110610fc957fe5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff16331461108657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60006002819055600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f6adcc7125002935e0aa31697538ebbd65cfddf20431eb6ecdcfc3e238bfd082c9190a1565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461118b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b81905060008173ffffffffffffffffffffffffffffffffffffffff16638205bf6a6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156111f457600080fd5b505af1158015611208573d6000803e3d6000fd5b505050506040513d602081101561121e57600080fd5b5051101561128d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f476976656e2041676772656761746f7220697320696e76616c69640000000000604482015290519081900360640190fd5b60008381526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1615156112ee57600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688018390555b60008381526006602090815260409182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851690811790915582518681529182015281517f0bcae573430f69c5361e5d76534d3f61d2d803958778680cd74be9dc6299bc63929181900390910190a1505050565b60055473ffffffffffffffffffffffffffffffffffffffff16331461142857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4f6e6c7920746865206f7261636c652063616e20706572666f726d207468697360448201527f20616374696f6e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600061143382611dba565b1161149f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f52617465206973207a65726f0000000000000000000000000000000000000000604482015290519081900360640190fd5b6000818152600460209081526040808320600b808452828520805486529184528285208590559385905292825282547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909255815183815291517fe69d655565c7ff1353d8eaeea62fb7904fa9696987431ec351be288c865f1ae19281900390910190a150565b6007805482908110610fc957fe5b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60008361155d816107a3565b156115ef57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52617465207374616c65206f72206e6f6e6578697374616e742063757272656e60448201527f6379000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b826115f9816107a3565b1561168b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52617465207374616c65206f72206e6f6e6578697374616e742063757272656e60448201527f6379000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b8584141561169b578492506116c3565b6116c06116a785611dba565b610d236116b389611dba565b889063ffffffff612b2316565b92505b50509392505050565b60066020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60096020526000908152604090208054600182015460028301546003909301549192909160ff1684565b60015473ffffffffffffffffffffffffffffffffffffffff1633146117ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e6572736869700000000000000000000000606482015290519081900360840190fd5b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461191b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60088190556040805182815290517f16529d8c407b08938da67de7fa4319199baffce4f5d1971f812cc770b0237e669181900360200190a150565b600081815260066020526040812054819073ffffffffffffffffffffffffffffffffffffffff1615611a2f575060008281526006602090815260408083205481517f668a0f02000000000000000000000000000000000000000000000000000000008152915173ffffffffffffffffffffffffffffffffffffffff90911693849363668a0f02936004808201949293918390030190829087803b1580156119fc57600080fd5b505af1158015611a10573d6000803e3d6000fd5b505050506040513d6020811015611a2657600080fd5b50519150611a41565b6000838152600b602052604090205491505b50919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611af357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116919091179182905560408051929091168252517f3df77beb5db05fcdd70a30fc8adf3f83f9501b68579455adbd100b8180940394916020908290030190a150565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff163314611c5757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60035460ff161515611cca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53656c66204465737472756374206e6f742079657420696e6974696174656400604482015290519081900360640190fd5b426224ea0060025401101515611d4157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f53656c662064657374727563742064656c6179206e6f74206d65740000000000604482015290519081900360640190fd5b506003546040805173ffffffffffffffffffffffffffffffffffffffff61010090930492909216808352905190917f8a09e1677ced846cb537dc2b172043bd05a1a81ad7e0033a7ef8ba762df990b7919081900360200190a18073ffffffffffffffffffffffffffffffffffffffff16ff5b6224ea0081565b6000611dc582612c2a565b517affffffffffffffffffffffffffffffffffffffffffffffffffffff1692915050565b60009081526009602052604090206003015460ff1690565b60005473ffffffffffffffffffffffffffffffffffffffff163314611ead57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60008511611f1c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f656e747279506f696e74206d7573742062652061626f76652030000000000000604482015290519081900360640190fd5b60008311611f8b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6c6f7765724c696d6974206d7573742062652061626f76652030000000000000604482015290519081900360640190fd5b84841161201f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f75707065724c696d6974206d7573742062652061626f76652074686520656e7460448201527f7279506f696e7400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b61203085600263ffffffff612e6316565b84106120c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f75707065724c696d6974206d757374206265206c657373207468616e20646f7560448201527f626c6520656e747279506f696e74000000000000000000000000000000000000606482015290519081900360840190fd5b84831061215757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f6c6f7765724c696d6974206d7573742062652062656c6f772074686520656e7460448201527f7279506f696e7400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600086815260096020526040812054116121a157600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8018690555b600086815260096020908152604091829020878155600181018790556002810186905560030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151517905581518881529081018790528082018690526060810185905290517f37efb38e92b0f94698f6df0c9070e2f00946862a042ac09e34ae8c547684240a916080908290030190a18115612286576040805187815290517f4b3d3f51dab37576ab4ca08ebdb81d4a4c587f25df5cc1f9a620a7faff84aba89181900360200190a1612286868261227e5784612280565b855b42612ef3565b505050505050565b60035460ff1681565b60606000606060008060006122aa613620565b604080518981526020808b028201019091528880156122d3578160200160208202803883390190505b509450600093506008549250600091505b878210156123c15761230b8989848181106122fb57fe5b9050602002013560001916612c2a565b905080600001517affffffffffffffffffffffffffffffffffffffffffffffffffffff16858381518110151561233d57fe5b602090810290910101528315156123b65788888381811061235a57fe5b9050602002013560001916600019167f7355534400000000000000000000000000000000000000000000000000000000141580156123b35750602081015142906123b19064ffffffffff168563ffffffff6128ad16565b105b93505b6001909101906122e4565b50929791965090945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461247c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b42600255600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055604080516224ea00815290517fcbd94ca75b8dc45c9d80c77e851670e78843c0d75180cb81db3e2158228fa9a69181900360200190a1565b60055460009073ffffffffffffffffffffffffffffffffffffffff16331461259257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4f6e6c7920746865206f7261636c652063616e20706572666f726d207468697360448201527f20616374696f6e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6125f58686808060200260200160405190810160405280939291908181526020018383602002808284375050604080516020808c0282810182019093528b82529095508b94508a935083925085019084908082843750899450612fb09350505050565b9695505050505050565b606080600084849050604051908082528060200260200182016040528015612631578160200160208202803883390190505b509150600090505b838110156126805761266085858381811061265057fe5b9050602002013560001916611dba565b828281518110151561266e57fe5b60209081029091010152600101612639565b509392505050565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461275657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b600082815260096020526040812054116127d157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4e6f20696e766572746564207072696365206578697374730000000000000000604482015290519081900360640190fd5b600082815260096020526040812081815560018101829055600281019190915560030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905561282582600a612b4d565b905080156128755760408051838152600060208201819052818301819052606082015290517f37efb38e92b0f94698f6df0c9070e2f00946862a042ac09e34ae8c547684240a9181900360800190a15b5050565b600061288482612c2a565b6020015164ffffffffff1692915050565b6000806128a28484612928565b915091509250929050565b60008282018381101561292157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f536166654d6174682e616464204572726f720000000000000000000000000000604482015290519081900360640190fd5b9392505050565b60008281526006602052604081205481908190819073ffffffffffffffffffffffffffffffffffffffff1615612ab55760008681526006602090815260408083205481517fb5ab58dc000000000000000000000000000000000000000000000000000000008152600481018a9052915173ffffffffffffffffffffffffffffffffffffffff9091169550859363b5ab58dc93602480850194919392918390030190829087803b1580156129da57600080fd5b505af11580156129ee573d6000803e3d6000fd5b505050506040513d6020811015612a0457600080fd5b5051604080517fb633620c0000000000000000000000000000000000000000000000000000000081526004810188905290516402540be4009092029173ffffffffffffffffffffffffffffffffffffffff85169163b633620c9160248083019260209291908290030181600087803b158015612a7f57600080fd5b505af1158015612a93573d6000803e3d6000fd5b505050506040513d6020811015612aa957600080fd5b50519094509250612b1a565b506000858152600460209081526040808320878452909152902080547affffffffffffffffffffffffffffffffffffffffffffffffffffff811694507b01000000000000000000000000000000000000000000000000000000900464ffffffffff1692505b50509250929050565b60006129218383670de0b6b3a764000061338b565b60006129218383670de0b6b3a76400006133ca565b6000805b8254811015610fb15782548490849083908110612b6a57fe5b6000918252602090912001541415612c22578281815481101515612b8a57fe5b6000918252602082200155825483907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110612bc557fe5b90600052602060002001548382815481101515612bde57fe5b6000918252602090912001558254612c18847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8301613637565b506001915061087b565b600101612b51565b612c32613620565b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1615612de95760408051808201808352600085815260066020908152848220547f50d25bcd0000000000000000000000000000000000000000000000000000000090935293519293849373ffffffffffffffffffffffffffffffffffffffff909316926350d25bcd92604480870193929182880390910190829087803b158015612cdf57600080fd5b505af1158015612cf3573d6000803e3d6000fd5b505050506040513d6020811015612d0957600080fd5b50516402540be400027affffffffffffffffffffffffffffffffffffffffffffffffffffff16815260008481526006602090815260408083205481517f8205bf6a00000000000000000000000000000000000000000000000000000000815291519483019473ffffffffffffffffffffffffffffffffffffffff90911693638205bf6a93600480850194919392918390030190829087803b158015612dad57600080fd5b505af1158015612dc1573d6000803e3d6000fd5b505050506040513d6020811015612dd757600080fd5b505164ffffffffff16905290506107f5565b506000818152600460209081526040808320600b83528184205484528252918290208251808401909352547affffffffffffffffffffffffffffffffffffffffffffffffffffff811683527b01000000000000000000000000000000000000000000000000000000900464ffffffffff16908201526107f5565b600080831515612e76576000915061087b565b50828202828482811515612e8657fe5b041461292157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f536166654d6174682e6d756c204572726f720000000000000000000000000000604482015290519081900360640190fd5b6000838152600b60209081526040808320805460010190819055815180830183527affffffffffffffffffffffffffffffffffffffffffffffffffffff968716815264ffffffffff9586168185019081529785526004845282852091855292529091209051815494519092167b01000000000000000000000000000000000000000000000000000000029183167fffffffffff00000000000000000000000000000000000000000000000000000090941693909317909116179055565b60008060008451865114151561304d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f43757272656e6379206b6579206172726179206c656e677468206d757374206d60448201527f61746368207261746573206172726179206c656e6774682e0000000000000000606482015290519081900360840190fd5b426102580184106130bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f54696d6520697320746f6f2066617220696e746f207468652066757475726500604482015290519081900360640190fd5b600091505b85518210156132c45785828151811015156130db57fe5b90602001906020020151905084828151811015156130f557fe5b60209081029091010151151561319257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f5a65726f206973206e6f7420612076616c696420726174652c20706c6561736560448201527f2063616c6c2064656c6574655261746520696e73746561642e00000000000000606482015290519081900360840190fd5b7f735553440000000000000000000000000000000000000000000000000000000081141561324757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f52617465206f6620735553442063616e6e6f7420626520757064617465642c2060448201527f6974277320616c7761797320554e49542e000000000000000000000000000000606482015290519081900360840190fd5b61325081612879565b84101561325c576132b9565b61327d81868481518110151561326e57fe5b906020019060200201516133fc565b858381518110151561328b57fe5b6020908102909101015284516132b99082908790859081106132a957fe5b9060200190602002015186612ef3565b6001909101906130c4565b7f1bc0fc8997efa076f59b5ef02c315bc5390f7a6d24d661ce12128c01a3b0ba578686604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561332b578181015183820152602001613313565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561336a578181015183820152602001613352565b5050505090500194505050505060405180910390a150600195945050505050565b600080600a83046133a2868663ffffffff612e6316565b8115156133ab57fe5b0490506005600a825b06106133be57600a015b600a9004949350505050565b6000806133f0846133e487600a870263ffffffff612e6316565b9063ffffffff61352216565b90506005600a826133b4565b6000828152600960205260408120805482908190811061341e57849350613519565b61342786611dba565b600384015490925060ff16151561351557825461344b90600263ffffffff612e6316565b905084811161345d5760009150613470565b61346d818663ffffffff6135a716565b91505b60018301548210613487578260010154915061349a565b6002830154821161349a57826002015491505b82600101548214806134af5750826002015482145b15613515576003830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040805187815290517f4b3d3f51dab37576ab4ca08ebdb81d4a4c587f25df5cc1f9a620a7faff84aba89181900360200190a15b8193505b50505092915050565b60008080831161359357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f536166654d6174682e646976204572726f720000000000000000000000000000604482015290519081900360640190fd5b828481151561359e57fe5b04949350505050565b6000808383111561361957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f536166654d6174682e737562204572726f720000000000000000000000000000604482015290519081900360640190fd5b5050900390565b604080518082019091526000808252602082015290565b815481835581811115610f1b57600083815260209020610f1b91810190830161367491905b80821115613670576000815560010161365c565b5090565b905600a165627a7a72305820092d454032d37016776fc256a5acbaea9ea0f4a289e39f1a3328ce8526920f070029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882000000000000000000000000ac1ed4fabbd5204e02950d68b6fc8c446ac95362000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001534e58000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000c74a38bbfe81670
-----Decoded View---------------
Arg [0] : _owner (address): 0xB64fF7a4a33Acdf48d97dab0D764afD0F6176882
Arg [1] : _oracle (address): 0xaC1ED4Fabbd5204E02950D68b6FC8c446AC95362
Arg [2] : _currencyKeys (bytes32[]): System.Byte[]
Arg [3] : _newRates (uint256[]): 897522046369011312
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882
Arg [1] : 000000000000000000000000ac1ed4fabbd5204e02950d68b6fc8c446ac95362
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [5] : 534e580000000000000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [7] : 0000000000000000000000000000000000000000000000000c74a38bbfe81670
Loading...
Loading
Loading...
Loading
OVERVIEW
Synthetix: Exchange Rates contract has migrated to 0xba727c69636491ecdfE3E6F64cBE9428aD371e48.Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $1 | 3.9844 | $3.98 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.