Feature Tip: Add private address tag to any address under My Name Tag !
Synthetix: Exchange Rates contract has migrated to a new address.
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 15,388 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Rate Stale P... | 8971768 | 1816 days ago | IN | 0 ETH | 0.00028273 | ||||
Update Rates | 8971767 | 1816 days ago | IN | 0 ETH | 0.00786287 | ||||
Update Rates | 8971745 | 1816 days ago | IN | 0 ETH | 0.00279318 | ||||
Update Rates | 8971714 | 1816 days ago | IN | 0 ETH | 0.00138907 | ||||
Update Rates | 8971706 | 1816 days ago | IN | 0 ETH | 0.00281837 | ||||
Update Rates | 8971674 | 1816 days ago | IN | 0 ETH | 0.00329545 | ||||
Update Rates | 8971654 | 1816 days ago | IN | 0 ETH | 0.0027843 | ||||
Update Rates | 8971649 | 1816 days ago | IN | 0 ETH | 0.00174262 | ||||
Update Rates | 8971633 | 1816 days ago | IN | 0 ETH | 0.0019324 | ||||
Update Rates | 8971611 | 1816 days ago | IN | 0 ETH | 0.00191588 | ||||
Update Rates | 8971583 | 1816 days ago | IN | 0 ETH | 0.00248904 | ||||
Update Rates | 8971575 | 1816 days ago | IN | 0 ETH | 0.0031476 | ||||
Update Rates | 8971511 | 1816 days ago | IN | 0 ETH | 0.0012221 | ||||
Update Rates | 8971494 | 1816 days ago | IN | 0 ETH | 0.0012245 | ||||
Update Rates | 8971470 | 1816 days ago | IN | 0 ETH | 0.0017497 | ||||
Update Rates | 8971460 | 1816 days ago | IN | 0 ETH | 0.00294913 | ||||
Update Rates | 8971441 | 1816 days ago | IN | 0 ETH | 0.00190881 | ||||
Update Rates | 8971431 | 1816 days ago | IN | 0 ETH | 0.00084207 | ||||
Update Rates | 8971367 | 1816 days ago | IN | 0 ETH | 0.0012221 | ||||
Update Rates | 8971349 | 1816 days ago | IN | 0 ETH | 0.00191348 | ||||
Update Rates | 8971325 | 1816 days ago | IN | 0 ETH | 0.00270777 | ||||
Update Rates | 8971306 | 1816 days ago | IN | 0 ETH | 0.0027648 | ||||
Update Rates | 8971290 | 1816 days ago | IN | 0 ETH | 0.00595952 | ||||
Update Rates | 8971237 | 1816 days ago | IN | 0 ETH | 0.00245773 | ||||
Update Rates | 8971216 | 1816 days ago | IN | 0 ETH | 0.00138987 |
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 2019-09-26 */ /* =============================================== * 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); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } /* ----------------------------------------------------------------- FILE 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) Owned(_owner) public { 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); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: ExchangeRates.sol version: 1.0 author: Kevin Brown date: 2018-09-12 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- A contract that any other contract in the Synthetix system can query for the current market value of various assets, including crypto assets as well as various fiat assets. This contract assumes that rate updates will completely update all rates to their current values. If a rate shock happens on a single asset, the oracle will still push updated rates for all other assets. ----------------------------------------------------------------- */ /** * @title The repository for exchange rates */ contract ExchangeRates is SelfDestructible { using SafeMath for uint; using SafeDecimalMath for uint; // Exchange rates stored by currency code, e.g. 'SNX', or 'sUSD' mapping(bytes32 => uint) public rates; // Update times stored by currency code, e.g. 'SNX', or 'sUSD' mapping(bytes32 => uint) public lastRateUpdateTimes; // The address of the oracle which pushes rate updates to this contract address public oracle; // Do not allow the oracle to submit times any further forward into the future than this constant. uint constant ORACLE_FUTURE_LIMIT = 10 minutes; // How long will the contract assume the rate of any asset is correct uint public rateStalePeriod = 3 hours; // Lock exchanges until price update complete bool public priceUpdateLock = false; // Each participating currency in the XDR basket is represented as a currency key with // equal weighting. // There are 5 participating currencies, so we'll declare that clearly. bytes32[5] public xdrParticipants; // 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; // // ========== 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 ) /* Owned is initialised in SelfDestructible */ SelfDestructible(_owner) public { 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. rates["sUSD"] = SafeDecimalMath.unit(); lastRateUpdateTimes["sUSD"] = now; // These are the currencies that make up the XDR basket. // These are hard coded because: // - This way users can depend on the calculation and know it won't change for this deployment of the contract. // - Adding new currencies would likely introduce some kind of weighting factor, which // isn't worth preemptively adding when all of the currencies in the current basket are weighted at 1. // - The expectation is if this logic needs to be updated, we'll simply deploy a new version of this contract // then point the system at the new version. xdrParticipants = [ bytes32("sUSD"), bytes32("sAUD"), bytes32("sCHF"), bytes32("sEUR"), bytes32("sGBP") ]; internalUpdateRates(_currencyKeys, _newRates, now); } /* ========== SETTERS ========== */ /** * @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).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 updateRates(bytes32[] currencyKeys, uint[] newRates, uint timeSent) external onlyOracle returns(bool) { return internalUpdateRates(currencyKeys, newRates, timeSent); } /** * @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++) { // 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(currencyKeys[i] != "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[currencyKeys[i]]) { continue; } newRates[i] = rateOrInverted(currencyKeys[i], newRates[i]); // Ok, go ahead with the update. rates[currencyKeys[i]] = newRates[i]; lastRateUpdateTimes[currencyKeys[i]] = timeSent; } emit RatesUpdated(currencyKeys, newRates); // Now update our XDR rate. updateXDRRate(timeSent); // If locked during a priceupdate then reset it if (priceUpdateLock) { priceUpdateLock = false; } return true; } /** * @notice Internal function to get the inverted rate, if any, and mark an inverted * key as frozen if either limits are reached. * @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 = rates[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; } /** * @notice Update the Synthetix Drawing Rights exchange rate based on other rates already updated. */ function updateXDRRate(uint timeSent) internal { uint total = 0; for (uint i = 0; i < xdrParticipants.length; i++) { total = rates[xdrParticipants[i]].add(total); } // Set the rate rates["XDR"] = total; // Record that we updated the XDR rate. lastRateUpdateTimes["XDR"] = timeSent; // Emit our updated event separate to the others to save // moving data around between arrays. bytes32[] memory eventCurrencyCode = new bytes32[](1); eventCurrencyCode[0] = "XDR"; uint[] memory eventRate = new uint[](1); eventRate[0] = rates["XDR"]; emit RatesUpdated(eventCurrencyCode, eventRate); } /** * @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(rates[currencyKey] > 0, "Rate is zero"); delete rates[currencyKey]; delete lastRateUpdateTimes[currencyKey]; emit RateDeleted(currencyKey); } /** * @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); } /** * @notice Set the the locked state for a priceUpdate call * @param _priceUpdateLock lock boolean flag */ function setPriceUpdateLock(bool _priceUpdateLock) external onlyOracle { priceUpdateLock = _priceUpdateLock; } /** * @notice Set an inverse price up for the currency key * @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 */ function setInversePricing(bytes32 currencyKey, uint entryPoint, uint upperLimit, uint lowerLimit) 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 = false; emit InversePriceConfigured(currencyKey, entryPoint, upperLimit, lowerLimit); } /** * @notice Remove an inverse price for the currency key * @param currencyKey The currency to remove inverse pricing for */ function removeInversePricing(bytes32 currencyKey) external onlyOwner { inversePricing[currencyKey].entryPoint = 0; inversePricing[currencyKey].upperLimit = 0; inversePricing[currencyKey].lowerLimit = 0; inversePricing[currencyKey].frozen = false; // now remove inverted key from array for (uint8 i = 0; i < invertedKeys.length; i++) { if (invertedKeys[i] == currencyKey) { delete invertedKeys[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. invertedKeys[i] = invertedKeys[invertedKeys.length - 1]; // Decrease the size of the array by one. invertedKeys.length--; break; } } emit InversePriceConfigured(currencyKey, 0, 0, 0); } /* ========== VIEWS ========== */ /** * @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(rateForCurrency(sourceCurrencyKey)) .divideDecimalRound(rateForCurrency(destinationCurrencyKey)); } /** * @notice Retrieve the rate for a specific currency */ function rateForCurrency(bytes32 currencyKey) public view returns (uint) { return rates[currencyKey]; } /** * @notice Retrieve the rates for a list of currencies */ function ratesForCurrencies(bytes32[] currencyKeys) public view returns (uint[]) { uint[] memory _rates = new uint[](currencyKeys.length); for (uint8 i = 0; i < currencyKeys.length; i++) { _rates[i] = rates[currencyKeys[i]]; } return _rates; } /** * @notice Retrieve a list of last update times for specific currencies */ function lastRateUpdateTimeForCurrency(bytes32 currencyKey) public view returns (uint) { return lastRateUpdateTimes[currencyKey]; } /** * @notice Retrieve the last update time for a specific currency */ function lastRateUpdateTimesForCurrencies(bytes32[] currencyKeys) public view returns (uint[]) { uint[] memory lastUpdateTimes = new uint[](currencyKeys.length); for (uint8 i = 0; i < currencyKeys.length; i++) { lastUpdateTimes[i] = lastRateUpdateTimes[currencyKeys[i]]; } return lastUpdateTimes; } /** * @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; } /* ========== 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); }
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":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":"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":true,"inputs":[{"name":"currencyKey","type":"bytes32"}],"name":"lastRateUpdateTimeForCurrency","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"priceUpdateLock","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"currencyKey","type":"bytes32"}],"name":"deleteRate","outputs":[],"payable":false,"stateMutability":"nonpayable","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":false,"inputs":[{"name":"_priceUpdateLock","type":"bool"}],"name":"setPriceUpdateLock","outputs":[],"payable":false,"stateMutability":"nonpayable","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":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":"","type":"uint256"}],"name":"xdrParticipants","outputs":[{"name":"","type":"bytes32"}],"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":true,"inputs":[],"name":"selfDestructInitiated","outputs":[{"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":"","type":"bytes32"}],"name":"lastRateUpdateTimes","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"rates","outputs":[{"name":"","type":"uint256"}],"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":"setInversePricing","outputs":[],"payable":false,"stateMutability":"nonpayable","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":[],"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
6080604052612a306007556008805460ff191690553480156200002157600080fd5b506040516200375f3803806200375f83398101604090815281516020830151918301516060840151919390810191018380600160a060020a0381161515620000ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b60008054600160a060020a031916600160a060020a038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150600160a060020a03811615156200019b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f776e6572206d757374206e6f74206265207a65726f00000000000000000000604482015290519081900360640190fd5b60038054600160a060020a038316610100810261010060a860020a03199092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c539181900360200190a15080518251146200028c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f43757272656e6379206b6579206c656e67746820616e642072617465206c656e60448201527f677468206d757374206d617463682e0000000000000000000000000000000000606482015290519081900360840190fd5b60068054600160a060020a031916600160a060020a038516179055604080517f907af6c000000000000000000000000000000000000000000000000000000000815290517384d626b2bb4d0f064067e4bf80fce7055d8f3e7b9163907af6c0916004808301926020929190829003018186803b1580156200030c57600080fd5b505af415801562000321573d6000803e3d6000fd5b505050506040513d60208110156200033857600080fd5b50517f735553440000000000000000000000000000000000000000000000000000000060008190527f9fb26aab670129fe77edeb65291121f3b0b41e28b5cdcb1e5461de51bb21e3c89190915560056020818152427f74c62d09fbc50aefae0794a9a068f786a692826fbdfe63828ec23a875865823f556040805160a0810182529384527f7341554400000000000000000000000000000000000000000000000000000000918401919091527f7343484600000000000000000000000000000000000000000000000000000000908301527f734555520000000000000000000000000000000000000000000000000000000060608301527f73474250000000000000000000000000000000000000000000000000000000006080830152620004639160099162000d06565b506200047a82824264010000000062000485810204565b505050505062000d6b565b600080835185511415156200052157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f43757272656e6379206b6579206172726179206c656e677468206d757374206d60448201527f61746368207261746573206172726179206c656e6774682e0000000000000000606482015290519081900360840190fd5b426102580183106200059457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f54696d6520697320746f6f2066617220696e746f207468652066757475726500604482015290519081900360640190fd5b5060005b845181101562000844578381815181101515620005b157fe5b6020908102909101015115156200064f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f5a65726f206973206e6f7420612076616c696420726174652c20706c6561736560448201527f2063616c6c2064656c6574655261746520696e73746561642e00000000000000606482015290519081900360840190fd5b84818151811015156200065e57fe5b602090810290910101517f735553440000000000000000000000000000000000000000000000000000000014156200071d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f52617465206f6620735553442063616e6e6f7420626520757064617465642c2060448201527f6974277320616c7761797320554e49542e000000000000000000000000000000606482015290519081900360840190fd5b6005600086838151811015156200073057fe5b602090810290910181015182528101919091526040016000205483101562000758576200083b565b620007a385828151811015156200076b57fe5b9060200190602002015185838151811015156200078457fe5b9060200190602002015162000928640100000000026401000000009004565b8482815181101515620007b257fe5b602090810290910101528351849082908110620007cb57fe5b90602001906020020151600460008784815181101515620007e857fe5b906020019060200201516000191660001916815260200190815260200160002081905550826005600087848151811015156200082057fe5b60209081029091018101518252810191909152604001600020555b60010162000598565b6000805160206200371f8339815191528585604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156200089c57818101518382015260200162000882565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015620008dd578181015183820152602001620008c3565b5050505090500194505050505060405180910390a1620009068364010000000062000a54810204565b60085460ff16156200091d576008805460ff191690555b506001949350505050565b6000828152600e6020526040812080548290819081106200094c5784935062000a4b565b600086815260046020526040902054600384015490925060ff16151562000a475782546200098a906002640100000000620024bf62000c9e82021704565b90508481116200099e5760009150620009bb565b620009b881866401000000006200291762000cdb82021704565b91505b60018301548210620009d45782600101549150620009e8565b60028301548211620009e857826002015491505b8260010154821480620009fe5750826002015482145b1562000a475760038301805460ff191660011790556040805187815290517f4b3d3f51dab37576ab4ca08ebdb81d4a4c587f25df5cc1f9a620a7faff84aba89181900360200190a15b8193505b50505092915050565b6000806060805b600583101562000ab25762000aa484600460006009876005811062000a7c57fe5b015481526020810191909152604001600020549064010000000062001fdc62000cf382021704565b935060019092019162000a5b565b7f58445200000000000000000000000000000000000000000000000000000000006000526000805160206200373f83398151915284905560056020527fc6095f8ba0c30294f3d36501e92c5966cb30d5606d2b235ecebf5abd9fffed92859055604080516001808252818301909252908160200160208202803883390190505091507f584452000000000000000000000000000000000000000000000000000000000082600081518110151562000b6557fe5b602090810290910101526040805160018082528183019092529081602001602082028038833950507f5844520000000000000000000000000000000000000000000000000000000000600090815260046020526000805160206200373f83398151915254835193945092849250811062000bdb57fe5b90602001906020020181815250506000805160206200371f8339815191528282604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101562000c4157818101518382015260200162000c27565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101562000c8257818101518382015260200162000c68565b5050505090500194505050505060405180910390a15050505050565b60008083151562000cb3576000915062000cd4565b5082820282848281151562000cc457fe5b041462000cd057600080fd5b8091505b5092915050565b6000808383111562000cec57600080fd5b5050900390565b60008282018381101562000cd057600080fd5b826005810192821562000d39579160200282015b8281111562000d39578251825560209092019160019091019062000d1a565b5062000d4792915062000d4b565b5090565b62000d6891905b8082111562000d47576000815560010162000d52565b90565b6129a48062000d7b6000396000f3006080604052600436106101b55763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416629919c081146101ba57806305a046e5146101e65780630ee4951b1461028b5780631627540c146102b257806317c70de4146102e257806320714f88146102f75780632d227674146103255780632ea913d4146103455780633278c9601461035d578063446144ad1461037257806344d010d41461038a578063459388491461039f57806353a47bb7146103b7578063654a60ac146103f557806370bb595914610413578063728dec291461042d57806379ba50971461046d57806379cb657a146104825780637adbf9731461049a5780637dc0d1d0146104c85780638da5cb5b146104dd5780639cb8a26a146104f2578063a461fc8214610507578063aa687daf1461051c578063ac82f60814610534578063af3aea861461054c578063b8225dec14610564578063bd32aa4414610579578063bfa005ce1461058e578063c2c8a676146105bd578063c58aaae614610612578063c8e6f39514610627578063ce8480ea1461063f578063dc72620514610657578063e32111b71461066f575b600080fd5b3480156101c657600080fd5b506101d2600435610690565b604080519115158252519081900360200190f35b3480156101f257600080fd5b506040805160206004803580820135838102808601850190965280855261023b953695939460249493850192918291850190849080828437509497506106ef9650505050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561027757818101518382015260200161025f565b505050509050019250505060405180910390f35b34801561029757600080fd5b506102a061078c565b60408051918252519081900360200190f35b3480156102be57600080fd5b506102e073ffffffffffffffffffffffffffffffffffffffff60043516610792565b005b3480156102ee57600080fd5b506102a06108b7565b34801561030357600080fd5b506102e073ffffffffffffffffffffffffffffffffffffffff600435166108bd565b34801561033157600080fd5b506101d26004803560248101910135610a6d565b34801561035157600080fd5b506102a0600435610b1f565b34801561036957600080fd5b506102e0610b3e565b34801561037e57600080fd5b506102a0600435610c42565b34801561039657600080fd5b506101d2610c54565b3480156103ab57600080fd5b506102e0600435610c5d565b3480156103c357600080fd5b506103cc610dd7565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561040157600080fd5b506102a0600435602435604435610df3565b34801561041f57600080fd5b506102e06004351515610f7a565b34801561043957600080fd5b50610445600435611057565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b34801561047957600080fd5b506102e0611081565b34801561048e57600080fd5b506102e06004356111d2565b3480156104a657600080fd5b506102e073ffffffffffffffffffffffffffffffffffffffff600435166112b9565b3480156104d457600080fd5b506103cc6113e4565b3480156104e957600080fd5b506103cc611400565b3480156104fe57600080fd5b506102e061141c565b34801561051357600080fd5b506102a0611625565b34801561052857600080fd5b506102a060043561162c565b34801561054057600080fd5b506102a0600435611640565b34801561055857600080fd5b506101d2600435611652565b34801561057057600080fd5b506101d261166a565b34801561058557600080fd5b506102e0611673565b34801561059a57600080fd5b506101d26024600480358281019290820135918135918201910135604435611786565b3480156105c957600080fd5b506040805160206004803580820135838102808601850190965280855261023b953695939460249493850192918291850190849080828437509497506118a29650505050505050565b34801561061e57600080fd5b506103cc611938565b34801561063357600080fd5b506102e0600435611959565b34801561064b57600080fd5b506102a0600435611b82565b34801561066357600080fd5b506102a0600435611b94565b34801561067b57600080fd5b506102e0600435602435604435606435611ba6565b60007f73555344000000000000000000000000000000000000000000000000000000008214156106c2575060006106ea565b60075460008381526005602052604090205442916106e6919063ffffffff611fdc16565b1090505b919050565b6060806000835160405190808252806020026020018201604052801561071f578160200160208202803883390190505b509150600090505b83518160ff1610156107855760056000858360ff1681518110151561074857fe5b60209081029091018101518252810191909152604001600020548251839060ff841690811061077357fe5b60209081029091010152600101610727565b5092915050565b60075481565b60005473ffffffffffffffffffffffffffffffffffffffff16331461083e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b60025481565b60005473ffffffffffffffffffffffffffffffffffffffff16331461096957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b73ffffffffffffffffffffffffffffffffffffffff811615156109ed57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f42656e6566696369617279206d757374206e6f74206265207a65726f00000000604482015290519081900360640190fd5b6003805473ffffffffffffffffffffffffffffffffffffffff831661010081027fffffffffffffffffffffff0000000000000000000000000000000000000000ff9092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c539181900360200190a150565b6000805b82811015610b1557838382818110610a8557fe5b9050602002013560001916600019167f735553440000000000000000000000000000000000000000000000000000000014158015610aff575042610afd600754600560008888878181101515610ad757fe5b60209081029290920135835250810191909152604001600020549063ffffffff611fdc16565b105b15610b0d5760019150610785565b600101610a71565b5060009392505050565b600f805482908110610b2d57fe5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bea57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60006002819055600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f6adcc7125002935e0aa31697538ebbd65cfddf20431eb6ecdcfc3e238bfd082c9190a1565b60009081526005602052604090205490565b60085460ff1681565b60065473ffffffffffffffffffffffffffffffffffffffff163314610d0957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4f6e6c7920746865206f7261636c652063616e20706572666f726d207468697360448201527f20616374696f6e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008181526004602052604081205411610d8457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f52617465206973207a65726f0000000000000000000000000000000000000000604482015290519081900360640190fd5b60008181526004602090815260408083208390556005825280832092909255815183815291517fe69d655565c7ff1353d8eaeea62fb7904fa9696987431ec351be288c865f1ae19281900390910190a150565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b600083610dff81610690565b15610e9157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52617465207374616c65206f72206e6f6e6578697374616e742063757272656e60448201527f6379000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b82610e9b81610690565b15610f2d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52617465207374616c65206f72206e6f6e6578697374616e742063757272656e60448201527f6379000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b85841415610f3d57849250610f71565b610f6e610f4985611640565b610f62610f5589611640565b889063ffffffff611ff516565b9063ffffffff61200a16565b92505b50509392505050565b60065473ffffffffffffffffffffffffffffffffffffffff16331461102657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4f6e6c7920746865206f7261636c652063616e20706572666f726d207468697360448201527f20616374696f6e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b600e6020526000908152604090208054600182015460028301546003909301549192909160ff1684565b60015473ffffffffffffffffffffffffffffffffffffffff16331461112d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e6572736869700000000000000000000000606482015290519081900360840190fd5b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461127e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60078190556040805182815290517f16529d8c407b08938da67de7fa4319199baffce4f5d1971f812cc770b0237e669181900360200190a150565b60005473ffffffffffffffffffffffffffffffffffffffff16331461136557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116919091179182905560408051929091168252517f3df77beb5db05fcdd70a30fc8adf3f83f9501b68579455adbd100b8180940394916020908290030190a150565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146114c957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60035460ff16151561153c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53656c66204465737472756374206e6f742079657420696e6974696174656400604482015290519081900360640190fd5b426224ea00600254011015156115b357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f53656c662064657374727563742064656c6179206e6f74206d65740000000000604482015290519081900360640190fd5b506003546040805173ffffffffffffffffffffffffffffffffffffffff61010090930492909216808352905190917f8a09e1677ced846cb537dc2b172043bd05a1a81ad7e0033a7ef8ba762df990b7919081900360200190a18073ffffffffffffffffffffffffffffffffffffffff16ff5b6224ea0081565b6009816005811061163957fe5b0154905081565b60009081526004602052604090205490565b6000908152600e602052604090206003015460ff1690565b60035460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461171f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b42600255600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055604080516224ea00815290517fcbd94ca75b8dc45c9d80c77e851670e78843c0d75180cb81db3e2158228fa9a69181900360200190a1565b60065460009073ffffffffffffffffffffffffffffffffffffffff16331461183557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4f6e6c7920746865206f7261636c652063616e20706572666f726d207468697360448201527f20616374696f6e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6118988686808060200260200160405190810160405280939291908181526020018383602002808284375050604080516020808c0282810182019093528b82529095508b94508a93508392508501908490808284375089945061201f9350505050565b9695505050505050565b606080600083516040519080825280602002602001820160405280156118d2578160200160208202803883390190505b509150600090505b83518160ff1610156107855760046000858360ff168151811015156118fb57fe5b60209081029091018101518252810191909152604001600020548251839060ff841690811061192657fe5b602090810290910101526001016118da565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff163314611a0657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b506000818152600e60205260408120818155600181018290556002810182905560030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b600f5460ff82161015611b3757600f805483919060ff8416908110611a7157fe5b6000918252602090912001541415611b2f57600f805460ff8316908110611a9457fe5b6000918252602082200155600f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110611acf57fe5b9060005260206000200154600f8260ff16815481101515611aec57fe5b600091825260209091200155600f805490611b29907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830161292e565b50611b37565b600101611a50565b60408051838152600060208201819052818301819052606082015290517f37efb38e92b0f94698f6df0c9070e2f00946862a042ac09e34ae8c547684240a9181900360800190a15050565b60056020526000908152604090205481565b60046020526000908152604090205481565b60005473ffffffffffffffffffffffffffffffffffffffff163314611c5257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60008311611cc157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f656e747279506f696e74206d7573742062652061626f76652030000000000000604482015290519081900360640190fd5b60008111611d3057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6c6f7765724c696d6974206d7573742062652061626f76652030000000000000604482015290519081900360640190fd5b828211611dc457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f75707065724c696d6974206d7573742062652061626f76652074686520656e7460448201527f7279506f696e7400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b611dd583600263ffffffff6124bf16565b8210611e6857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f75707065724c696d6974206d757374206265206c657373207468616e20646f7560448201527f626c6520656e747279506f696e74000000000000000000000000000000000000606482015290519081900360840190fd5b828110611efc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f6c6f7765724c696d6974206d7573742062652062656c6f772074686520656e7460448201527f7279506f696e7400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000848152600e602052604081205411611f4657600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802018490555b6000848152600e6020908152604091829020858155600181018590556002810184905560030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905581518681529081018590528082018490526060810183905290517f37efb38e92b0f94698f6df0c9070e2f00946862a042ac09e34ae8c547684240a9181900360800190a150505050565b600082820183811015611fee57600080fd5b9392505050565b6000611fee8383670de0b6b3a76400006124ed565b6000611fee8383670de0b6b3a764000061252c565b600080835185511415156120ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f43757272656e6379206b6579206172726179206c656e677468206d757374206d60448201527f61746368207261746573206172726179206c656e6774682e0000000000000000606482015290519081900360840190fd5b4261025801831061212c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f54696d6520697320746f6f2066617220696e746f207468652066757475726500604482015290519081900360640190fd5b5060005b84518110156123bc57838181518110151561214757fe5b6020908102909101015115156121e457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f5a65726f206973206e6f7420612076616c696420726174652c20706c6561736560448201527f2063616c6c2064656c6574655261746520696e73746561642e00000000000000606482015290519081900360840190fd5b84818151811015156121f257fe5b602090810290910101517f735553440000000000000000000000000000000000000000000000000000000014156122b057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f52617465206f6620735553442063616e6e6f7420626520757064617465642c2060448201527f6974277320616c7761797320554e49542e000000000000000000000000000000606482015290519081900360840190fd5b6005600086838151811015156122c257fe5b60209081029091018101518252810191909152604001600020548310156122e8576123b4565b61232085828151811015156122f957fe5b90602001906020020151858381518110151561231157fe5b9060200190602002015161255e565b848281518110151561232e57fe5b60209081029091010152835184908290811061234657fe5b9060200190602002015160046000878481518110151561236257fe5b9060200190602002015160001916600019168152602001908152602001600020819055508260056000878481518110151561239957fe5b60209081029091018101518252810191909152604001600020555b600101612130565b7f1bc0fc8997efa076f59b5ef02c315bc5390f7a6d24d661ce12128c01a3b0ba578585604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561242357818101518382015260200161240b565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561246257818101518382015260200161244a565b5050505090500194505050505060405180910390a16124808361268a565b60085460ff16156124b457600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b506001949350505050565b6000808315156124d25760009150610785565b508282028284828115156124e257fe5b0414611fee57600080fd5b600080600a8304612504868663ffffffff6124bf16565b81151561250d57fe5b0490506005600a825b061061252057600a015b600a9004949350505050565b6000806125528461254687600a870263ffffffff6124bf16565b9063ffffffff6128f416565b90506005600a82612516565b6000828152600e60205260408120805482908190811061258057849350612681565b600086815260046020526040902054600384015490925060ff16151561267d5782546125b390600263ffffffff6124bf16565b90508481116125c557600091506125d8565b6125d5818663ffffffff61291716565b91505b600183015482106125ef5782600101549150612602565b6002830154821161260257826002015491505b82600101548214806126175750826002015482145b1561267d576003830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040805187815290517f4b3d3f51dab37576ab4ca08ebdb81d4a4c587f25df5cc1f9a620a7faff84aba89181900360200190a15b8193505b50505092915050565b6000806060805b60058310156126db576126ce8460046000600987600581106126af57fe5b015481526020810191909152604001600020549063ffffffff611fdc16565b9350600190920191612691565b7f58445200000000000000000000000000000000000000000000000000000000006000527fff1c33bb980e6507c2f1abbbb539f436519cfa198453007a4295f347e328ef6b84905560056020527fc6095f8ba0c30294f3d36501e92c5966cb30d5606d2b235ecebf5abd9fffed92859055604080516001808252818301909252908160200160208202803883390190505091507f584452000000000000000000000000000000000000000000000000000000000082600081518110151561279e57fe5b602090810290910101526040805160018082528183019092529081602001602082028038833950507f5844520000000000000000000000000000000000000000000000000000000000600090815260046020527fff1c33bb980e6507c2f1abbbb539f436519cfa198453007a4295f347e328ef6b54835193945092849250811061282457fe5b90602001906020020181815250507f1bc0fc8997efa076f59b5ef02c315bc5390f7a6d24d661ce12128c01a3b0ba578282604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015612899578181015183820152602001612881565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156128d85781810151838201526020016128c0565b5050505090500194505050505060405180910390a15050505050565b60008080831161290357600080fd5b828481151561290e57fe5b04949350505050565b6000808383111561292757600080fd5b5050900390565b81548183558181111561295257600083815260209020612952918101908301612957565b505050565b61297591905b80821115612971576000815560010161295d565b5090565b905600a165627a7a723058205acccebc836792d223305408f65a44e258246f4c6d57bc2b07af1a393fa4c38c00291bc0fc8997efa076f59b5ef02c315bc5390f7a6d24d661ce12128c01a3b0ba57ff1c33bb980e6507c2f1abbbb539f436519cfa198453007a4295f347e328ef6b000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882000000000000000000000000ac1ed4fabbd5204e02950d68b6fc8c446ac95362000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001534e580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000005f284af56a14a02
Deployed Bytecode
0x6080604052600436106101b55763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416629919c081146101ba57806305a046e5146101e65780630ee4951b1461028b5780631627540c146102b257806317c70de4146102e257806320714f88146102f75780632d227674146103255780632ea913d4146103455780633278c9601461035d578063446144ad1461037257806344d010d41461038a578063459388491461039f57806353a47bb7146103b7578063654a60ac146103f557806370bb595914610413578063728dec291461042d57806379ba50971461046d57806379cb657a146104825780637adbf9731461049a5780637dc0d1d0146104c85780638da5cb5b146104dd5780639cb8a26a146104f2578063a461fc8214610507578063aa687daf1461051c578063ac82f60814610534578063af3aea861461054c578063b8225dec14610564578063bd32aa4414610579578063bfa005ce1461058e578063c2c8a676146105bd578063c58aaae614610612578063c8e6f39514610627578063ce8480ea1461063f578063dc72620514610657578063e32111b71461066f575b600080fd5b3480156101c657600080fd5b506101d2600435610690565b604080519115158252519081900360200190f35b3480156101f257600080fd5b506040805160206004803580820135838102808601850190965280855261023b953695939460249493850192918291850190849080828437509497506106ef9650505050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561027757818101518382015260200161025f565b505050509050019250505060405180910390f35b34801561029757600080fd5b506102a061078c565b60408051918252519081900360200190f35b3480156102be57600080fd5b506102e073ffffffffffffffffffffffffffffffffffffffff60043516610792565b005b3480156102ee57600080fd5b506102a06108b7565b34801561030357600080fd5b506102e073ffffffffffffffffffffffffffffffffffffffff600435166108bd565b34801561033157600080fd5b506101d26004803560248101910135610a6d565b34801561035157600080fd5b506102a0600435610b1f565b34801561036957600080fd5b506102e0610b3e565b34801561037e57600080fd5b506102a0600435610c42565b34801561039657600080fd5b506101d2610c54565b3480156103ab57600080fd5b506102e0600435610c5d565b3480156103c357600080fd5b506103cc610dd7565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561040157600080fd5b506102a0600435602435604435610df3565b34801561041f57600080fd5b506102e06004351515610f7a565b34801561043957600080fd5b50610445600435611057565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b34801561047957600080fd5b506102e0611081565b34801561048e57600080fd5b506102e06004356111d2565b3480156104a657600080fd5b506102e073ffffffffffffffffffffffffffffffffffffffff600435166112b9565b3480156104d457600080fd5b506103cc6113e4565b3480156104e957600080fd5b506103cc611400565b3480156104fe57600080fd5b506102e061141c565b34801561051357600080fd5b506102a0611625565b34801561052857600080fd5b506102a060043561162c565b34801561054057600080fd5b506102a0600435611640565b34801561055857600080fd5b506101d2600435611652565b34801561057057600080fd5b506101d261166a565b34801561058557600080fd5b506102e0611673565b34801561059a57600080fd5b506101d26024600480358281019290820135918135918201910135604435611786565b3480156105c957600080fd5b506040805160206004803580820135838102808601850190965280855261023b953695939460249493850192918291850190849080828437509497506118a29650505050505050565b34801561061e57600080fd5b506103cc611938565b34801561063357600080fd5b506102e0600435611959565b34801561064b57600080fd5b506102a0600435611b82565b34801561066357600080fd5b506102a0600435611b94565b34801561067b57600080fd5b506102e0600435602435604435606435611ba6565b60007f73555344000000000000000000000000000000000000000000000000000000008214156106c2575060006106ea565b60075460008381526005602052604090205442916106e6919063ffffffff611fdc16565b1090505b919050565b6060806000835160405190808252806020026020018201604052801561071f578160200160208202803883390190505b509150600090505b83518160ff1610156107855760056000858360ff1681518110151561074857fe5b60209081029091018101518252810191909152604001600020548251839060ff841690811061077357fe5b60209081029091010152600101610727565b5092915050565b60075481565b60005473ffffffffffffffffffffffffffffffffffffffff16331461083e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b60025481565b60005473ffffffffffffffffffffffffffffffffffffffff16331461096957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b73ffffffffffffffffffffffffffffffffffffffff811615156109ed57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f42656e6566696369617279206d757374206e6f74206265207a65726f00000000604482015290519081900360640190fd5b6003805473ffffffffffffffffffffffffffffffffffffffff831661010081027fffffffffffffffffffffff0000000000000000000000000000000000000000ff9092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c539181900360200190a150565b6000805b82811015610b1557838382818110610a8557fe5b9050602002013560001916600019167f735553440000000000000000000000000000000000000000000000000000000014158015610aff575042610afd600754600560008888878181101515610ad757fe5b60209081029290920135835250810191909152604001600020549063ffffffff611fdc16565b105b15610b0d5760019150610785565b600101610a71565b5060009392505050565b600f805482908110610b2d57fe5b600091825260209091200154905081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bea57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60006002819055600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f6adcc7125002935e0aa31697538ebbd65cfddf20431eb6ecdcfc3e238bfd082c9190a1565b60009081526005602052604090205490565b60085460ff1681565b60065473ffffffffffffffffffffffffffffffffffffffff163314610d0957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4f6e6c7920746865206f7261636c652063616e20706572666f726d207468697360448201527f20616374696f6e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008181526004602052604081205411610d8457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f52617465206973207a65726f0000000000000000000000000000000000000000604482015290519081900360640190fd5b60008181526004602090815260408083208390556005825280832092909255815183815291517fe69d655565c7ff1353d8eaeea62fb7904fa9696987431ec351be288c865f1ae19281900390910190a150565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b600083610dff81610690565b15610e9157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52617465207374616c65206f72206e6f6e6578697374616e742063757272656e60448201527f6379000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b82610e9b81610690565b15610f2d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52617465207374616c65206f72206e6f6e6578697374616e742063757272656e60448201527f6379000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b85841415610f3d57849250610f71565b610f6e610f4985611640565b610f62610f5589611640565b889063ffffffff611ff516565b9063ffffffff61200a16565b92505b50509392505050565b60065473ffffffffffffffffffffffffffffffffffffffff16331461102657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4f6e6c7920746865206f7261636c652063616e20706572666f726d207468697360448201527f20616374696f6e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b600e6020526000908152604090208054600182015460028301546003909301549192909160ff1684565b60015473ffffffffffffffffffffffffffffffffffffffff16331461112d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e6572736869700000000000000000000000606482015290519081900360840190fd5b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461127e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60078190556040805182815290517f16529d8c407b08938da67de7fa4319199baffce4f5d1971f812cc770b0237e669181900360200190a150565b60005473ffffffffffffffffffffffffffffffffffffffff16331461136557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116919091179182905560408051929091168252517f3df77beb5db05fcdd70a30fc8adf3f83f9501b68579455adbd100b8180940394916020908290030190a150565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff1633146114c957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60035460ff16151561153c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53656c66204465737472756374206e6f742079657420696e6974696174656400604482015290519081900360640190fd5b426224ea00600254011015156115b357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f53656c662064657374727563742064656c6179206e6f74206d65740000000000604482015290519081900360640190fd5b506003546040805173ffffffffffffffffffffffffffffffffffffffff61010090930492909216808352905190917f8a09e1677ced846cb537dc2b172043bd05a1a81ad7e0033a7ef8ba762df990b7919081900360200190a18073ffffffffffffffffffffffffffffffffffffffff16ff5b6224ea0081565b6009816005811061163957fe5b0154905081565b60009081526004602052604090205490565b6000908152600e602052604090206003015460ff1690565b60035460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461171f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b42600255600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055604080516224ea00815290517fcbd94ca75b8dc45c9d80c77e851670e78843c0d75180cb81db3e2158228fa9a69181900360200190a1565b60065460009073ffffffffffffffffffffffffffffffffffffffff16331461183557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4f6e6c7920746865206f7261636c652063616e20706572666f726d207468697360448201527f20616374696f6e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6118988686808060200260200160405190810160405280939291908181526020018383602002808284375050604080516020808c0282810182019093528b82529095508b94508a93508392508501908490808284375089945061201f9350505050565b9695505050505050565b606080600083516040519080825280602002602001820160405280156118d2578160200160208202803883390190505b509150600090505b83518160ff1610156107855760046000858360ff168151811015156118fb57fe5b60209081029091018101518252810191909152604001600020548251839060ff841690811061192657fe5b602090810290910101526001016118da565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff163314611a0657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b506000818152600e60205260408120818155600181018290556002810182905560030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b600f5460ff82161015611b3757600f805483919060ff8416908110611a7157fe5b6000918252602090912001541415611b2f57600f805460ff8316908110611a9457fe5b6000918252602082200155600f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110611acf57fe5b9060005260206000200154600f8260ff16815481101515611aec57fe5b600091825260209091200155600f805490611b29907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830161292e565b50611b37565b600101611a50565b60408051838152600060208201819052818301819052606082015290517f37efb38e92b0f94698f6df0c9070e2f00946862a042ac09e34ae8c547684240a9181900360800190a15050565b60056020526000908152604090205481565b60046020526000908152604090205481565b60005473ffffffffffffffffffffffffffffffffffffffff163314611c5257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e0000000000000000000000000000000000606482015290519081900360840190fd5b60008311611cc157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f656e747279506f696e74206d7573742062652061626f76652030000000000000604482015290519081900360640190fd5b60008111611d3057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6c6f7765724c696d6974206d7573742062652061626f76652030000000000000604482015290519081900360640190fd5b828211611dc457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f75707065724c696d6974206d7573742062652061626f76652074686520656e7460448201527f7279506f696e7400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b611dd583600263ffffffff6124bf16565b8210611e6857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f75707065724c696d6974206d757374206265206c657373207468616e20646f7560448201527f626c6520656e747279506f696e74000000000000000000000000000000000000606482015290519081900360840190fd5b828110611efc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f6c6f7765724c696d6974206d7573742062652062656c6f772074686520656e7460448201527f7279506f696e7400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000848152600e602052604081205411611f4657600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802018490555b6000848152600e6020908152604091829020858155600181018590556002810184905560030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905581518681529081018590528082018490526060810183905290517f37efb38e92b0f94698f6df0c9070e2f00946862a042ac09e34ae8c547684240a9181900360800190a150505050565b600082820183811015611fee57600080fd5b9392505050565b6000611fee8383670de0b6b3a76400006124ed565b6000611fee8383670de0b6b3a764000061252c565b600080835185511415156120ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f43757272656e6379206b6579206172726179206c656e677468206d757374206d60448201527f61746368207261746573206172726179206c656e6774682e0000000000000000606482015290519081900360840190fd5b4261025801831061212c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f54696d6520697320746f6f2066617220696e746f207468652066757475726500604482015290519081900360640190fd5b5060005b84518110156123bc57838181518110151561214757fe5b6020908102909101015115156121e457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f5a65726f206973206e6f7420612076616c696420726174652c20706c6561736560448201527f2063616c6c2064656c6574655261746520696e73746561642e00000000000000606482015290519081900360840190fd5b84818151811015156121f257fe5b602090810290910101517f735553440000000000000000000000000000000000000000000000000000000014156122b057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f52617465206f6620735553442063616e6e6f7420626520757064617465642c2060448201527f6974277320616c7761797320554e49542e000000000000000000000000000000606482015290519081900360840190fd5b6005600086838151811015156122c257fe5b60209081029091018101518252810191909152604001600020548310156122e8576123b4565b61232085828151811015156122f957fe5b90602001906020020151858381518110151561231157fe5b9060200190602002015161255e565b848281518110151561232e57fe5b60209081029091010152835184908290811061234657fe5b9060200190602002015160046000878481518110151561236257fe5b9060200190602002015160001916600019168152602001908152602001600020819055508260056000878481518110151561239957fe5b60209081029091018101518252810191909152604001600020555b600101612130565b7f1bc0fc8997efa076f59b5ef02c315bc5390f7a6d24d661ce12128c01a3b0ba578585604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561242357818101518382015260200161240b565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561246257818101518382015260200161244a565b5050505090500194505050505060405180910390a16124808361268a565b60085460ff16156124b457600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b506001949350505050565b6000808315156124d25760009150610785565b508282028284828115156124e257fe5b0414611fee57600080fd5b600080600a8304612504868663ffffffff6124bf16565b81151561250d57fe5b0490506005600a825b061061252057600a015b600a9004949350505050565b6000806125528461254687600a870263ffffffff6124bf16565b9063ffffffff6128f416565b90506005600a82612516565b6000828152600e60205260408120805482908190811061258057849350612681565b600086815260046020526040902054600384015490925060ff16151561267d5782546125b390600263ffffffff6124bf16565b90508481116125c557600091506125d8565b6125d5818663ffffffff61291716565b91505b600183015482106125ef5782600101549150612602565b6002830154821161260257826002015491505b82600101548214806126175750826002015482145b1561267d576003830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040805187815290517f4b3d3f51dab37576ab4ca08ebdb81d4a4c587f25df5cc1f9a620a7faff84aba89181900360200190a15b8193505b50505092915050565b6000806060805b60058310156126db576126ce8460046000600987600581106126af57fe5b015481526020810191909152604001600020549063ffffffff611fdc16565b9350600190920191612691565b7f58445200000000000000000000000000000000000000000000000000000000006000527fff1c33bb980e6507c2f1abbbb539f436519cfa198453007a4295f347e328ef6b84905560056020527fc6095f8ba0c30294f3d36501e92c5966cb30d5606d2b235ecebf5abd9fffed92859055604080516001808252818301909252908160200160208202803883390190505091507f584452000000000000000000000000000000000000000000000000000000000082600081518110151561279e57fe5b602090810290910101526040805160018082528183019092529081602001602082028038833950507f5844520000000000000000000000000000000000000000000000000000000000600090815260046020527fff1c33bb980e6507c2f1abbbb539f436519cfa198453007a4295f347e328ef6b54835193945092849250811061282457fe5b90602001906020020181815250507f1bc0fc8997efa076f59b5ef02c315bc5390f7a6d24d661ce12128c01a3b0ba578282604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015612899578181015183820152602001612881565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156128d85781810151838201526020016128c0565b5050505090500194505050505060405180910390a15050505050565b60008080831161290357600080fd5b828481151561290e57fe5b04949350505050565b6000808383111561292757600080fd5b5050900390565b81548183558181111561295257600083815260209020612952918101908301612957565b505050565b61297591905b80821115612971576000815560010161295d565b5090565b905600a165627a7a723058205acccebc836792d223305408f65a44e258246f4c6d57bc2b07af1a393fa4c38c0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882000000000000000000000000ac1ed4fabbd5204e02950d68b6fc8c446ac95362000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001534e580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000005f284af56a14a02
-----Decoded View---------------
Arg [0] : _owner (address): 0xB64fF7a4a33Acdf48d97dab0D764afD0F6176882
Arg [1] : _oracle (address): 0xaC1ED4Fabbd5204E02950D68b6FC8c446AC95362
Arg [2] : _currencyKeys (bytes32[]): System.Byte[]
Arg [3] : _newRates (uint256[]): 428550803161172482
-----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] : 00000000000000000000000000000000000000000000000005f284af56a14a02
Swarm Source
bzzr://5acccebc836792d223305408f65a44e258246f4c6d57bc2b07af1a393fa4c38c
Loading...
Loading
Loading...
Loading
OVERVIEW
The legacy address for Synthetix: Exchange Rates contract.Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.