ETH Price: $3,067.58 (-1.06%)
Gas: 8 Gwei

Contract

0x5eF0de4bd373e435341Cd82311dfb13d5E8fdEf5
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Issue Max Synths...108234152020-09-08 21:17:471319 days ago1599599867IN
Synthetix: Underlying SNX Token
0 ETH0.0487978774.88264128
Transfer107340302020-08-26 4:57:231333 days ago1598417843IN
Synthetix: Underlying SNX Token
0 ETH0.0043766877
Transfer107340302020-08-26 4:57:231333 days ago1598417843IN
Synthetix: Underlying SNX Token
0 ETH0.004377677
Transfer107340292020-08-26 4:57:111333 days ago1598417831IN
Synthetix: Underlying SNX Token
0 ETH0.0043766877
Transfer107242522020-08-24 16:41:301334 days ago1598287290IN
Synthetix: Underlying SNX Token
0 ETH0.007567133.10000023
Issue Max Synths...107190912020-08-23 21:40:591335 days ago1598218859IN
Synthetix: Underlying SNX Token
0 ETH0.047749555.83744185
Issue Max Synths...107190752020-08-23 21:38:061335 days ago1598218686IN
Synthetix: Underlying SNX Token
0 ETH0.0476078955.96083091
Issue Max Synths...107190532020-08-23 21:31:491335 days ago1598218309IN
Synthetix: Underlying SNX Token
0 ETH0.0489299256.11538448
Issue Max Synths...107190362020-08-23 21:27:321335 days ago1598218052IN
Synthetix: Underlying SNX Token
0 ETH0.0492186456.44883425
Issue Max Synths...107190172020-08-23 21:23:231335 days ago1598217803IN
Synthetix: Underlying SNX Token
0 ETH0.0475360455.35635218
Issue Max Synths...107189932020-08-23 21:16:001335 days ago1598217360IN
Synthetix: Underlying SNX Token
0 ETH0.0444330455.82679366
Issue Max Synths...107189512020-08-23 21:07:211335 days ago1598216841IN
Synthetix: Underlying SNX Token
0 ETH0.0473925954.24256835
Issue Max Synths...107189032020-08-23 20:56:201335 days ago1598216180IN
Synthetix: Underlying SNX Token
0 ETH0.0475840455.41185383
Issue Max Synths...107188752020-08-23 20:49:451335 days ago1598215785IN
Synthetix: Underlying SNX Token
0 ETH0.0474611355.26679999
Issue Max Synths...107188572020-08-23 20:46:341335 days ago1598215594IN
Synthetix: Underlying SNX Token
0 ETH0.0480986456.00915127
Issue Max Synths...107188382020-08-23 20:42:461335 days ago1598215366IN
Synthetix: Underlying SNX Token
0 ETH0.0458638657.62277105
Issue Max Synths...107188172020-08-23 20:38:191335 days ago1598215099IN
Synthetix: Underlying SNX Token
0 ETH0.0482370956.17036817
Issue Max Synths...107187942020-08-23 20:32:241335 days ago1598214744IN
Synthetix: Underlying SNX Token
0 ETH0.0451140456.68070409
Issue Max Synths...107187642020-08-23 20:25:031335 days ago1598214303IN
Synthetix: Underlying SNX Token
0 ETH0.0485931956.58346344
Issue Max Synths...107187432020-08-23 20:20:151335 days ago1598214015IN
Synthetix: Underlying SNX Token
0 ETH0.0488504856.88503936
Issue Max Synths...107187222020-08-23 20:16:241335 days ago1598213784IN
Synthetix: Underlying SNX Token
0 ETH0.0497720357.9565403
Issue Max Synths...107187022020-08-23 20:13:131335 days ago1598213593IN
Synthetix: Underlying SNX Token
0 ETH0.0495282657.67348922
Issue Max Synths...107186732020-08-23 20:06:401335 days ago1598213200IN
Synthetix: Underlying SNX Token
0 ETH0.050245258.50793438
Transfer107173292020-08-23 15:11:111335 days ago1598195471IN
Synthetix: Underlying SNX Token
0 ETH0.0053838894.7
Transfer107173202020-08-23 15:10:041335 days ago1598195404IN
Synthetix: Underlying SNX Token
0 ETH0.0053785994.607
View all transactions

Latest 5 internal transactions

Advanced mode:
Parent Transaction Hash Block From To Value
107556152020-08-29 12:24:181330 days ago1598703858
Synthetix: Underlying SNX Token
0.01 ETH
107179482020-08-23 17:29:411335 days ago1598203781
Synthetix: Underlying SNX Token
0.00256079 ETH
106448242020-08-12 11:17:551347 days ago1597231075
Synthetix: Underlying SNX Token
0.1 ETH
105077162020-07-22 7:04:041368 days ago1595401444
Synthetix: Underlying SNX Token
0.00004099 ETH
103799522020-07-02 12:20:361388 days ago1593692436
Synthetix: Underlying SNX Token
0.03107131 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Synthetix

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-07-01
*/

/*

⚠⚠⚠ WARNING WARNING WARNING ⚠⚠⚠

This is a TARGET contract - DO NOT CONNECT TO IT DIRECTLY IN YOUR CONTRACTS or DAPPS!

This contract has an associated PROXY that MUST be used for all integrations - this TARGET will be REPLACED in an upcoming Synthetix release!
The proxy for this contract can be found here:

https://contracts.synthetix.io/ProxyERC20

*//*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

* Synthetix: Synthetix.sol
*
* Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/Synthetix.sol
* Docs: https://docs.synthetix.io/contracts/Synthetix
*
* Contract Dependencies: 
*	- ExternStateToken
*	- IAddressResolver
*	- IERC20
*	- ISynthetix
*	- MixinResolver
*	- Owned
*	- Proxyable
*	- SelfDestructible
*	- State
* Libraries: 
*	- Math
*	- SafeDecimalMath
*	- SafeMath
*
* MIT License
* ===========
*
* Copyright (c) 2020 Synthetix
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

/* ===============================================
* Flattened with Solidifier by Coinage
* 
* https://solidifier.coina.ge
* ===============================================
*/


pragma solidity >=0.4.24;


interface IERC20 {
    // ERC20 Optional Views
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);

    // Views
    function totalSupply() external view returns (uint);

    function balanceOf(address owner) external view returns (uint);

    function allowance(address owner, address spender) external view returns (uint);

    // Mutative functions
    function transfer(address to, uint value) external returns (bool);

    function approve(address spender, uint value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint value
    ) external returns (bool);

    // Events
    event Transfer(address indexed from, address indexed to, uint value);

    event Approval(address indexed owner, address indexed spender, uint value);
}


// https://docs.synthetix.io/contracts/Owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    constructor(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_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);
}


// Inheritance


// https://docs.synthetix.io/contracts/SelfDestructible
contract SelfDestructible is Owned {
    uint public constant SELFDESTRUCT_DELAY = 4 weeks;

    uint public initiationTime;
    bool public selfDestructInitiated;

    address public selfDestructBeneficiary;

    constructor() internal {
        // This contract is abstract, and thus cannot be instantiated directly
        require(owner != address(0), "Owner must be set");
        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 payable _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");
        emit SelfDestructed(selfDestructBeneficiary);
        selfdestruct(address(uint160(selfDestructBeneficiary)));
    }

    event SelfDestructTerminated();
    event SelfDestructed(address beneficiary);
    event SelfDestructInitiated(uint selfDestructDelay);
    event SelfDestructBeneficiaryUpdated(address newBeneficiary);
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/Proxy
contract Proxy is Owned {
    Proxyable public target;

    constructor(address _owner) public Owned(_owner) {}

    function setTarget(Proxyable _target) external onlyOwner {
        target = _target;
        emit TargetUpdated(_target);
    }

    function _emit(
        bytes calldata callData,
        uint numTopics,
        bytes32 topic1,
        bytes32 topic2,
        bytes32 topic3,
        bytes32 topic4
    ) external onlyTarget {
        uint size = callData.length;
        bytes memory _callData = callData;

        assembly {
            /* The first 32 bytes of callData contain its length (as specified by the abi).
             * Length is assumed to be a uint256 and therefore maximum of 32 bytes
             * in length. It is also leftpadded to be a multiple of 32 bytes.
             * This means moving call_data across 32 bytes guarantees we correctly access
             * the data itself. */
            switch numTopics
                case 0 {
                    log0(add(_callData, 32), size)
                }
                case 1 {
                    log1(add(_callData, 32), size, topic1)
                }
                case 2 {
                    log2(add(_callData, 32), size, topic1, topic2)
                }
                case 3 {
                    log3(add(_callData, 32), size, topic1, topic2, topic3)
                }
                case 4 {
                    log4(add(_callData, 32), size, topic1, topic2, topic3, topic4)
                }
        }
    }

    // solhint-disable no-complex-fallback
    function() external payable {
        // Mutable call setting Proxyable.messageSender as this is using call not delegatecall
        target.setMessageSender(msg.sender);

        assembly {
            let free_ptr := mload(0x40)
            calldatacopy(free_ptr, 0, calldatasize)

            /* We must explicitly forward ether to the underlying contract as well. */
            let result := call(gas, sload(target_slot), callvalue, free_ptr, calldatasize, 0, 0)
            returndatacopy(free_ptr, 0, returndatasize)

            if iszero(result) {
                revert(free_ptr, returndatasize)
            }
            return(free_ptr, returndatasize)
        }
    }

    modifier onlyTarget {
        require(Proxyable(msg.sender) == target, "Must be proxy target");
        _;
    }

    event TargetUpdated(Proxyable newTarget);
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/Proxyable
contract Proxyable is Owned {
    // This contract should be treated like an abstract contract

    /* The proxy this contract exists behind. */
    Proxy public proxy;
    Proxy public integrationProxy;

    /* The caller of the proxy, passed through to this contract.
     * Note that every function using this member must apply the onlyProxy or
     * optionalProxy modifiers, otherwise their invocations can use stale values. */
    address public messageSender;

    constructor(address payable _proxy) internal {
        // This contract is abstract, and thus cannot be instantiated directly
        require(owner != address(0), "Owner must be set");

        proxy = Proxy(_proxy);
        emit ProxyUpdated(_proxy);
    }

    function setProxy(address payable _proxy) external onlyOwner {
        proxy = Proxy(_proxy);
        emit ProxyUpdated(_proxy);
    }

    function setIntegrationProxy(address payable _integrationProxy) external onlyOwner {
        integrationProxy = Proxy(_integrationProxy);
    }

    function setMessageSender(address sender) external onlyProxy {
        messageSender = sender;
    }

    modifier onlyProxy {
        require(Proxy(msg.sender) == proxy || Proxy(msg.sender) == integrationProxy, "Only the proxy can call");
        _;
    }

    modifier optionalProxy {
        if (Proxy(msg.sender) != proxy && Proxy(msg.sender) != integrationProxy && messageSender != msg.sender) {
            messageSender = msg.sender;
        }
        _;
    }

    modifier optionalProxy_onlyOwner {
        if (Proxy(msg.sender) != proxy && Proxy(msg.sender) != integrationProxy && messageSender != msg.sender) {
            messageSender = msg.sender;
        }
        require(messageSender == owner, "Owner only function");
        _;
    }

    event ProxyUpdated(address proxyAddress);
}


/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, "SafeMath: division by zero");
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0, "SafeMath: modulo by zero");
        return a % b;
    }
}


// Libraries


// https://docs.synthetix.io/contracts/SafeDecimalMath
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;
    }
}


// Inheritance


// https://docs.synthetix.io/contracts/State
contract State is Owned {
    // the address of the contract that can modify variables
    // this can only be changed by the owner of this contract
    address public associatedContract;

    constructor(address _associatedContract) internal {
        // This contract is abstract, and thus cannot be instantiated directly
        require(owner != address(0), "Owner must be set");

        associatedContract = _associatedContract;
        emit AssociatedContractUpdated(_associatedContract);
    }

    /* ========== SETTERS ========== */

    // Change the associated contract to a new address
    function setAssociatedContract(address _associatedContract) external onlyOwner {
        associatedContract = _associatedContract;
        emit AssociatedContractUpdated(_associatedContract);
    }

    /* ========== MODIFIERS ========== */

    modifier onlyAssociatedContract {
        require(msg.sender == associatedContract, "Only the associated contract can perform this action");
        _;
    }

    /* ========== EVENTS ========== */

    event AssociatedContractUpdated(address associatedContract);
}


// Inheritance


// https://docs.synthetix.io/contracts/TokenState
contract TokenState is Owned, State {
    /* ERC20 fields. */
    mapping(address => uint) public balanceOf;
    mapping(address => mapping(address => uint)) public allowance;

    constructor(address _owner, address _associatedContract) public Owned(_owner) State(_associatedContract) {}

    /* ========== SETTERS ========== */

    /**
     * @notice Set ERC20 allowance.
     * @dev Only the associated contract may call this.
     * @param tokenOwner The authorising party.
     * @param spender The authorised party.
     * @param value The total value the authorised party may spend on the
     * authorising party's behalf.
     */
    function setAllowance(
        address tokenOwner,
        address spender,
        uint value
    ) external onlyAssociatedContract {
        allowance[tokenOwner][spender] = value;
    }

    /**
     * @notice Set the balance in a given account
     * @dev Only the associated contract may call this.
     * @param account The account whose value to set.
     * @param value The new balance of the given account.
     */
    function setBalanceOf(address account, uint value) external onlyAssociatedContract {
        balanceOf[account] = value;
    }
}


// Inheritance


// Libraries


// Internal references


// https://docs.synthetix.io/contracts/ExternStateToken
contract ExternStateToken is Owned, SelfDestructible, Proxyable {
    using SafeMath for uint;
    using SafeDecimalMath for uint;

    /* ========== STATE VARIABLES ========== */

    /* Stores balances and allowances. */
    TokenState public tokenState;

    /* Other ERC20 fields. */
    string public name;
    string public symbol;
    uint public totalSupply;
    uint8 public decimals;

    constructor(
        address payable _proxy,
        TokenState _tokenState,
        string memory _name,
        string memory _symbol,
        uint _totalSupply,
        uint8 _decimals,
        address _owner
    ) public Owned(_owner) SelfDestructible() Proxyable(_proxy) {
        tokenState = _tokenState;

        name = _name;
        symbol = _symbol;
        totalSupply = _totalSupply;
        decimals = _decimals;
    }

    /* ========== VIEWS ========== */

    /**
     * @notice Returns the ERC20 allowance of one party to spend on behalf of another.
     * @param owner The party authorising spending of their funds.
     * @param spender The party spending tokenOwner's funds.
     */
    function allowance(address owner, address spender) public view returns (uint) {
        return tokenState.allowance(owner, spender);
    }

    /**
     * @notice Returns the ERC20 token balance of a given account.
     */
    function balanceOf(address account) external view returns (uint) {
        return tokenState.balanceOf(account);
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    /**
     * @notice Set the address of the TokenState contract.
     * @dev This can be used to "pause" transfer functionality, by pointing the tokenState at 0x000..
     * as balances would be unreachable.
     */
    function setTokenState(TokenState _tokenState) external optionalProxy_onlyOwner {
        tokenState = _tokenState;
        emitTokenStateUpdated(address(_tokenState));
    }

    function _internalTransfer(
        address from,
        address to,
        uint value
    ) internal returns (bool) {
        /* Disallow transfers to irretrievable-addresses. */
        require(to != address(0) && to != address(this) && to != address(proxy), "Cannot transfer to this address");

        // Insufficient balance will be handled by the safe subtraction.
        tokenState.setBalanceOf(from, tokenState.balanceOf(from).sub(value));
        tokenState.setBalanceOf(to, tokenState.balanceOf(to).add(value));

        // Emit a standard ERC20 transfer event
        emitTransfer(from, to, value);

        return true;
    }

    /**
     * @dev Perform an ERC20 token transfer. Designed to be called by transfer functions possessing
     * the onlyProxy or optionalProxy modifiers.
     */
    function _transferByProxy(
        address from,
        address to,
        uint value
    ) internal returns (bool) {
        return _internalTransfer(from, to, value);
    }

    /*
     * @dev Perform an ERC20 token transferFrom. Designed to be called by transferFrom functions
     * possessing the optionalProxy or optionalProxy modifiers.
     */
    function _transferFromByProxy(
        address sender,
        address from,
        address to,
        uint value
    ) internal returns (bool) {
        /* Insufficient allowance will be handled by the safe subtraction. */
        tokenState.setAllowance(from, sender, tokenState.allowance(from, sender).sub(value));
        return _internalTransfer(from, to, value);
    }

    /**
     * @notice Approves spender to transfer on the message sender's behalf.
     */
    function approve(address spender, uint value) public optionalProxy returns (bool) {
        address sender = messageSender;

        tokenState.setAllowance(sender, spender, value);
        emitApproval(sender, spender, value);
        return true;
    }

    /* ========== EVENTS ========== */
    function addressToBytes32(address input) internal pure returns (bytes32) {
        return bytes32(uint256(uint160(input)));
    }

    event Transfer(address indexed from, address indexed to, uint value);
    bytes32 internal constant TRANSFER_SIG = keccak256("Transfer(address,address,uint256)");

    function emitTransfer(
        address from,
        address to,
        uint value
    ) internal {
        proxy._emit(abi.encode(value), 3, TRANSFER_SIG, addressToBytes32(from), addressToBytes32(to), 0);
    }

    event Approval(address indexed owner, address indexed spender, uint value);
    bytes32 internal constant APPROVAL_SIG = keccak256("Approval(address,address,uint256)");

    function emitApproval(
        address owner,
        address spender,
        uint value
    ) internal {
        proxy._emit(abi.encode(value), 3, APPROVAL_SIG, addressToBytes32(owner), addressToBytes32(spender), 0);
    }

    event TokenStateUpdated(address newTokenState);
    bytes32 internal constant TOKENSTATEUPDATED_SIG = keccak256("TokenStateUpdated(address)");

    function emitTokenStateUpdated(address newTokenState) internal {
        proxy._emit(abi.encode(newTokenState), 1, TOKENSTATEUPDATED_SIG, 0, 0, 0);
    }
}


interface IAddressResolver {
    function getAddress(bytes32 name) external view returns (address);

    function getSynth(bytes32 key) external view returns (address);

    function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address);
}


interface ISynth {
    // Views
    function currencyKey() external view returns (bytes32);

    function transferableSynths(address account) external view returns (uint);

    // Mutative functions
    function transferAndSettle(address to, uint value) external returns (bool);

    function transferFromAndSettle(
        address from,
        address to,
        uint value
    ) external returns (bool);

    // Restricted: used internally to Synthetix
    function burn(address account, uint amount) external;

    function issue(address account, uint amount) external;
}


interface IIssuer {
    // Views
    function anySynthOrSNXRateIsStale() external view returns (bool anyRateStale);

    function availableCurrencyKeys() external view returns (bytes32[] memory);

    function availableSynthCount() external view returns (uint);

    function availableSynths(uint index) external view returns (ISynth);

    function canBurnSynths(address account) external view returns (bool);

    function collateral(address account) external view returns (uint);

    function collateralisationRatio(address issuer) external view returns (uint);

    function collateralisationRatioAndAnyRatesStale(address _issuer)
        external
        view
        returns (uint cratio, bool anyRateIsStale);

    function debtBalanceOf(address issuer, bytes32 currencyKey) external view returns (uint debtBalance);

    function lastIssueEvent(address account) external view returns (uint);

    function maxIssuableSynths(address issuer) external view returns (uint maxIssuable);

    function remainingIssuableSynths(address issuer)
        external
        view
        returns (
            uint maxIssuable,
            uint alreadyIssued,
            uint totalSystemDebt
        );

    function synths(bytes32 currencyKey) external view returns (ISynth);

    function synthsByAddress(address synthAddress) external view returns (bytes32);

    function totalIssuedSynths(bytes32 currencyKey, bool excludeEtherCollateral) external view returns (uint);

    function transferableSynthetixAndAnyRateIsStale(address account, uint balance)
        external
        view
        returns (uint transferable, bool anyRateIsStale);

    // Restricted: used internally to Synthetix
    function issueSynths(address from, uint amount) external;

    function issueSynthsOnBehalf(
        address issueFor,
        address from,
        uint amount
    ) external;

    function issueMaxSynths(address from) external;

    function issueMaxSynthsOnBehalf(address issueFor, address from) external;

    function burnSynths(address from, uint amount) external;

    function burnSynthsOnBehalf(
        address burnForAddress,
        address from,
        uint amount
    ) external;

    function burnSynthsToTarget(address from) external;

    function burnSynthsToTargetOnBehalf(address burnForAddress, address from) external;

    function liquidateDelinquentAccount(address account, uint susdAmount, address liquidator) external returns (uint totalRedeemed, uint amountToLiquidate);
}


// Inheritance


// https://docs.synthetix.io/contracts/AddressResolver
contract AddressResolver is Owned, IAddressResolver {
    mapping(bytes32 => address) public repository;

    constructor(address _owner) public Owned(_owner) {}

    /* ========== MUTATIVE FUNCTIONS ========== */

    function importAddresses(bytes32[] calldata names, address[] calldata destinations) external onlyOwner {
        require(names.length == destinations.length, "Input lengths must match");

        for (uint i = 0; i < names.length; i++) {
            repository[names[i]] = destinations[i];
        }
    }

    /* ========== VIEWS ========== */

    function getAddress(bytes32 name) external view returns (address) {
        return repository[name];
    }

    function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address) {
        address _foundAddress = repository[name];
        require(_foundAddress != address(0), reason);
        return _foundAddress;
    }

    function getSynth(bytes32 key) external view returns (address) {
        IIssuer issuer = IIssuer(repository["Issuer"]);
        require(address(issuer) != address(0), "Cannot find Issuer address");
        return address(issuer.synths(key));
    }
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/MixinResolver
contract MixinResolver is Owned {
    AddressResolver public resolver;

    mapping(bytes32 => address) private addressCache;

    bytes32[] public resolverAddressesRequired;

    uint public constant MAX_ADDRESSES_FROM_RESOLVER = 24;

    constructor(address _resolver, bytes32[MAX_ADDRESSES_FROM_RESOLVER] memory _addressesToCache) internal {
        // This contract is abstract, and thus cannot be instantiated directly
        require(owner != address(0), "Owner must be set");

        for (uint i = 0; i < _addressesToCache.length; i++) {
            if (_addressesToCache[i] != bytes32(0)) {
                resolverAddressesRequired.push(_addressesToCache[i]);
            } else {
                // End early once an empty item is found - assumes there are no empty slots in
                // _addressesToCache
                break;
            }
        }
        resolver = AddressResolver(_resolver);
        // Do not sync the cache as addresses may not be in the resolver yet
    }

    /* ========== SETTERS ========== */
    function setResolverAndSyncCache(AddressResolver _resolver) external onlyOwner {
        resolver = _resolver;

        for (uint i = 0; i < resolverAddressesRequired.length; i++) {
            bytes32 name = resolverAddressesRequired[i];
            // Note: can only be invoked once the resolver has all the targets needed added
            addressCache[name] = resolver.requireAndGetAddress(name, "Resolver missing target");
        }
    }

    /* ========== VIEWS ========== */

    function requireAndGetAddress(bytes32 name, string memory reason) internal view returns (address) {
        address _foundAddress = addressCache[name];
        require(_foundAddress != address(0), reason);
        return _foundAddress;
    }

    // Note: this could be made external in a utility contract if addressCache was made public
    // (used for deployment)
    function isResolverCached(AddressResolver _resolver) external view returns (bool) {
        if (resolver != _resolver) {
            return false;
        }

        // otherwise, check everything
        for (uint i = 0; i < resolverAddressesRequired.length; i++) {
            bytes32 name = resolverAddressesRequired[i];
            // false if our cache is invalid or if the resolver doesn't have the required address
            if (resolver.getAddress(name) != addressCache[name] || addressCache[name] == address(0)) {
                return false;
            }
        }

        return true;
    }

    // Note: can be made external into a utility contract (used for deployment)
    function getResolverAddressesRequired()
        external
        view
        returns (bytes32[MAX_ADDRESSES_FROM_RESOLVER] memory addressesRequired)
    {
        for (uint i = 0; i < resolverAddressesRequired.length; i++) {
            addressesRequired[i] = resolverAddressesRequired[i];
        }
    }

    /* ========== INTERNAL FUNCTIONS ========== */
    function appendToAddressCache(bytes32 name) internal {
        resolverAddressesRequired.push(name);
        require(resolverAddressesRequired.length < MAX_ADDRESSES_FROM_RESOLVER, "Max resolver cache size met");
        // Because this is designed to be called internally in constructors, we don't
        // check the address exists already in the resolver
        addressCache[name] = resolver.getAddress(name);
    }
}


interface ISynthetix {
    // Views
    function anySynthOrSNXRateIsStale() external view returns (bool anyRateStale);

    function availableCurrencyKeys() external view returns (bytes32[] memory);

    function availableSynthCount() external view returns (uint);

    function availableSynths(uint index) external view returns (ISynth);

    function collateral(address account) external view returns (uint);

    function collateralisationRatio(address issuer) external view returns (uint);

    function debtBalanceOf(address issuer, bytes32 currencyKey) external view returns (uint);

    function isWaitingPeriod(bytes32 currencyKey) external view returns (bool);

    function maxIssuableSynths(address issuer) external view returns (uint maxIssuable);

    function remainingIssuableSynths(address issuer)
        external
        view
        returns (
            uint maxIssuable,
            uint alreadyIssued,
            uint totalSystemDebt
        );

    function synths(bytes32 currencyKey) external view returns (ISynth);

    function synthsByAddress(address synthAddress) external view returns (bytes32);

    function totalIssuedSynths(bytes32 currencyKey) external view returns (uint);

    function totalIssuedSynthsExcludeEtherCollateral(bytes32 currencyKey) external view returns (uint);

    function transferableSynthetix(address account) external view returns (uint transferable);

    // Mutative Functions
    function burnSynths(uint amount) external;

    function burnSynthsOnBehalf(address burnForAddress, uint amount) external;

    function burnSynthsToTarget() external;

    function burnSynthsToTargetOnBehalf(address burnForAddress) external;

    function exchange(
        bytes32 sourceCurrencyKey,
        uint sourceAmount,
        bytes32 destinationCurrencyKey
    ) external returns (uint amountReceived);

    function exchangeOnBehalf(
        address exchangeForAddress,
        bytes32 sourceCurrencyKey,
        uint sourceAmount,
        bytes32 destinationCurrencyKey
    ) external returns (uint amountReceived);

    function issueMaxSynths() external;

    function issueMaxSynthsOnBehalf(address issueForAddress) external;

    function issueSynths(uint amount) external;

    function issueSynthsOnBehalf(address issueForAddress, uint amount) external;

    function mint() external returns (bool);

    function settle(bytes32 currencyKey)
        external
        returns (
            uint reclaimed,
            uint refunded,
            uint numEntries
        );

    function liquidateDelinquentAccount(address account, uint susdAmount) external returns (bool);
}


interface ISynthetixState {
    // Views
    function debtLedger(uint index) external view returns (uint);

    function issuanceRatio() external view returns (uint);

    function issuanceData(address account) external view returns (uint initialDebtOwnership, uint debtEntryIndex);

    function debtLedgerLength() external view returns (uint);

    function hasIssued(address account) external view returns (bool);

    function lastDebtLedgerEntry() external view returns (uint);

    // Mutative functions
    function incrementTotalIssuerCount() external;

    function decrementTotalIssuerCount() external;

    function setCurrentIssuanceData(address account, uint initialDebtOwnership) external;

    function appendDebtLedgerValue(uint value) external;

    function clearIssuanceData(address account) external;
}


interface ISystemStatus {
    // Views
    function requireSystemActive() external view;

    function requireIssuanceActive() external view;

    function requireExchangeActive() external view;

    function requireSynthActive(bytes32 currencyKey) external view;

    function requireSynthsActive(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) external view;
}


interface IExchanger {
    // Views
    function calculateAmountAfterSettlement(
        address from,
        bytes32 currencyKey,
        uint amount,
        uint refunded
    ) external view returns (uint amountAfterSettlement);

    function maxSecsLeftInWaitingPeriod(address account, bytes32 currencyKey) external view returns (uint);

    function settlementOwing(address account, bytes32 currencyKey)
        external
        view
        returns (
            uint reclaimAmount,
            uint rebateAmount,
            uint numEntries
        );

    function hasWaitingPeriodOrSettlementOwing(address account, bytes32 currencyKey) external view returns (bool);

    function feeRateForExchange(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey)
        external
        view
        returns (uint exchangeFeeRate);

    function getAmountsForExchange(
        uint sourceAmount,
        bytes32 sourceCurrencyKey,
        bytes32 destinationCurrencyKey
    )
        external
        view
        returns (
            uint amountReceived,
            uint fee,
            uint exchangeFeeRate
        );

    // Mutative functions
    function exchange(
        address from,
        bytes32 sourceCurrencyKey,
        uint sourceAmount,
        bytes32 destinationCurrencyKey,
        address destinationAddress
    ) external returns (uint amountReceived);

    function exchangeOnBehalf(
        address exchangeForAddress,
        address from,
        bytes32 sourceCurrencyKey,
        uint sourceAmount,
        bytes32 destinationCurrencyKey
    ) external returns (uint amountReceived);

    function settle(address from, bytes32 currencyKey)
        external
        returns (
            uint reclaimed,
            uint refunded,
            uint numEntries
        );
}


// Libraries


// https://docs.synthetix.io/contracts/Math
library Math {
    using SafeMath for uint;
    using SafeDecimalMath for uint;

    /**
     * @dev Uses "exponentiation by squaring" algorithm where cost is 0(logN)
     * vs 0(N) for naive repeated multiplication.
     * Calculates x^n with x as fixed-point and n as regular unsigned int.
     * Calculates to 18 digits of precision with SafeDecimalMath.unit()
     */
    function powDecimal(uint x, uint n) internal pure returns (uint) {
        // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/

        uint result = SafeDecimalMath.unit();
        while (n > 0) {
            if (n % 2 != 0) {
                result = result.multiplyDecimal(x);
            }
            x = x.multiplyDecimal(x);
            n /= 2;
        }
        return result;
    }
}


// Inheritance


// Libraries


// Internal references


// https://docs.synthetix.io/contracts/SupplySchedule
contract SupplySchedule is Owned {
    using SafeMath for uint;
    using SafeDecimalMath for uint;
    using Math for uint;

    // Time of the last inflation supply mint event
    uint public lastMintEvent;

    // Counter for number of weeks since the start of supply inflation
    uint public weekCounter;

    // The number of SNX rewarded to the caller of Synthetix.mint()
    uint public minterReward = 200 * SafeDecimalMath.unit();

    // The initial weekly inflationary supply is 75m / 52 until the start of the decay rate.
    // 75e6 * SafeDecimalMath.unit() / 52
    uint public constant INITIAL_WEEKLY_SUPPLY = 1442307692307692307692307;

    // Address of the SynthetixProxy for the onlySynthetix modifier
    address payable public synthetixProxy;

    // Max SNX rewards for minter
    uint public constant MAX_MINTER_REWARD = 200 * 1e18;

    // How long each inflation period is before mint can be called
    uint public constant MINT_PERIOD_DURATION = 1 weeks;

    uint public constant INFLATION_START_DATE = 1551830400; // 2019-03-06T00:00:00+00:00
    uint public constant MINT_BUFFER = 1 days;
    uint8 public constant SUPPLY_DECAY_START = 40; // Week 40
    uint8 public constant SUPPLY_DECAY_END = 234; //  Supply Decay ends on Week 234 (inclusive of Week 234 for a total of 195 weeks of inflation decay)

    // Weekly percentage decay of inflationary supply from the first 40 weeks of the 75% inflation rate
    uint public constant DECAY_RATE = 12500000000000000; // 1.25% weekly

    // Percentage growth of terminal supply per annum
    uint public constant TERMINAL_SUPPLY_RATE_ANNUAL = 25000000000000000; // 2.5% pa

    constructor(
        address _owner,
        uint _lastMintEvent,
        uint _currentWeek
    ) public Owned(_owner) {
        lastMintEvent = _lastMintEvent;
        weekCounter = _currentWeek;
    }

    // ========== VIEWS ==========

    /**
     * @return The amount of SNX mintable for the inflationary supply
     */
    function mintableSupply() external view returns (uint) {
        uint totalAmount;

        if (!isMintable()) {
            return totalAmount;
        }

        uint remainingWeeksToMint = weeksSinceLastIssuance();

        uint currentWeek = weekCounter;

        // Calculate total mintable supply from exponential decay function
        // The decay function stops after week 234
        while (remainingWeeksToMint > 0) {
            currentWeek++;

            if (currentWeek < SUPPLY_DECAY_START) {
                // If current week is before supply decay we add initial supply to mintableSupply
                totalAmount = totalAmount.add(INITIAL_WEEKLY_SUPPLY);
                remainingWeeksToMint--;
            } else if (currentWeek <= SUPPLY_DECAY_END) {
                // if current week before supply decay ends we add the new supply for the week
                // diff between current week and (supply decay start week - 1)
                uint decayCount = currentWeek.sub(SUPPLY_DECAY_START - 1);

                totalAmount = totalAmount.add(tokenDecaySupplyForWeek(decayCount));
                remainingWeeksToMint--;
            } else {
                // Terminal supply is calculated on the total supply of Synthetix including any new supply
                // We can compound the remaining week's supply at the fixed terminal rate
                uint totalSupply = IERC20(synthetixProxy).totalSupply();
                uint currentTotalSupply = totalSupply.add(totalAmount);

                totalAmount = totalAmount.add(terminalInflationSupply(currentTotalSupply, remainingWeeksToMint));
                remainingWeeksToMint = 0;
            }
        }

        return totalAmount;
    }

    /**
     * @return A unit amount of decaying inflationary supply from the INITIAL_WEEKLY_SUPPLY
     * @dev New token supply reduces by the decay rate each week calculated as supply = INITIAL_WEEKLY_SUPPLY * ()
     */
    function tokenDecaySupplyForWeek(uint counter) public pure returns (uint) {
        // Apply exponential decay function to number of weeks since
        // start of inflation smoothing to calculate diminishing supply for the week.
        uint effectiveDecay = (SafeDecimalMath.unit().sub(DECAY_RATE)).powDecimal(counter);
        uint supplyForWeek = INITIAL_WEEKLY_SUPPLY.multiplyDecimal(effectiveDecay);

        return supplyForWeek;
    }

    /**
     * @return A unit amount of terminal inflation supply
     * @dev Weekly compound rate based on number of weeks
     */
    function terminalInflationSupply(uint totalSupply, uint numOfWeeks) public pure returns (uint) {
        // rate = (1 + weekly rate) ^ num of weeks
        uint effectiveCompoundRate = SafeDecimalMath.unit().add(TERMINAL_SUPPLY_RATE_ANNUAL.div(52)).powDecimal(numOfWeeks);

        // return Supply * (effectiveRate - 1) for extra supply to issue based on number of weeks
        return totalSupply.multiplyDecimal(effectiveCompoundRate.sub(SafeDecimalMath.unit()));
    }

    /**
     * @dev Take timeDiff in seconds (Dividend) and MINT_PERIOD_DURATION as (Divisor)
     * @return Calculate the numberOfWeeks since last mint rounded down to 1 week
     */
    function weeksSinceLastIssuance() public view returns (uint) {
        // Get weeks since lastMintEvent
        // If lastMintEvent not set or 0, then start from inflation start date.
        uint timeDiff = lastMintEvent > 0 ? now.sub(lastMintEvent) : now.sub(INFLATION_START_DATE);
        return timeDiff.div(MINT_PERIOD_DURATION);
    }

    /**
     * @return boolean whether the MINT_PERIOD_DURATION (7 days)
     * has passed since the lastMintEvent.
     * */
    function isMintable() public view returns (bool) {
        if (now - lastMintEvent > MINT_PERIOD_DURATION) {
            return true;
        }
        return false;
    }

    // ========== MUTATIVE FUNCTIONS ==========

    /**
     * @notice Record the mint event from Synthetix by incrementing the inflation
     * week counter for the number of weeks minted (probabaly always 1)
     * and store the time of the event.
     * @param supplyMinted the amount of SNX the total supply was inflated by.
     * */
    function recordMintEvent(uint supplyMinted) external onlySynthetix returns (bool) {
        uint numberOfWeeksIssued = weeksSinceLastIssuance();

        // add number of weeks minted to weekCounter
        weekCounter = weekCounter.add(numberOfWeeksIssued);

        // Update mint event to latest week issued (start date + number of weeks issued * seconds in week)
        // 1 day time buffer is added so inflation is minted after feePeriod closes
        lastMintEvent = INFLATION_START_DATE.add(weekCounter.mul(MINT_PERIOD_DURATION)).add(MINT_BUFFER);

        emit SupplyMinted(supplyMinted, numberOfWeeksIssued, lastMintEvent, now);
        return true;
    }

    /**
     * @notice Sets the reward amount of SNX for the caller of the public
     * function Synthetix.mint().
     * This incentivises anyone to mint the inflationary supply and the mintr
     * Reward will be deducted from the inflationary supply and sent to the caller.
     * @param amount the amount of SNX to reward the minter.
     * */
    function setMinterReward(uint amount) external onlyOwner {
        require(amount <= MAX_MINTER_REWARD, "Reward cannot exceed max minter reward");
        minterReward = amount;
        emit MinterRewardUpdated(minterReward);
    }

    // ========== SETTERS ========== */

    /**
     * @notice Set the SynthetixProxy should it ever change.
     * SupplySchedule requires Synthetix address as it has the authority
     * to record mint event.
     * */
    function setSynthetixProxy(ISynthetix _synthetixProxy) external onlyOwner {
        require(address(_synthetixProxy) != address(0), "Address cannot be 0");
        synthetixProxy = address(uint160(address(_synthetixProxy)));
        emit SynthetixProxyUpdated(synthetixProxy);
    }

    // ========== MODIFIERS ==========

    /**
     * @notice Only the Synthetix contract is authorised to call this function
     * */
    modifier onlySynthetix() {
        require(
            msg.sender == address(Proxy(address(synthetixProxy)).target()),
            "Only the synthetix contract can perform this action"
        );
        _;
    }

    /* ========== EVENTS ========== */
    /**
     * @notice Emitted when the inflationary supply is minted
     * */
    event SupplyMinted(uint supplyMinted, uint numberOfWeeksIssued, uint lastMintEvent, uint timestamp);

    /**
     * @notice Emitted when the SNX minter reward amount is updated
     * */
    event MinterRewardUpdated(uint newRewardAmount);

    /**
     * @notice Emitted when setSynthetixProxy is called changing the Synthetix Proxy address
     * */
    event SynthetixProxyUpdated(address newAddress);
}


interface IRewardsDistribution {
    // Mutative functions
    function distributeRewards(uint amount) external returns (bool);
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/Synthetix
contract Synthetix is IERC20, ExternStateToken, MixinResolver, ISynthetix {
    // ========== STATE VARIABLES ==========

    // Available Synths which can be used with the system
    string public constant TOKEN_NAME = "Synthetix Network Token";
    string public constant TOKEN_SYMBOL = "SNX";
    uint8 public constant DECIMALS = 18;
    bytes32 public constant sUSD = "sUSD";

    /* ========== ADDRESS RESOLVER CONFIGURATION ========== */

    bytes32 private constant CONTRACT_SYNTHETIXSTATE = "SynthetixState";
    bytes32 private constant CONTRACT_SYSTEMSTATUS = "SystemStatus";
    bytes32 private constant CONTRACT_EXCHANGER = "Exchanger";
    bytes32 private constant CONTRACT_ISSUER = "Issuer";
    bytes32 private constant CONTRACT_SUPPLYSCHEDULE = "SupplySchedule";
    bytes32 private constant CONTRACT_REWARDSDISTRIBUTION = "RewardsDistribution";

    bytes32[24] private addressesToCache = [
        CONTRACT_SYSTEMSTATUS,
        CONTRACT_EXCHANGER,
        CONTRACT_ISSUER,
        CONTRACT_SUPPLYSCHEDULE,
        CONTRACT_REWARDSDISTRIBUTION,
        CONTRACT_SYNTHETIXSTATE
    ];

    // ========== CONSTRUCTOR ==========

    constructor(
        address payable _proxy,
        TokenState _tokenState,
        address _owner,
        uint _totalSupply,
        address _resolver
    )
        public
        ExternStateToken(_proxy, _tokenState, TOKEN_NAME, TOKEN_SYMBOL, _totalSupply, DECIMALS, _owner)
        MixinResolver(_resolver, addressesToCache)
    {}

    /* ========== VIEWS ========== */

    function synthetixState() internal view returns (ISynthetixState) {
        return ISynthetixState(requireAndGetAddress(CONTRACT_SYNTHETIXSTATE, "Missing SynthetixState address"));
    }

    function systemStatus() internal view returns (ISystemStatus) {
        return ISystemStatus(requireAndGetAddress(CONTRACT_SYSTEMSTATUS, "Missing SystemStatus address"));
    }

    function exchanger() internal view returns (IExchanger) {
        return IExchanger(requireAndGetAddress(CONTRACT_EXCHANGER, "Missing Exchanger address"));
    }

    function issuer() internal view returns (IIssuer) {
        return IIssuer(requireAndGetAddress(CONTRACT_ISSUER, "Missing Issuer address"));
    }

    function supplySchedule() internal view returns (SupplySchedule) {
        return SupplySchedule(requireAndGetAddress(CONTRACT_SUPPLYSCHEDULE, "Missing SupplySchedule address"));
    }

    function rewardsDistribution() internal view returns (IRewardsDistribution) {
        return
            IRewardsDistribution(requireAndGetAddress(CONTRACT_REWARDSDISTRIBUTION, "Missing RewardsDistribution address"));
    }

    function debtBalanceOf(address account, bytes32 currencyKey) external view returns (uint) {
        return issuer().debtBalanceOf(account, currencyKey);
    }

    function totalIssuedSynths(bytes32 currencyKey) external view returns (uint) {
        return issuer().totalIssuedSynths(currencyKey, false);
    }

    function totalIssuedSynthsExcludeEtherCollateral(bytes32 currencyKey) external view returns (uint) {
        return issuer().totalIssuedSynths(currencyKey, true);
    }

    function availableCurrencyKeys() external view returns (bytes32[] memory) {
        return issuer().availableCurrencyKeys();
    }

    function availableSynthCount() external view returns (uint) {
        return issuer().availableSynthCount();
    }

    function availableSynths(uint index) external view returns (ISynth) {
        return issuer().availableSynths(index);
    }

    function synths(bytes32 currencyKey) external view returns (ISynth) {
        return issuer().synths(currencyKey);
    }

    function synthsByAddress(address synthAddress) external view returns (bytes32) {
        return issuer().synthsByAddress(synthAddress);
    }

    function isWaitingPeriod(bytes32 currencyKey) external view returns (bool) {
        return exchanger().maxSecsLeftInWaitingPeriod(messageSender, currencyKey) > 0;
    }

    function anySynthOrSNXRateIsStale() external view returns (bool anyRateStale) {
        return issuer().anySynthOrSNXRateIsStale();
    }

    function maxIssuableSynths(address account) external view returns (uint maxIssuable) {
        return issuer().maxIssuableSynths(account);
    }

    function remainingIssuableSynths(address account)
        external
        view
        returns (
            uint maxIssuable,
            uint alreadyIssued,
            uint totalSystemDebt
        )
    {
        return issuer().remainingIssuableSynths(account);
    }

    function _canTransfer(address account, uint value) internal view returns (bool) {
        (uint initialDebtOwnership, ) = synthetixState().issuanceData(account);

        if (initialDebtOwnership > 0) {
            (uint transferable, bool anyRateIsStale) = issuer().transferableSynthetixAndAnyRateIsStale(
                account,
                tokenState.balanceOf(account)
            );
            require(value <= transferable, "Cannot transfer staked or escrowed SNX");
            require(!anyRateIsStale, "A synth or SNX rate is stale");
        }
        return true;
    }

    // ========== MUTATIVE FUNCTIONS ==========

    function transfer(address to, uint value) external optionalProxy systemActive returns (bool) {
        // Ensure they're not trying to exceed their locked amount -- only if they have debt.
        _canTransfer(messageSender, value);

        // Perform the transfer: if there is a problem an exception will be thrown in this call.
        _transferByProxy(messageSender, to, value);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint value
    ) external optionalProxy systemActive returns (bool) {
        // Ensure they're not trying to exceed their locked amount -- only if they have debt.
        _canTransfer(from, value);

        // Perform the transfer: if there is a problem,
        // an exception will be thrown in this call.
        return _transferFromByProxy(messageSender, from, to, value);
    }

    function issueSynths(uint amount) external issuanceActive optionalProxy {
        return issuer().issueSynths(messageSender, amount);
    }

    function issueSynthsOnBehalf(address issueForAddress, uint amount) external issuanceActive optionalProxy {
        return issuer().issueSynthsOnBehalf(issueForAddress, messageSender, amount);
    }

    function issueMaxSynths() external issuanceActive optionalProxy {
        return issuer().issueMaxSynths(messageSender);
    }

    function issueMaxSynthsOnBehalf(address issueForAddress) external issuanceActive optionalProxy {
        return issuer().issueMaxSynthsOnBehalf(issueForAddress, messageSender);
    }

    function burnSynths(uint amount) external issuanceActive optionalProxy {
        return issuer().burnSynths(messageSender, amount);
    }

    function burnSynthsOnBehalf(address burnForAddress, uint amount) external issuanceActive optionalProxy {
        return issuer().burnSynthsOnBehalf(burnForAddress, messageSender, amount);
    }

    function burnSynthsToTarget() external issuanceActive optionalProxy {
        return issuer().burnSynthsToTarget(messageSender);
    }

    function burnSynthsToTargetOnBehalf(address burnForAddress) external issuanceActive optionalProxy {
        return issuer().burnSynthsToTargetOnBehalf(burnForAddress, messageSender);
    }

    function exchange(
        bytes32 sourceCurrencyKey,
        uint sourceAmount,
        bytes32 destinationCurrencyKey
    ) external exchangeActive(sourceCurrencyKey, destinationCurrencyKey) optionalProxy returns (uint amountReceived) {
        return exchanger().exchange(messageSender, sourceCurrencyKey, sourceAmount, destinationCurrencyKey, messageSender);
    }

    function exchangeOnBehalf(
        address exchangeForAddress,
        bytes32 sourceCurrencyKey,
        uint sourceAmount,
        bytes32 destinationCurrencyKey
    ) external exchangeActive(sourceCurrencyKey, destinationCurrencyKey) optionalProxy returns (uint amountReceived) {
        return
            exchanger().exchangeOnBehalf(
                exchangeForAddress,
                messageSender,
                sourceCurrencyKey,
                sourceAmount,
                destinationCurrencyKey
            );
    }

    function settle(bytes32 currencyKey)
        external
        optionalProxy
        returns (
            uint reclaimed,
            uint refunded,
            uint numEntriesSettled
        )
    {
        return exchanger().settle(messageSender, currencyKey);
    }

    function collateralisationRatio(address _issuer) external view returns (uint) {
        return issuer().collateralisationRatio(_issuer);
    }

    function collateral(address account) external view returns (uint) {
        return issuer().collateral(account);
    }

    function transferableSynthetix(address account) external view returns (uint transferable) {
        (transferable, ) = issuer().transferableSynthetixAndAnyRateIsStale(account, tokenState.balanceOf(account));
    }

    function mint() external issuanceActive returns (bool) {
        require(address(rewardsDistribution()) != address(0), "RewardsDistribution not set");

        SupplySchedule _supplySchedule = supplySchedule();
        IRewardsDistribution _rewardsDistribution = rewardsDistribution();

        uint supplyToMint = _supplySchedule.mintableSupply();
        require(supplyToMint > 0, "No supply is mintable");

        // record minting event before mutation to token supply
        _supplySchedule.recordMintEvent(supplyToMint);

        // Set minted SNX balance to RewardEscrow's balance
        // Minus the minterReward and set balance of minter to add reward
        uint minterReward = _supplySchedule.minterReward();
        // Get the remainder
        uint amountToDistribute = supplyToMint.sub(minterReward);

        // Set the token balance to the RewardsDistribution contract
        tokenState.setBalanceOf(
            address(_rewardsDistribution),
            tokenState.balanceOf(address(_rewardsDistribution)).add(amountToDistribute)
        );
        emitTransfer(address(this), address(_rewardsDistribution), amountToDistribute);

        // Kick off the distribution of rewards
        _rewardsDistribution.distributeRewards(amountToDistribute);

        // Assign the minters reward.
        tokenState.setBalanceOf(msg.sender, tokenState.balanceOf(msg.sender).add(minterReward));
        emitTransfer(address(this), msg.sender, minterReward);

        totalSupply = totalSupply.add(supplyToMint);

        return true;
    }

    function liquidateDelinquentAccount(address account, uint susdAmount)
        external
        systemActive
        optionalProxy
        returns (bool)
    {
        (uint totalRedeemed, uint amountLiquidated) = issuer().liquidateDelinquentAccount(
            account,
            susdAmount,
            messageSender
        );

        emitAccountLiquidated(account, totalRedeemed, amountLiquidated, messageSender);

        // Transfer SNX redeemed to messageSender
        // Reverts if amount to redeem is more than balanceOf account, ie due to escrowed balance
        return _transferByProxy(account, messageSender, totalRedeemed);
    }

    // ========== MODIFIERS ==========

    modifier onlyExchanger() {
        require(msg.sender == address(exchanger()), "Only Exchanger can invoke this");
        _;
    }

    modifier systemActive() {
        systemStatus().requireSystemActive();
        _;
    }

    modifier issuanceActive() {
        systemStatus().requireIssuanceActive();
        _;
    }

    modifier exchangeActive(bytes32 src, bytes32 dest) {
        systemStatus().requireExchangeActive();
        systemStatus().requireSynthsActive(src, dest);
        _;
    }

    // ========== EVENTS ==========

    event SynthExchange(
        address indexed account,
        bytes32 fromCurrencyKey,
        uint256 fromAmount,
        bytes32 toCurrencyKey,
        uint256 toAmount,
        address toAddress
    );
    bytes32 internal constant SYNTHEXCHANGE_SIG = keccak256(
        "SynthExchange(address,bytes32,uint256,bytes32,uint256,address)"
    );

    function emitSynthExchange(
        address account,
        bytes32 fromCurrencyKey,
        uint256 fromAmount,
        bytes32 toCurrencyKey,
        uint256 toAmount,
        address toAddress
    ) external onlyExchanger {
        proxy._emit(
            abi.encode(fromCurrencyKey, fromAmount, toCurrencyKey, toAmount, toAddress),
            2,
            SYNTHEXCHANGE_SIG,
            addressToBytes32(account),
            0,
            0
        );
    }

    event ExchangeReclaim(address indexed account, bytes32 currencyKey, uint amount);
    bytes32 internal constant EXCHANGERECLAIM_SIG = keccak256("ExchangeReclaim(address,bytes32,uint256)");

    function emitExchangeReclaim(
        address account,
        bytes32 currencyKey,
        uint256 amount
    ) external onlyExchanger {
        proxy._emit(abi.encode(currencyKey, amount), 2, EXCHANGERECLAIM_SIG, addressToBytes32(account), 0, 0);
    }

    event ExchangeRebate(address indexed account, bytes32 currencyKey, uint amount);
    bytes32 internal constant EXCHANGEREBATE_SIG = keccak256("ExchangeRebate(address,bytes32,uint256)");

    function emitExchangeRebate(
        address account,
        bytes32 currencyKey,
        uint256 amount
    ) external onlyExchanger {
        proxy._emit(abi.encode(currencyKey, amount), 2, EXCHANGEREBATE_SIG, addressToBytes32(account), 0, 0);
    }

    event AccountLiquidated(address indexed account, uint snxRedeemed, uint amountLiquidated, address liquidator);
    bytes32 internal constant ACCOUNTLIQUIDATED_SIG = keccak256("AccountLiquidated(address,uint256,uint256,address)");

    function emitAccountLiquidated(
        address account,
        uint256 snxRedeemed,
        uint256 amountLiquidated,
        address liquidator
    ) internal {
        proxy._emit(
            abi.encode(snxRedeemed, amountLiquidated, liquidator),
            2,
            ACCOUNTLIQUIDATED_SIG,
            addressToBytes32(account),
            0,
            0
        );
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"_proxy","type":"address"},{"internalType":"contract TokenState","name":"_tokenState","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"},{"internalType":"address","name":"_resolver","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"snxRedeemed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountLiquidated","type":"uint256"},{"indexed":false,"internalType":"address","name":"liquidator","type":"address"}],"name":"AccountLiquidated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bytes32","name":"currencyKey","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ExchangeRebate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bytes32","name":"currencyKey","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ExchangeReclaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"proxyAddress","type":"address"}],"name":"ProxyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newBeneficiary","type":"address"}],"name":"SelfDestructBeneficiaryUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"selfDestructDelay","type":"uint256"}],"name":"SelfDestructInitiated","type":"event"},{"anonymous":false,"inputs":[],"name":"SelfDestructTerminated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"beneficiary","type":"address"}],"name":"SelfDestructed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bytes32","name":"fromCurrencyKey","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"fromAmount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"toCurrencyKey","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"toAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"toAddress","type":"address"}],"name":"SynthExchange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newTokenState","type":"address"}],"name":"TokenStateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_ADDRESSES_FROM_RESOLVER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SELFDESTRUCT_DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TOKEN_NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TOKEN_SYMBOL","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"anySynthOrSNXRateIsStale","outputs":[{"internalType":"bool","name":"anyRateStale","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"availableCurrencyKeys","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"availableSynthCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"availableSynths","outputs":[{"internalType":"contract ISynth","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnSynths","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"burnForAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnSynthsOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"burnSynthsToTarget","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"burnForAddress","type":"address"}],"name":"burnSynthsToTargetOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"collateral","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_issuer","type":"address"}],"name":"collateralisationRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"currencyKey","type":"bytes32"}],"name":"debtBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"currencyKey","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emitExchangeRebate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"currencyKey","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emitExchangeReclaim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"fromCurrencyKey","type":"bytes32"},{"internalType":"uint256","name":"fromAmount","type":"uint256"},{"internalType":"bytes32","name":"toCurrencyKey","type":"bytes32"},{"internalType":"uint256","name":"toAmount","type":"uint256"},{"internalType":"address","name":"toAddress","type":"address"}],"name":"emitSynthExchange","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"sourceCurrencyKey","type":"bytes32"},{"internalType":"uint256","name":"sourceAmount","type":"uint256"},{"internalType":"bytes32","name":"destinationCurrencyKey","type":"bytes32"}],"name":"exchange","outputs":[{"internalType":"uint256","name":"amountReceived","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"exchangeForAddress","type":"address"},{"internalType":"bytes32","name":"sourceCurrencyKey","type":"bytes32"},{"internalType":"uint256","name":"sourceAmount","type":"uint256"},{"internalType":"bytes32","name":"destinationCurrencyKey","type":"bytes32"}],"name":"exchangeOnBehalf","outputs":[{"internalType":"uint256","name":"amountReceived","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getResolverAddressesRequired","outputs":[{"internalType":"bytes32[24]","name":"addressesRequired","type":"bytes32[24]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"initiateSelfDestruct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"initiationTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"integrationProxy","outputs":[{"internalType":"contract Proxy","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"contract AddressResolver","name":"_resolver","type":"address"}],"name":"isResolverCached","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"currencyKey","type":"bytes32"}],"name":"isWaitingPeriod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"issueMaxSynths","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"issueForAddress","type":"address"}],"name":"issueMaxSynthsOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"issueSynths","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"issueForAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"issueSynthsOnBehalf","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"susdAmount","type":"uint256"}],"name":"liquidateDelinquentAccount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"maxIssuableSynths","outputs":[{"internalType":"uint256","name":"maxIssuable","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"messageSender","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proxy","outputs":[{"internalType":"contract Proxy","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"remainingIssuableSynths","outputs":[{"internalType":"uint256","name":"maxIssuable","type":"uint256"},{"internalType":"uint256","name":"alreadyIssued","type":"uint256"},{"internalType":"uint256","name":"totalSystemDebt","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"resolver","outputs":[{"internalType":"contract AddressResolver","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"resolverAddressesRequired","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"sUSD","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"selfDestruct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"selfDestructBeneficiary","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"selfDestructInitiated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"_integrationProxy","type":"address"}],"name":"setIntegrationProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"setMessageSender","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"_proxy","type":"address"}],"name":"setProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract AddressResolver","name":"_resolver","type":"address"}],"name":"setResolverAndSyncCache","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"_beneficiary","type":"address"}],"name":"setSelfDestructBeneficiary","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract TokenState","name":"_tokenState","type":"address"}],"name":"setTokenState","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"currencyKey","type":"bytes32"}],"name":"settle","outputs":[{"internalType":"uint256","name":"reclaimed","type":"uint256"},{"internalType":"uint256","name":"refunded","type":"uint256"},{"internalType":"uint256","name":"numEntriesSettled","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"currencyKey","type":"bytes32"}],"name":"synths","outputs":[{"internalType":"contract ISynth","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"synthAddress","type":"address"}],"name":"synthsByAddress","outputs":[{"internalType":"bytes32","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":"tokenState","outputs":[{"internalType":"contract TokenState","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"currencyKey","type":"bytes32"}],"name":"totalIssuedSynths","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"currencyKey","type":"bytes32"}],"name":"totalIssuedSynthsExcludeEtherCollateral","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"transferableSynthetix","outputs":[{"internalType":"uint256","name":"transferable","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]

6101406040526b53797374656d53746174757360a01b60809081526822bc31b430b733b2b960b91b60a0526524b9b9bab2b960d11b60c0526d537570706c795363686564756c6560901b60e0527f52657761726473446973747269627574696f6e00000000000000000000000000610100526d53796e746865746978537461746560901b610120526200009790600e906006620004de565b50348015620000a557600080fd5b5060405162004f8238038062004f82833981810160405260a0811015620000cb57600080fd5b5080516020820151604080840151606085015160809095015182516103008101938490529495939491939290918291600e9060189082845b8154815260200190600101908083116200010357505050505086866040518060400160405280601781526020017f53796e746865746978204e6574776f726b20546f6b656e000000000000000000815250604051806040016040528060038152602001620a69cb60eb1b8152508760128a868160006001600160a01b0316816001600160a01b03161415620001df576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a1506000546001600160a01b03166200028a576040805162461bcd60e51b815260206004820152601160248201527013dddb995c881b5d5cdd081899481cd95d607a1b604482015290519081900360640190fd5b60005460038054610100600160a81b0319166101006001600160a01b0390931692830217905560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c53916020908290030190a16000546001600160a01b031662000335576040805162461bcd60e51b815260206004820152601160248201527013dddb995c881b5d5cdd081899481cd95d607a1b604482015290519081900360640190fd5b600480546001600160a01b0383166001600160a01b0319909116811790915560408051918252517ffc80377ca9c49cc11ae6982f390a42db976d5530af7c43889264b13fbbd7c57e9181900360200190a150600780546001600160a01b0319166001600160a01b0388161790558451620003b790600890602088019062000521565b508351620003cd90600990602087019062000521565b5050600a91909155600b805460ff191660ff90921691909117905550506000546001600160a01b031615159150620004429050576040805162461bcd60e51b815260206004820152601160248201527013dddb995c881b5d5cdd081899481cd95d607a1b604482015290519081900360640190fd5b60005b6018811015620004aa5760008282601881106200045e57fe5b6020020151146200049b57600d8282601881106200047857fe5b6020908102919091015182546001810184556000938452919092200155620004a1565b620004aa565b60010162000445565b5050600b80546001600160a01b0390921661010002610100600160a81b031990921691909117905550620005b39350505050565b82601881019282156200050f579160200282015b828111156200050f578251825591602001919060010190620004f2565b506200051d92915062000593565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200056457805160ff19168380011785556200050f565b828001600101855582156200050f57918201828111156200050f578251825591602001919060010190620004f2565b620005b091905b808211156200051d57600081556001016200059a565b90565b6149bf80620005c36000396000f3fe608060405234801561001057600080fd5b50600436106104125760003560e01c80638da5cb5b11610220578063bc67f83211610130578063dbf63340116100b8578063e8e09b8b11610087578063e8e09b8b14610c1a578063e90dd9e214610c46578063ec55688914610c4e578063ee52a2f314610c56578063f354cad114610c7f57610412565b8063dbf6334014610bb0578063dd62ed3e14610bb8578063e3235c9114610be6578063e6203ed114610bee57610412565b8063c6c9d828116100ff578063c6c9d82814610b0a578063c836fa0a14610b27578063d37c4d8b14610b5f578063d60888e414610b8b578063d67bdd2514610ba857610412565b8063bc67f83214610aa8578063bd32aa4414610ace578063c2bf388014610ad6578063c58aaae614610b0257610412565b80639f769807116101b3578063a9059cbb11610182578063a9059cbb146109f9578063ab49848c14610a25578063ace88afd14610a66578063af086c7e14610a98578063b8225dec14610aa057610412565b80639f7698071461097f578063a311c7c2146109a5578063a461fc82146109cb578063a5fdc5de146109d357610412565b80639741fb22116101ef5780639741fb221461094a578063987757dd146109525780639cb8a26a1461096f5780639cbdaeb61461097757610412565b80638da5cb5b1461090c5780639324cac71461091457806395d89b411461091c57806397107d6d1461092457610412565b80632c955fa7116103265780636ac0bf9c116102ae57806372cb051f1161027d57806372cb051f1461085557806379ba5097146108ad578063835e119c146108b557806383d625d4146108d25780638a290014146108ef57610412565b80636ac0bf9c146107915780636c00f310146107b75780636f01a986146107fd57806370a082311461082f57610412565b806332608039116102f557806332608039146107185780633278c960146107355780633be99e6f1461073d57806353a47bb714610763578063631e14441461076b57610412565b80632c955fa7146106a65780632e0f2625146106cc578063313ce567146106ea578063320223db146106f257610412565b806316b2213f116103a95780631fce304d116103785780631fce304d1461060857806320714f881461062557806323b872dd1461064b578063295da87d146106815780632a9053181461069e57610412565b806316b2213f146105ca57806317c70de4146105f057806318160ddd146105f8578063188214001461060057610412565b80631137aedf116103e55780631137aedf146105305780631249c58b14610574578063131b0ae71461057c5780631627540c146105a457610412565b806304f3bcec1461041757806305b3c1c91461043b57806306fdde0314610473578063095ea7b3146104f0575b600080fd5b61041f610c87565b604080516001600160a01b039092168252519081900360200190f35b6104616004803603602081101561045157600080fd5b50356001600160a01b0316610c9b565b60408051918252519081900360200190f35b61047b610d2e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61051c6004803603604081101561050657600080fd5b506001600160a01b038135169060200135610dbc565b604080519115158252519081900360200190f35b6105566004803603602081101561054657600080fd5b50356001600160a01b0316610ea4565b60408051938452602084019290925282820152519081900360600190f35b61051c610f4a565b6105a26004803603602081101561059257600080fd5b50356001600160a01b031661143e565b005b6105a2600480360360208110156105ba57600080fd5b50356001600160a01b03166114a9565b610461600480360360208110156105e057600080fd5b50356001600160a01b0316611546565b6104616115a5565b6104616115ab565b61047b6115b1565b61051c6004803603602081101561061e57600080fd5b50356115ea565b6105a26004803603602081101561063b57600080fd5b50356001600160a01b031661167d565b61051c6004803603606081101561066157600080fd5b506001600160a01b0381358116916020810135909116906040013561177d565b6105a26004803603602081101561069757600080fd5b5035611858565b61047b611980565b6105a2600480360360208110156106bc57600080fd5b50356001600160a01b031661199f565b6106d4611aac565b6040805160ff9092168252519081900360200190f35b6106d4611ab1565b6105a26004803603602081101561070857600080fd5b50356001600160a01b0316611aba565b61041f6004803603602081101561072e57600080fd5b5035611bc7565b6105a2611c14565b6105a26004803603602081101561075357600080fd5b50356001600160a01b0316611c97565b61041f611e0e565b61051c6004803603602081101561078157600080fd5b50356001600160a01b0316611e1d565b610461600480360360208110156107a757600080fd5b50356001600160a01b0316611f44565b6105a2600480360360c08110156107cd57600080fd5b506001600160a01b03813581169160208101359160408201359160608101359160808201359160a001351661204b565b6105a26004803603606081101561081357600080fd5b506001600160a01b038135169060208101359060400135612210565b6104616004803603602081101561084557600080fd5b50356001600160a01b03166123b7565b61085d612408565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610899578181015183820152602001610881565b505050509050019250505060405180910390f35b6105a2612518565b61041f600480360360208110156108cb57600080fd5b50356125d4565b610461600480360360208110156108e857600080fd5b5035612621565b6105a26004803603602081101561090557600080fd5b503561267b565b61041f612786565b610461612795565b61047b6127a0565b6105a26004803603602081101561093a57600080fd5b50356001600160a01b03166127fb565b6105a2612898565b6105566004803603602081101561096857600080fd5b50356129b7565b6105a2612a86565b61041f612bd8565b6105a26004803603602081101561099557600080fd5b50356001600160a01b0316612be7565b610461600480360360208110156109bb57600080fd5b50356001600160a01b0316612cbb565b610461612d1a565b610461600480360360208110156109e957600080fd5b50356001600160a01b0316612d21565b61051c60048036036040811015610a0f57600080fd5b506001600160a01b038135169060200135612d80565b610a2d612e5f565b604051808261030080838360005b83811015610a53578181015183820152602001610a3b565b5050505090500191505060405180910390f35b6105a260048036036060811015610a7c57600080fd5b506001600160a01b038135169060208101359060400135612ea9565b6105a2612f6f565b61051c613074565b6105a260048036036020811015610abe57600080fd5b50356001600160a01b031661307d565b6105a2613113565b6105a260048036036040811015610aec57600080fd5b506001600160a01b0381351690602001356131a5565b61041f6132d5565b61046160048036036020811015610b2057600080fd5b50356132e9565b61046160048036036080811015610b3d57600080fd5b506001600160a01b038135169060208101359060408101359060600135613307565b61046160048036036040811015610b7557600080fd5b506001600160a01b0381351690602001356134d0565b61046160048036036020811015610ba157600080fd5b503561356a565b61041f6135c4565b6104616135d3565b61046160048036036040811015610bce57600080fd5b506001600160a01b0381358116916020013516613646565b61046161369f565b61051c60048036036040811015610c0457600080fd5b506001600160a01b0381351690602001356136a4565b6105a260048036036040811015610c3057600080fd5b506001600160a01b03813516906020013561382e565b61041f613942565b61041f613951565b61046160048036036060811015610c6c57600080fd5b5080359060208101359060400135613960565b61051c613b27565b600b5461010090046001600160a01b031681565b6000610ca5613b69565b6001600160a01b03166305b3c1c9836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610cfa57600080fd5b505afa158015610d0e573d6000803e3d6000fd5b505050506040513d6020811015610d2457600080fd5b505190505b919050565b6008805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610db45780601f10610d8957610100808354040283529160200191610db4565b820191906000526020600020905b815481529060010190602001808311610d9757829003601f168201915b505050505081565b6004546000906001600160a01b03163314801590610de557506005546001600160a01b03163314155b8015610dfc57506006546001600160a01b03163314155b15610e1457600680546001600160a01b031916331790555b60065460075460408051633691826360e21b81526001600160a01b0393841660048201819052878516602483015260448201879052915191939092169163da46098c91606480830192600092919082900301818387803b158015610e7757600080fd5b505af1158015610e8b573d6000803e3d6000fd5b50505050610e9a818585613bb1565b5060019392505050565b6000806000610eb1613b69565b6001600160a01b0316631137aedf856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060606040518083038186803b158015610f0657600080fd5b505afa158015610f1a573d6000803e3d6000fd5b505050506040513d6060811015610f3057600080fd5b508051602082015160409092015190969195509350915050565b6000610f54613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b158015610f8c57600080fd5b505afa158015610fa0573d6000803e3d6000fd5b5050505060006001600160a01b0316610fb7613ccb565b6001600160a01b03161415611013576040805162461bcd60e51b815260206004820152601b60248201527f52657761726473446973747269627574696f6e206e6f74207365740000000000604482015290519081900360640190fd5b600061101d613d05565b90506000611029613ccb565b90506000826001600160a01b031663cc5c095c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561106657600080fd5b505afa15801561107a573d6000803e3d6000fd5b505050506040513d602081101561109057600080fd5b50519050806110de576040805162461bcd60e51b81526020600482015260156024820152744e6f20737570706c79206973206d696e7461626c6560581b604482015290519081900360640190fd5b826001600160a01b0316637e7961d7826040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561112457600080fd5b505af1158015611138573d6000803e3d6000fd5b505050506040513d602081101561114e57600080fd5b505060408051639bdd7ac760e01b815290516000916001600160a01b03861691639bdd7ac791600480820192602092909190829003018186803b15801561119457600080fd5b505afa1580156111a8573d6000803e3d6000fd5b505050506040513d60208110156111be57600080fd5b5051905060006111d4838363ffffffff613d5716565b600754604080516370a0823160e01b81526001600160a01b038881166004830152915193945091169163b46310f691879161126a91869186916370a08231916024808301926020929190829003018186803b15801561123257600080fd5b505afa158015611246573d6000803e3d6000fd5b505050506040513d602081101561125c57600080fd5b50519063ffffffff613db416565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156112b957600080fd5b505af11580156112cd573d6000803e3d6000fd5b505050506112dc308583613e15565b836001600160a01b03166359974e38826040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561132257600080fd5b505af1158015611336573d6000803e3d6000fd5b505050506040513d602081101561134c57600080fd5b5050600754604080516370a0823160e01b8152336004820181905291516001600160a01b039093169263b46310f692916113aa91879186916370a0823191602480820192602092909190829003018186803b15801561123257600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156113f957600080fd5b505af115801561140d573d6000803e3d6000fd5b5050505061141c303384613e15565b600a5461142f908463ffffffff613db416565b600a5550600194505050505090565b6000546001600160a01b031633146114875760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146114f25760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b6000611550613b69565b6001600160a01b03166316b2213f836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610cfa57600080fd5b60025481565b600a5481565b6040518060400160405280601781526020017f53796e746865746978204e6574776f726b20546f6b656e00000000000000000081525081565b6000806115f5613e68565b600654604080516301670a7b60e21b81526001600160a01b039283166004820152602481018790529051929091169163059c29ec91604480820192602092909190829003018186803b15801561164a57600080fd5b505afa15801561165e573d6000803e3d6000fd5b505050506040513d602081101561167457600080fd5b50511192915050565b6000546001600160a01b031633146116c65760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b6001600160a01b038116611721576040805162461bcd60e51b815260206004820152601c60248201527f42656e6566696369617279206d757374206e6f74206265207a65726f00000000604482015290519081900360640190fd5b600380546001600160a01b0383166101008102610100600160a81b03199092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c539181900360200190a150565b6004546000906001600160a01b031633148015906117a657506005546001600160a01b03163314155b80156117bd57506006546001600160a01b03163314155b156117d557600680546001600160a01b031916331790555b6117dd613c7b565b6001600160a01b031663086dabd16040518163ffffffff1660e01b815260040160006040518083038186803b15801561181557600080fd5b505afa158015611829573d6000803e3d6000fd5b505050506118378483613eb5565b50600654611850906001600160a01b03168585856140e6565b949350505050565b611860613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b15801561189857600080fd5b505afa1580156118ac573d6000803e3d6000fd5b50506004546001600160a01b031633148015925090506118d757506005546001600160a01b03163314155b80156118ee57506006546001600160a01b03163314155b1561190657600680546001600160a01b031916331790555b61190e613b69565b6006546040805163b06e8c6560e01b81526001600160a01b039283166004820152602481018590529051929091169163b06e8c659160448082019260009290919082900301818387803b15801561196457600080fd5b505af1158015611978573d6000803e3d6000fd5b505050505b50565b604051806040016040528060038152602001620a69cb60eb1b81525081565b6119a7613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b1580156119df57600080fd5b505afa1580156119f3573d6000803e3d6000fd5b50506004546001600160a01b03163314801592509050611a1e57506005546001600160a01b03163314155b8015611a3557506006546001600160a01b03163314155b15611a4d57600680546001600160a01b031916331790555b611a55613b69565b6006546040805163159fa0d560e11b81526001600160a01b038581166004830152928316602482015290519290911691632b3f41aa9160448082019260009290919082900301818387803b15801561196457600080fd5b601281565b600b5460ff1681565b611ac2613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b158015611afa57600080fd5b505afa158015611b0e573d6000803e3d6000fd5b50506004546001600160a01b03163314801592509050611b3957506005546001600160a01b03163314155b8015611b5057506006546001600160a01b03163314155b15611b6857600680546001600160a01b031916331790555b611b70613b69565b6006546040805163fd864ccf60e01b81526001600160a01b03858116600483015292831660248201529051929091169163fd864ccf9160448082019260009290919082900301818387803b15801561196457600080fd5b6000611bd1613b69565b6001600160a01b03166332608039836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610cfa57600080fd5b6000546001600160a01b03163314611c5d5760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b600060028190556003805460ff191690556040517f6adcc7125002935e0aa31697538ebbd65cfddf20431eb6ecdcfc3e238bfd082c9190a1565b6000546001600160a01b03163314611ce05760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b600b8054610100600160a81b0319166101006001600160a01b0384160217905560005b600d54811015611e0a576000600d8281548110611d1c57fe5b60009182526020918290200154600b546040805163dacb2d0160e01b81526004810184905260248101829052601760448201527f5265736f6c766572206d697373696e6720746172676574000000000000000000606482015290519294506101009091046001600160a01b03169263dacb2d0192608480840193829003018186803b158015611daa57600080fd5b505afa158015611dbe573d6000803e3d6000fd5b505050506040513d6020811015611dd457600080fd5b50516000918252600c602052604090912080546001600160a01b0319166001600160a01b03909216919091179055600101611d03565b5050565b6001546001600160a01b031681565b600b546000906001600160a01b038381166101009092041614611e4257506000610d29565b60005b600d54811015611f3b576000600d8281548110611e5e57fe5b6000918252602080832090910154808352600c825260409283902054600b5484516321f8a72160e01b81526004810184905294519295506001600160a01b0391821694610100909104909116926321f8a72192602480840193829003018186803b158015611ecb57600080fd5b505afa158015611edf573d6000803e3d6000fd5b505050506040513d6020811015611ef557600080fd5b50516001600160a01b0316141580611f2257506000818152600c60205260409020546001600160a01b0316155b15611f3257600092505050610d29565b50600101611e45565b50600192915050565b6000611f4e613b69565b600754604080516370a0823160e01b81526001600160a01b03868116600483015291519382169363db2b91cf93879316916370a08231916024808301926020929190829003018186803b158015611fa457600080fd5b505afa158015611fb8573d6000803e3d6000fd5b505050506040513d6020811015611fce57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091528051604480840193829003018186803b15801561201957600080fd5b505afa15801561202d573d6000803e3d6000fd5b505050506040513d604081101561204357600080fd5b505192915050565b612053613e68565b6001600160a01b0316336001600160a01b0316146120b8576040805162461bcd60e51b815260206004820152601e60248201527f4f6e6c792045786368616e6765722063616e20696e766f6b6520746869730000604482015290519081900360640190fd5b600454604080516020810188905280820187905260608101869052608081018590526001600160a01b0384811660a0808401919091528351808403909101815260c0909201928390529092169163907dff979160029080603e61483a8239603e019050604051809103902061212c8b614214565b6000806040518763ffffffff1660e01b815260040180806020018781526020018681526020018581526020018460001b81526020018360001b8152602001828103825288818151815260200191508051906020019080838360005b8381101561219f578181015183820152602001612187565b50505050905090810190601f1680156121cc5780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b1580156121f057600080fd5b505af1158015612204573d6000803e3d6000fd5b50505050505050505050565b612218613e68565b6001600160a01b0316336001600160a01b03161461227d576040805162461bcd60e51b815260206004820152601e60248201527f4f6e6c792045786368616e6765722063616e20696e766f6b6520746869730000604482015290519081900360640190fd5b60045460408051602081018590528082018490528151808203830181526060909101918290526001600160a01b039092169163907dff97916002908060276149118239602701905060405180910390206122d688614214565b6000806040518763ffffffff1660e01b815260040180806020018781526020018681526020018581526020018460001b81526020018360001b8152602001828103825288818151815260200191508051906020019080838360005b83811015612349578181015183820152602001612331565b50505050905090810190601f1680156123765780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b15801561239a57600080fd5b505af11580156123ae573d6000803e3d6000fd5b50505050505050565b600754604080516370a0823160e01b81526001600160a01b038481166004830152915160009392909216916370a0823191602480820192602092909190829003018186803b158015610cfa57600080fd5b6060612412613b69565b6001600160a01b03166372cb051f6040518163ffffffff1660e01b815260040160006040518083038186803b15801561244a57600080fd5b505afa15801561245e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561248757600080fd5b81019080805160405193929190846401000000008211156124a757600080fd5b9083019060208201858111156124bc57600080fd5b82518660208202830111640100000000821117156124d957600080fd5b82525081516020918201928201910280838360005b838110156125065781810151838201526020016124ee565b50505050905001604052505050905090565b6001546001600160a01b031633146125615760405162461bcd60e51b81526004018080602001828103825260358152602001806147dd6035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b60006125de613b69565b6001600160a01b031663835e119c836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610cfa57600080fd5b600061262b613b69565b6001600160a01b0316637b1001b78360006040518363ffffffff1660e01b815260040180838152602001821515151581526020019250505060206040518083038186803b158015610cfa57600080fd5b612683613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b1580156126bb57600080fd5b505afa1580156126cf573d6000803e3d6000fd5b50506004546001600160a01b031633148015925090506126fa57506005546001600160a01b03163314155b801561271157506006546001600160a01b03163314155b1561272957600680546001600160a01b031916331790555b612731613b69565b600654604080516285c0d160e31b81526001600160a01b039283166004820152602481018590529051929091169163042e06889160448082019260009290919082900301818387803b15801561196457600080fd5b6000546001600160a01b031681565b631cd554d160e21b81565b6009805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610db45780601f10610d8957610100808354040283529160200191610db4565b6000546001600160a01b031633146128445760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b600480546001600160a01b0383166001600160a01b0319909116811790915560408051918252517ffc80377ca9c49cc11ae6982f390a42db976d5530af7c43889264b13fbbd7c57e9181900360200190a150565b6128a0613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b1580156128d857600080fd5b505afa1580156128ec573d6000803e3d6000fd5b50506004546001600160a01b0316331480159250905061291757506005546001600160a01b03163314155b801561292e57506006546001600160a01b03163314155b1561294657600680546001600160a01b031916331790555b61294e613b69565b600654604080516324beb82560e11b81526001600160a01b0392831660048201529051929091169163497d704a9160248082019260009290919082900301818387803b15801561299d57600080fd5b505af11580156129b1573d6000803e3d6000fd5b50505050565b600454600090819081906001600160a01b031633148015906129e457506005546001600160a01b03163314155b80156129fb57506006546001600160a01b03163314155b15612a1357600680546001600160a01b031916331790555b612a1b613e68565b600654604080516306c5a00b60e21b81526001600160a01b0392831660048201526024810188905290519290911691631b16802c916044808201926060929091908290030181600087803b158015612a7257600080fd5b505af1158015610f1a573d6000803e3d6000fd5b6000546001600160a01b03163314612acf5760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b60035460ff16612b26576040805162461bcd60e51b815260206004820152601f60248201527f53656c66204465737472756374206e6f742079657420696e6974696174656400604482015290519081900360640190fd5b426224ea006002540110612b81576040805162461bcd60e51b815260206004820152601b60248201527f53656c662064657374727563742064656c6179206e6f74206d65740000000000604482015290519081900360640190fd5b600354604080516101009092046001600160a01b03168252517f8a09e1677ced846cb537dc2b172043bd05a1a81ad7e0033a7ef8ba762df990b7916020908290030190a160035461010090046001600160a01b0316ff5b6005546001600160a01b031681565b6004546001600160a01b03163314801590612c0d57506005546001600160a01b03163314155b8015612c2457506006546001600160a01b03163314155b15612c3c57600680546001600160a01b031916331790555b6000546006546001600160a01b03908116911614612c97576040805162461bcd60e51b815260206004820152601360248201527227bbb732b91037b7363c90333ab731ba34b7b760691b604482015290519081900360640190fd5b600780546001600160a01b0319166001600160a01b03831617905561197d81614220565b6000612cc5613b69565b6001600160a01b031663a311c7c2836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610cfa57600080fd5b6224ea0081565b6000612d2b613b69565b6001600160a01b031663a5fdc5de836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610cfa57600080fd5b6004546000906001600160a01b03163314801590612da957506005546001600160a01b03163314155b8015612dc057506006546001600160a01b03163314155b15612dd857600680546001600160a01b031916331790555b612de0613c7b565b6001600160a01b031663086dabd16040518163ffffffff1660e01b815260040160006040518083038186803b158015612e1857600080fd5b505afa158015612e2c573d6000803e3d6000fd5b5050600654612e4792506001600160a01b0316905083613eb5565b50600654610e9a906001600160a01b03168484614349565b612e676147bd565b60005b600d54811015612ea557600d8181548110612e8157fe5b9060005260206000200154828260188110612e9857fe5b6020020152600101612e6a565b5090565b612eb1613e68565b6001600160a01b0316336001600160a01b031614612f16576040805162461bcd60e51b815260206004820152601e60248201527f4f6e6c792045786368616e6765722063616e20696e766f6b6520746869730000604482015290519081900360640190fd5b60045460408051602081018590528082018490528151808203830181526060909101918290526001600160a01b039092169163907dff97916002908060286148128239602801905060405180910390206122d688614214565b612f77613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b158015612faf57600080fd5b505afa158015612fc3573d6000803e3d6000fd5b50506004546001600160a01b03163314801592509050612fee57506005546001600160a01b03163314155b801561300557506006546001600160a01b03163314155b1561301d57600680546001600160a01b031916331790555b613025613b69565b6006546040805163644bb89960e11b81526001600160a01b0392831660048201529051929091169163c89771329160248082019260009290919082900301818387803b15801561299d57600080fd5b60035460ff1681565b6004546001600160a01b03163314806130a057506005546001600160a01b031633145b6130f1576040805162461bcd60e51b815260206004820152601760248201527f4f6e6c79207468652070726f78792063616e2063616c6c000000000000000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461315c5760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b426002556003805460ff19166001179055604080516224ea00815290517fcbd94ca75b8dc45c9d80c77e851670e78843c0d75180cb81db3e2158228fa9a69181900360200190a1565b6131ad613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b1580156131e557600080fd5b505afa1580156131f9573d6000803e3d6000fd5b50506004546001600160a01b0316331480159250905061322457506005546001600160a01b03163314155b801561323b57506006546001600160a01b03163314155b1561325357600680546001600160a01b031916331790555b61325b613b69565b60065460408051632694552d60e21b81526001600160a01b03868116600483015292831660248201526044810185905290519290911691639a5154b49160648082019260009290919082900301818387803b1580156132b957600080fd5b505af11580156132cd573d6000803e3d6000fd5b505050505050565b60035461010090046001600160a01b031681565b600d81815481106132f657fe5b600091825260209091200154905081565b60008382613313613c7b565b6001600160a01b0316637118d4316040518163ffffffff1660e01b815260040160006040518083038186803b15801561334b57600080fd5b505afa15801561335f573d6000803e3d6000fd5b5050505061336b613c7b565b6001600160a01b0316636132eba483836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b1580156133b657600080fd5b505afa1580156133ca573d6000803e3d6000fd5b50506004546001600160a01b031633148015925090506133f557506005546001600160a01b03163314155b801561340c57506006546001600160a01b03163314155b1561342457600680546001600160a01b031916331790555b61342c613e68565b60065460408051630d4388eb60e31b81526001600160a01b038b811660048301529283166024820152604481018a9052606481018990526084810188905290519290911691636a1c47589160a4808201926020929091908290030181600087803b15801561349957600080fd5b505af11580156134ad573d6000803e3d6000fd5b505050506040513d60208110156134c357600080fd5b5051979650505050505050565b60006134da613b69565b6001600160a01b031663d37c4d8b84846040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b031681526020018281526020019250505060206040518083038186803b15801561353757600080fd5b505afa15801561354b573d6000803e3d6000fd5b505050506040513d602081101561356157600080fd5b50519392505050565b6000613574613b69565b6001600160a01b0316637b1001b78360016040518363ffffffff1660e01b815260040180838152602001821515151581526020019250505060206040518083038186803b158015610cfa57600080fd5b6006546001600160a01b031681565b60006135dd613b69565b6001600160a01b031663dbf633406040518163ffffffff1660e01b815260040160206040518083038186803b15801561361557600080fd5b505afa158015613629573d6000803e3d6000fd5b505050506040513d602081101561363f57600080fd5b5051905090565b60075460408051636eb1769f60e11b81526001600160a01b03858116600483015284811660248301529151600093929092169163dd62ed3e91604480820192602092909190829003018186803b15801561353757600080fd5b601881565b60006136ae613c7b565b6001600160a01b031663086dabd16040518163ffffffff1660e01b815260040160006040518083038186803b1580156136e657600080fd5b505afa1580156136fa573d6000803e3d6000fd5b50506004546001600160a01b0316331480159250905061372557506005546001600160a01b03163314155b801561373c57506006546001600160a01b03163314155b1561375457600680546001600160a01b031916331790555b60008061375f613b69565b6006546040805163298f137d60e21b81526001600160a01b0389811660048301526024820189905292831660448201528151939092169263a63c4df49260648082019392918290030181600087803b1580156137ba57600080fd5b505af11580156137ce573d6000803e3d6000fd5b505050506040513d60408110156137e457600080fd5b508051602090910151600654919350915061380d908690849084906001600160a01b0316614356565b6006546138259086906001600160a01b031684614349565b95945050505050565b613836613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b15801561386e57600080fd5b505afa158015613882573d6000803e3d6000fd5b50506004546001600160a01b031633148015925090506138ad57506005546001600160a01b03163314155b80156138c457506006546001600160a01b03163314155b156138dc57600680546001600160a01b031916331790555b6138e4613b69565b6006546040805163227635b160e11b81526001600160a01b038681166004830152928316602482015260448101859052905192909116916344ec6b629160648082019260009290919082900301818387803b1580156132b957600080fd5b6007546001600160a01b031681565b6004546001600160a01b031681565b6000838261396c613c7b565b6001600160a01b0316637118d4316040518163ffffffff1660e01b815260040160006040518083038186803b1580156139a457600080fd5b505afa1580156139b8573d6000803e3d6000fd5b505050506139c4613c7b565b6001600160a01b0316636132eba483836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b158015613a0f57600080fd5b505afa158015613a23573d6000803e3d6000fd5b50506004546001600160a01b03163314801592509050613a4e57506005546001600160a01b03163314155b8015613a6557506006546001600160a01b03163314155b15613a7d57600680546001600160a01b031916331790555b613a85613e68565b60065460408051630a1e187d60e01b81526001600160a01b0392831660048201819052602482018b9052604482018a905260648201899052608482015290519290911691630a1e187d9160a4808201926020929091908290030181600087803b158015613af157600080fd5b505af1158015613b05573d6000803e3d6000fd5b505050506040513d6020811015613b1b57600080fd5b50519695505050505050565b6000613b31613b69565b6001600160a01b031663f354cad16040518163ffffffff1660e01b815260040160206040518083038186803b15801561361557600080fd5b6000613bac6524b9b9bab2b960d11b604051806040016040528060168152602001754d697373696e6720497373756572206164647265737360501b81525061449e565b905090565b60045460408051602080820185905282518083039091018152908201918290526001600160a01b039092169163907dff97916003908060216148cd823960210190506040518091039020613c0488614214565b613c0d88614214565b60006040518763ffffffff1660e01b815260040180806020018781526020018681526020018581526020018481526020018360001b81526020018281038252888181518152602001915080519060200190808383600083811015612349578181015183820152602001612331565b6000613bac6b53797374656d53746174757360a01b6040518060400160405280601c81526020017f4d697373696e672053797374656d53746174757320616464726573730000000081525061449e565b6000613bac722932bbb0b93239a234b9ba3934b13aba34b7b760691b6040518060600160405280602381526020016148ee6023913961449e565b6000613bac6d537570706c795363686564756c6560901b6040518060400160405280601e81526020017f4d697373696e6720537570706c795363686564756c652061646472657373000081525061449e565b600082821115613dae576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015613e0e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60045460408051602080820185905282518083039091018152908201918290526001600160a01b039092169163907dff979160039080602161496a823960210190506040518091039020613c0488614214565b6000613bac6822bc31b430b733b2b960b91b6040518060400160405280601981526020017f4d697373696e672045786368616e67657220616464726573730000000000000081525061449e565b600080613ec0614548565b60408051631167f01160e31b81526001600160a01b0387811660048301528251931692638b3f808892602480840193919291829003018186803b158015613f0657600080fd5b505afa158015613f1a573d6000803e3d6000fd5b505050506040513d6040811015613f3057600080fd5b505190508015610e9a57600080613f45613b69565b600754604080516370a0823160e01b81526001600160a01b038a8116600483015291519382169363db2b91cf938b9316916370a08231916024808301926020929190829003018186803b158015613f9b57600080fd5b505afa158015613faf573d6000803e3d6000fd5b505050506040513d6020811015613fc557600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091528051604480840193829003018186803b15801561401057600080fd5b505afa158015614024573d6000803e3d6000fd5b505050506040513d604081101561403a57600080fd5b5080516020909101519092509050818511156140875760405162461bcd60e51b81526004018080602001828103825260268152602001806148786026913960400191505060405180910390fd5b80156140da576040805162461bcd60e51b815260206004820152601c60248201527f412073796e7468206f7220534e582072617465206973207374616c6500000000604482015290519081900360640190fd5b50600195945050505050565b60075460408051636eb1769f60e11b81526001600160a01b03868116600483015287811660248301529151600093929092169163da46098c9187918991614189918891879163dd62ed3e91604480820192602092909190829003018186803b15801561415157600080fd5b505afa158015614165573d6000803e3d6000fd5b505050506040513d602081101561417b57600080fd5b50519063ffffffff613d5716565b6040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156141f157600080fd5b505af1158015614205573d6000803e3d6000fd5b5050505061382584848461459a565b6001600160a01b031690565b60048054604080516001600160a01b038581166020808401919091528351808403820181528385018086527f546f6b656e5374617465557064617465642861646472657373290000000000009052935192839003605a01832063907dff9760e01b8452600160248501819052604485018290526000606486018190526084860181905260a4860181905260c0988601988952865160c48701528651949097169763907dff979791959294919384938493839260e4909201918a0190808383885b838110156142f85781810151838201526020016142e0565b50505050905090810190601f1680156143255780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b15801561196457600080fd5b600061185084848461459a565b60045460408051602081018690528082018590526001600160a01b03848116606080840191909152835180840390910181526080909201928390529092169163907dff97916002908060326149388239603201905060405180910390206143bc89614214565b6000806040518763ffffffff1660e01b815260040180806020018781526020018681526020018581526020018460001b81526020018360001b8152602001828103825288818151815260200191508051906020019080838360005b8381101561442f578181015183820152602001614417565b50505050905090810190601f16801561445c5780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b15801561448057600080fd5b505af1158015614494573d6000803e3d6000fd5b5050505050505050565b6000828152600c60205260408120546001600160a01b031682816145405760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156145055781810151838201526020016144ed565b50505050905090810190601f1680156145325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509392505050565b6000613bac6d53796e746865746978537461746560901b6040518060400160405280601e81526020017f4d697373696e672053796e74686574697853746174652061646472657373000081525061449e565b60006001600160a01b038316158015906145bd57506001600160a01b0383163014155b80156145d757506004546001600160a01b03848116911614155b614628576040805162461bcd60e51b815260206004820152601f60248201527f43616e6e6f74207472616e7366657220746f2074686973206164647265737300604482015290519081900360640190fd5b600754604080516370a0823160e01b81526001600160a01b0387811660048301529151919092169163b46310f691879161468691879186916370a0823191602480820192602092909190829003018186803b15801561415157600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156146d557600080fd5b505af11580156146e9573d6000803e3d6000fd5b5050600754604080516370a0823160e01b81526001600160a01b038881166004830152915191909216935063b46310f69250869161474b91879186916370a0823191602480820192602092909190829003018186803b15801561123257600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561479a57600080fd5b505af11580156147ae573d6000803e3d6000fd5b50505050610e9a848484613e15565b604051806103000160405280601890602082028038833950919291505056fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e65727368697045786368616e67655265636c61696d28616464726573732c627974657333322c75696e743235362953796e746845786368616e676528616464726573732c627974657333322c75696e743235362c627974657333322c75696e743235362c616464726573732943616e6e6f74207472616e73666572207374616b6564206f7220657363726f77656420534e584f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e417070726f76616c28616464726573732c616464726573732c75696e74323536294d697373696e672052657761726473446973747269627574696f6e206164647265737345786368616e676552656261746528616464726573732c627974657333322c75696e74323536294163636f756e744c69717569646174656428616464726573732c75696e743235362c75696e743235362c61646472657373295472616e7366657228616464726573732c616464726573732c75696e7432353629a265627a7a723158201ded25a810a1dd8d06d43bc19eeb3abc4ff1a1139db3c0539afa3bdfe1da73ca64736f6c63430005100032000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f0000000000000000000000005b1b5fea1b99d83ad479df0c222f0492385381dd000000000000000000000000de910777c787903f78c89e7a0bf7f4c435cbb1fe0000000000000000000000000000000000000000009e0e1bd8e558030ba6055c00000000000000000000000061166014e3f04e40c953fe4eab9d9e40863c83ae

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106104125760003560e01c80638da5cb5b11610220578063bc67f83211610130578063dbf63340116100b8578063e8e09b8b11610087578063e8e09b8b14610c1a578063e90dd9e214610c46578063ec55688914610c4e578063ee52a2f314610c56578063f354cad114610c7f57610412565b8063dbf6334014610bb0578063dd62ed3e14610bb8578063e3235c9114610be6578063e6203ed114610bee57610412565b8063c6c9d828116100ff578063c6c9d82814610b0a578063c836fa0a14610b27578063d37c4d8b14610b5f578063d60888e414610b8b578063d67bdd2514610ba857610412565b8063bc67f83214610aa8578063bd32aa4414610ace578063c2bf388014610ad6578063c58aaae614610b0257610412565b80639f769807116101b3578063a9059cbb11610182578063a9059cbb146109f9578063ab49848c14610a25578063ace88afd14610a66578063af086c7e14610a98578063b8225dec14610aa057610412565b80639f7698071461097f578063a311c7c2146109a5578063a461fc82146109cb578063a5fdc5de146109d357610412565b80639741fb22116101ef5780639741fb221461094a578063987757dd146109525780639cb8a26a1461096f5780639cbdaeb61461097757610412565b80638da5cb5b1461090c5780639324cac71461091457806395d89b411461091c57806397107d6d1461092457610412565b80632c955fa7116103265780636ac0bf9c116102ae57806372cb051f1161027d57806372cb051f1461085557806379ba5097146108ad578063835e119c146108b557806383d625d4146108d25780638a290014146108ef57610412565b80636ac0bf9c146107915780636c00f310146107b75780636f01a986146107fd57806370a082311461082f57610412565b806332608039116102f557806332608039146107185780633278c960146107355780633be99e6f1461073d57806353a47bb714610763578063631e14441461076b57610412565b80632c955fa7146106a65780632e0f2625146106cc578063313ce567146106ea578063320223db146106f257610412565b806316b2213f116103a95780631fce304d116103785780631fce304d1461060857806320714f881461062557806323b872dd1461064b578063295da87d146106815780632a9053181461069e57610412565b806316b2213f146105ca57806317c70de4146105f057806318160ddd146105f8578063188214001461060057610412565b80631137aedf116103e55780631137aedf146105305780631249c58b14610574578063131b0ae71461057c5780631627540c146105a457610412565b806304f3bcec1461041757806305b3c1c91461043b57806306fdde0314610473578063095ea7b3146104f0575b600080fd5b61041f610c87565b604080516001600160a01b039092168252519081900360200190f35b6104616004803603602081101561045157600080fd5b50356001600160a01b0316610c9b565b60408051918252519081900360200190f35b61047b610d2e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61051c6004803603604081101561050657600080fd5b506001600160a01b038135169060200135610dbc565b604080519115158252519081900360200190f35b6105566004803603602081101561054657600080fd5b50356001600160a01b0316610ea4565b60408051938452602084019290925282820152519081900360600190f35b61051c610f4a565b6105a26004803603602081101561059257600080fd5b50356001600160a01b031661143e565b005b6105a2600480360360208110156105ba57600080fd5b50356001600160a01b03166114a9565b610461600480360360208110156105e057600080fd5b50356001600160a01b0316611546565b6104616115a5565b6104616115ab565b61047b6115b1565b61051c6004803603602081101561061e57600080fd5b50356115ea565b6105a26004803603602081101561063b57600080fd5b50356001600160a01b031661167d565b61051c6004803603606081101561066157600080fd5b506001600160a01b0381358116916020810135909116906040013561177d565b6105a26004803603602081101561069757600080fd5b5035611858565b61047b611980565b6105a2600480360360208110156106bc57600080fd5b50356001600160a01b031661199f565b6106d4611aac565b6040805160ff9092168252519081900360200190f35b6106d4611ab1565b6105a26004803603602081101561070857600080fd5b50356001600160a01b0316611aba565b61041f6004803603602081101561072e57600080fd5b5035611bc7565b6105a2611c14565b6105a26004803603602081101561075357600080fd5b50356001600160a01b0316611c97565b61041f611e0e565b61051c6004803603602081101561078157600080fd5b50356001600160a01b0316611e1d565b610461600480360360208110156107a757600080fd5b50356001600160a01b0316611f44565b6105a2600480360360c08110156107cd57600080fd5b506001600160a01b03813581169160208101359160408201359160608101359160808201359160a001351661204b565b6105a26004803603606081101561081357600080fd5b506001600160a01b038135169060208101359060400135612210565b6104616004803603602081101561084557600080fd5b50356001600160a01b03166123b7565b61085d612408565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610899578181015183820152602001610881565b505050509050019250505060405180910390f35b6105a2612518565b61041f600480360360208110156108cb57600080fd5b50356125d4565b610461600480360360208110156108e857600080fd5b5035612621565b6105a26004803603602081101561090557600080fd5b503561267b565b61041f612786565b610461612795565b61047b6127a0565b6105a26004803603602081101561093a57600080fd5b50356001600160a01b03166127fb565b6105a2612898565b6105566004803603602081101561096857600080fd5b50356129b7565b6105a2612a86565b61041f612bd8565b6105a26004803603602081101561099557600080fd5b50356001600160a01b0316612be7565b610461600480360360208110156109bb57600080fd5b50356001600160a01b0316612cbb565b610461612d1a565b610461600480360360208110156109e957600080fd5b50356001600160a01b0316612d21565b61051c60048036036040811015610a0f57600080fd5b506001600160a01b038135169060200135612d80565b610a2d612e5f565b604051808261030080838360005b83811015610a53578181015183820152602001610a3b565b5050505090500191505060405180910390f35b6105a260048036036060811015610a7c57600080fd5b506001600160a01b038135169060208101359060400135612ea9565b6105a2612f6f565b61051c613074565b6105a260048036036020811015610abe57600080fd5b50356001600160a01b031661307d565b6105a2613113565b6105a260048036036040811015610aec57600080fd5b506001600160a01b0381351690602001356131a5565b61041f6132d5565b61046160048036036020811015610b2057600080fd5b50356132e9565b61046160048036036080811015610b3d57600080fd5b506001600160a01b038135169060208101359060408101359060600135613307565b61046160048036036040811015610b7557600080fd5b506001600160a01b0381351690602001356134d0565b61046160048036036020811015610ba157600080fd5b503561356a565b61041f6135c4565b6104616135d3565b61046160048036036040811015610bce57600080fd5b506001600160a01b0381358116916020013516613646565b61046161369f565b61051c60048036036040811015610c0457600080fd5b506001600160a01b0381351690602001356136a4565b6105a260048036036040811015610c3057600080fd5b506001600160a01b03813516906020013561382e565b61041f613942565b61041f613951565b61046160048036036060811015610c6c57600080fd5b5080359060208101359060400135613960565b61051c613b27565b600b5461010090046001600160a01b031681565b6000610ca5613b69565b6001600160a01b03166305b3c1c9836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610cfa57600080fd5b505afa158015610d0e573d6000803e3d6000fd5b505050506040513d6020811015610d2457600080fd5b505190505b919050565b6008805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610db45780601f10610d8957610100808354040283529160200191610db4565b820191906000526020600020905b815481529060010190602001808311610d9757829003601f168201915b505050505081565b6004546000906001600160a01b03163314801590610de557506005546001600160a01b03163314155b8015610dfc57506006546001600160a01b03163314155b15610e1457600680546001600160a01b031916331790555b60065460075460408051633691826360e21b81526001600160a01b0393841660048201819052878516602483015260448201879052915191939092169163da46098c91606480830192600092919082900301818387803b158015610e7757600080fd5b505af1158015610e8b573d6000803e3d6000fd5b50505050610e9a818585613bb1565b5060019392505050565b6000806000610eb1613b69565b6001600160a01b0316631137aedf856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060606040518083038186803b158015610f0657600080fd5b505afa158015610f1a573d6000803e3d6000fd5b505050506040513d6060811015610f3057600080fd5b508051602082015160409092015190969195509350915050565b6000610f54613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b158015610f8c57600080fd5b505afa158015610fa0573d6000803e3d6000fd5b5050505060006001600160a01b0316610fb7613ccb565b6001600160a01b03161415611013576040805162461bcd60e51b815260206004820152601b60248201527f52657761726473446973747269627574696f6e206e6f74207365740000000000604482015290519081900360640190fd5b600061101d613d05565b90506000611029613ccb565b90506000826001600160a01b031663cc5c095c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561106657600080fd5b505afa15801561107a573d6000803e3d6000fd5b505050506040513d602081101561109057600080fd5b50519050806110de576040805162461bcd60e51b81526020600482015260156024820152744e6f20737570706c79206973206d696e7461626c6560581b604482015290519081900360640190fd5b826001600160a01b0316637e7961d7826040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561112457600080fd5b505af1158015611138573d6000803e3d6000fd5b505050506040513d602081101561114e57600080fd5b505060408051639bdd7ac760e01b815290516000916001600160a01b03861691639bdd7ac791600480820192602092909190829003018186803b15801561119457600080fd5b505afa1580156111a8573d6000803e3d6000fd5b505050506040513d60208110156111be57600080fd5b5051905060006111d4838363ffffffff613d5716565b600754604080516370a0823160e01b81526001600160a01b038881166004830152915193945091169163b46310f691879161126a91869186916370a08231916024808301926020929190829003018186803b15801561123257600080fd5b505afa158015611246573d6000803e3d6000fd5b505050506040513d602081101561125c57600080fd5b50519063ffffffff613db416565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156112b957600080fd5b505af11580156112cd573d6000803e3d6000fd5b505050506112dc308583613e15565b836001600160a01b03166359974e38826040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561132257600080fd5b505af1158015611336573d6000803e3d6000fd5b505050506040513d602081101561134c57600080fd5b5050600754604080516370a0823160e01b8152336004820181905291516001600160a01b039093169263b46310f692916113aa91879186916370a0823191602480820192602092909190829003018186803b15801561123257600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156113f957600080fd5b505af115801561140d573d6000803e3d6000fd5b5050505061141c303384613e15565b600a5461142f908463ffffffff613db416565b600a5550600194505050505090565b6000546001600160a01b031633146114875760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146114f25760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b6000611550613b69565b6001600160a01b03166316b2213f836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610cfa57600080fd5b60025481565b600a5481565b6040518060400160405280601781526020017f53796e746865746978204e6574776f726b20546f6b656e00000000000000000081525081565b6000806115f5613e68565b600654604080516301670a7b60e21b81526001600160a01b039283166004820152602481018790529051929091169163059c29ec91604480820192602092909190829003018186803b15801561164a57600080fd5b505afa15801561165e573d6000803e3d6000fd5b505050506040513d602081101561167457600080fd5b50511192915050565b6000546001600160a01b031633146116c65760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b6001600160a01b038116611721576040805162461bcd60e51b815260206004820152601c60248201527f42656e6566696369617279206d757374206e6f74206265207a65726f00000000604482015290519081900360640190fd5b600380546001600160a01b0383166101008102610100600160a81b03199092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c539181900360200190a150565b6004546000906001600160a01b031633148015906117a657506005546001600160a01b03163314155b80156117bd57506006546001600160a01b03163314155b156117d557600680546001600160a01b031916331790555b6117dd613c7b565b6001600160a01b031663086dabd16040518163ffffffff1660e01b815260040160006040518083038186803b15801561181557600080fd5b505afa158015611829573d6000803e3d6000fd5b505050506118378483613eb5565b50600654611850906001600160a01b03168585856140e6565b949350505050565b611860613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b15801561189857600080fd5b505afa1580156118ac573d6000803e3d6000fd5b50506004546001600160a01b031633148015925090506118d757506005546001600160a01b03163314155b80156118ee57506006546001600160a01b03163314155b1561190657600680546001600160a01b031916331790555b61190e613b69565b6006546040805163b06e8c6560e01b81526001600160a01b039283166004820152602481018590529051929091169163b06e8c659160448082019260009290919082900301818387803b15801561196457600080fd5b505af1158015611978573d6000803e3d6000fd5b505050505b50565b604051806040016040528060038152602001620a69cb60eb1b81525081565b6119a7613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b1580156119df57600080fd5b505afa1580156119f3573d6000803e3d6000fd5b50506004546001600160a01b03163314801592509050611a1e57506005546001600160a01b03163314155b8015611a3557506006546001600160a01b03163314155b15611a4d57600680546001600160a01b031916331790555b611a55613b69565b6006546040805163159fa0d560e11b81526001600160a01b038581166004830152928316602482015290519290911691632b3f41aa9160448082019260009290919082900301818387803b15801561196457600080fd5b601281565b600b5460ff1681565b611ac2613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b158015611afa57600080fd5b505afa158015611b0e573d6000803e3d6000fd5b50506004546001600160a01b03163314801592509050611b3957506005546001600160a01b03163314155b8015611b5057506006546001600160a01b03163314155b15611b6857600680546001600160a01b031916331790555b611b70613b69565b6006546040805163fd864ccf60e01b81526001600160a01b03858116600483015292831660248201529051929091169163fd864ccf9160448082019260009290919082900301818387803b15801561196457600080fd5b6000611bd1613b69565b6001600160a01b03166332608039836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610cfa57600080fd5b6000546001600160a01b03163314611c5d5760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b600060028190556003805460ff191690556040517f6adcc7125002935e0aa31697538ebbd65cfddf20431eb6ecdcfc3e238bfd082c9190a1565b6000546001600160a01b03163314611ce05760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b600b8054610100600160a81b0319166101006001600160a01b0384160217905560005b600d54811015611e0a576000600d8281548110611d1c57fe5b60009182526020918290200154600b546040805163dacb2d0160e01b81526004810184905260248101829052601760448201527f5265736f6c766572206d697373696e6720746172676574000000000000000000606482015290519294506101009091046001600160a01b03169263dacb2d0192608480840193829003018186803b158015611daa57600080fd5b505afa158015611dbe573d6000803e3d6000fd5b505050506040513d6020811015611dd457600080fd5b50516000918252600c602052604090912080546001600160a01b0319166001600160a01b03909216919091179055600101611d03565b5050565b6001546001600160a01b031681565b600b546000906001600160a01b038381166101009092041614611e4257506000610d29565b60005b600d54811015611f3b576000600d8281548110611e5e57fe5b6000918252602080832090910154808352600c825260409283902054600b5484516321f8a72160e01b81526004810184905294519295506001600160a01b0391821694610100909104909116926321f8a72192602480840193829003018186803b158015611ecb57600080fd5b505afa158015611edf573d6000803e3d6000fd5b505050506040513d6020811015611ef557600080fd5b50516001600160a01b0316141580611f2257506000818152600c60205260409020546001600160a01b0316155b15611f3257600092505050610d29565b50600101611e45565b50600192915050565b6000611f4e613b69565b600754604080516370a0823160e01b81526001600160a01b03868116600483015291519382169363db2b91cf93879316916370a08231916024808301926020929190829003018186803b158015611fa457600080fd5b505afa158015611fb8573d6000803e3d6000fd5b505050506040513d6020811015611fce57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091528051604480840193829003018186803b15801561201957600080fd5b505afa15801561202d573d6000803e3d6000fd5b505050506040513d604081101561204357600080fd5b505192915050565b612053613e68565b6001600160a01b0316336001600160a01b0316146120b8576040805162461bcd60e51b815260206004820152601e60248201527f4f6e6c792045786368616e6765722063616e20696e766f6b6520746869730000604482015290519081900360640190fd5b600454604080516020810188905280820187905260608101869052608081018590526001600160a01b0384811660a0808401919091528351808403909101815260c0909201928390529092169163907dff979160029080603e61483a8239603e019050604051809103902061212c8b614214565b6000806040518763ffffffff1660e01b815260040180806020018781526020018681526020018581526020018460001b81526020018360001b8152602001828103825288818151815260200191508051906020019080838360005b8381101561219f578181015183820152602001612187565b50505050905090810190601f1680156121cc5780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b1580156121f057600080fd5b505af1158015612204573d6000803e3d6000fd5b50505050505050505050565b612218613e68565b6001600160a01b0316336001600160a01b03161461227d576040805162461bcd60e51b815260206004820152601e60248201527f4f6e6c792045786368616e6765722063616e20696e766f6b6520746869730000604482015290519081900360640190fd5b60045460408051602081018590528082018490528151808203830181526060909101918290526001600160a01b039092169163907dff97916002908060276149118239602701905060405180910390206122d688614214565b6000806040518763ffffffff1660e01b815260040180806020018781526020018681526020018581526020018460001b81526020018360001b8152602001828103825288818151815260200191508051906020019080838360005b83811015612349578181015183820152602001612331565b50505050905090810190601f1680156123765780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b15801561239a57600080fd5b505af11580156123ae573d6000803e3d6000fd5b50505050505050565b600754604080516370a0823160e01b81526001600160a01b038481166004830152915160009392909216916370a0823191602480820192602092909190829003018186803b158015610cfa57600080fd5b6060612412613b69565b6001600160a01b03166372cb051f6040518163ffffffff1660e01b815260040160006040518083038186803b15801561244a57600080fd5b505afa15801561245e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561248757600080fd5b81019080805160405193929190846401000000008211156124a757600080fd5b9083019060208201858111156124bc57600080fd5b82518660208202830111640100000000821117156124d957600080fd5b82525081516020918201928201910280838360005b838110156125065781810151838201526020016124ee565b50505050905001604052505050905090565b6001546001600160a01b031633146125615760405162461bcd60e51b81526004018080602001828103825260358152602001806147dd6035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b60006125de613b69565b6001600160a01b031663835e119c836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610cfa57600080fd5b600061262b613b69565b6001600160a01b0316637b1001b78360006040518363ffffffff1660e01b815260040180838152602001821515151581526020019250505060206040518083038186803b158015610cfa57600080fd5b612683613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b1580156126bb57600080fd5b505afa1580156126cf573d6000803e3d6000fd5b50506004546001600160a01b031633148015925090506126fa57506005546001600160a01b03163314155b801561271157506006546001600160a01b03163314155b1561272957600680546001600160a01b031916331790555b612731613b69565b600654604080516285c0d160e31b81526001600160a01b039283166004820152602481018590529051929091169163042e06889160448082019260009290919082900301818387803b15801561196457600080fd5b6000546001600160a01b031681565b631cd554d160e21b81565b6009805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610db45780601f10610d8957610100808354040283529160200191610db4565b6000546001600160a01b031633146128445760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b600480546001600160a01b0383166001600160a01b0319909116811790915560408051918252517ffc80377ca9c49cc11ae6982f390a42db976d5530af7c43889264b13fbbd7c57e9181900360200190a150565b6128a0613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b1580156128d857600080fd5b505afa1580156128ec573d6000803e3d6000fd5b50506004546001600160a01b0316331480159250905061291757506005546001600160a01b03163314155b801561292e57506006546001600160a01b03163314155b1561294657600680546001600160a01b031916331790555b61294e613b69565b600654604080516324beb82560e11b81526001600160a01b0392831660048201529051929091169163497d704a9160248082019260009290919082900301818387803b15801561299d57600080fd5b505af11580156129b1573d6000803e3d6000fd5b50505050565b600454600090819081906001600160a01b031633148015906129e457506005546001600160a01b03163314155b80156129fb57506006546001600160a01b03163314155b15612a1357600680546001600160a01b031916331790555b612a1b613e68565b600654604080516306c5a00b60e21b81526001600160a01b0392831660048201526024810188905290519290911691631b16802c916044808201926060929091908290030181600087803b158015612a7257600080fd5b505af1158015610f1a573d6000803e3d6000fd5b6000546001600160a01b03163314612acf5760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b60035460ff16612b26576040805162461bcd60e51b815260206004820152601f60248201527f53656c66204465737472756374206e6f742079657420696e6974696174656400604482015290519081900360640190fd5b426224ea006002540110612b81576040805162461bcd60e51b815260206004820152601b60248201527f53656c662064657374727563742064656c6179206e6f74206d65740000000000604482015290519081900360640190fd5b600354604080516101009092046001600160a01b03168252517f8a09e1677ced846cb537dc2b172043bd05a1a81ad7e0033a7ef8ba762df990b7916020908290030190a160035461010090046001600160a01b0316ff5b6005546001600160a01b031681565b6004546001600160a01b03163314801590612c0d57506005546001600160a01b03163314155b8015612c2457506006546001600160a01b03163314155b15612c3c57600680546001600160a01b031916331790555b6000546006546001600160a01b03908116911614612c97576040805162461bcd60e51b815260206004820152601360248201527227bbb732b91037b7363c90333ab731ba34b7b760691b604482015290519081900360640190fd5b600780546001600160a01b0319166001600160a01b03831617905561197d81614220565b6000612cc5613b69565b6001600160a01b031663a311c7c2836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610cfa57600080fd5b6224ea0081565b6000612d2b613b69565b6001600160a01b031663a5fdc5de836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610cfa57600080fd5b6004546000906001600160a01b03163314801590612da957506005546001600160a01b03163314155b8015612dc057506006546001600160a01b03163314155b15612dd857600680546001600160a01b031916331790555b612de0613c7b565b6001600160a01b031663086dabd16040518163ffffffff1660e01b815260040160006040518083038186803b158015612e1857600080fd5b505afa158015612e2c573d6000803e3d6000fd5b5050600654612e4792506001600160a01b0316905083613eb5565b50600654610e9a906001600160a01b03168484614349565b612e676147bd565b60005b600d54811015612ea557600d8181548110612e8157fe5b9060005260206000200154828260188110612e9857fe5b6020020152600101612e6a565b5090565b612eb1613e68565b6001600160a01b0316336001600160a01b031614612f16576040805162461bcd60e51b815260206004820152601e60248201527f4f6e6c792045786368616e6765722063616e20696e766f6b6520746869730000604482015290519081900360640190fd5b60045460408051602081018590528082018490528151808203830181526060909101918290526001600160a01b039092169163907dff97916002908060286148128239602801905060405180910390206122d688614214565b612f77613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b158015612faf57600080fd5b505afa158015612fc3573d6000803e3d6000fd5b50506004546001600160a01b03163314801592509050612fee57506005546001600160a01b03163314155b801561300557506006546001600160a01b03163314155b1561301d57600680546001600160a01b031916331790555b613025613b69565b6006546040805163644bb89960e11b81526001600160a01b0392831660048201529051929091169163c89771329160248082019260009290919082900301818387803b15801561299d57600080fd5b60035460ff1681565b6004546001600160a01b03163314806130a057506005546001600160a01b031633145b6130f1576040805162461bcd60e51b815260206004820152601760248201527f4f6e6c79207468652070726f78792063616e2063616c6c000000000000000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461315c5760405162461bcd60e51b815260040180806020018281038252602f81526020018061489e602f913960400191505060405180910390fd5b426002556003805460ff19166001179055604080516224ea00815290517fcbd94ca75b8dc45c9d80c77e851670e78843c0d75180cb81db3e2158228fa9a69181900360200190a1565b6131ad613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b1580156131e557600080fd5b505afa1580156131f9573d6000803e3d6000fd5b50506004546001600160a01b0316331480159250905061322457506005546001600160a01b03163314155b801561323b57506006546001600160a01b03163314155b1561325357600680546001600160a01b031916331790555b61325b613b69565b60065460408051632694552d60e21b81526001600160a01b03868116600483015292831660248201526044810185905290519290911691639a5154b49160648082019260009290919082900301818387803b1580156132b957600080fd5b505af11580156132cd573d6000803e3d6000fd5b505050505050565b60035461010090046001600160a01b031681565b600d81815481106132f657fe5b600091825260209091200154905081565b60008382613313613c7b565b6001600160a01b0316637118d4316040518163ffffffff1660e01b815260040160006040518083038186803b15801561334b57600080fd5b505afa15801561335f573d6000803e3d6000fd5b5050505061336b613c7b565b6001600160a01b0316636132eba483836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b1580156133b657600080fd5b505afa1580156133ca573d6000803e3d6000fd5b50506004546001600160a01b031633148015925090506133f557506005546001600160a01b03163314155b801561340c57506006546001600160a01b03163314155b1561342457600680546001600160a01b031916331790555b61342c613e68565b60065460408051630d4388eb60e31b81526001600160a01b038b811660048301529283166024820152604481018a9052606481018990526084810188905290519290911691636a1c47589160a4808201926020929091908290030181600087803b15801561349957600080fd5b505af11580156134ad573d6000803e3d6000fd5b505050506040513d60208110156134c357600080fd5b5051979650505050505050565b60006134da613b69565b6001600160a01b031663d37c4d8b84846040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b031681526020018281526020019250505060206040518083038186803b15801561353757600080fd5b505afa15801561354b573d6000803e3d6000fd5b505050506040513d602081101561356157600080fd5b50519392505050565b6000613574613b69565b6001600160a01b0316637b1001b78360016040518363ffffffff1660e01b815260040180838152602001821515151581526020019250505060206040518083038186803b158015610cfa57600080fd5b6006546001600160a01b031681565b60006135dd613b69565b6001600160a01b031663dbf633406040518163ffffffff1660e01b815260040160206040518083038186803b15801561361557600080fd5b505afa158015613629573d6000803e3d6000fd5b505050506040513d602081101561363f57600080fd5b5051905090565b60075460408051636eb1769f60e11b81526001600160a01b03858116600483015284811660248301529151600093929092169163dd62ed3e91604480820192602092909190829003018186803b15801561353757600080fd5b601881565b60006136ae613c7b565b6001600160a01b031663086dabd16040518163ffffffff1660e01b815260040160006040518083038186803b1580156136e657600080fd5b505afa1580156136fa573d6000803e3d6000fd5b50506004546001600160a01b0316331480159250905061372557506005546001600160a01b03163314155b801561373c57506006546001600160a01b03163314155b1561375457600680546001600160a01b031916331790555b60008061375f613b69565b6006546040805163298f137d60e21b81526001600160a01b0389811660048301526024820189905292831660448201528151939092169263a63c4df49260648082019392918290030181600087803b1580156137ba57600080fd5b505af11580156137ce573d6000803e3d6000fd5b505050506040513d60408110156137e457600080fd5b508051602090910151600654919350915061380d908690849084906001600160a01b0316614356565b6006546138259086906001600160a01b031684614349565b95945050505050565b613836613c7b565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b15801561386e57600080fd5b505afa158015613882573d6000803e3d6000fd5b50506004546001600160a01b031633148015925090506138ad57506005546001600160a01b03163314155b80156138c457506006546001600160a01b03163314155b156138dc57600680546001600160a01b031916331790555b6138e4613b69565b6006546040805163227635b160e11b81526001600160a01b038681166004830152928316602482015260448101859052905192909116916344ec6b629160648082019260009290919082900301818387803b1580156132b957600080fd5b6007546001600160a01b031681565b6004546001600160a01b031681565b6000838261396c613c7b565b6001600160a01b0316637118d4316040518163ffffffff1660e01b815260040160006040518083038186803b1580156139a457600080fd5b505afa1580156139b8573d6000803e3d6000fd5b505050506139c4613c7b565b6001600160a01b0316636132eba483836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060006040518083038186803b158015613a0f57600080fd5b505afa158015613a23573d6000803e3d6000fd5b50506004546001600160a01b03163314801592509050613a4e57506005546001600160a01b03163314155b8015613a6557506006546001600160a01b03163314155b15613a7d57600680546001600160a01b031916331790555b613a85613e68565b60065460408051630a1e187d60e01b81526001600160a01b0392831660048201819052602482018b9052604482018a905260648201899052608482015290519290911691630a1e187d9160a4808201926020929091908290030181600087803b158015613af157600080fd5b505af1158015613b05573d6000803e3d6000fd5b505050506040513d6020811015613b1b57600080fd5b50519695505050505050565b6000613b31613b69565b6001600160a01b031663f354cad16040518163ffffffff1660e01b815260040160206040518083038186803b15801561361557600080fd5b6000613bac6524b9b9bab2b960d11b604051806040016040528060168152602001754d697373696e6720497373756572206164647265737360501b81525061449e565b905090565b60045460408051602080820185905282518083039091018152908201918290526001600160a01b039092169163907dff97916003908060216148cd823960210190506040518091039020613c0488614214565b613c0d88614214565b60006040518763ffffffff1660e01b815260040180806020018781526020018681526020018581526020018481526020018360001b81526020018281038252888181518152602001915080519060200190808383600083811015612349578181015183820152602001612331565b6000613bac6b53797374656d53746174757360a01b6040518060400160405280601c81526020017f4d697373696e672053797374656d53746174757320616464726573730000000081525061449e565b6000613bac722932bbb0b93239a234b9ba3934b13aba34b7b760691b6040518060600160405280602381526020016148ee6023913961449e565b6000613bac6d537570706c795363686564756c6560901b6040518060400160405280601e81526020017f4d697373696e6720537570706c795363686564756c652061646472657373000081525061449e565b600082821115613dae576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015613e0e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60045460408051602080820185905282518083039091018152908201918290526001600160a01b039092169163907dff979160039080602161496a823960210190506040518091039020613c0488614214565b6000613bac6822bc31b430b733b2b960b91b6040518060400160405280601981526020017f4d697373696e672045786368616e67657220616464726573730000000000000081525061449e565b600080613ec0614548565b60408051631167f01160e31b81526001600160a01b0387811660048301528251931692638b3f808892602480840193919291829003018186803b158015613f0657600080fd5b505afa158015613f1a573d6000803e3d6000fd5b505050506040513d6040811015613f3057600080fd5b505190508015610e9a57600080613f45613b69565b600754604080516370a0823160e01b81526001600160a01b038a8116600483015291519382169363db2b91cf938b9316916370a08231916024808301926020929190829003018186803b158015613f9b57600080fd5b505afa158015613faf573d6000803e3d6000fd5b505050506040513d6020811015613fc557600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091528051604480840193829003018186803b15801561401057600080fd5b505afa158015614024573d6000803e3d6000fd5b505050506040513d604081101561403a57600080fd5b5080516020909101519092509050818511156140875760405162461bcd60e51b81526004018080602001828103825260268152602001806148786026913960400191505060405180910390fd5b80156140da576040805162461bcd60e51b815260206004820152601c60248201527f412073796e7468206f7220534e582072617465206973207374616c6500000000604482015290519081900360640190fd5b50600195945050505050565b60075460408051636eb1769f60e11b81526001600160a01b03868116600483015287811660248301529151600093929092169163da46098c9187918991614189918891879163dd62ed3e91604480820192602092909190829003018186803b15801561415157600080fd5b505afa158015614165573d6000803e3d6000fd5b505050506040513d602081101561417b57600080fd5b50519063ffffffff613d5716565b6040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156141f157600080fd5b505af1158015614205573d6000803e3d6000fd5b5050505061382584848461459a565b6001600160a01b031690565b60048054604080516001600160a01b038581166020808401919091528351808403820181528385018086527f546f6b656e5374617465557064617465642861646472657373290000000000009052935192839003605a01832063907dff9760e01b8452600160248501819052604485018290526000606486018190526084860181905260a4860181905260c0988601988952865160c48701528651949097169763907dff979791959294919384938493839260e4909201918a0190808383885b838110156142f85781810151838201526020016142e0565b50505050905090810190601f1680156143255780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b15801561196457600080fd5b600061185084848461459a565b60045460408051602081018690528082018590526001600160a01b03848116606080840191909152835180840390910181526080909201928390529092169163907dff97916002908060326149388239603201905060405180910390206143bc89614214565b6000806040518763ffffffff1660e01b815260040180806020018781526020018681526020018581526020018460001b81526020018360001b8152602001828103825288818151815260200191508051906020019080838360005b8381101561442f578181015183820152602001614417565b50505050905090810190601f16801561445c5780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b15801561448057600080fd5b505af1158015614494573d6000803e3d6000fd5b5050505050505050565b6000828152600c60205260408120546001600160a01b031682816145405760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156145055781810151838201526020016144ed565b50505050905090810190601f1680156145325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509392505050565b6000613bac6d53796e746865746978537461746560901b6040518060400160405280601e81526020017f4d697373696e672053796e74686574697853746174652061646472657373000081525061449e565b60006001600160a01b038316158015906145bd57506001600160a01b0383163014155b80156145d757506004546001600160a01b03848116911614155b614628576040805162461bcd60e51b815260206004820152601f60248201527f43616e6e6f74207472616e7366657220746f2074686973206164647265737300604482015290519081900360640190fd5b600754604080516370a0823160e01b81526001600160a01b0387811660048301529151919092169163b46310f691879161468691879186916370a0823191602480820192602092909190829003018186803b15801561415157600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156146d557600080fd5b505af11580156146e9573d6000803e3d6000fd5b5050600754604080516370a0823160e01b81526001600160a01b038881166004830152915191909216935063b46310f69250869161474b91879186916370a0823191602480820192602092909190829003018186803b15801561123257600080fd5b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561479a57600080fd5b505af11580156147ae573d6000803e3d6000fd5b50505050610e9a848484613e15565b604051806103000160405280601890602082028038833950919291505056fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e65727368697045786368616e67655265636c61696d28616464726573732c627974657333322c75696e743235362953796e746845786368616e676528616464726573732c627974657333322c75696e743235362c627974657333322c75696e743235362c616464726573732943616e6e6f74207472616e73666572207374616b6564206f7220657363726f77656420534e584f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e417070726f76616c28616464726573732c616464726573732c75696e74323536294d697373696e672052657761726473446973747269627574696f6e206164647265737345786368616e676552656261746528616464726573732c627974657333322c75696e74323536294163636f756e744c69717569646174656428616464726573732c75696e743235362c75696e743235362c61646472657373295472616e7366657228616464726573732c616464726573732c75696e7432353629a265627a7a723158201ded25a810a1dd8d06d43bc19eeb3abc4ff1a1139db3c0539afa3bdfe1da73ca64736f6c63430005100032

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f0000000000000000000000005b1b5fea1b99d83ad479df0c222f0492385381dd000000000000000000000000de910777c787903f78c89e7a0bf7f4c435cbb1fe0000000000000000000000000000000000000000009e0e1bd8e558030ba6055c00000000000000000000000061166014e3f04e40c953fe4eab9d9e40863c83ae

-----Decoded View---------------
Arg [0] : _proxy (address): 0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F
Arg [1] : _tokenState (address): 0x5b1b5fEa1b99D83aD479dF0C222F0492385381dD
Arg [2] : _owner (address): 0xDe910777C787903F78C89e7a0bf7F4C435cBB1Fe
Arg [3] : _totalSupply (uint256): 191076906320956426757211484
Arg [4] : _resolver (address): 0x61166014E3f04E40C953fe4EAb9D9E40863C83AE

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f
Arg [1] : 0000000000000000000000005b1b5fea1b99d83ad479df0c222f0492385381dd
Arg [2] : 000000000000000000000000de910777c787903f78c89e7a0bf7f4c435cbb1fe
Arg [3] : 0000000000000000000000000000000000000000009e0e1bd8e558030ba6055c
Arg [4] : 00000000000000000000000061166014e3f04e40c953fe4eab9d9e40863c83ae


Libraries Used


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.