Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Transfer | 22772403 | 117 days ago | 0.00413538 ETH |
Cross-Chain Transactions
Loading...
Loading
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 2024-08-19 */ /* ⚠⚠⚠ 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/ProxySynthetix *//* ____ __ __ __ _ / __/__ __ ___ / /_ / / ___ / /_ (_)__ __ _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ / /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ * 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: * - BaseSynthetix * - ExternStateToken * - IAddressResolver * - IERC20 * - ISynthetix * - MixinResolver * - Owned * - Proxyable * - State * Libraries: * - SafeDecimalMath * - SafeMath * - VestingEntries * * MIT License * =========== * * Copyright (c) 2024 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 */ pragma solidity >=0.4.24; // https://docs.synthetix.io/contracts/source/interfaces/ierc20 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/source/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 { _onlyOwner(); _; } function _onlyOwner() private view { require(msg.sender == owner, "Only the contract owner may perform this action"); } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } // Inheritance // Internal references // https://docs.synthetix.io/contracts/source/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/source/contracts/proxyable contract Proxyable is Owned { // This contract should be treated like an abstract contract /* The proxy this contract exists behind. */ Proxy public proxy; /* 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 setMessageSender(address sender) external onlyProxy { messageSender = sender; } modifier onlyProxy { _onlyProxy(); _; } function _onlyProxy() private view { require(Proxy(msg.sender) == proxy, "Only the proxy can call"); } modifier optionalProxy { _optionalProxy(); _; } function _optionalProxy() private { if (Proxy(msg.sender) != proxy && messageSender != msg.sender) { messageSender = msg.sender; } } modifier optionalProxy_onlyOwner { _optionalProxy_onlyOwner(); _; } // solhint-disable-next-line func-name-mixedcase function _optionalProxy_onlyOwner() private { if (Proxy(msg.sender) != proxy && 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/source/libraries/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; } // Computes `a - b`, setting the value to 0 if b > a. function floorsub(uint a, uint b) internal pure returns (uint) { return b >= a ? 0 : a - b; } /* ---------- Utilities ---------- */ /* * Absolute value of the input, returned as a signed number. */ function signedAbs(int x) internal pure returns (int) { return x < 0 ? -x : x; } /* * Absolute value of the input, returned as an unsigned number. */ function abs(int x) internal pure returns (uint) { return uint(signedAbs(x)); } } // Inheritance // https://docs.synthetix.io/contracts/source/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/source/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/source/contracts/externstatetoken contract ExternStateToken is Owned, 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) 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); } } // https://docs.synthetix.io/contracts/source/interfaces/iaddressresolver 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); } // https://docs.synthetix.io/contracts/source/interfaces/isynth 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; } // https://docs.synthetix.io/contracts/source/interfaces/iissuer interface IIssuer { // Views function allNetworksDebtInfo() external view returns ( uint256 debt, uint256 sharesSupply, bool isStale ); function anySynthOrSNXRateIsInvalid() external view returns (bool anyRateInvalid); 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 collateralisationRatioAndAnyRatesInvalid(address _issuer) external view returns (uint cratio, bool anyRateIsInvalid); function debtBalanceOf(address issuer, bytes32 currencyKey) external view returns (uint debtBalance); function issuanceRatio() external view returns (uint); function lastIssueEvent(address account) external view returns (uint); function maxIssuableSynths(address issuer) external view returns (uint maxIssuable); function minimumStakeTime() external view returns (uint); function remainingIssuableSynths(address issuer) external view returns ( uint maxIssuable, uint alreadyIssued, uint totalSystemDebt ); function synths(bytes32 currencyKey) external view returns (ISynth); function getSynths(bytes32[] calldata currencyKeys) external view returns (ISynth[] memory); function synthsByAddress(address synthAddress) external view returns (bytes32); function totalIssuedSynths(bytes32 currencyKey, bool excludeOtherCollateral) external view returns (uint); function transferableSynthetixAndAnyRateIsInvalid(address account, uint balance) external view returns (uint transferable, bool anyRateIsInvalid); function liquidationAmounts(address account, bool isSelfLiquidation) external view returns ( uint totalRedeemed, uint debtToRemove, uint escrowToLiquidate, uint initialDebtBalance ); // Restricted: used internally to Synthetix function addSynths(ISynth[] calldata synthsToAdd) external; 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 burnForRedemption( address deprecatedSynthProxy, address account, uint balance ) external; function setCurrentPeriodId(uint128 periodId) external; function liquidateAccount(address account, bool isSelfLiquidation) external returns ( uint totalRedeemed, uint debtRemoved, uint escrowToLiquidate ); function issueSynthsWithoutDebt( bytes32 currencyKey, address to, uint amount ) external returns (bool rateInvalid); function burnSynthsWithoutDebt( bytes32 currencyKey, address to, uint amount ) external returns (bool rateInvalid); function burnAndIssueSynthsWithoutDebtCache( address account, bytes32 currencyKey, uint amountOfSynth, uint amountInsUSD ) external; function modifyDebtSharesForMigration(address account, uint amount) external; } // Inheritance // Internal references // https://docs.synthetix.io/contracts/source/contracts/addressresolver contract AddressResolver is Owned, IAddressResolver { mapping(bytes32 => address) public repository; constructor(address _owner) public Owned(_owner) {} /* ========== RESTRICTED 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++) { bytes32 name = names[i]; address destination = destinations[i]; repository[name] = destination; emit AddressImported(name, destination); } } /* ========= PUBLIC FUNCTIONS ========== */ function rebuildCaches(MixinResolver[] calldata destinations) external { for (uint i = 0; i < destinations.length; i++) { destinations[i].rebuildCache(); } } /* ========== VIEWS ========== */ function areAddressesImported(bytes32[] calldata names, address[] calldata destinations) external view returns (bool) { for (uint i = 0; i < names.length; i++) { if (repository[names[i]] != destinations[i]) { return false; } } return true; } 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)); } /* ========== EVENTS ========== */ event AddressImported(bytes32 name, address destination); } // Internal references // https://docs.synthetix.io/contracts/source/contracts/mixinresolver contract MixinResolver { AddressResolver public resolver; mapping(bytes32 => address) private addressCache; constructor(address _resolver) internal { resolver = AddressResolver(_resolver); } /* ========== INTERNAL FUNCTIONS ========== */ function combineArrays(bytes32[] memory first, bytes32[] memory second) internal pure returns (bytes32[] memory combination) { combination = new bytes32[](first.length + second.length); for (uint i = 0; i < first.length; i++) { combination[i] = first[i]; } for (uint j = 0; j < second.length; j++) { combination[first.length + j] = second[j]; } } /* ========== PUBLIC FUNCTIONS ========== */ // Note: this function is public not external in order for it to be overridden and invoked via super in subclasses function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {} function rebuildCache() public { bytes32[] memory requiredAddresses = resolverAddressesRequired(); // The resolver must call this function whenver it updates its state for (uint i = 0; i < requiredAddresses.length; i++) { bytes32 name = requiredAddresses[i]; // Note: can only be invoked once the resolver has all the targets needed added address destination = resolver.requireAndGetAddress(name, string(abi.encodePacked("Resolver missing target: ", name))); addressCache[name] = destination; emit CacheUpdated(name, destination); } } /* ========== VIEWS ========== */ function isResolverCached() external view returns (bool) { bytes32[] memory requiredAddresses = resolverAddressesRequired(); for (uint i = 0; i < requiredAddresses.length; i++) { bytes32 name = requiredAddresses[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; } /* ========== INTERNAL FUNCTIONS ========== */ function requireAndGetAddress(bytes32 name) internal view returns (address) { address _foundAddress = addressCache[name]; require(_foundAddress != address(0), string(abi.encodePacked("Missing address: ", name))); return _foundAddress; } /* ========== EVENTS ========== */ event CacheUpdated(bytes32 name, address destination); } interface IVirtualSynth { // Views function balanceOfUnderlying(address account) external view returns (uint); function rate() external view returns (uint); function readyToSettle() external view returns (bool); function secsLeftInWaitingPeriod() external view returns (uint); function settled() external view returns (bool); function synth() external view returns (ISynth); // Mutative functions function settle(address account) external; } // https://docs.synthetix.io/contracts/source/interfaces/isynthetix interface ISynthetix { // Views function anySynthOrSNXRateIsInvalid() external view returns (bool anyRateInvalid); 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 totalIssuedSynthsExcludeOtherCollateral(bytes32 currencyKey) external view returns (uint); function transferableSynthetix(address account) external view returns (uint transferable); function getFirstNonZeroEscrowIndex(address account) external view returns (uint); // 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 exchangeWithTracking( bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, address rewardAddress, bytes32 trackingCode ) external returns (uint amountReceived); function exchangeWithTrackingForInitiator( bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, address rewardAddress, bytes32 trackingCode ) external returns (uint amountReceived); function exchangeOnBehalfWithTracking( address exchangeForAddress, bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, address rewardAddress, bytes32 trackingCode ) external returns (uint amountReceived); function exchangeWithVirtual( bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, bytes32 trackingCode ) external returns (uint amountReceived, IVirtualSynth vSynth); function exchangeAtomically( bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, bytes32 trackingCode, uint minAmount ) 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 ); // Liquidations function liquidateDelinquentAccount(address account) external returns (bool); function liquidateDelinquentAccountEscrowIndex(address account, uint escrowStartIndex) external returns (bool); function liquidateSelf() external returns (bool); // Restricted Functions function mintSecondary(address account, uint amount) external; function mintSecondaryRewards(uint amount) external; function burnSecondary(address account, uint amount) external; function migrateAccountBalances(address account) external returns (uint totalEscrowRevoked, uint totalLiquidBalance); } // https://docs.synthetix.io/contracts/source/interfaces/isystemstatus interface ISystemStatus { struct Status { bool canSuspend; bool canResume; } struct Suspension { bool suspended; // reason is an integer code, // 0 => no reason, 1 => upgrading, 2+ => defined by system usage uint248 reason; } // Views function accessControl(bytes32 section, address account) external view returns (bool canSuspend, bool canResume); function requireSystemActive() external view; function systemSuspended() external view returns (bool); function requireIssuanceActive() external view; function requireExchangeActive() external view; function requireFuturesActive() external view; function requireFuturesMarketActive(bytes32 marketKey) external view; function requireExchangeBetweenSynthsAllowed(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) external view; function requireSynthActive(bytes32 currencyKey) external view; function synthSuspended(bytes32 currencyKey) external view returns (bool); function requireSynthsActive(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) external view; function systemSuspension() external view returns (bool suspended, uint248 reason); function issuanceSuspension() external view returns (bool suspended, uint248 reason); function exchangeSuspension() external view returns (bool suspended, uint248 reason); function futuresSuspension() external view returns (bool suspended, uint248 reason); function synthExchangeSuspension(bytes32 currencyKey) external view returns (bool suspended, uint248 reason); function synthSuspension(bytes32 currencyKey) external view returns (bool suspended, uint248 reason); function futuresMarketSuspension(bytes32 marketKey) external view returns (bool suspended, uint248 reason); function getSynthExchangeSuspensions(bytes32[] calldata synths) external view returns (bool[] memory exchangeSuspensions, uint256[] memory reasons); function getSynthSuspensions(bytes32[] calldata synths) external view returns (bool[] memory suspensions, uint256[] memory reasons); function getFuturesMarketSuspensions(bytes32[] calldata marketKeys) external view returns (bool[] memory suspensions, uint256[] memory reasons); // Restricted functions function suspendIssuance(uint256 reason) external; function suspendSynth(bytes32 currencyKey, uint256 reason) external; function suspendFuturesMarket(bytes32 marketKey, uint256 reason) external; function updateAccessControl( bytes32 section, address account, bool canSuspend, bool canResume ) external; } pragma experimental ABIEncoderV2; // https://docs.synthetix.io/contracts/source/interfaces/iexchanger interface IExchanger { struct ExchangeEntrySettlement { bytes32 src; uint amount; bytes32 dest; uint reclaim; uint rebate; uint srcRoundIdAtPeriodEnd; uint destRoundIdAtPeriodEnd; uint timestamp; } struct ExchangeEntry { uint sourceRate; uint destinationRate; uint destinationAmount; uint exchangeFeeRate; uint exchangeDynamicFeeRate; uint roundIdForSrc; uint roundIdForDest; uint sourceAmountAfterSettlement; } // Views function calculateAmountAfterSettlement( address from, bytes32 currencyKey, uint amount, uint refunded ) external view returns (uint amountAfterSettlement); function isSynthRateInvalid(bytes32 currencyKey) external view returns (bool); 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); function dynamicFeeRateForExchange(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) external view returns (uint feeRate, bool tooVolatile); function getAmountsForExchange( uint sourceAmount, bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey ) external view returns ( uint amountReceived, uint fee, uint exchangeFeeRate ); function priceDeviationThresholdFactor() external view returns (uint); function waitingPeriodSecs() external view returns (uint); function lastExchangeRate(bytes32 currencyKey) external view returns (uint); // Mutative functions function exchange( address exchangeForAddress, address from, bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, address destinationAddress, bool virtualSynth, address rewardAddress, bytes32 trackingCode ) external returns (uint amountReceived, IVirtualSynth vSynth); function exchangeAtomically( address from, bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, address destinationAddress, bytes32 trackingCode, uint minAmount ) external returns (uint amountReceived); function settle(address from, bytes32 currencyKey) external returns ( uint reclaimed, uint refunded, uint numEntries ); } // Used to have strongly-typed access to internal mutative functions in Synthetix interface ISynthetixInternal { function emitExchangeTracking( bytes32 trackingCode, bytes32 toCurrencyKey, uint256 toAmount, uint256 fee ) external; function emitSynthExchange( address account, bytes32 fromCurrencyKey, uint fromAmount, bytes32 toCurrencyKey, uint toAmount, address toAddress ) external; function emitAtomicSynthExchange( address account, bytes32 fromCurrencyKey, uint fromAmount, bytes32 toCurrencyKey, uint toAmount, address toAddress ) external; function emitExchangeReclaim( address account, bytes32 currencyKey, uint amount ) external; function emitExchangeRebate( address account, bytes32 currencyKey, uint amount ) external; } interface IExchangerInternalDebtCache { function updateCachedSynthDebtsWithRates(bytes32[] calldata currencyKeys, uint[] calldata currencyRates) external; function updateCachedSynthDebts(bytes32[] calldata currencyKeys) external; } // https://docs.synthetix.io/contracts/source/interfaces/irewardsdistribution interface IRewardsDistribution { // Structs struct DistributionData { address destination; uint amount; } // Views function authority() external view returns (address); function distributions(uint index) external view returns (address destination, uint amount); // DistributionData function distributionsLength() external view returns (uint); // Mutative Functions function distributeRewards(uint amount) external returns (bool); } interface ILiquidator { // Views function issuanceRatio() external view returns (uint); function liquidationDelay() external view returns (uint); function liquidationRatio() external view returns (uint); function liquidationEscrowDuration() external view returns (uint); function liquidationPenalty() external view returns (uint); function selfLiquidationPenalty() external view returns (uint); function liquidateReward() external view returns (uint); function flagReward() external view returns (uint); function liquidationCollateralRatio() external view returns (uint); function getLiquidationDeadlineForAccount(address account) external view returns (uint); function getLiquidationCallerForAccount(address account) external view returns (address); function isLiquidationOpen(address account, bool isSelfLiquidation) external view returns (bool); function isLiquidationDeadlinePassed(address account) external view returns (bool); function calculateAmountToFixCollateral( uint debtBalance, uint collateral, uint penalty ) external view returns (uint); function liquidationAmounts(address account, bool isSelfLiquidation) external view returns ( uint totalRedeemed, uint debtToRemove, uint escrowToLiquidate, uint initialDebtBalance ); // Mutative Functions function flagAccountForLiquidation(address account) external; // Restricted: used internally to Synthetix contracts function removeAccountInLiquidation(address account) external; function checkAndRemoveAccountInLiquidation(address account) external; } interface ILiquidatorRewards { // Views function earned(address account) external view returns (uint256); // Mutative function getReward(address account) external; function notifyRewardAmount(uint256 reward) external; function updateEntry(address account) external; } library VestingEntries { struct VestingEntry { uint64 endTime; uint256 escrowAmount; } struct VestingEntryWithID { uint64 endTime; uint256 escrowAmount; uint256 entryID; } } /// SIP-252: this is the interface for immutable V2 escrow (renamed with suffix Frozen). /// These sources need to exist here and match on-chain frozen contracts for tests and reference. /// the reason for the naming mess is that the immutable LiquidatorRewards expects a working /// RewardEscrowV2 resolver entry for its getReward method, so the "new" (would be V3) /// needs to be found at that entry for liq-rewards to function. interface IRewardEscrowV2Frozen { // Views function balanceOf(address account) external view returns (uint); function numVestingEntries(address account) external view returns (uint); function totalEscrowedBalance() external view returns (uint); function totalEscrowedAccountBalance(address account) external view returns (uint); function totalVestedAccountBalance(address account) external view returns (uint); function getVestingQuantity(address account, uint256[] calldata entryIDs) external view returns (uint); function getVestingSchedules( address account, uint256 index, uint256 pageSize ) external view returns (VestingEntries.VestingEntryWithID[] memory); function getAccountVestingEntryIDs( address account, uint256 index, uint256 pageSize ) external view returns (uint256[] memory); function getVestingEntryClaimable(address account, uint256 entryID) external view returns (uint); function getVestingEntry(address account, uint256 entryID) external view returns (uint64, uint256); // Mutative functions function vest(uint256[] calldata entryIDs) external; function createEscrowEntry( address beneficiary, uint256 deposit, uint256 duration ) external; function appendVestingEntry( address account, uint256 quantity, uint256 duration ) external; function migrateVestingSchedule(address _addressToMigrate) external; function migrateAccountEscrowBalances( address[] calldata accounts, uint256[] calldata escrowBalances, uint256[] calldata vestedBalances ) external; // Account Merging function startMergingWindow() external; function mergeAccount(address accountToMerge, uint256[] calldata entryIDs) external; function nominateAccountToMerge(address account) external; function accountMergingIsOpen() external view returns (bool); // L2 Migration function importVestingEntries( address account, uint256 escrowedAmount, VestingEntries.VestingEntry[] calldata vestingEntries ) external; // Return amount of SNX transfered to SynthetixBridgeToOptimism deposit contract function burnForMigration(address account, uint256[] calldata entryIDs) external returns (uint256 escrowedAccountBalance, VestingEntries.VestingEntry[] memory vestingEntries); function nextEntryId() external view returns (uint); function vestingSchedules(address account, uint256 entryId) external view returns (VestingEntries.VestingEntry memory); function accountVestingEntryIDs(address account, uint256 index) external view returns (uint); //function totalEscrowedAccountBalance(address account) external view returns (uint); //function totalVestedAccountBalance(address account) external view returns (uint); } interface IRewardEscrowV2Storage { /// Views function numVestingEntries(address account) external view returns (uint); function totalEscrowedAccountBalance(address account) external view returns (uint); function totalVestedAccountBalance(address account) external view returns (uint); function totalEscrowedBalance() external view returns (uint); function nextEntryId() external view returns (uint); function vestingSchedules(address account, uint256 entryId) external view returns (VestingEntries.VestingEntry memory); function accountVestingEntryIDs(address account, uint256 index) external view returns (uint); /// Mutative function setZeroAmount(address account, uint entryId) external; function setZeroAmountUntilTarget( address account, uint startIndex, uint targetAmount ) external returns ( uint total, uint endIndex, uint lastEntryTime ); function updateEscrowAccountBalance(address account, int delta) external; function updateVestedAccountBalance(address account, int delta) external; function updateTotalEscrowedBalance(int delta) external; function addVestingEntry(address account, VestingEntries.VestingEntry calldata entry) external returns (uint); // setFallbackRewardEscrow is used for configuration but not used by contracts } /// this should remain backwards compatible to IRewardEscrowV2Frozen /// ideally this would be done by inheriting from that interface /// but solidity v0.5 doesn't support interface inheritance interface IRewardEscrowV2 { // Views function balanceOf(address account) external view returns (uint); function numVestingEntries(address account) external view returns (uint); function totalEscrowedBalance() external view returns (uint); function totalEscrowedAccountBalance(address account) external view returns (uint); function totalVestedAccountBalance(address account) external view returns (uint); function getVestingQuantity(address account, uint256[] calldata entryIDs) external view returns (uint); function getVestingSchedules( address account, uint256 index, uint256 pageSize ) external view returns (VestingEntries.VestingEntryWithID[] memory); function getAccountVestingEntryIDs( address account, uint256 index, uint256 pageSize ) external view returns (uint256[] memory); function getVestingEntryClaimable(address account, uint256 entryID) external view returns (uint); function getVestingEntry(address account, uint256 entryID) external view returns (uint64, uint256); // Mutative functions function vest(uint256[] calldata entryIDs) external; function createEscrowEntry( address beneficiary, uint256 deposit, uint256 duration ) external; function appendVestingEntry( address account, uint256 quantity, uint256 duration ) external; function migrateVestingSchedule(address _addressToMigrate) external; function migrateAccountEscrowBalances( address[] calldata accounts, uint256[] calldata escrowBalances, uint256[] calldata vestedBalances ) external; // Account Merging function startMergingWindow() external; function mergeAccount(address accountToMerge, uint256[] calldata entryIDs) external; function nominateAccountToMerge(address account) external; function accountMergingIsOpen() external view returns (bool); // L2 Migration function importVestingEntries( address account, uint256 escrowedAmount, VestingEntries.VestingEntry[] calldata vestingEntries ) external; // Return amount of SNX transfered to SynthetixBridgeToOptimism deposit contract function burnForMigration(address account, uint256[] calldata entryIDs) external returns (uint256 escrowedAccountBalance, VestingEntries.VestingEntry[] memory vestingEntries); function nextEntryId() external view returns (uint); function vestingSchedules(address account, uint256 entryId) external view returns (VestingEntries.VestingEntry memory); function accountVestingEntryIDs(address account, uint256 index) external view returns (uint); /// below are methods not available in IRewardEscrowV2Frozen // revoke entries for liquidations (access controlled to Synthetix) function revokeFrom( address account, address recipient, uint targetAmount, uint startIndex ) external; } // Inheritance // Internal references contract BaseSynthetix 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_SYSTEMSTATUS = "SystemStatus"; bytes32 private constant CONTRACT_EXCHANGER = "Exchanger"; bytes32 private constant CONTRACT_ISSUER = "Issuer"; bytes32 private constant CONTRACT_REWARDSDISTRIBUTION = "RewardsDistribution"; bytes32 private constant CONTRACT_LIQUIDATORREWARDS = "LiquidatorRewards"; bytes32 private constant CONTRACT_LIQUIDATOR = "Liquidator"; bytes32 private constant CONTRACT_REWARDESCROW_V2 = "RewardEscrowV2"; bytes32 private constant CONTRACT_V3_LEGACYMARKET = "LegacyMarket"; bytes32 private constant CONTRACT_DEBT_MIGRATOR_ON_ETHEREUM = "DebtMigratorOnEthereum"; // ========== 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) {} // ========== VIEWS ========== // Note: use public visibility so that it can be invoked in a subclass function resolverAddressesRequired() public view returns (bytes32[] memory addresses) { addresses = new bytes32[](7); addresses[0] = CONTRACT_SYSTEMSTATUS; addresses[1] = CONTRACT_EXCHANGER; addresses[2] = CONTRACT_ISSUER; addresses[3] = CONTRACT_REWARDSDISTRIBUTION; addresses[4] = CONTRACT_LIQUIDATORREWARDS; addresses[5] = CONTRACT_LIQUIDATOR; addresses[6] = CONTRACT_REWARDESCROW_V2; } function systemStatus() internal view returns (ISystemStatus) { return ISystemStatus(requireAndGetAddress(CONTRACT_SYSTEMSTATUS)); } function exchanger() internal view returns (IExchanger) { return IExchanger(requireAndGetAddress(CONTRACT_EXCHANGER)); } function issuer() internal view returns (IIssuer) { return IIssuer(requireAndGetAddress(CONTRACT_ISSUER)); } function rewardsDistribution() internal view returns (IRewardsDistribution) { return IRewardsDistribution(requireAndGetAddress(CONTRACT_REWARDSDISTRIBUTION)); } function liquidatorRewards() internal view returns (ILiquidatorRewards) { return ILiquidatorRewards(requireAndGetAddress(CONTRACT_LIQUIDATORREWARDS)); } function rewardEscrowV2() internal view returns (IRewardEscrowV2) { return IRewardEscrowV2(requireAndGetAddress(CONTRACT_REWARDESCROW_V2)); } function liquidator() internal view returns (ILiquidator) { return ILiquidator(requireAndGetAddress(CONTRACT_LIQUIDATOR)); } 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 totalIssuedSynthsExcludeOtherCollateral(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 anySynthOrSNXRateIsInvalid() external view returns (bool anyRateInvalid) { return issuer().anySynthOrSNXRateIsInvalid(); } 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 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().transferableSynthetixAndAnyRateIsInvalid(account, tokenState.balanceOf(account)); } /// the index of the first non zero RewardEscrowV2 entry for an account in order of iteration over accountVestingEntryIDs. /// This is intended as a convenience off-chain view for liquidators to calculate the startIndex to pass /// into liquidateDelinquentAccountEscrowIndex to save gas. function getFirstNonZeroEscrowIndex(address account) external view returns (uint) { uint numIds = rewardEscrowV2().numVestingEntries(account); uint entryID; VestingEntries.VestingEntry memory entry; for (uint i = 0; i < numIds; i++) { entryID = rewardEscrowV2().accountVestingEntryIDs(account, i); entry = rewardEscrowV2().vestingSchedules(account, entryID); if (entry.escrowAmount > 0) { return i; } } revert("all entries are zero"); } function _canTransfer(address account, uint value) internal view returns (bool) { // Always allow legacy market to transfer // note if legacy market is not yet available this will just return 0 address and it will never be true address legacyMarketAddress = resolver.getAddress(CONTRACT_V3_LEGACYMARKET); if ((messageSender != address(0) && messageSender == legacyMarketAddress) || account == legacyMarketAddress) { return true; } if (issuer().debtBalanceOf(account, sUSD) > 0) { (uint transferable, bool anyRateIsInvalid) = issuer().transferableSynthetixAndAnyRateIsInvalid(account, tokenState.balanceOf(account)); require(value <= transferable, "Cannot transfer staked or escrowed SNX"); require(!anyRateIsInvalid, "A synth or SNX rate is invalid"); } return true; } // ========== MUTATIVE FUNCTIONS ========== function exchange( bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey ) external exchangeActive(sourceCurrencyKey, destinationCurrencyKey) optionalProxy returns (uint amountReceived) { (amountReceived, ) = exchanger().exchange( messageSender, messageSender, sourceCurrencyKey, sourceAmount, destinationCurrencyKey, messageSender, false, messageSender, bytes32(0) ); } function exchangeOnBehalf( address exchangeForAddress, bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey ) external exchangeActive(sourceCurrencyKey, destinationCurrencyKey) optionalProxy returns (uint amountReceived) { (amountReceived, ) = exchanger().exchange( exchangeForAddress, messageSender, sourceCurrencyKey, sourceAmount, destinationCurrencyKey, exchangeForAddress, false, exchangeForAddress, bytes32(0) ); } function settle(bytes32 currencyKey) external optionalProxy returns ( uint reclaimed, uint refunded, uint numEntriesSettled ) { return exchanger().settle(messageSender, currencyKey); } function exchangeWithTracking( bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, address rewardAddress, bytes32 trackingCode ) external exchangeActive(sourceCurrencyKey, destinationCurrencyKey) optionalProxy returns (uint amountReceived) { (amountReceived, ) = exchanger().exchange( messageSender, messageSender, sourceCurrencyKey, sourceAmount, destinationCurrencyKey, messageSender, false, rewardAddress, trackingCode ); } function exchangeOnBehalfWithTracking( address exchangeForAddress, bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, address rewardAddress, bytes32 trackingCode ) external exchangeActive(sourceCurrencyKey, destinationCurrencyKey) optionalProxy returns (uint amountReceived) { (amountReceived, ) = exchanger().exchange( exchangeForAddress, messageSender, sourceCurrencyKey, sourceAmount, destinationCurrencyKey, exchangeForAddress, false, rewardAddress, trackingCode ); } function transfer(address to, uint value) external onlyProxyOrInternal 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 onlyProxyOrInternal 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); } // SIP-252: migration of SNX token balance from old to new escrow rewards contract function migrateEscrowContractBalance() external onlyOwner { address from = resolver.requireAndGetAddress("RewardEscrowV2Frozen", "Old escrow address unset"); // technically the below could use `rewardEscrowV2()`, but in the case of a migration it's better to avoid // using the cached value and read the most updated one directly from the resolver address to = resolver.requireAndGetAddress("RewardEscrowV2", "New escrow address unset"); require(to != from, "cannot migrate to same address"); uint currentBalance = tokenState.balanceOf(from); // allow no-op for idempotent migration steps in case action was performed already if (currentBalance > 0) { _internalTransfer(from, to, currentBalance); } } 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); } /// @notice Force liquidate a delinquent account and distribute the redeemed SNX rewards amongst the appropriate recipients. /// @dev The SNX transfers will revert if the amount to send is more than balanceOf account (i.e. due to escrowed balance). function liquidateDelinquentAccount(address account) external systemActive optionalProxy returns (bool) { return _liquidateDelinquentAccount(account, 0, messageSender); } /// @param escrowStartIndex: index into the account's vesting entries list to start iterating from /// when liquidating from escrow in order to save gas (the default method uses 0 as default) function liquidateDelinquentAccountEscrowIndex(address account, uint escrowStartIndex) external systemActive optionalProxy returns (bool) { return _liquidateDelinquentAccount(account, escrowStartIndex, messageSender); } /// @notice Force liquidate a delinquent account and distribute the redeemed SNX rewards amongst the appropriate recipients. /// @dev The SNX transfers will revert if the amount to send is more than balanceOf account (i.e. due to escrowed balance). function _liquidateDelinquentAccount( address account, uint escrowStartIndex, address liquidatorAccount ) internal returns (bool) { // ensure the user has no liquidation rewards (also counted towards collateral) outstanding liquidatorRewards().getReward(account); (uint totalRedeemed, uint debtToRemove, uint escrowToLiquidate) = issuer().liquidateAccount(account, false); // This transfers the to-be-liquidated part of escrow to the account (!) as liquid SNX. // It is transferred to the account instead of to the rewards because of the liquidator / flagger // rewards that may need to be paid (so need to be transferrable, to avoid edge cases) if (escrowToLiquidate > 0) { rewardEscrowV2().revokeFrom(account, account, escrowToLiquidate, escrowStartIndex); } emitAccountLiquidated(account, totalRedeemed, debtToRemove, liquidatorAccount); // First, pay out the flag and liquidate rewards. uint flagReward = liquidator().flagReward(); uint liquidateReward = liquidator().liquidateReward(); // Transfer the flagReward to the account who flagged this account for liquidation. address flagger = liquidator().getLiquidationCallerForAccount(account); bool flagRewardTransferSucceeded = _transferByProxy(account, flagger, flagReward); require(flagRewardTransferSucceeded, "Flag reward transfer did not succeed"); // Transfer the liquidateReward to liquidator (the account who invoked this liquidation). bool liquidateRewardTransferSucceeded = _transferByProxy(account, liquidatorAccount, liquidateReward); require(liquidateRewardTransferSucceeded, "Liquidate reward transfer did not succeed"); if (totalRedeemed > 0) { // Send the remaining SNX to the LiquidatorRewards contract. bool liquidatorRewardTransferSucceeded = _transferByProxy(account, address(liquidatorRewards()), totalRedeemed); require(liquidatorRewardTransferSucceeded, "Transfer to LiquidatorRewards failed"); // Inform the LiquidatorRewards contract about the incoming SNX rewards. liquidatorRewards().notifyRewardAmount(totalRedeemed); } return true; } /// @notice Allows an account to self-liquidate anytime its c-ratio is below the target issuance ratio. function liquidateSelf() external systemActive optionalProxy returns (bool) { require(resolver.getAddress(CONTRACT_V3_LEGACYMARKET) == address(0), "Must liquidate using V3"); // must store liquidated account address because below functions may attempt to transfer SNX which changes messageSender address liquidatedAccount = messageSender; // ensure the user has no liquidation rewards (also counted towards collateral) outstanding liquidatorRewards().getReward(liquidatedAccount); // Self liquidate the account (`isSelfLiquidation` flag must be set to `true`). // escrowToLiquidate is unused because it cannot be used for self-liquidations (uint totalRedeemed, uint debtRemoved, ) = issuer().liquidateAccount(liquidatedAccount, true); require(debtRemoved > 0, "cannot self liquidate"); emitAccountLiquidated(liquidatedAccount, totalRedeemed, debtRemoved, liquidatedAccount); // Transfer the redeemed SNX to the LiquidatorRewards contract. // Reverts if amount to redeem is more than balanceOf account (i.e. due to escrowed balance). bool success = _transferByProxy(liquidatedAccount, address(liquidatorRewards()), totalRedeemed); require(success, "Transfer to LiquidatorRewards failed"); // Inform the LiquidatorRewards contract about the incoming SNX rewards. liquidatorRewards().notifyRewardAmount(totalRedeemed); return success; } function migrateAccountBalances(address account) external systemActive returns (uint totalEscrowRevoked, uint totalLiquidBalance) { address debtMigratorOnEthereum = resolver.getAddress(CONTRACT_DEBT_MIGRATOR_ON_ETHEREUM); require( msg.sender == debtMigratorOnEthereum || msg.sender == resolver.getAddress(CONTRACT_V3_LEGACYMARKET), "Only L1 DebtMigrator or LegacyMarket" ); // get their liquid SNX balance and transfer it to the migrator contract totalLiquidBalance = tokenState.balanceOf(account); if (totalLiquidBalance > 0) { bool succeeded = _transferByProxy(account, msg.sender, totalLiquidBalance); require(succeeded, "snx transfer failed"); } // get their escrowed SNX balance and revoke it all totalEscrowRevoked = rewardEscrowV2().totalEscrowedAccountBalance(account); if (totalEscrowRevoked > 0) { rewardEscrowV2().revokeFrom(account, msg.sender, totalEscrowRevoked, 0); } } function exchangeWithTrackingForInitiator( bytes32, uint, bytes32, address, bytes32 ) external returns (uint) { _notImplemented(); } function exchangeWithVirtual( bytes32, uint, bytes32, bytes32 ) external returns (uint, IVirtualSynth) { _notImplemented(); } function exchangeAtomically( bytes32, uint, bytes32, bytes32, uint ) external returns (uint) { _notImplemented(); } function mint() external returns (bool) { _notImplemented(); } function mintSecondary(address, uint) external { _notImplemented(); } function mintSecondaryRewards(uint) external { _notImplemented(); } function burnSecondary(address, uint) external { _notImplemented(); } function _notImplemented() internal pure { revert("Cannot be run on this layer"); } // ========== MODIFIERS ========== modifier systemActive() { _systemActive(); _; } function _systemActive() private view { systemStatus().requireSystemActive(); } modifier issuanceActive() { _issuanceActive(); _; } function _issuanceActive() private view { systemStatus().requireIssuanceActive(); } modifier exchangeActive(bytes32 src, bytes32 dest) { _exchangeActive(src, dest); _; } function _exchangeActive(bytes32 src, bytes32 dest) private view { systemStatus().requireExchangeBetweenSynthsAllowed(src, dest); } modifier onlyExchanger() { _onlyExchanger(); _; } function _onlyExchanger() private view { require(msg.sender == address(exchanger()), "Only Exchanger can invoke this"); } modifier onlyProxyOrInternal { _onlyProxyOrInternal(); _; } function _onlyProxyOrInternal() internal { if (msg.sender == address(proxy)) { // allow proxy through, messageSender should be already set correctly return; } else if (_isInternalTransferCaller(msg.sender)) { // optionalProxy behaviour only for the internal legacy contracts messageSender = msg.sender; } else { revert("Only the proxy can call"); } } /// some legacy internal contracts use transfer methods directly on implementation /// which isn't supported due to SIP-238 for other callers function _isInternalTransferCaller(address caller) internal view returns (bool) { // These entries are not required or cached in order to allow them to not exist (==address(0)) // e.g. due to not being available on L2 or at some future point in time. return // ordered to reduce gas for more frequent calls, bridge first, vesting and migrating after, legacy last caller == resolver.getAddress("SynthetixBridgeToOptimism") || caller == resolver.getAddress("RewardEscrowV2") || caller == resolver.getAddress("DebtMigratorOnOptimism") || // legacy contracts caller == resolver.getAddress("RewardEscrow") || caller == resolver.getAddress("SynthetixEscrow") || caller == resolver.getAddress("Depot"); } // ========== EVENTS ========== 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 ); } event SynthExchange( address indexed account, bytes32 fromCurrencyKey, uint256 fromAmount, bytes32 toCurrencyKey, uint256 toAmount, address toAddress ); bytes32 internal constant SYNTH_EXCHANGE_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, SYNTH_EXCHANGE_SIG, addressToBytes32(account), 0, 0 ); } event ExchangeTracking(bytes32 indexed trackingCode, bytes32 toCurrencyKey, uint256 toAmount, uint256 fee); bytes32 internal constant EXCHANGE_TRACKING_SIG = keccak256("ExchangeTracking(bytes32,bytes32,uint256,uint256)"); function emitExchangeTracking( bytes32 trackingCode, bytes32 toCurrencyKey, uint256 toAmount, uint256 fee ) external onlyExchanger { proxy._emit(abi.encode(toCurrencyKey, toAmount, fee), 2, EXCHANGE_TRACKING_SIG, trackingCode, 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); } } // https://docs.synthetix.io/contracts/source/interfaces/irewardescrow interface IRewardEscrow { // Views function balanceOf(address account) external view returns (uint); function numVestingEntries(address account) external view returns (uint); function totalEscrowedAccountBalance(address account) external view returns (uint); function totalVestedAccountBalance(address account) external view returns (uint); function getVestingScheduleEntry(address account, uint index) external view returns (uint[2] memory); function getNextVestingIndex(address account) external view returns (uint); // Mutative functions function appendVestingEntry(address account, uint quantity) external; function vest() external; } // https://docs.synthetix.io/contracts/source/interfaces/isupplyschedule interface ISupplySchedule { // Views function mintableSupply() external view returns (uint); function isMintable() external view returns (bool); function minterReward() external view returns (uint); // Mutative functions function recordMintEvent(uint supplyMinted) external returns (uint); } // Inheritance // Internal references // https://docs.synthetix.io/contracts/source/contracts/synthetix contract Synthetix is BaseSynthetix { bytes32 public constant CONTRACT_NAME = "Synthetix"; // ========== ADDRESS RESOLVER CONFIGURATION ========== bytes32 private constant CONTRACT_REWARD_ESCROW = "RewardEscrow"; bytes32 private constant CONTRACT_SUPPLYSCHEDULE = "SupplySchedule"; // ========== CONSTRUCTOR ========== constructor( address payable _proxy, TokenState _tokenState, address _owner, uint _totalSupply, address _resolver ) public BaseSynthetix(_proxy, _tokenState, _owner, _totalSupply, _resolver) {} function resolverAddressesRequired() public view returns (bytes32[] memory addresses) { bytes32[] memory existingAddresses = BaseSynthetix.resolverAddressesRequired(); bytes32[] memory newAddresses = new bytes32[](2); newAddresses[0] = CONTRACT_REWARD_ESCROW; newAddresses[1] = CONTRACT_SUPPLYSCHEDULE; return combineArrays(existingAddresses, newAddresses); } // ========== VIEWS ========== function rewardEscrow() internal view returns (IRewardEscrow) { return IRewardEscrow(requireAndGetAddress(CONTRACT_REWARD_ESCROW)); } function supplySchedule() internal view returns (ISupplySchedule) { return ISupplySchedule(requireAndGetAddress(CONTRACT_SUPPLYSCHEDULE)); } // ========== OVERRIDDEN FUNCTIONS ========== function exchangeWithVirtual( bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, bytes32 trackingCode ) external exchangeActive(sourceCurrencyKey, destinationCurrencyKey) optionalProxy returns (uint amountReceived, IVirtualSynth vSynth) { return exchanger().exchange( messageSender, messageSender, sourceCurrencyKey, sourceAmount, destinationCurrencyKey, messageSender, true, messageSender, trackingCode ); } // SIP-140 The initiating user of this exchange will receive the proceeds of the exchange // Note: this function may have unintended consequences if not understood correctly. Please // read SIP-140 for more information on the use-case function exchangeWithTrackingForInitiator( bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, address rewardAddress, bytes32 trackingCode ) external exchangeActive(sourceCurrencyKey, destinationCurrencyKey) optionalProxy returns (uint amountReceived) { (amountReceived, ) = exchanger().exchange( messageSender, messageSender, sourceCurrencyKey, sourceAmount, destinationCurrencyKey, // solhint-disable avoid-tx-origin tx.origin, false, rewardAddress, trackingCode ); } function exchangeAtomically( bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, bytes32 trackingCode, uint minAmount ) external exchangeActive(sourceCurrencyKey, destinationCurrencyKey) optionalProxy returns (uint amountReceived) { return exchanger().exchangeAtomically( messageSender, sourceCurrencyKey, sourceAmount, destinationCurrencyKey, messageSender, trackingCode, minAmount ); } function settle(bytes32 currencyKey) external optionalProxy returns ( uint reclaimed, uint refunded, uint numEntriesSettled ) { return exchanger().settle(messageSender, currencyKey); } function mint() external issuanceActive returns (bool) { require(address(rewardsDistribution()) != address(0), "RewardsDistribution not set"); ISupplySchedule _supplySchedule = supplySchedule(); IRewardsDistribution _rewardsDistribution = rewardsDistribution(); uint supplyToMint = _supplySchedule.mintableSupply(); require(supplyToMint > 0, "No supply is mintable"); emitTransfer(address(0), address(this), supplyToMint); // record minting event before mutation to token supply uint minterReward = _supplySchedule.recordMintEvent(supplyToMint); // Set minted SNX balance to RewardEscrow's balance // Minus the minterReward and set balance of minter to add reward 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); // Increase total supply by minted amount totalSupply = totalSupply.add(supplyToMint); return true; } /* Once off function for SIP-60 to migrate SNX balances in the RewardEscrow contract * To the new RewardEscrowV2 contract */ function migrateEscrowBalanceToRewardEscrowV2() external onlyOwner { // Record balanceOf(RewardEscrow) contract uint rewardEscrowBalance = tokenState.balanceOf(address(rewardEscrow())); // transfer all of RewardEscrow's balance to RewardEscrowV2 // _internalTransfer emits the transfer event _internalTransfer(address(rewardEscrow()), address(rewardEscrowV2()), rewardEscrowBalance); } // ========== EVENTS ========== event AtomicSynthExchange( address indexed account, bytes32 fromCurrencyKey, uint256 fromAmount, bytes32 toCurrencyKey, uint256 toAmount, address toAddress ); bytes32 internal constant ATOMIC_SYNTH_EXCHANGE_SIG = keccak256("AtomicSynthExchange(address,bytes32,uint256,bytes32,uint256,address)"); function emitAtomicSynthExchange( address account, bytes32 fromCurrencyKey, uint256 fromAmount, bytes32 toCurrencyKey, uint256 toAmount, address toAddress ) external onlyExchanger { proxy._emit( abi.encode(fromCurrencyKey, fromAmount, toCurrencyKey, toAmount, toAddress), 2, ATOMIC_SYNTH_EXCHANGE_SIG, addressToBytes32(account), 0, 0 ); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"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":"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":"AtomicSynthExchange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":false,"internalType":"address","name":"destination","type":"address"}],"name":"CacheUpdated","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":true,"internalType":"bytes32","name":"trackingCode","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"toCurrencyKey","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"toAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"ExchangeTracking","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":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":"CONTRACT_NAME","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"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":"anySynthOrSNXRateIsInvalid","outputs":[{"internalType":"bool","name":"anyRateInvalid","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":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"burnSecondary","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"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":"emitAtomicSynthExchange","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":"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":"bytes32","name":"trackingCode","type":"bytes32"},{"internalType":"bytes32","name":"toCurrencyKey","type":"bytes32"},{"internalType":"uint256","name":"toAmount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"emitExchangeTracking","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":"bytes32","name":"sourceCurrencyKey","type":"bytes32"},{"internalType":"uint256","name":"sourceAmount","type":"uint256"},{"internalType":"bytes32","name":"destinationCurrencyKey","type":"bytes32"},{"internalType":"bytes32","name":"trackingCode","type":"bytes32"},{"internalType":"uint256","name":"minAmount","type":"uint256"}],"name":"exchangeAtomically","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":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"},{"internalType":"address","name":"rewardAddress","type":"address"},{"internalType":"bytes32","name":"trackingCode","type":"bytes32"}],"name":"exchangeOnBehalfWithTracking","outputs":[{"internalType":"uint256","name":"amountReceived","type":"uint256"}],"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"},{"internalType":"address","name":"rewardAddress","type":"address"},{"internalType":"bytes32","name":"trackingCode","type":"bytes32"}],"name":"exchangeWithTracking","outputs":[{"internalType":"uint256","name":"amountReceived","type":"uint256"}],"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"},{"internalType":"address","name":"rewardAddress","type":"address"},{"internalType":"bytes32","name":"trackingCode","type":"bytes32"}],"name":"exchangeWithTrackingForInitiator","outputs":[{"internalType":"uint256","name":"amountReceived","type":"uint256"}],"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"},{"internalType":"bytes32","name":"trackingCode","type":"bytes32"}],"name":"exchangeWithVirtual","outputs":[{"internalType":"uint256","name":"amountReceived","type":"uint256"},{"internalType":"contract IVirtualSynth","name":"vSynth","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getFirstNonZeroEscrowIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"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"}],"name":"liquidateDelinquentAccount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"escrowStartIndex","type":"uint256"}],"name":"liquidateDelinquentAccountEscrowIndex","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"liquidateSelf","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":[{"internalType":"address","name":"account","type":"address"}],"name":"migrateAccountBalances","outputs":[{"internalType":"uint256","name":"totalEscrowRevoked","type":"uint256"},{"internalType":"uint256","name":"totalLiquidBalance","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"migrateEscrowBalanceToRewardEscrowV2","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"migrateEscrowContractBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintSecondary","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintSecondaryRewards","outputs":[],"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":false,"inputs":[],"name":"rebuildCache","outputs":[],"payable":false,"stateMutability":"nonpayable","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":[],"name":"resolverAddressesRequired","outputs":[{"internalType":"bytes32[]","name":"addresses","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":[{"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 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":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":"totalIssuedSynthsExcludeOtherCollateral","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"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200648838038062006488833981016040819052620000349162000315565b84848484848085856040518060400160405280601781526020017f53796e746865746978204e6574776f726b20546f6b656e000000000000000000815250604051806040016040528060038152602001620a69cb60eb1b81525086601289868160006001600160a01b0316816001600160a01b03161415620000d35760405162461bcd60e51b8152600401620000ca9062000463565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0383161781556040517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91620001209184906200042b565b60405180910390a1506000546001600160a01b0316620001545760405162461bcd60e51b8152600401620000ca9062000451565b600280546001600160a01b0319166001600160a01b0383161790556040517ffc80377ca9c49cc11ae6982f390a42db976d5530af7c43889264b13fbbd7c57e90620001a19083906200041b565b60405180910390a150600480546001600160a01b0319166001600160a01b0388161790558451620001da90600590602088019062000243565b508351620001f090600690602087019062000243565b50506007919091556008805460ff191660ff90921691909117610100600160a81b0319166101006001600160a01b0397909716969096029590951790945550620004e19c50505050505050505050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200028657805160ff1916838001178555620002b6565b82800160010185558215620002b6579182015b82811115620002b657825182559160200191906001019062000299565b50620002c4929150620002c8565b5090565b620002e591905b80821115620002c45760008155600101620002cf565b90565b8051620002f581620004b1565b92915050565b8051620002f581620004cb565b8051620002f581620004d6565b600080600080600060a086880312156200032e57600080fd5b60006200033c8888620002e8565b95505060206200034f88828901620002fb565b94505060406200036288828901620002e8565b9350506060620003758882890162000308565b92505060806200038888828901620002e8565b9150509295509295909350565b620003a081620004a4565b82525050565b620003a0816200047e565b6000620003c060118362000475565b7013dddb995c881b5d5cdd081899481cd95d607a1b815260200192915050565b6000620003ef60198362000475565b7f4f776e657220616464726573732063616e6e6f74206265203000000000000000815260200192915050565b60208101620002f5828462000395565b604081016200043b828562000395565b6200044a6020830184620003a6565b9392505050565b60208082528101620002f581620003b1565b60208082528101620002f581620003e0565b90815260200190565b6000620002f58262000498565b6000620002f5826200047e565b6001600160a01b031690565b6000620002f5826200048b565b620004bc816200047e565b8114620004c857600080fd5b50565b620004bc816200048b565b620004bc81620002e5565b615f9780620004f16000396000f3fe608060405234801561001057600080fd5b50600436106104495760003560e01c80636c00f310116102415780639f7698071161013b578063d37c4d8b116100c3578063e8e09b8b11610087578063e8e09b8b146108f3578063e90dd9e214610906578063ec5568891461090e578063edef719a146106b0578063ee52a2f31461091657610449565b8063d37c4d8b146108aa578063d67bdd25146108bd578063d8a1f76f146108c5578063dbf63340146108d8578063dd62ed3e146108e057610449565b8063ace88afd1161010a578063ace88afd14610856578063af086c7e14610869578063bc67f83214610871578063c2bf388014610884578063c836fa0a1461089757610449565b80639f7698071461080a578063a311c7c21461081d578063a5fdc5de14610830578063a9059cbb1461084357610449565b806384358843116101c95780639324cac71161018d5780639324cac7146107cc57806395d89b41146107d457806397107d6d146107dc5780639741fb22146107ef578063987757dd146107f757610449565b80638435884314610775578063899ffef4146107965780638a2900141461079e5780638da5cb5b146107b157806391e56b68146107b957610449565b806372cb051f1161021057806372cb051f1461072a578063741853601461073f57806379ba509714610747578063835e119c1461074f57806383d625d41461076257610449565b80636c00f310146106de5780636f01a986146106f1578063704e7b851461070457806370a082311461071757610449565b80632c955fa71161035257806344b3e923116102da5780635e22846a1161029e5780635e22846a14610695578063614d08f8146106a8578063666ed4f1146106b05780636ac0bf9c146106c35780636b76222f146106d657610449565b806344b3e9231461064a5780634e99bda91461065d578063528c7efb1461066557806353a47bb71461066d5780635af090ef1461068257610449565b806330ead7601161032157806330ead760146105f6578063313ce56714610609578063320223db1461061157806332608039146106245780633e89b9e51461063757610449565b80632c955fa7146105a85780632d3169eb146105bb5780632e0f2625146105ce5780632f7206ce146105e357610449565b806316b2213f116103d557806323b872dd116103a457806323b872dd1461055f5780632621716f14610572578063295da87d146105855780632a905318146105985780632af64bd3146105a057610449565b806316b2213f1461052957806318160ddd1461053c57806318821400146105445780631fce304d1461054c57610449565b8063095ea7b31161041c578063095ea7b3146104ab5780630e30963c146104cb5780631137aedf146104ec5780631249c58b1461050e5780631627540c1461051657610449565b806303fbc5471461044e57806304f3bcec1461045857806305b3c1c91461047657806306fdde0314610496575b600080fd5b610456610929565b005b610460610b16565b60405161046d9190615bdf565b60405180910390f35b6104896104843660046147a5565b610b2a565b60405161046d9190615a40565b61049e610bb7565b60405161046d9190615bed565b6104be6104b9366004614868565b610c45565b60405161046d9190615a32565b6104de6104d9366004614abb565b610cd2565b60405161046d929190615de8565b6104ff6104fa3660046147a5565b610de1565b60405161046d93929190615ae4565b6104be610e76565b6104566105243660046147a5565b611230565b6104896105373660046147a5565b61128e565b6104896112c3565b61049e6112c9565b6104be61055a366004614a7f565b611302565b6104be61056d36600461481b565b611397565b6104896105803660046147a5565b6113d6565b610456610593366004614a7f565b6115b7565b61049e611638565b6104be611657565b6104566105b63660046147a5565b611773565b6104566105c9366004614abb565b6117bf565b6105d6611875565b60405161046d9190615e2b565b6104566105f13660046149b2565b61187a565b610489610604366004614afe565b61193c565b6105d66119fa565b61045661061f3660046147a5565b611a03565b610460610632366004614a7f565b611a4f565b610489610645366004614a7f565b611ad4565b610489610658366004614b73565b611b0c565b6104be611bc4565b6104be611c43565b610675611ede565b60405161046d91906157d9565b610489610690366004614afe565b611eed565b6104be6106a33660046147a5565b611f4d565b610489611f79565b6104566106be366004614868565b611f89565b6104896106d13660046147a5565b611f95565b61045661209d565b6104566106ec3660046149b2565b612148565b6104566106ff366004614898565b61219b565b6104be610712366004614868565b612254565b6104896107253660046147a5565b61227f565b6107326122b1565b60405161046d9190615a21565b61045661232f565b610456612481565b61046061075d366004614a7f565b61251d565b610489610770366004614a7f565b612552565b6107886107833660046147a5565b61258a565b60405161046d929190615a6a565b6107326128bf565b6104566107ac366004614a7f565b612953565b61067561299d565b6104896107c736600461492b565b6129ac565b610489612a6c565b61049e612a77565b6104566107ea3660046147a5565b612ad2565b610456612b25565b6104ff610805366004614a7f565b612b9e565b610456610818366004614be8565b612c14565b61048961082b3660046147a5565b612c40565b61048961083e3660046147a5565b612c75565b6104be610851366004614868565b612caa565b610456610864366004614898565b612cf4565b610456612d41565b61045661087f3660046147a5565b612d8a565b610456610892366004614868565b612db4565b6104896108a53660046148ca565b612e38565b6104896108b8366004614868565b612ef6565b610675612f7d565b6104566108d3366004614a7f565b612f8c565b610489612f94565b6104896108ee3660046147e1565b61300e565b610456610901366004614868565b613042565b610460613090565b61046061309f565b610489610924366004614add565b6130ae565b61093161316a565b60085460405163dacb2d0160e01b815260009161010090046001600160a01b03169063dacb2d019061096590600401615dca565b60206040518083038186803b15801561097d57600080fd5b505afa158015610991573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109b591908101906147c3565b60085460405163dacb2d0160e01b81529192506000916101009091046001600160a01b03169063dacb2d01906109ed90600401615d42565b60206040518083038186803b158015610a0557600080fd5b505afa158015610a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610a3d91908101906147c3565b9050816001600160a01b0316816001600160a01b03161415610a7a5760405162461bcd60e51b8152600401610a7190615dba565b60405180910390fd5b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a0823191610aac918791016157d9565b60206040518083038186803b158015610ac457600080fd5b505afa158015610ad8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610afc9190810190614a9d565b90508015610b1157610b0f838383613194565b505b505050565b60085461010090046001600160a01b031681565b6000610b34613370565b6001600160a01b03166305b3c1c9836040518263ffffffff1660e01b8152600401610b5f91906157d9565b60206040518083038186803b158015610b7757600080fd5b505afa158015610b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610baf9190810190614a9d565b90505b919050565b6005805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610c3d5780601f10610c1257610100808354040283529160200191610c3d565b820191906000526020600020905b815481529060010190602001808311610c2057829003601f168201915b505050505081565b6000610c4f613384565b60035460048054604051633691826360e21b81526001600160a01b03938416939091169163da46098c91610c89918591899189910161593f565b600060405180830381600087803b158015610ca357600080fd5b505af1158015610cb7573d6000803e3d6000fd5b50505050610cc68185856133c3565b60019150505b92915050565b6000808584610ce18282613443565b610ce9613384565b610cf16134a4565b6001600160a01b0316634f8633d2600360009054906101000a90046001600160a01b0316600360009054906101000a90046001600160a01b03168b8b8b600360009054906101000a90046001600160a01b03166001600360009054906101000a90046001600160a01b03168e6040518a63ffffffff1660e01b8152600401610d81999897969594939291906158ef565b6040805180830381600087803b158015610d9a57600080fd5b505af1158015610dae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610dd29190810190614c54565b93509350505094509492505050565b6000806000610dee613370565b6001600160a01b0316631137aedf856040518263ffffffff1660e01b8152600401610e1991906157d9565b60606040518083038186803b158015610e3157600080fd5b505afa158015610e45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610e699190810190614c84565b9250925092509193909250565b6000610e806134bb565b6000610e8a61350f565b6001600160a01b03161415610eb15760405162461bcd60e51b8152600401610a7190615ce5565b6000610ebb613530565b90506000610ec761350f565b90506000826001600160a01b031663cc5c095c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0457600080fd5b505afa158015610f18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f3c9190810190614a9d565b905060008111610f5e5760405162461bcd60e51b8152600401610a7190615d8d565b610f6a6000308361354c565b604051637e7961d760e01b81526000906001600160a01b03851690637e7961d790610f99908590600401615a40565b602060405180830381600087803b158015610fb357600080fd5b505af1158015610fc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610feb9190810190614a9d565b90506000610fff838363ffffffff61358f16565b600480546040516370a0823160e01b81529293506001600160a01b03169163b46310f691879161109b91869186916370a082319161103f918791016157d9565b60206040518083038186803b15801561105757600080fd5b505afa15801561106b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061108f9190810190614a9d565b9063ffffffff6135b716565b6040518363ffffffff1660e01b81526004016110b89291906159b7565b600060405180830381600087803b1580156110d257600080fd5b505af11580156110e6573d6000803e3d6000fd5b505050506110f530858361354c565b604051630b32e9c760e31b81526001600160a01b038516906359974e3890611121908490600401615a40565b602060405180830381600087803b15801561113b57600080fd5b505af115801561114f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506111739190810190614a61565b50600480546040516370a0823160e01b81526001600160a01b039091169163b46310f69133916111b391879186916370a082319161103f918791016157e7565b6040518363ffffffff1660e01b81526004016111d09291906157f5565b600060405180830381600087803b1580156111ea57600080fd5b505af11580156111fe573d6000803e3d6000fd5b5050505061120d30338461354c565b600754611220908463ffffffff6135b716565b6007555060019450505050505b90565b61123861316a565b600180546001600160a01b0319166001600160a01b0383161790556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce22906112839083906157d9565b60405180910390a150565b6000611298613370565b6001600160a01b03166316b2213f836040518263ffffffff1660e01b8152600401610b5f91906157d9565b60075481565b6040518060400160405280601781526020017f53796e746865746978204e6574776f726b20546f6b656e00000000000000000081525081565b60008061130d6134a4565b6003546040516301670a7b60e21b81526001600160a01b039283169263059c29ec926113409291169087906004016159b7565b60206040518083038186803b15801561135857600080fd5b505afa15801561136c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506113909190810190614a9d565b1192915050565b60006113a16135dc565b6113a9613631565b6113b38483613671565b506003546113cc906001600160a01b0316858585613942565b90505b9392505050565b6000806113e16139ee565b6001600160a01b031663204b676a846040518263ffffffff1660e01b815260040161140c91906157d9565b60206040518083038186803b15801561142457600080fd5b505afa158015611438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061145c9190810190614a9d565b90506000611468614670565b60005b8381101561159e5761147b6139ee565b6001600160a01b031663ae58254987836040518363ffffffff1660e01b81526004016114a89291906159b7565b60206040518083038186803b1580156114c057600080fd5b505afa1580156114d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506114f89190810190614a9d565b92506115026139ee565b6001600160a01b03166345626bd687856040518363ffffffff1660e01b815260040161152f9291906159b7565b604080518083038186803b15801561154657600080fd5b505afa15801561155a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061157e9190810190614c06565b602081015190925015611596579350610bb292505050565b60010161146b565b5060405162461bcd60e51b8152600401610a7190615c58565b6115bf6134bb565b6115c7613384565b6115cf613370565b60035460405163b06e8c6560e01b81526001600160a01b039283169263b06e8c65926116029291169085906004016159b7565b600060405180830381600087803b15801561161c57600080fd5b505af1158015611630573d6000803e3d6000fd5b505050505b50565b604051806040016040528060038152602001620a69cb60eb1b81525081565b600060606116636128bf565b905060005b815181101561176a57600082828151811061167f57fe5b602090810291909101810151600081815260099092526040918290205460085492516321f8a72160e01b81529193506001600160a01b0390811692610100900416906321f8a721906116d5908590600401615a40565b60206040518083038186803b1580156116ed57600080fd5b505afa158015611701573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061172591908101906147c3565b6001600160a01b031614158061175057506000818152600960205260409020546001600160a01b0316155b15611761576000935050505061122d565b50600101611668565b50600191505090565b61177b6134bb565b611783613384565b61178b613370565b60035460405163159fa0d560e11b81526001600160a01b0392831692632b3f41aa9261160292869290911690600401615810565b6117c7613a0a565b6002546040516001600160a01b039091169063907dff97906117f190869086908690602001615ae4565b604051602081830303815290604052600260405161180e90615761565b6040519081900381206001600160e01b031960e086901b16825261183d9392918a906000908190600401615b5e565b600060405180830381600087803b15801561185757600080fd5b505af115801561186b573d6000803e3d6000fd5b5050505050505050565b601281565b611882613a0a565b6002546040516001600160a01b039091169063907dff97906118b09088908890889088908890602001615a98565b60405160208183030381529060405260026040516118cd9061574b565b60405180910390206118de8b613a42565b6000806040518763ffffffff1660e01b815260040161190296959493929190615b5e565b600060405180830381600087803b15801561191c57600080fd5b505af1158015611930573d6000803e3d6000fd5b50505050505050505050565b6000858461194a8282613443565b611952613384565b61195a6134a4565b6003546040516327c319e960e11b81526001600160a01b0392831692634f8633d29261199c9291169081908d908d908d9084906000908f908f906004016158ef565b6040805180830381600087803b1580156119b557600080fd5b505af11580156119c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506119ed9190810190614c54565b5098975050505050505050565b60085460ff1681565b611a0b6134bb565b611a13613384565b611a1b613370565b60035460405163fd864ccf60e01b81526001600160a01b039283169263fd864ccf9261160292869290911690600401615810565b6000611a59613370565b6001600160a01b03166332608039836040518263ffffffff1660e01b8152600401611a849190615a40565b60206040518083038186803b158015611a9c57600080fd5b505afa158015611ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610baf9190810190614bca565b6000611ade613370565b6001600160a01b0316637b1001b78360016040518363ffffffff1660e01b8152600401610b5f929190615a5c565b60008584611b1a8282613443565b611b22613384565b611b2a6134a4565b60035460405162674ed160e71b81526001600160a01b03928316926333a7688092611b66929116908c908c908c9084908d908d906004016159c5565b602060405180830381600087803b158015611b8057600080fd5b505af1158015611b94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611bb89190810190614a9d565b98975050505050505050565b6000611bce613370565b6001600160a01b0316634e99bda96040518163ffffffff1660e01b815260040160206040518083038186803b158015611c0657600080fd5b505afa158015611c1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611c3e9190810190614a61565b905090565b6000611c4d613631565b611c55613384565b6008546040516321f8a72160e01b815260009161010090046001600160a01b0316906321f8a72190611c9a906b131959d858de53585c9ad95d60a21b90600401615a40565b60206040518083038186803b158015611cb257600080fd5b505afa158015611cc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611cea91908101906147c3565b6001600160a01b031614611d105760405162461bcd60e51b8152600401610a7190615d15565b6003546001600160a01b0316611d24613a4e565b6001600160a01b031663c00007b0826040518263ffffffff1660e01b8152600401611d4f91906157d9565b600060405180830381600087803b158015611d6957600080fd5b505af1158015611d7d573d6000803e3d6000fd5b50505050600080611d8c613370565b6001600160a01b03166372c658168460016040518363ffffffff1660e01b8152600401611dba92919061599c565b606060405180830381600087803b158015611dd457600080fd5b505af1158015611de8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611e0c9190810190614c84565b509150915060008111611e315760405162461bcd60e51b8152600401610a7190615d70565b611e3d83838386613a6d565b6000611e5184611e4b613a4e565b85613ae9565b905080611e705760405162461bcd60e51b8152600401610a7190615d05565b611e78613a4e565b6001600160a01b0316633c6b16ab846040518263ffffffff1660e01b8152600401611ea39190615a40565b600060405180830381600087803b158015611ebd57600080fd5b505af1158015611ed1573d6000803e3d6000fd5b5092965050505050505090565b6001546001600160a01b031681565b60008584611efb8282613443565b611f03613384565b611f0b6134a4565b6003546040516327c319e960e11b81526001600160a01b0392831692634f8633d29261199c9291169081908d908d908d9032906000908f908f90600401615869565b6000611f57613631565b611f5f613384565b600354610baf9083906000906001600160a01b0316613af6565b680a6f2dce8d0cae8d2f60bb1b81565b611f91613ef8565b5050565b6000611f9f613370565b600480546040516370a0823160e01b81526001600160a01b0393841693636bed0415938793909116916370a0823191611fda918591016157d9565b60206040518083038186803b158015611ff257600080fd5b505afa158015612006573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061202a9190810190614a9d565b6040518363ffffffff1660e01b81526004016120479291906159b7565b604080518083038186803b15801561205e57600080fd5b505afa158015612072573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506120969190810190614c24565b5092915050565b6120a561316a565b6004546000906001600160a01b03166370a082316120c1613f10565b6040518263ffffffff1660e01b81526004016120dd91906157d9565b60206040518083038186803b1580156120f557600080fd5b505afa158015612109573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061212d9190810190614a9d565b9050611f9161213a613f10565b6121426139ee565b83613194565b612150613a0a565b6002546040516001600160a01b039091169063907dff979061217e9088908890889088908890602001615a98565b60405160208183030381529060405260026040516118cd9061578c565b6121a3613a0a565b6002546040516001600160a01b039091169063907dff97906121cb9085908590602001615a6a565b60405160208183030381529060405260026040516121e8906157a2565b60405180910390206121f988613a42565b6000806040518763ffffffff1660e01b815260040161221d96959493929190615b5e565b600060405180830381600087803b15801561223757600080fd5b505af115801561224b573d6000803e3d6000fd5b50505050505050565b600061225e613631565b612266613384565b6003546113cf90849084906001600160a01b0316613af6565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a0823191610b5f918691016157d9565b60606122bb613370565b6001600160a01b03166372cb051f6040518163ffffffff1660e01b815260040160006040518083038186803b1580156122f357600080fd5b505afa158015612307573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c3e9190810190614a2c565b60606123396128bf565b905060005b8151811015611f9157600082828151811061235557fe5b602002602001015190506000600860019054906101000a90046001600160a01b03166001600160a01b031663dacb2d01838460405160200161239791906157c3565b6040516020818303038152906040526040518363ffffffff1660e01b81526004016123c3929190615a78565b60206040518083038186803b1580156123db57600080fd5b505afa1580156123ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061241391908101906147c3565b6000838152600960205260409081902080546001600160a01b0319166001600160a01b038416179055519091507f88a93678a3692f6789d9546fc621bf7234b101ddb7d4fe479455112831b8aa689061246f9084908490615a4e565b60405180910390a1505060010161233e565b6001546001600160a01b031633146124ab5760405162461bcd60e51b8152600401610a7190615c1b565b6000546001546040517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c926124ee926001600160a01b0391821692911690615810565b60405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000612527613370565b6001600160a01b031663835e119c836040518263ffffffff1660e01b8152600401611a849190615a40565b600061255c613370565b6001600160a01b0316637b1001b78360006040518363ffffffff1660e01b8152600401610b5f929190615a5c565b600080612595613631565b6008546040516321f8a72160e01b815260009161010090046001600160a01b0316906321f8a721906125e49075446562744d69677261746f724f6e457468657265756d60501b90600401615a40565b60206040518083038186803b1580156125fc57600080fd5b505afa158015612610573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061263491908101906147c3565b9050336001600160a01b03821614806126f057506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a7219061268b906b131959d858de53585c9ad95d60a21b90600401615a40565b60206040518083038186803b1580156126a357600080fd5b505afa1580156126b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506126db91908101906147c3565b6001600160a01b0316336001600160a01b0316145b61270c5760405162461bcd60e51b8152600401610a7190615d25565b600480546040516370a0823160e01b81526001600160a01b03909116916370a082319161273b918891016157d9565b60206040518083038186803b15801561275357600080fd5b505afa158015612767573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061278b9190810190614a9d565b915081156127c15760006127a0853385613ae9565b9050806127bf5760405162461bcd60e51b8152600401610a7190615ca5565b505b6127c96139ee565b6001600160a01b031663326a3cfb856040518263ffffffff1660e01b81526004016127f491906157d9565b60206040518083038186803b15801561280c57600080fd5b505afa158015612820573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506128449190810190614a9d565b925082156128b9576128546139ee565b6001600160a01b031663de065f6785338660006040518563ffffffff1660e01b8152600401612886949392919061582b565b600060405180830381600087803b1580156128a057600080fd5b505af11580156128b4573d6000803e3d6000fd5b505050505b50915091565b6060806128ca613f2a565b6040805160028082526060808301845293945090916020830190803883390190505090506b526577617264457363726f7760a01b8160008151811061290b57fe5b6020026020010181815250506d537570706c795363686564756c6560901b8160018151811061293657fe5b60200260200101818152505061294c8282614073565b9250505090565b61295b6134bb565b612963613384565b61296b613370565b6003546040516285c0d160e31b81526001600160a01b039283169263042e0688926116029291169085906004016159b7565b6000546001600160a01b031681565b600085846129ba8282613443565b6129c2613384565b6129ca6134a4565b6003546040516327c319e960e11b81526001600160a01b0392831692634f8633d292612a0d928e92909116908d908d908d9085906000908f908f906004016158ef565b6040805180830381600087803b158015612a2657600080fd5b505af1158015612a3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612a5e9190810190614c54565b509998505050505050505050565b631cd554d160e21b81565b6006805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610c3d5780601f10610c1257610100808354040283529160200191610c3d565b612ada61316a565b600280546001600160a01b0319166001600160a01b0383161790556040517ffc80377ca9c49cc11ae6982f390a42db976d5530af7c43889264b13fbbd7c57e906112839083906157e7565b612b2d6134bb565b612b35613384565b612b3d613370565b6003546040516324beb82560e11b81526001600160a01b039283169263497d704a92612b6e929116906004016157d9565b600060405180830381600087803b158015612b8857600080fd5b505af1158015610b0f573d6000803e3d6000fd5b565b6000806000612bab613384565b612bb36134a4565b6003546040516306c5a00b60e21b81526001600160a01b0392831692631b16802c92612be69291169088906004016159b7565b606060405180830381600087803b158015612c0057600080fd5b505af1158015610e45573d6000803e3d6000fd5b612c1c614128565b600480546001600160a01b0319166001600160a01b03831617905561163581614196565b6000612c4a613370565b6001600160a01b031663a311c7c2836040518263ffffffff1660e01b8152600401610b5f91906157d9565b6000612c7f613370565b6001600160a01b031663a5fdc5de836040518263ffffffff1660e01b8152600401610b5f91906157d9565b6000612cb46135dc565b612cbc613631565b600354612cd2906001600160a01b031683613671565b50600354612cea906001600160a01b03168484613ae9565b5060019392505050565b612cfc613a0a565b6002546040516001600160a01b039091169063907dff9790612d249085908590602001615a6a565b60405160208183030381529060405260026040516121e890615756565b612d496134bb565b612d51613384565b612d59613370565b60035460405163644bb89960e11b81526001600160a01b039283169263c897713292612b6e929116906004016157d9565b612d92614208565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612dbc6134bb565b612dc4613384565b612dcc613370565b600354604051632694552d60e21b81526001600160a01b0392831692639a5154b492612e0292879290911690869060040161593f565b600060405180830381600087803b158015612e1c57600080fd5b505af1158015612e30573d6000803e3d6000fd5b505050505050565b60008382612e468282613443565b612e4e613384565b612e566134a4565b6003546040516327c319e960e11b81526001600160a01b0392831692634f8633d292612e99928c92909116908b908b908b908590600090829082906004016158ef565b6040805180830381600087803b158015612eb257600080fd5b505af1158015612ec6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612eea9190810190614c54565b50979650505050505050565b6000612f00613370565b6001600160a01b031663d37c4d8b84846040518363ffffffff1660e01b8152600401612f2d9291906159b7565b60206040518083038186803b158015612f4557600080fd5b505afa158015612f59573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506113cf9190810190614a9d565b6003546001600160a01b031681565b611635613ef8565b6000612f9e613370565b6001600160a01b031663dbf633406040518163ffffffff1660e01b815260040160206040518083038186803b158015612fd657600080fd5b505afa158015612fea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611c3e9190810190614a9d565b60048054604051636eb1769f60e11b81526000926001600160a01b039092169163dd62ed3e91612f2d918791879101615810565b61304a6134bb565b613052613384565b61305a613370565b60035460405163227635b160e11b81526001600160a01b03928316926344ec6b6292612e0292879290911690869060040161593f565b6004546001600160a01b031681565b6002546001600160a01b031681565b600083826130bc8282613443565b6130c4613384565b6130cc6134a4565b6003546040516327c319e960e11b81526001600160a01b0392831692634f8633d29261310e9291169081908b908b908b908490600090829082906004016158ef565b6040805180830381600087803b15801561312757600080fd5b505af115801561313b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061315f9190810190614c54565b509695505050505050565b6000546001600160a01b03163314612b9c5760405162461bcd60e51b8152600401610a7190615cf5565b60006001600160a01b038316158015906131b757506001600160a01b0383163014155b80156131d157506002546001600160a01b03848116911614155b6131ed5760405162461bcd60e51b8152600401610a7190615bfe565b600480546040516370a0823160e01b81526001600160a01b039091169163b46310f691879161328891879186916370a082319161322c918791016157d9565b60206040518083038186803b15801561324457600080fd5b505afa158015613258573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061327c9190810190614a9d565b9063ffffffff61358f16565b6040518363ffffffff1660e01b81526004016132a59291906159b7565b600060405180830381600087803b1580156132bf57600080fd5b505af11580156132d3573d6000803e3d6000fd5b5050600480546040516370a0823160e01b81526001600160a01b03909116935063b46310f69250869161331691879186916370a082319161103f918791016157d9565b6040518363ffffffff1660e01b81526004016133339291906159b7565b600060405180830381600087803b15801561334d57600080fd5b505af1158015613361573d6000803e3d6000fd5b50505050612cea84848461354c565b6000611c3e6524b9b9bab2b960d11b614232565b6002546001600160a01b031633148015906133aa57506003546001600160a01b03163314155b15612b9c57600380546001600160a01b03191633179055565b6002546040516001600160a01b039091169063907dff97906133e9908490602001615a40565b604051602081830303815290604052600360405161340690615797565b604051809103902061341788613a42565b61342088613a42565b60006040518763ffffffff1660e01b815260040161221d96959493929190615b98565b61344b61428f565b6001600160a01b0316631ce00ba283836040518363ffffffff1660e01b8152600401613478929190615a6a565b60006040518083038186803b15801561349057600080fd5b505afa158015612e30573d6000803e3d6000fd5b6000611c3e6822bc31b430b733b2b960b91b614232565b6134c361428f565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b1580156134fb57600080fd5b505afa158015610b0f573d6000803e3d6000fd5b6000611c3e722932bbb0b93239a234b9ba3934b13aba34b7b760691b614232565b6000611c3e6d537570706c795363686564756c6560901b614232565b6002546040516001600160a01b039091169063907dff9790613572908490602001615a40565b6040516020818303038152906040526003604051613406906157ce565b6000828211156135b15760405162461bcd60e51b8152600401610a7190615c95565b50900390565b6000828201838110156113cf5760405162461bcd60e51b8152600401610a7190615c68565b6002546001600160a01b03163314156135f457612b9c565b6135fd336142a9565b1561361957600380546001600160a01b03191633179055612b9c565b60405162461bcd60e51b8152600401610a7190615d9d565b61363961428f565b6001600160a01b031663086dabd16040518163ffffffff1660e01b815260040160006040518083038186803b1580156134fb57600080fd5b6008546040516321f8a72160e01b815260009182916101009091046001600160a01b0316906321f8a721906136b9906b131959d858de53585c9ad95d60a21b90600401615a40565b60206040518083038186803b1580156136d157600080fd5b505afa1580156136e5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061370991908101906147c3565b6003549091506001600160a01b03161580159061373357506003546001600160a01b038281169116145b8061374f5750806001600160a01b0316846001600160a01b0316145b1561375e576001915050610ccc565b6000613768613370565b6001600160a01b031663d37c4d8b86631cd554d160e21b6040518363ffffffff1660e01b815260040161379c9291906159b7565b60206040518083038186803b1580156137b457600080fd5b505afa1580156137c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506137ec9190810190614a9d565b1115610cc6576000806137fd613370565b600480546040516370a0823160e01b81526001600160a01b0393841693636bed0415938b93909116916370a0823191613838918591016157d9565b60206040518083038186803b15801561385057600080fd5b505afa158015613864573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506138889190810190614a9d565b6040518363ffffffff1660e01b81526004016138a59291906159b7565b604080518083038186803b1580156138bc57600080fd5b505afa1580156138d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506138f49190810190614c24565b91509150818511156139185760405162461bcd60e51b8152600401610a7190615cc5565b80156139365760405162461bcd60e51b8152600401610a7190615cd5565b50600195945050505050565b60048054604051636eb1769f60e11b81526000926001600160a01b039092169163da46098c9187918991613988918891879163dd62ed3e9161322c918891889101615810565b6040518463ffffffff1660e01b81526004016139a69392919061593f565b600060405180830381600087803b1580156139c057600080fd5b505af11580156139d4573d6000803e3d6000fd5b505050506139e3848484613194565b90505b949350505050565b6000611c3e6d2932bbb0b93222b9b1b937bbab1960911b614232565b613a126134a4565b6001600160a01b0316336001600160a01b031614612b9c5760405162461bcd60e51b8152600401610a7190615c48565b6001600160a01b031690565b6000611c3e704c697175696461746f725265776172647360781b614232565b6002546040516001600160a01b039091169063907dff9790613a9790869086908690602001615e03565b6040516020818303038152906040526002604051613ab4906157b8565b6040518091039020613ac589613a42565b6000806040518763ffffffff1660e01b815260040161183d96959493929190615b5e565b60006113cc848484613194565b6000613b00613a4e565b6001600160a01b031663c00007b0856040518263ffffffff1660e01b8152600401613b2b91906157d9565b600060405180830381600087803b158015613b4557600080fd5b505af1158015613b59573d6000803e3d6000fd5b505050506000806000613b6a613370565b6001600160a01b03166372c658168860006040518363ffffffff1660e01b8152600401613b9892919061599c565b606060405180830381600087803b158015613bb257600080fd5b505af1158015613bc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250613bea9190810190614c84565b919450925090508015613c6357613bff6139ee565b6001600160a01b031663de065f678889848a6040518563ffffffff1660e01b8152600401613c309493929190615967565b600060405180830381600087803b158015613c4a57600080fd5b505af1158015613c5e573d6000803e3d6000fd5b505050505b613c6f87848488613a6d565b6000613c79614658565b6001600160a01b0316638074b3726040518163ffffffff1660e01b815260040160206040518083038186803b158015613cb157600080fd5b505afa158015613cc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250613ce99190810190614a9d565b90506000613cf5614658565b6001600160a01b03166331e4e0306040518163ffffffff1660e01b815260040160206040518083038186803b158015613d2d57600080fd5b505afa158015613d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250613d659190810190614a9d565b90506000613d71614658565b6001600160a01b0316635616c9578b6040518263ffffffff1660e01b8152600401613d9c91906157d9565b60206040518083038186803b158015613db457600080fd5b505afa158015613dc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250613dec91908101906147c3565b90506000613dfb8b8386613ae9565b905080613e1a5760405162461bcd60e51b8152600401610a7190615c78565b6000613e278c8b86613ae9565b905080613e465760405162461bcd60e51b8152600401610a7190615d60565b8715613ee6576000613e608d613e5a613a4e565b8b613ae9565b905080613e7f5760405162461bcd60e51b8152600401610a7190615d05565b613e87613a4e565b6001600160a01b0316633c6b16ab8a6040518263ffffffff1660e01b8152600401613eb29190615a40565b600060405180830381600087803b158015613ecc57600080fd5b505af1158015613ee0573d6000803e3d6000fd5b50505050505b5060019b9a5050505050505050505050565b60405162461bcd60e51b8152600401610a7190615cb5565b6000611c3e6b526577617264457363726f7760a01b614232565b60408051600780825261010082019092526060916020820160e0803883390190505090506b53797374656d53746174757360a01b81600081518110613f6b57fe5b6020026020010181815250506822bc31b430b733b2b960b91b81600181518110613f9157fe5b6020026020010181815250506524b9b9bab2b960d11b81600281518110613fb457fe5b602002602001018181525050722932bbb0b93239a234b9ba3934b13aba34b7b760691b81600381518110613fe457fe5b602002602001018181525050704c697175696461746f725265776172647360781b8160048151811061401257fe5b602002602001018181525050692634b8bab4b230ba37b960b11b8160058151811061403957fe5b6020026020010181815250506d2932bbb0b93222b9b1b937bbab1960911b8160068151811061406457fe5b60200260200101818152505090565b606081518351016040519080825280602002602001820160405280156140a3578160200160208202803883390190505b50905060005b83518110156140e5578381815181106140be57fe5b60200260200101518282815181106140d257fe5b60209081029190910101526001016140a9565b5060005b8251811015612096578281815181106140fe57fe5b602002602001015182828651018151811061411557fe5b60209081029190910101526001016140e9565b6002546001600160a01b0316331480159061414e57506003546001600160a01b03163314155b1561416657600380546001600160a01b031916331790555b6000546003546001600160a01b03908116911614612b9c5760405162461bcd60e51b8152600401610a7190615c38565b6002546040516001600160a01b039091169063907dff97906141bc9084906020016157d9565b60405160208183030381529060405260016040516141d9906157ad565b6040519081900381206001600160e01b031960e086901b16825261160293929160009081908190600401615aff565b6002546001600160a01b03163314612b9c5760405162461bcd60e51b8152600401610a7190615d9d565b60008181526009602090815260408083205490516001600160a01b0390911691821515916142629186910161576c565b604051602081830303815290604052906120965760405162461bcd60e51b8152600401610a719190615bed565b6000611c3e6b53797374656d53746174757360a01b614232565b6008546040516321f8a72160e01b815260009161010090046001600160a01b0316906321f8a721906142dd90600401615dad565b60206040518083038186803b1580156142f557600080fd5b505afa158015614309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061432d91908101906147c3565b6001600160a01b0316826001600160a01b031614806143de57506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a7219061437990600401615d35565b60206040518083038186803b15801561439157600080fd5b505afa1580156143a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506143c991908101906147c3565b6001600160a01b0316826001600160a01b0316145b8061447b57506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a7219061441690600401615c0e565b60206040518083038186803b15801561442e57600080fd5b505afa158015614442573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061446691908101906147c3565b6001600160a01b0316826001600160a01b0316145b8061451857506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a721906144b390600401615c88565b60206040518083038186803b1580156144cb57600080fd5b505afa1580156144df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061450391908101906147c3565b6001600160a01b0316826001600160a01b0316145b806145b557506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a7219061455090600401615c2b565b60206040518083038186803b15801561456857600080fd5b505afa15801561457c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506145a091908101906147c3565b6001600160a01b0316826001600160a01b0316145b80610baf57506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a721906145ed90600401615d80565b60206040518083038186803b15801561460557600080fd5b505afa158015614619573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061463d91908101906147c3565b6001600160a01b0316826001600160a01b0316149050919050565b6000611c3e692634b8bab4b230ba37b960b11b614232565b604080518082019091526000808252602082015290565b8035610ccc81615f1c565b8051610ccc81615f1c565b600082601f8301126146ae57600080fd5b81516146c16146bc82615e60565b615e39565b915081818352602084019350602081019050838560208402820111156146e657600080fd5b60005b8381101561471257816146fc8882614732565b84525060209283019291909101906001016146e9565b5050505092915050565b8051610ccc81615f30565b8035610ccc81615f39565b8051610ccc81615f39565b8051610ccc81615f42565b8035610ccc81615f42565b60006040828403121561476557600080fd5b61476f6040615e39565b9050600061477d848461479a565b825250602061478e84848301614732565b60208301525092915050565b8051610ccc81615f4b565b6000602082840312156147b757600080fd5b60006139e68484614687565b6000602082840312156147d557600080fd5b60006139e68484614692565b600080604083850312156147f457600080fd5b60006148008585614687565b925050602061481185828601614687565b9150509250929050565b60008060006060848603121561483057600080fd5b600061483c8686614687565b935050602061484d86828701614687565b925050604061485e86828701614727565b9150509250925092565b6000806040838503121561487b57600080fd5b60006148878585614687565b925050602061481185828601614727565b6000806000606084860312156148ad57600080fd5b60006148b98686614687565b935050602061484d86828701614727565b600080600080608085870312156148e057600080fd5b60006148ec8787614687565b94505060206148fd87828801614727565b935050604061490e87828801614727565b925050606061491f87828801614727565b91505092959194509250565b60008060008060008060c0878903121561494457600080fd5b60006149508989614687565b965050602061496189828a01614727565b955050604061497289828a01614727565b945050606061498389828a01614727565b935050608061499489828a01614687565b92505060a06149a589828a01614727565b9150509295509295509295565b60008060008060008060c087890312156149cb57600080fd5b60006149d78989614687565b96505060206149e889828a01614727565b95505060406149f989828a01614727565b9450506060614a0a89828a01614727565b9350506080614a1b89828a01614727565b92505060a06149a589828a01614687565b600060208284031215614a3e57600080fd5b815167ffffffffffffffff811115614a5557600080fd5b6139e68482850161469d565b600060208284031215614a7357600080fd5b60006139e6848461471c565b600060208284031215614a9157600080fd5b60006139e68484614727565b600060208284031215614aaf57600080fd5b60006139e68484614732565b60008060008060808587031215614ad157600080fd5b60006148ec8787614727565b600080600060608486031215614af257600080fd5b60006148b98686614727565b600080600080600060a08688031215614b1657600080fd5b6000614b228888614727565b9550506020614b3388828901614727565b9450506040614b4488828901614727565b9350506060614b5588828901614687565b9250506080614b6688828901614727565b9150509295509295909350565b600080600080600060a08688031215614b8b57600080fd5b6000614b978888614727565b9550506020614ba888828901614727565b9450506040614bb988828901614727565b9350506060614b5588828901614727565b600060208284031215614bdc57600080fd5b60006139e6848461473d565b600060208284031215614bfa57600080fd5b60006139e68484614748565b600060408284031215614c1857600080fd5b60006139e68484614753565b60008060408385031215614c3757600080fd5b6000614c438585614732565b92505060206148118582860161471c565b60008060408385031215614c6757600080fd5b6000614c738585614732565b92505060206148118582860161473d565b600080600060608486031215614c9957600080fd5b6000614ca58686614732565b9350506020614cb686828701614732565b925050604061485e86828701614732565b6000614cd38383614d55565b505060200190565b614ce481615ec2565b82525050565b614ce481615e94565b6000614cfe82615e87565b614d088185615e8b565b9350614d1383615e81565b8060005b83811015614d41578151614d2b8882614cc7565b9750614d3683615e81565b925050600101614d17565b509495945050505050565b614ce481615e9f565b614ce48161122d565b614ce4614d6a8261122d565b61122d565b6000614d7a82615e87565b614d848185615e8b565b9350614d94818560208601615ee6565b614d9d81615f12565b9093019392505050565b614ce481615ea4565b614ce481615ecd565b614ce481615edb565b6000614dcf601f83615e8b565b7f43616e6e6f74207472616e7366657220746f2074686973206164647265737300815260200192915050565b75446562744d69677261746f724f6e4f7074696d69736d60501b9052565b6000614e26603583615e8b565b7f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7581527402063616e20616363657074206f776e65727368697605c1b602082015260400192915050565b6e53796e746865746978457363726f7760881b9052565b6000614e94601383615e8b565b7227bbb732b91037b7363c90333ab731ba34b7b760691b815260200192915050565b6000614ec3601e83615e8b565b7f4f6e6c792045786368616e6765722063616e20696e766f6b6520746869730000815260200192915050565b6000614efc604483610bb2565b7f41746f6d696353796e746845786368616e676528616464726573732c6279746581527f7333322c75696e743235362c627974657333322c75696e743235362c616464726020820152636573732960e01b604082015260440192915050565b6000614f68601483615e8b565b73616c6c20656e747269657320617265207a65726f60601b815260200192915050565b6000614f98601b83615e8b565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6000614fd1602483615e8b565b7f466c616720726577617264207472616e7366657220646964206e6f742073756381526318d9595960e21b602082015260400192915050565b6b526577617264457363726f7760a01b9052565b600061502b601883615e8b565b7f4e657720657363726f77206164647265737320756e7365740000000000000000815260200192915050565b6000615064602883610bb2565b7f45786368616e67655265636c61696d28616464726573732c627974657333322c81526775696e743235362960c01b602082015260280192915050565b60006150ae601e83615e8b565b7f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815260200192915050565b60006150e7601383615e8b565b721cdb9e081d1c985b9cd9995c8819985a5b1959606a1b815260200192915050565b6000615116601b83615e8b565b7f43616e6e6f742062652072756e206f6e2074686973206c617965720000000000815260200192915050565b600061514f603183610bb2565b7f45786368616e6765547261636b696e6728627974657333322c627974657333328152702c75696e743235362c75696e743235362960781b602082015260310192915050565b60006151a2601183610bb2565b70026b4b9b9b4b7339030b2323932b9b99d1607d1b815260110192915050565b60006151cf603e83610bb2565b7f53796e746845786368616e676528616464726573732c627974657333322c756981527f6e743235362c627974657333322c75696e743235362c616464726573732900006020820152603e0192915050565b600061522e602683615e8b565b7f43616e6e6f74207472616e73666572207374616b6564206f7220657363726f778152650cac840a69cb60d31b602082015260400192915050565b6000615276601e83615e8b565b7f412073796e7468206f7220534e58207261746520697320696e76616c69640000815260200192915050565b60006152af601b83615e8b565b7f52657761726473446973747269627574696f6e206e6f74207365740000000000815260200192915050565b60006152e8602f83615e8b565b7f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726681526e37b936903a3434b99030b1ba34b7b760891b602082015260400192915050565b6000615339602483615e8b565b7f5472616e7366657220746f204c697175696461746f72526577617264732066618152631a5b195960e21b602082015260400192915050565b600061537f602183610bb2565b7f417070726f76616c28616464726573732c616464726573732c75696e743235368152602960f81b602082015260210192915050565b60006153c2601783615e8b565b7f4d757374206c6971756964617465207573696e67205633000000000000000000815260200192915050565b60006153fb602783610bb2565b7f45786368616e676552656261746528616464726573732c627974657333322c75815266696e743235362960c81b602082015260270192915050565b6000615444602483615e8b565b7f4f6e6c79204c3120446562744d69677261746f72206f72204c65676163794d618152631c9ad95d60e21b602082015260400192915050565b600061548a601a83610bb2565b7f546f6b656e5374617465557064617465642861646472657373290000000000008152601a0192915050565b60006154c3603283610bb2565b7f4163636f756e744c69717569646174656428616464726573732c75696e743235815271362c75696e743235362c616464726573732960701b602082015260320192915050565b6d2932bbb0b93222b9b1b937bbab1960911b9052565b600061552d601983610bb2565b7f5265736f6c766572206d697373696e67207461726765743a2000000000000000815260190192915050565b6000615566602983615e8b565b7f4c697175696461746520726577617264207472616e7366657220646964206e6f8152681d081cdd58d8d9595960ba1b602082015260400192915050565b60006155b1601583615e8b565b7463616e6e6f742073656c66206c697175696461746560581b815260200192915050565b6411195c1bdd60da1b9052565b60006155ef601583615e8b565b744e6f20737570706c79206973206d696e7461626c6560581b815260200192915050565b6000615620601883615e8b565b7f4f6c6420657363726f77206164647265737320756e7365740000000000000000815260200192915050565b6000615659602183610bb2565b7f5472616e7366657228616464726573732c616464726573732c75696e743235368152602960f81b602082015260210192915050565b600061569c601783615e8b565b7f4f6e6c79207468652070726f78792063616e2063616c6c000000000000000000815260200192915050565b7f53796e746865746978427269646765546f4f7074696d69736d000000000000009052565b60006156fa601e83615e8b565b7f63616e6e6f74206d69677261746520746f2073616d6520616464726573730000815260200192915050565b732932bbb0b93222b9b1b937bbab19233937bd32b760611b9052565b614ce481615ebc565b6000610ccc82614eef565b6000610ccc82615057565b6000610ccc82615142565b600061577782615195565b91506157838284614d5e565b50602001919050565b6000610ccc826151c2565b6000610ccc82615372565b6000610ccc826153ee565b6000610ccc8261547d565b6000610ccc826154b6565b600061577782615520565b6000610ccc8261564c565b60208101610ccc8284614cea565b60208101610ccc8284614cdb565b604081016158038285614cdb565b6113cf6020830184614d55565b6040810161581e8285614cea565b6113cf6020830184614cea565b608081016158398287614cea565b6158466020830186614cdb565b6158536040830185614d55565b6158606060830184614db9565b95945050505050565b6101208101615878828c614cea565b615885602083018b614cea565b615892604083018a614d55565b61589f6060830189614d55565b6158ac6080830188614d55565b6158b960a0830187614cdb565b6158c660c0830186614d4c565b6158d360e0830185614cea565b6158e1610100830184614d55565b9a9950505050505050505050565b61012081016158fe828c614cea565b61590b602083018b614cea565b615918604083018a614d55565b6159256060830189614d55565b6159326080830188614d55565b6158b960a0830187614cea565b6060810161594d8286614cea565b61595a6020830185614cea565b6139e66040830184614d55565b608081016159758287614cea565b6159826020830186614cea565b61598f6040830185614d55565b6158606060830184614d55565b604081016159aa8285614cea565b6113cf6020830184614d4c565b604081016158038285614cea565b60e081016159d3828a614cea565b6159e06020830189614d55565b6159ed6040830188614d55565b6159fa6060830187614d55565b615a076080830186614cea565b615a1460a0830185614d55565b611bb860c0830184614d55565b602080825281016113cf8184614cf3565b60208101610ccc8284614d4c565b60208101610ccc8284614d55565b6040810161581e8285614d55565b604081016159aa8285614d55565b604081016158038285614d55565b60408101615a868285614d55565b81810360208301526113cc8184614d6f565b60a08101615aa68288614d55565b615ab36020830187614d55565b615ac06040830186614d55565b615acd6060830185614d55565b615ada6080830184614cea565b9695505050505050565b60608101615af28286614d55565b61595a6020830185614d55565b60c08082528101615b108189614d6f565b9050615b1f6020830188614db9565b615b2c6040830187614d55565b615b396060830186614db0565b615b466080830185614db0565b615b5360a0830184614db0565b979650505050505050565b60c08082528101615b6f8189614d6f565b9050615b7e6020830188614db9565b615b8b6040830187614d55565b615b396060830186614d55565b60c08082528101615ba98189614d6f565b9050615bb86020830188614db9565b615bc56040830187614d55565b615bd26060830186614d55565b615b466080830185614d55565b60208101610ccc8284614da7565b602080825281016113cf8184614d6f565b60208082528101610baf81614dc2565b60208101610bb282614dfb565b60208082528101610baf81614e19565b60208101610bb282614e70565b60208082528101610baf81614e87565b60208082528101610baf81614eb6565b60208082528101610baf81614f5b565b60208082528101610baf81614f8b565b60208082528101610baf81614fc4565b60208101610bb28261500a565b60208082528101610baf816150a1565b60208082528101610baf816150da565b60208082528101610baf81615109565b60208082528101610baf81615221565b60208082528101610baf81615269565b60208082528101610baf816152a2565b60208082528101610baf816152db565b60208082528101610baf8161532c565b60208082528101610baf816153b5565b60208082528101610baf81615437565b60208101610bb28261550a565b60408101615d4f8261550a565b8181036020830152610baf8161501e565b60208082528101610baf81615559565b60208082528101610baf816155a4565b60208101610bb2826155d5565b60208082528101610baf816155e2565b60208082528101610baf8161568f565b60208101610bb2826156c8565b60208082528101610baf816156ed565b60408101615dd782615726565b8181036020830152610baf81615613565b60408101615df68285614d55565b6113cf6020830184614da7565b60608101615e118286614d55565b615e1e6020830185614d55565b6139e66040830184614cea565b60208101610ccc8284615742565b60405181810167ffffffffffffffff81118282101715615e5857600080fd5b604052919050565b600067ffffffffffffffff821115615e7757600080fd5b5060209081020190565b60200190565b5190565b90815260200190565b6000610baf82613a42565b151590565b6000610baf82615e94565b67ffffffffffffffff1690565b60ff1690565b6000610baf82615ea4565b6000610baf614d6a8361122d565b6000610baf8261122d565b60005b83811015615f01578181015183820152602001615ee9565b83811115610b0f5750506000910152565b601f01601f191690565b615f2581615e94565b811461163557600080fd5b615f2581615e9f565b615f258161122d565b615f2581615ea4565b615f2581615eaf56fea365627a7a723158204825395a7bccc95316825fe426192a6c5fd210c860e25765e28157068fc582e16c6578706572696d656e74616cf564736f6c63430005100040000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f0000000000000000000000005b1b5fea1b99d83ad479df0c222f0492385381dd000000000000000000000000e2163dd599067919d1e9108929b568bf41d3a4200000000000000000000000000000000000000000010f7997d2882ebe53a2cb800000000000000000000000004e3b31eb0e5cb73641ee1e65e7dcefe520ba3ef2
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106104495760003560e01c80636c00f310116102415780639f7698071161013b578063d37c4d8b116100c3578063e8e09b8b11610087578063e8e09b8b146108f3578063e90dd9e214610906578063ec5568891461090e578063edef719a146106b0578063ee52a2f31461091657610449565b8063d37c4d8b146108aa578063d67bdd25146108bd578063d8a1f76f146108c5578063dbf63340146108d8578063dd62ed3e146108e057610449565b8063ace88afd1161010a578063ace88afd14610856578063af086c7e14610869578063bc67f83214610871578063c2bf388014610884578063c836fa0a1461089757610449565b80639f7698071461080a578063a311c7c21461081d578063a5fdc5de14610830578063a9059cbb1461084357610449565b806384358843116101c95780639324cac71161018d5780639324cac7146107cc57806395d89b41146107d457806397107d6d146107dc5780639741fb22146107ef578063987757dd146107f757610449565b80638435884314610775578063899ffef4146107965780638a2900141461079e5780638da5cb5b146107b157806391e56b68146107b957610449565b806372cb051f1161021057806372cb051f1461072a578063741853601461073f57806379ba509714610747578063835e119c1461074f57806383d625d41461076257610449565b80636c00f310146106de5780636f01a986146106f1578063704e7b851461070457806370a082311461071757610449565b80632c955fa71161035257806344b3e923116102da5780635e22846a1161029e5780635e22846a14610695578063614d08f8146106a8578063666ed4f1146106b05780636ac0bf9c146106c35780636b76222f146106d657610449565b806344b3e9231461064a5780634e99bda91461065d578063528c7efb1461066557806353a47bb71461066d5780635af090ef1461068257610449565b806330ead7601161032157806330ead760146105f6578063313ce56714610609578063320223db1461061157806332608039146106245780633e89b9e51461063757610449565b80632c955fa7146105a85780632d3169eb146105bb5780632e0f2625146105ce5780632f7206ce146105e357610449565b806316b2213f116103d557806323b872dd116103a457806323b872dd1461055f5780632621716f14610572578063295da87d146105855780632a905318146105985780632af64bd3146105a057610449565b806316b2213f1461052957806318160ddd1461053c57806318821400146105445780631fce304d1461054c57610449565b8063095ea7b31161041c578063095ea7b3146104ab5780630e30963c146104cb5780631137aedf146104ec5780631249c58b1461050e5780631627540c1461051657610449565b806303fbc5471461044e57806304f3bcec1461045857806305b3c1c91461047657806306fdde0314610496575b600080fd5b610456610929565b005b610460610b16565b60405161046d9190615bdf565b60405180910390f35b6104896104843660046147a5565b610b2a565b60405161046d9190615a40565b61049e610bb7565b60405161046d9190615bed565b6104be6104b9366004614868565b610c45565b60405161046d9190615a32565b6104de6104d9366004614abb565b610cd2565b60405161046d929190615de8565b6104ff6104fa3660046147a5565b610de1565b60405161046d93929190615ae4565b6104be610e76565b6104566105243660046147a5565b611230565b6104896105373660046147a5565b61128e565b6104896112c3565b61049e6112c9565b6104be61055a366004614a7f565b611302565b6104be61056d36600461481b565b611397565b6104896105803660046147a5565b6113d6565b610456610593366004614a7f565b6115b7565b61049e611638565b6104be611657565b6104566105b63660046147a5565b611773565b6104566105c9366004614abb565b6117bf565b6105d6611875565b60405161046d9190615e2b565b6104566105f13660046149b2565b61187a565b610489610604366004614afe565b61193c565b6105d66119fa565b61045661061f3660046147a5565b611a03565b610460610632366004614a7f565b611a4f565b610489610645366004614a7f565b611ad4565b610489610658366004614b73565b611b0c565b6104be611bc4565b6104be611c43565b610675611ede565b60405161046d91906157d9565b610489610690366004614afe565b611eed565b6104be6106a33660046147a5565b611f4d565b610489611f79565b6104566106be366004614868565b611f89565b6104896106d13660046147a5565b611f95565b61045661209d565b6104566106ec3660046149b2565b612148565b6104566106ff366004614898565b61219b565b6104be610712366004614868565b612254565b6104896107253660046147a5565b61227f565b6107326122b1565b60405161046d9190615a21565b61045661232f565b610456612481565b61046061075d366004614a7f565b61251d565b610489610770366004614a7f565b612552565b6107886107833660046147a5565b61258a565b60405161046d929190615a6a565b6107326128bf565b6104566107ac366004614a7f565b612953565b61067561299d565b6104896107c736600461492b565b6129ac565b610489612a6c565b61049e612a77565b6104566107ea3660046147a5565b612ad2565b610456612b25565b6104ff610805366004614a7f565b612b9e565b610456610818366004614be8565b612c14565b61048961082b3660046147a5565b612c40565b61048961083e3660046147a5565b612c75565b6104be610851366004614868565b612caa565b610456610864366004614898565b612cf4565b610456612d41565b61045661087f3660046147a5565b612d8a565b610456610892366004614868565b612db4565b6104896108a53660046148ca565b612e38565b6104896108b8366004614868565b612ef6565b610675612f7d565b6104566108d3366004614a7f565b612f8c565b610489612f94565b6104896108ee3660046147e1565b61300e565b610456610901366004614868565b613042565b610460613090565b61046061309f565b610489610924366004614add565b6130ae565b61093161316a565b60085460405163dacb2d0160e01b815260009161010090046001600160a01b03169063dacb2d019061096590600401615dca565b60206040518083038186803b15801561097d57600080fd5b505afa158015610991573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109b591908101906147c3565b60085460405163dacb2d0160e01b81529192506000916101009091046001600160a01b03169063dacb2d01906109ed90600401615d42565b60206040518083038186803b158015610a0557600080fd5b505afa158015610a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610a3d91908101906147c3565b9050816001600160a01b0316816001600160a01b03161415610a7a5760405162461bcd60e51b8152600401610a7190615dba565b60405180910390fd5b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a0823191610aac918791016157d9565b60206040518083038186803b158015610ac457600080fd5b505afa158015610ad8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610afc9190810190614a9d565b90508015610b1157610b0f838383613194565b505b505050565b60085461010090046001600160a01b031681565b6000610b34613370565b6001600160a01b03166305b3c1c9836040518263ffffffff1660e01b8152600401610b5f91906157d9565b60206040518083038186803b158015610b7757600080fd5b505afa158015610b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610baf9190810190614a9d565b90505b919050565b6005805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610c3d5780601f10610c1257610100808354040283529160200191610c3d565b820191906000526020600020905b815481529060010190602001808311610c2057829003601f168201915b505050505081565b6000610c4f613384565b60035460048054604051633691826360e21b81526001600160a01b03938416939091169163da46098c91610c89918591899189910161593f565b600060405180830381600087803b158015610ca357600080fd5b505af1158015610cb7573d6000803e3d6000fd5b50505050610cc68185856133c3565b60019150505b92915050565b6000808584610ce18282613443565b610ce9613384565b610cf16134a4565b6001600160a01b0316634f8633d2600360009054906101000a90046001600160a01b0316600360009054906101000a90046001600160a01b03168b8b8b600360009054906101000a90046001600160a01b03166001600360009054906101000a90046001600160a01b03168e6040518a63ffffffff1660e01b8152600401610d81999897969594939291906158ef565b6040805180830381600087803b158015610d9a57600080fd5b505af1158015610dae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610dd29190810190614c54565b93509350505094509492505050565b6000806000610dee613370565b6001600160a01b0316631137aedf856040518263ffffffff1660e01b8152600401610e1991906157d9565b60606040518083038186803b158015610e3157600080fd5b505afa158015610e45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610e699190810190614c84565b9250925092509193909250565b6000610e806134bb565b6000610e8a61350f565b6001600160a01b03161415610eb15760405162461bcd60e51b8152600401610a7190615ce5565b6000610ebb613530565b90506000610ec761350f565b90506000826001600160a01b031663cc5c095c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0457600080fd5b505afa158015610f18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f3c9190810190614a9d565b905060008111610f5e5760405162461bcd60e51b8152600401610a7190615d8d565b610f6a6000308361354c565b604051637e7961d760e01b81526000906001600160a01b03851690637e7961d790610f99908590600401615a40565b602060405180830381600087803b158015610fb357600080fd5b505af1158015610fc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610feb9190810190614a9d565b90506000610fff838363ffffffff61358f16565b600480546040516370a0823160e01b81529293506001600160a01b03169163b46310f691879161109b91869186916370a082319161103f918791016157d9565b60206040518083038186803b15801561105757600080fd5b505afa15801561106b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061108f9190810190614a9d565b9063ffffffff6135b716565b6040518363ffffffff1660e01b81526004016110b89291906159b7565b600060405180830381600087803b1580156110d257600080fd5b505af11580156110e6573d6000803e3d6000fd5b505050506110f530858361354c565b604051630b32e9c760e31b81526001600160a01b038516906359974e3890611121908490600401615a40565b602060405180830381600087803b15801561113b57600080fd5b505af115801561114f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506111739190810190614a61565b50600480546040516370a0823160e01b81526001600160a01b039091169163b46310f69133916111b391879186916370a082319161103f918791016157e7565b6040518363ffffffff1660e01b81526004016111d09291906157f5565b600060405180830381600087803b1580156111ea57600080fd5b505af11580156111fe573d6000803e3d6000fd5b5050505061120d30338461354c565b600754611220908463ffffffff6135b716565b6007555060019450505050505b90565b61123861316a565b600180546001600160a01b0319166001600160a01b0383161790556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce22906112839083906157d9565b60405180910390a150565b6000611298613370565b6001600160a01b03166316b2213f836040518263ffffffff1660e01b8152600401610b5f91906157d9565b60075481565b6040518060400160405280601781526020017f53796e746865746978204e6574776f726b20546f6b656e00000000000000000081525081565b60008061130d6134a4565b6003546040516301670a7b60e21b81526001600160a01b039283169263059c29ec926113409291169087906004016159b7565b60206040518083038186803b15801561135857600080fd5b505afa15801561136c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506113909190810190614a9d565b1192915050565b60006113a16135dc565b6113a9613631565b6113b38483613671565b506003546113cc906001600160a01b0316858585613942565b90505b9392505050565b6000806113e16139ee565b6001600160a01b031663204b676a846040518263ffffffff1660e01b815260040161140c91906157d9565b60206040518083038186803b15801561142457600080fd5b505afa158015611438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061145c9190810190614a9d565b90506000611468614670565b60005b8381101561159e5761147b6139ee565b6001600160a01b031663ae58254987836040518363ffffffff1660e01b81526004016114a89291906159b7565b60206040518083038186803b1580156114c057600080fd5b505afa1580156114d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506114f89190810190614a9d565b92506115026139ee565b6001600160a01b03166345626bd687856040518363ffffffff1660e01b815260040161152f9291906159b7565b604080518083038186803b15801561154657600080fd5b505afa15801561155a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061157e9190810190614c06565b602081015190925015611596579350610bb292505050565b60010161146b565b5060405162461bcd60e51b8152600401610a7190615c58565b6115bf6134bb565b6115c7613384565b6115cf613370565b60035460405163b06e8c6560e01b81526001600160a01b039283169263b06e8c65926116029291169085906004016159b7565b600060405180830381600087803b15801561161c57600080fd5b505af1158015611630573d6000803e3d6000fd5b505050505b50565b604051806040016040528060038152602001620a69cb60eb1b81525081565b600060606116636128bf565b905060005b815181101561176a57600082828151811061167f57fe5b602090810291909101810151600081815260099092526040918290205460085492516321f8a72160e01b81529193506001600160a01b0390811692610100900416906321f8a721906116d5908590600401615a40565b60206040518083038186803b1580156116ed57600080fd5b505afa158015611701573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061172591908101906147c3565b6001600160a01b031614158061175057506000818152600960205260409020546001600160a01b0316155b15611761576000935050505061122d565b50600101611668565b50600191505090565b61177b6134bb565b611783613384565b61178b613370565b60035460405163159fa0d560e11b81526001600160a01b0392831692632b3f41aa9261160292869290911690600401615810565b6117c7613a0a565b6002546040516001600160a01b039091169063907dff97906117f190869086908690602001615ae4565b604051602081830303815290604052600260405161180e90615761565b6040519081900381206001600160e01b031960e086901b16825261183d9392918a906000908190600401615b5e565b600060405180830381600087803b15801561185757600080fd5b505af115801561186b573d6000803e3d6000fd5b5050505050505050565b601281565b611882613a0a565b6002546040516001600160a01b039091169063907dff97906118b09088908890889088908890602001615a98565b60405160208183030381529060405260026040516118cd9061574b565b60405180910390206118de8b613a42565b6000806040518763ffffffff1660e01b815260040161190296959493929190615b5e565b600060405180830381600087803b15801561191c57600080fd5b505af1158015611930573d6000803e3d6000fd5b50505050505050505050565b6000858461194a8282613443565b611952613384565b61195a6134a4565b6003546040516327c319e960e11b81526001600160a01b0392831692634f8633d29261199c9291169081908d908d908d9084906000908f908f906004016158ef565b6040805180830381600087803b1580156119b557600080fd5b505af11580156119c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506119ed9190810190614c54565b5098975050505050505050565b60085460ff1681565b611a0b6134bb565b611a13613384565b611a1b613370565b60035460405163fd864ccf60e01b81526001600160a01b039283169263fd864ccf9261160292869290911690600401615810565b6000611a59613370565b6001600160a01b03166332608039836040518263ffffffff1660e01b8152600401611a849190615a40565b60206040518083038186803b158015611a9c57600080fd5b505afa158015611ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610baf9190810190614bca565b6000611ade613370565b6001600160a01b0316637b1001b78360016040518363ffffffff1660e01b8152600401610b5f929190615a5c565b60008584611b1a8282613443565b611b22613384565b611b2a6134a4565b60035460405162674ed160e71b81526001600160a01b03928316926333a7688092611b66929116908c908c908c9084908d908d906004016159c5565b602060405180830381600087803b158015611b8057600080fd5b505af1158015611b94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611bb89190810190614a9d565b98975050505050505050565b6000611bce613370565b6001600160a01b0316634e99bda96040518163ffffffff1660e01b815260040160206040518083038186803b158015611c0657600080fd5b505afa158015611c1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611c3e9190810190614a61565b905090565b6000611c4d613631565b611c55613384565b6008546040516321f8a72160e01b815260009161010090046001600160a01b0316906321f8a72190611c9a906b131959d858de53585c9ad95d60a21b90600401615a40565b60206040518083038186803b158015611cb257600080fd5b505afa158015611cc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611cea91908101906147c3565b6001600160a01b031614611d105760405162461bcd60e51b8152600401610a7190615d15565b6003546001600160a01b0316611d24613a4e565b6001600160a01b031663c00007b0826040518263ffffffff1660e01b8152600401611d4f91906157d9565b600060405180830381600087803b158015611d6957600080fd5b505af1158015611d7d573d6000803e3d6000fd5b50505050600080611d8c613370565b6001600160a01b03166372c658168460016040518363ffffffff1660e01b8152600401611dba92919061599c565b606060405180830381600087803b158015611dd457600080fd5b505af1158015611de8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611e0c9190810190614c84565b509150915060008111611e315760405162461bcd60e51b8152600401610a7190615d70565b611e3d83838386613a6d565b6000611e5184611e4b613a4e565b85613ae9565b905080611e705760405162461bcd60e51b8152600401610a7190615d05565b611e78613a4e565b6001600160a01b0316633c6b16ab846040518263ffffffff1660e01b8152600401611ea39190615a40565b600060405180830381600087803b158015611ebd57600080fd5b505af1158015611ed1573d6000803e3d6000fd5b5092965050505050505090565b6001546001600160a01b031681565b60008584611efb8282613443565b611f03613384565b611f0b6134a4565b6003546040516327c319e960e11b81526001600160a01b0392831692634f8633d29261199c9291169081908d908d908d9032906000908f908f90600401615869565b6000611f57613631565b611f5f613384565b600354610baf9083906000906001600160a01b0316613af6565b680a6f2dce8d0cae8d2f60bb1b81565b611f91613ef8565b5050565b6000611f9f613370565b600480546040516370a0823160e01b81526001600160a01b0393841693636bed0415938793909116916370a0823191611fda918591016157d9565b60206040518083038186803b158015611ff257600080fd5b505afa158015612006573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061202a9190810190614a9d565b6040518363ffffffff1660e01b81526004016120479291906159b7565b604080518083038186803b15801561205e57600080fd5b505afa158015612072573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506120969190810190614c24565b5092915050565b6120a561316a565b6004546000906001600160a01b03166370a082316120c1613f10565b6040518263ffffffff1660e01b81526004016120dd91906157d9565b60206040518083038186803b1580156120f557600080fd5b505afa158015612109573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061212d9190810190614a9d565b9050611f9161213a613f10565b6121426139ee565b83613194565b612150613a0a565b6002546040516001600160a01b039091169063907dff979061217e9088908890889088908890602001615a98565b60405160208183030381529060405260026040516118cd9061578c565b6121a3613a0a565b6002546040516001600160a01b039091169063907dff97906121cb9085908590602001615a6a565b60405160208183030381529060405260026040516121e8906157a2565b60405180910390206121f988613a42565b6000806040518763ffffffff1660e01b815260040161221d96959493929190615b5e565b600060405180830381600087803b15801561223757600080fd5b505af115801561224b573d6000803e3d6000fd5b50505050505050565b600061225e613631565b612266613384565b6003546113cf90849084906001600160a01b0316613af6565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a0823191610b5f918691016157d9565b60606122bb613370565b6001600160a01b03166372cb051f6040518163ffffffff1660e01b815260040160006040518083038186803b1580156122f357600080fd5b505afa158015612307573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c3e9190810190614a2c565b60606123396128bf565b905060005b8151811015611f9157600082828151811061235557fe5b602002602001015190506000600860019054906101000a90046001600160a01b03166001600160a01b031663dacb2d01838460405160200161239791906157c3565b6040516020818303038152906040526040518363ffffffff1660e01b81526004016123c3929190615a78565b60206040518083038186803b1580156123db57600080fd5b505afa1580156123ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061241391908101906147c3565b6000838152600960205260409081902080546001600160a01b0319166001600160a01b038416179055519091507f88a93678a3692f6789d9546fc621bf7234b101ddb7d4fe479455112831b8aa689061246f9084908490615a4e565b60405180910390a1505060010161233e565b6001546001600160a01b031633146124ab5760405162461bcd60e51b8152600401610a7190615c1b565b6000546001546040517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c926124ee926001600160a01b0391821692911690615810565b60405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000612527613370565b6001600160a01b031663835e119c836040518263ffffffff1660e01b8152600401611a849190615a40565b600061255c613370565b6001600160a01b0316637b1001b78360006040518363ffffffff1660e01b8152600401610b5f929190615a5c565b600080612595613631565b6008546040516321f8a72160e01b815260009161010090046001600160a01b0316906321f8a721906125e49075446562744d69677261746f724f6e457468657265756d60501b90600401615a40565b60206040518083038186803b1580156125fc57600080fd5b505afa158015612610573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061263491908101906147c3565b9050336001600160a01b03821614806126f057506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a7219061268b906b131959d858de53585c9ad95d60a21b90600401615a40565b60206040518083038186803b1580156126a357600080fd5b505afa1580156126b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506126db91908101906147c3565b6001600160a01b0316336001600160a01b0316145b61270c5760405162461bcd60e51b8152600401610a7190615d25565b600480546040516370a0823160e01b81526001600160a01b03909116916370a082319161273b918891016157d9565b60206040518083038186803b15801561275357600080fd5b505afa158015612767573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061278b9190810190614a9d565b915081156127c15760006127a0853385613ae9565b9050806127bf5760405162461bcd60e51b8152600401610a7190615ca5565b505b6127c96139ee565b6001600160a01b031663326a3cfb856040518263ffffffff1660e01b81526004016127f491906157d9565b60206040518083038186803b15801561280c57600080fd5b505afa158015612820573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506128449190810190614a9d565b925082156128b9576128546139ee565b6001600160a01b031663de065f6785338660006040518563ffffffff1660e01b8152600401612886949392919061582b565b600060405180830381600087803b1580156128a057600080fd5b505af11580156128b4573d6000803e3d6000fd5b505050505b50915091565b6060806128ca613f2a565b6040805160028082526060808301845293945090916020830190803883390190505090506b526577617264457363726f7760a01b8160008151811061290b57fe5b6020026020010181815250506d537570706c795363686564756c6560901b8160018151811061293657fe5b60200260200101818152505061294c8282614073565b9250505090565b61295b6134bb565b612963613384565b61296b613370565b6003546040516285c0d160e31b81526001600160a01b039283169263042e0688926116029291169085906004016159b7565b6000546001600160a01b031681565b600085846129ba8282613443565b6129c2613384565b6129ca6134a4565b6003546040516327c319e960e11b81526001600160a01b0392831692634f8633d292612a0d928e92909116908d908d908d9085906000908f908f906004016158ef565b6040805180830381600087803b158015612a2657600080fd5b505af1158015612a3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612a5e9190810190614c54565b509998505050505050505050565b631cd554d160e21b81565b6006805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610c3d5780601f10610c1257610100808354040283529160200191610c3d565b612ada61316a565b600280546001600160a01b0319166001600160a01b0383161790556040517ffc80377ca9c49cc11ae6982f390a42db976d5530af7c43889264b13fbbd7c57e906112839083906157e7565b612b2d6134bb565b612b35613384565b612b3d613370565b6003546040516324beb82560e11b81526001600160a01b039283169263497d704a92612b6e929116906004016157d9565b600060405180830381600087803b158015612b8857600080fd5b505af1158015610b0f573d6000803e3d6000fd5b565b6000806000612bab613384565b612bb36134a4565b6003546040516306c5a00b60e21b81526001600160a01b0392831692631b16802c92612be69291169088906004016159b7565b606060405180830381600087803b158015612c0057600080fd5b505af1158015610e45573d6000803e3d6000fd5b612c1c614128565b600480546001600160a01b0319166001600160a01b03831617905561163581614196565b6000612c4a613370565b6001600160a01b031663a311c7c2836040518263ffffffff1660e01b8152600401610b5f91906157d9565b6000612c7f613370565b6001600160a01b031663a5fdc5de836040518263ffffffff1660e01b8152600401610b5f91906157d9565b6000612cb46135dc565b612cbc613631565b600354612cd2906001600160a01b031683613671565b50600354612cea906001600160a01b03168484613ae9565b5060019392505050565b612cfc613a0a565b6002546040516001600160a01b039091169063907dff9790612d249085908590602001615a6a565b60405160208183030381529060405260026040516121e890615756565b612d496134bb565b612d51613384565b612d59613370565b60035460405163644bb89960e11b81526001600160a01b039283169263c897713292612b6e929116906004016157d9565b612d92614208565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612dbc6134bb565b612dc4613384565b612dcc613370565b600354604051632694552d60e21b81526001600160a01b0392831692639a5154b492612e0292879290911690869060040161593f565b600060405180830381600087803b158015612e1c57600080fd5b505af1158015612e30573d6000803e3d6000fd5b505050505050565b60008382612e468282613443565b612e4e613384565b612e566134a4565b6003546040516327c319e960e11b81526001600160a01b0392831692634f8633d292612e99928c92909116908b908b908b908590600090829082906004016158ef565b6040805180830381600087803b158015612eb257600080fd5b505af1158015612ec6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612eea9190810190614c54565b50979650505050505050565b6000612f00613370565b6001600160a01b031663d37c4d8b84846040518363ffffffff1660e01b8152600401612f2d9291906159b7565b60206040518083038186803b158015612f4557600080fd5b505afa158015612f59573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506113cf9190810190614a9d565b6003546001600160a01b031681565b611635613ef8565b6000612f9e613370565b6001600160a01b031663dbf633406040518163ffffffff1660e01b815260040160206040518083038186803b158015612fd657600080fd5b505afa158015612fea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611c3e9190810190614a9d565b60048054604051636eb1769f60e11b81526000926001600160a01b039092169163dd62ed3e91612f2d918791879101615810565b61304a6134bb565b613052613384565b61305a613370565b60035460405163227635b160e11b81526001600160a01b03928316926344ec6b6292612e0292879290911690869060040161593f565b6004546001600160a01b031681565b6002546001600160a01b031681565b600083826130bc8282613443565b6130c4613384565b6130cc6134a4565b6003546040516327c319e960e11b81526001600160a01b0392831692634f8633d29261310e9291169081908b908b908b908490600090829082906004016158ef565b6040805180830381600087803b15801561312757600080fd5b505af115801561313b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061315f9190810190614c54565b509695505050505050565b6000546001600160a01b03163314612b9c5760405162461bcd60e51b8152600401610a7190615cf5565b60006001600160a01b038316158015906131b757506001600160a01b0383163014155b80156131d157506002546001600160a01b03848116911614155b6131ed5760405162461bcd60e51b8152600401610a7190615bfe565b600480546040516370a0823160e01b81526001600160a01b039091169163b46310f691879161328891879186916370a082319161322c918791016157d9565b60206040518083038186803b15801561324457600080fd5b505afa158015613258573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061327c9190810190614a9d565b9063ffffffff61358f16565b6040518363ffffffff1660e01b81526004016132a59291906159b7565b600060405180830381600087803b1580156132bf57600080fd5b505af11580156132d3573d6000803e3d6000fd5b5050600480546040516370a0823160e01b81526001600160a01b03909116935063b46310f69250869161331691879186916370a082319161103f918791016157d9565b6040518363ffffffff1660e01b81526004016133339291906159b7565b600060405180830381600087803b15801561334d57600080fd5b505af1158015613361573d6000803e3d6000fd5b50505050612cea84848461354c565b6000611c3e6524b9b9bab2b960d11b614232565b6002546001600160a01b031633148015906133aa57506003546001600160a01b03163314155b15612b9c57600380546001600160a01b03191633179055565b6002546040516001600160a01b039091169063907dff97906133e9908490602001615a40565b604051602081830303815290604052600360405161340690615797565b604051809103902061341788613a42565b61342088613a42565b60006040518763ffffffff1660e01b815260040161221d96959493929190615b98565b61344b61428f565b6001600160a01b0316631ce00ba283836040518363ffffffff1660e01b8152600401613478929190615a6a565b60006040518083038186803b15801561349057600080fd5b505afa158015612e30573d6000803e3d6000fd5b6000611c3e6822bc31b430b733b2b960b91b614232565b6134c361428f565b6001600160a01b0316637c3125416040518163ffffffff1660e01b815260040160006040518083038186803b1580156134fb57600080fd5b505afa158015610b0f573d6000803e3d6000fd5b6000611c3e722932bbb0b93239a234b9ba3934b13aba34b7b760691b614232565b6000611c3e6d537570706c795363686564756c6560901b614232565b6002546040516001600160a01b039091169063907dff9790613572908490602001615a40565b6040516020818303038152906040526003604051613406906157ce565b6000828211156135b15760405162461bcd60e51b8152600401610a7190615c95565b50900390565b6000828201838110156113cf5760405162461bcd60e51b8152600401610a7190615c68565b6002546001600160a01b03163314156135f457612b9c565b6135fd336142a9565b1561361957600380546001600160a01b03191633179055612b9c565b60405162461bcd60e51b8152600401610a7190615d9d565b61363961428f565b6001600160a01b031663086dabd16040518163ffffffff1660e01b815260040160006040518083038186803b1580156134fb57600080fd5b6008546040516321f8a72160e01b815260009182916101009091046001600160a01b0316906321f8a721906136b9906b131959d858de53585c9ad95d60a21b90600401615a40565b60206040518083038186803b1580156136d157600080fd5b505afa1580156136e5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061370991908101906147c3565b6003549091506001600160a01b03161580159061373357506003546001600160a01b038281169116145b8061374f5750806001600160a01b0316846001600160a01b0316145b1561375e576001915050610ccc565b6000613768613370565b6001600160a01b031663d37c4d8b86631cd554d160e21b6040518363ffffffff1660e01b815260040161379c9291906159b7565b60206040518083038186803b1580156137b457600080fd5b505afa1580156137c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506137ec9190810190614a9d565b1115610cc6576000806137fd613370565b600480546040516370a0823160e01b81526001600160a01b0393841693636bed0415938b93909116916370a0823191613838918591016157d9565b60206040518083038186803b15801561385057600080fd5b505afa158015613864573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506138889190810190614a9d565b6040518363ffffffff1660e01b81526004016138a59291906159b7565b604080518083038186803b1580156138bc57600080fd5b505afa1580156138d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506138f49190810190614c24565b91509150818511156139185760405162461bcd60e51b8152600401610a7190615cc5565b80156139365760405162461bcd60e51b8152600401610a7190615cd5565b50600195945050505050565b60048054604051636eb1769f60e11b81526000926001600160a01b039092169163da46098c9187918991613988918891879163dd62ed3e9161322c918891889101615810565b6040518463ffffffff1660e01b81526004016139a69392919061593f565b600060405180830381600087803b1580156139c057600080fd5b505af11580156139d4573d6000803e3d6000fd5b505050506139e3848484613194565b90505b949350505050565b6000611c3e6d2932bbb0b93222b9b1b937bbab1960911b614232565b613a126134a4565b6001600160a01b0316336001600160a01b031614612b9c5760405162461bcd60e51b8152600401610a7190615c48565b6001600160a01b031690565b6000611c3e704c697175696461746f725265776172647360781b614232565b6002546040516001600160a01b039091169063907dff9790613a9790869086908690602001615e03565b6040516020818303038152906040526002604051613ab4906157b8565b6040518091039020613ac589613a42565b6000806040518763ffffffff1660e01b815260040161183d96959493929190615b5e565b60006113cc848484613194565b6000613b00613a4e565b6001600160a01b031663c00007b0856040518263ffffffff1660e01b8152600401613b2b91906157d9565b600060405180830381600087803b158015613b4557600080fd5b505af1158015613b59573d6000803e3d6000fd5b505050506000806000613b6a613370565b6001600160a01b03166372c658168860006040518363ffffffff1660e01b8152600401613b9892919061599c565b606060405180830381600087803b158015613bb257600080fd5b505af1158015613bc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250613bea9190810190614c84565b919450925090508015613c6357613bff6139ee565b6001600160a01b031663de065f678889848a6040518563ffffffff1660e01b8152600401613c309493929190615967565b600060405180830381600087803b158015613c4a57600080fd5b505af1158015613c5e573d6000803e3d6000fd5b505050505b613c6f87848488613a6d565b6000613c79614658565b6001600160a01b0316638074b3726040518163ffffffff1660e01b815260040160206040518083038186803b158015613cb157600080fd5b505afa158015613cc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250613ce99190810190614a9d565b90506000613cf5614658565b6001600160a01b03166331e4e0306040518163ffffffff1660e01b815260040160206040518083038186803b158015613d2d57600080fd5b505afa158015613d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250613d659190810190614a9d565b90506000613d71614658565b6001600160a01b0316635616c9578b6040518263ffffffff1660e01b8152600401613d9c91906157d9565b60206040518083038186803b158015613db457600080fd5b505afa158015613dc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250613dec91908101906147c3565b90506000613dfb8b8386613ae9565b905080613e1a5760405162461bcd60e51b8152600401610a7190615c78565b6000613e278c8b86613ae9565b905080613e465760405162461bcd60e51b8152600401610a7190615d60565b8715613ee6576000613e608d613e5a613a4e565b8b613ae9565b905080613e7f5760405162461bcd60e51b8152600401610a7190615d05565b613e87613a4e565b6001600160a01b0316633c6b16ab8a6040518263ffffffff1660e01b8152600401613eb29190615a40565b600060405180830381600087803b158015613ecc57600080fd5b505af1158015613ee0573d6000803e3d6000fd5b50505050505b5060019b9a5050505050505050505050565b60405162461bcd60e51b8152600401610a7190615cb5565b6000611c3e6b526577617264457363726f7760a01b614232565b60408051600780825261010082019092526060916020820160e0803883390190505090506b53797374656d53746174757360a01b81600081518110613f6b57fe5b6020026020010181815250506822bc31b430b733b2b960b91b81600181518110613f9157fe5b6020026020010181815250506524b9b9bab2b960d11b81600281518110613fb457fe5b602002602001018181525050722932bbb0b93239a234b9ba3934b13aba34b7b760691b81600381518110613fe457fe5b602002602001018181525050704c697175696461746f725265776172647360781b8160048151811061401257fe5b602002602001018181525050692634b8bab4b230ba37b960b11b8160058151811061403957fe5b6020026020010181815250506d2932bbb0b93222b9b1b937bbab1960911b8160068151811061406457fe5b60200260200101818152505090565b606081518351016040519080825280602002602001820160405280156140a3578160200160208202803883390190505b50905060005b83518110156140e5578381815181106140be57fe5b60200260200101518282815181106140d257fe5b60209081029190910101526001016140a9565b5060005b8251811015612096578281815181106140fe57fe5b602002602001015182828651018151811061411557fe5b60209081029190910101526001016140e9565b6002546001600160a01b0316331480159061414e57506003546001600160a01b03163314155b1561416657600380546001600160a01b031916331790555b6000546003546001600160a01b03908116911614612b9c5760405162461bcd60e51b8152600401610a7190615c38565b6002546040516001600160a01b039091169063907dff97906141bc9084906020016157d9565b60405160208183030381529060405260016040516141d9906157ad565b6040519081900381206001600160e01b031960e086901b16825261160293929160009081908190600401615aff565b6002546001600160a01b03163314612b9c5760405162461bcd60e51b8152600401610a7190615d9d565b60008181526009602090815260408083205490516001600160a01b0390911691821515916142629186910161576c565b604051602081830303815290604052906120965760405162461bcd60e51b8152600401610a719190615bed565b6000611c3e6b53797374656d53746174757360a01b614232565b6008546040516321f8a72160e01b815260009161010090046001600160a01b0316906321f8a721906142dd90600401615dad565b60206040518083038186803b1580156142f557600080fd5b505afa158015614309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061432d91908101906147c3565b6001600160a01b0316826001600160a01b031614806143de57506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a7219061437990600401615d35565b60206040518083038186803b15801561439157600080fd5b505afa1580156143a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506143c991908101906147c3565b6001600160a01b0316826001600160a01b0316145b8061447b57506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a7219061441690600401615c0e565b60206040518083038186803b15801561442e57600080fd5b505afa158015614442573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061446691908101906147c3565b6001600160a01b0316826001600160a01b0316145b8061451857506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a721906144b390600401615c88565b60206040518083038186803b1580156144cb57600080fd5b505afa1580156144df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061450391908101906147c3565b6001600160a01b0316826001600160a01b0316145b806145b557506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a7219061455090600401615c2b565b60206040518083038186803b15801561456857600080fd5b505afa15801561457c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506145a091908101906147c3565b6001600160a01b0316826001600160a01b0316145b80610baf57506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a721906145ed90600401615d80565b60206040518083038186803b15801561460557600080fd5b505afa158015614619573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061463d91908101906147c3565b6001600160a01b0316826001600160a01b0316149050919050565b6000611c3e692634b8bab4b230ba37b960b11b614232565b604080518082019091526000808252602082015290565b8035610ccc81615f1c565b8051610ccc81615f1c565b600082601f8301126146ae57600080fd5b81516146c16146bc82615e60565b615e39565b915081818352602084019350602081019050838560208402820111156146e657600080fd5b60005b8381101561471257816146fc8882614732565b84525060209283019291909101906001016146e9565b5050505092915050565b8051610ccc81615f30565b8035610ccc81615f39565b8051610ccc81615f39565b8051610ccc81615f42565b8035610ccc81615f42565b60006040828403121561476557600080fd5b61476f6040615e39565b9050600061477d848461479a565b825250602061478e84848301614732565b60208301525092915050565b8051610ccc81615f4b565b6000602082840312156147b757600080fd5b60006139e68484614687565b6000602082840312156147d557600080fd5b60006139e68484614692565b600080604083850312156147f457600080fd5b60006148008585614687565b925050602061481185828601614687565b9150509250929050565b60008060006060848603121561483057600080fd5b600061483c8686614687565b935050602061484d86828701614687565b925050604061485e86828701614727565b9150509250925092565b6000806040838503121561487b57600080fd5b60006148878585614687565b925050602061481185828601614727565b6000806000606084860312156148ad57600080fd5b60006148b98686614687565b935050602061484d86828701614727565b600080600080608085870312156148e057600080fd5b60006148ec8787614687565b94505060206148fd87828801614727565b935050604061490e87828801614727565b925050606061491f87828801614727565b91505092959194509250565b60008060008060008060c0878903121561494457600080fd5b60006149508989614687565b965050602061496189828a01614727565b955050604061497289828a01614727565b945050606061498389828a01614727565b935050608061499489828a01614687565b92505060a06149a589828a01614727565b9150509295509295509295565b60008060008060008060c087890312156149cb57600080fd5b60006149d78989614687565b96505060206149e889828a01614727565b95505060406149f989828a01614727565b9450506060614a0a89828a01614727565b9350506080614a1b89828a01614727565b92505060a06149a589828a01614687565b600060208284031215614a3e57600080fd5b815167ffffffffffffffff811115614a5557600080fd5b6139e68482850161469d565b600060208284031215614a7357600080fd5b60006139e6848461471c565b600060208284031215614a9157600080fd5b60006139e68484614727565b600060208284031215614aaf57600080fd5b60006139e68484614732565b60008060008060808587031215614ad157600080fd5b60006148ec8787614727565b600080600060608486031215614af257600080fd5b60006148b98686614727565b600080600080600060a08688031215614b1657600080fd5b6000614b228888614727565b9550506020614b3388828901614727565b9450506040614b4488828901614727565b9350506060614b5588828901614687565b9250506080614b6688828901614727565b9150509295509295909350565b600080600080600060a08688031215614b8b57600080fd5b6000614b978888614727565b9550506020614ba888828901614727565b9450506040614bb988828901614727565b9350506060614b5588828901614727565b600060208284031215614bdc57600080fd5b60006139e6848461473d565b600060208284031215614bfa57600080fd5b60006139e68484614748565b600060408284031215614c1857600080fd5b60006139e68484614753565b60008060408385031215614c3757600080fd5b6000614c438585614732565b92505060206148118582860161471c565b60008060408385031215614c6757600080fd5b6000614c738585614732565b92505060206148118582860161473d565b600080600060608486031215614c9957600080fd5b6000614ca58686614732565b9350506020614cb686828701614732565b925050604061485e86828701614732565b6000614cd38383614d55565b505060200190565b614ce481615ec2565b82525050565b614ce481615e94565b6000614cfe82615e87565b614d088185615e8b565b9350614d1383615e81565b8060005b83811015614d41578151614d2b8882614cc7565b9750614d3683615e81565b925050600101614d17565b509495945050505050565b614ce481615e9f565b614ce48161122d565b614ce4614d6a8261122d565b61122d565b6000614d7a82615e87565b614d848185615e8b565b9350614d94818560208601615ee6565b614d9d81615f12565b9093019392505050565b614ce481615ea4565b614ce481615ecd565b614ce481615edb565b6000614dcf601f83615e8b565b7f43616e6e6f74207472616e7366657220746f2074686973206164647265737300815260200192915050565b75446562744d69677261746f724f6e4f7074696d69736d60501b9052565b6000614e26603583615e8b565b7f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7581527402063616e20616363657074206f776e65727368697605c1b602082015260400192915050565b6e53796e746865746978457363726f7760881b9052565b6000614e94601383615e8b565b7227bbb732b91037b7363c90333ab731ba34b7b760691b815260200192915050565b6000614ec3601e83615e8b565b7f4f6e6c792045786368616e6765722063616e20696e766f6b6520746869730000815260200192915050565b6000614efc604483610bb2565b7f41746f6d696353796e746845786368616e676528616464726573732c6279746581527f7333322c75696e743235362c627974657333322c75696e743235362c616464726020820152636573732960e01b604082015260440192915050565b6000614f68601483615e8b565b73616c6c20656e747269657320617265207a65726f60601b815260200192915050565b6000614f98601b83615e8b565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6000614fd1602483615e8b565b7f466c616720726577617264207472616e7366657220646964206e6f742073756381526318d9595960e21b602082015260400192915050565b6b526577617264457363726f7760a01b9052565b600061502b601883615e8b565b7f4e657720657363726f77206164647265737320756e7365740000000000000000815260200192915050565b6000615064602883610bb2565b7f45786368616e67655265636c61696d28616464726573732c627974657333322c81526775696e743235362960c01b602082015260280192915050565b60006150ae601e83615e8b565b7f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815260200192915050565b60006150e7601383615e8b565b721cdb9e081d1c985b9cd9995c8819985a5b1959606a1b815260200192915050565b6000615116601b83615e8b565b7f43616e6e6f742062652072756e206f6e2074686973206c617965720000000000815260200192915050565b600061514f603183610bb2565b7f45786368616e6765547261636b696e6728627974657333322c627974657333328152702c75696e743235362c75696e743235362960781b602082015260310192915050565b60006151a2601183610bb2565b70026b4b9b9b4b7339030b2323932b9b99d1607d1b815260110192915050565b60006151cf603e83610bb2565b7f53796e746845786368616e676528616464726573732c627974657333322c756981527f6e743235362c627974657333322c75696e743235362c616464726573732900006020820152603e0192915050565b600061522e602683615e8b565b7f43616e6e6f74207472616e73666572207374616b6564206f7220657363726f778152650cac840a69cb60d31b602082015260400192915050565b6000615276601e83615e8b565b7f412073796e7468206f7220534e58207261746520697320696e76616c69640000815260200192915050565b60006152af601b83615e8b565b7f52657761726473446973747269627574696f6e206e6f74207365740000000000815260200192915050565b60006152e8602f83615e8b565b7f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726681526e37b936903a3434b99030b1ba34b7b760891b602082015260400192915050565b6000615339602483615e8b565b7f5472616e7366657220746f204c697175696461746f72526577617264732066618152631a5b195960e21b602082015260400192915050565b600061537f602183610bb2565b7f417070726f76616c28616464726573732c616464726573732c75696e743235368152602960f81b602082015260210192915050565b60006153c2601783615e8b565b7f4d757374206c6971756964617465207573696e67205633000000000000000000815260200192915050565b60006153fb602783610bb2565b7f45786368616e676552656261746528616464726573732c627974657333322c75815266696e743235362960c81b602082015260270192915050565b6000615444602483615e8b565b7f4f6e6c79204c3120446562744d69677261746f72206f72204c65676163794d618152631c9ad95d60e21b602082015260400192915050565b600061548a601a83610bb2565b7f546f6b656e5374617465557064617465642861646472657373290000000000008152601a0192915050565b60006154c3603283610bb2565b7f4163636f756e744c69717569646174656428616464726573732c75696e743235815271362c75696e743235362c616464726573732960701b602082015260320192915050565b6d2932bbb0b93222b9b1b937bbab1960911b9052565b600061552d601983610bb2565b7f5265736f6c766572206d697373696e67207461726765743a2000000000000000815260190192915050565b6000615566602983615e8b565b7f4c697175696461746520726577617264207472616e7366657220646964206e6f8152681d081cdd58d8d9595960ba1b602082015260400192915050565b60006155b1601583615e8b565b7463616e6e6f742073656c66206c697175696461746560581b815260200192915050565b6411195c1bdd60da1b9052565b60006155ef601583615e8b565b744e6f20737570706c79206973206d696e7461626c6560581b815260200192915050565b6000615620601883615e8b565b7f4f6c6420657363726f77206164647265737320756e7365740000000000000000815260200192915050565b6000615659602183610bb2565b7f5472616e7366657228616464726573732c616464726573732c75696e743235368152602960f81b602082015260210192915050565b600061569c601783615e8b565b7f4f6e6c79207468652070726f78792063616e2063616c6c000000000000000000815260200192915050565b7f53796e746865746978427269646765546f4f7074696d69736d000000000000009052565b60006156fa601e83615e8b565b7f63616e6e6f74206d69677261746520746f2073616d6520616464726573730000815260200192915050565b732932bbb0b93222b9b1b937bbab19233937bd32b760611b9052565b614ce481615ebc565b6000610ccc82614eef565b6000610ccc82615057565b6000610ccc82615142565b600061577782615195565b91506157838284614d5e565b50602001919050565b6000610ccc826151c2565b6000610ccc82615372565b6000610ccc826153ee565b6000610ccc8261547d565b6000610ccc826154b6565b600061577782615520565b6000610ccc8261564c565b60208101610ccc8284614cea565b60208101610ccc8284614cdb565b604081016158038285614cdb565b6113cf6020830184614d55565b6040810161581e8285614cea565b6113cf6020830184614cea565b608081016158398287614cea565b6158466020830186614cdb565b6158536040830185614d55565b6158606060830184614db9565b95945050505050565b6101208101615878828c614cea565b615885602083018b614cea565b615892604083018a614d55565b61589f6060830189614d55565b6158ac6080830188614d55565b6158b960a0830187614cdb565b6158c660c0830186614d4c565b6158d360e0830185614cea565b6158e1610100830184614d55565b9a9950505050505050505050565b61012081016158fe828c614cea565b61590b602083018b614cea565b615918604083018a614d55565b6159256060830189614d55565b6159326080830188614d55565b6158b960a0830187614cea565b6060810161594d8286614cea565b61595a6020830185614cea565b6139e66040830184614d55565b608081016159758287614cea565b6159826020830186614cea565b61598f6040830185614d55565b6158606060830184614d55565b604081016159aa8285614cea565b6113cf6020830184614d4c565b604081016158038285614cea565b60e081016159d3828a614cea565b6159e06020830189614d55565b6159ed6040830188614d55565b6159fa6060830187614d55565b615a076080830186614cea565b615a1460a0830185614d55565b611bb860c0830184614d55565b602080825281016113cf8184614cf3565b60208101610ccc8284614d4c565b60208101610ccc8284614d55565b6040810161581e8285614d55565b604081016159aa8285614d55565b604081016158038285614d55565b60408101615a868285614d55565b81810360208301526113cc8184614d6f565b60a08101615aa68288614d55565b615ab36020830187614d55565b615ac06040830186614d55565b615acd6060830185614d55565b615ada6080830184614cea565b9695505050505050565b60608101615af28286614d55565b61595a6020830185614d55565b60c08082528101615b108189614d6f565b9050615b1f6020830188614db9565b615b2c6040830187614d55565b615b396060830186614db0565b615b466080830185614db0565b615b5360a0830184614db0565b979650505050505050565b60c08082528101615b6f8189614d6f565b9050615b7e6020830188614db9565b615b8b6040830187614d55565b615b396060830186614d55565b60c08082528101615ba98189614d6f565b9050615bb86020830188614db9565b615bc56040830187614d55565b615bd26060830186614d55565b615b466080830185614d55565b60208101610ccc8284614da7565b602080825281016113cf8184614d6f565b60208082528101610baf81614dc2565b60208101610bb282614dfb565b60208082528101610baf81614e19565b60208101610bb282614e70565b60208082528101610baf81614e87565b60208082528101610baf81614eb6565b60208082528101610baf81614f5b565b60208082528101610baf81614f8b565b60208082528101610baf81614fc4565b60208101610bb28261500a565b60208082528101610baf816150a1565b60208082528101610baf816150da565b60208082528101610baf81615109565b60208082528101610baf81615221565b60208082528101610baf81615269565b60208082528101610baf816152a2565b60208082528101610baf816152db565b60208082528101610baf8161532c565b60208082528101610baf816153b5565b60208082528101610baf81615437565b60208101610bb28261550a565b60408101615d4f8261550a565b8181036020830152610baf8161501e565b60208082528101610baf81615559565b60208082528101610baf816155a4565b60208101610bb2826155d5565b60208082528101610baf816155e2565b60208082528101610baf8161568f565b60208101610bb2826156c8565b60208082528101610baf816156ed565b60408101615dd782615726565b8181036020830152610baf81615613565b60408101615df68285614d55565b6113cf6020830184614da7565b60608101615e118286614d55565b615e1e6020830185614d55565b6139e66040830184614cea565b60208101610ccc8284615742565b60405181810167ffffffffffffffff81118282101715615e5857600080fd5b604052919050565b600067ffffffffffffffff821115615e7757600080fd5b5060209081020190565b60200190565b5190565b90815260200190565b6000610baf82613a42565b151590565b6000610baf82615e94565b67ffffffffffffffff1690565b60ff1690565b6000610baf82615ea4565b6000610baf614d6a8361122d565b6000610baf8261122d565b60005b83811015615f01578181015183820152602001615ee9565b83811115610b0f5750506000910152565b601f01601f191690565b615f2581615e94565b811461163557600080fd5b615f2581615e9f565b615f258161122d565b615f2581615ea4565b615f2581615eaf56fea365627a7a723158204825395a7bccc95316825fe426192a6c5fd210c860e25765e28157068fc582e16c6578706572696d656e74616cf564736f6c63430005100040
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f0000000000000000000000005b1b5fea1b99d83ad479df0c222f0492385381dd000000000000000000000000e2163dd599067919d1e9108929b568bf41d3a4200000000000000000000000000000000000000000010f7997d2882ebe53a2cb800000000000000000000000004e3b31eb0e5cb73641ee1e65e7dcefe520ba3ef2
-----Decoded View---------------
Arg [0] : _proxy (address): 0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F
Arg [1] : _tokenState (address): 0x5b1b5fEa1b99D83aD479dF0C222F0492385381dD
Arg [2] : _owner (address): 0xe2163dd599067919d1e9108929b568Bf41D3A420
Arg [3] : _totalSupply (uint256): 328193104088773603337882496
Arg [4] : _resolver (address): 0x4E3b31eB0E5CB73641EE1E65E7dCEFe520bA3ef2
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f
Arg [1] : 0000000000000000000000005b1b5fea1b99d83ad479df0c222f0492385381dd
Arg [2] : 000000000000000000000000e2163dd599067919d1e9108929b568bf41d3a420
Arg [3] : 0000000000000000000000000000000000000000010f7997d2882ebe53a2cb80
Arg [4] : 0000000000000000000000004e3b31eb0e5cb73641ee1e65e7dcefe520ba3ef2
Libraries Used
SafeDecimalMath : 0x84d626b2bb4d0f064067e4bf80fce7055d8f3e7bSystemSettingsLib : 0x4a39aef2281ac0d192a9c4783604833ba8f31174SignedSafeDecimalMath : 0x728a2b79cad691531cc1146ef802617ff50c7095ExchangeSettlementLib : 0xaa5a3d7f04e15b22eb3664b56310aa18a3527ec7
Loading...
Loading
Loading...
Loading

Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.