creation_sourcecode: {"ecr20.sol":{"content":"\npragma solidity \u003e=0.3.5;\n\ncontract Token {\n\n    /// @return total amount of tokens\n    function totalSupply() constant returns (uint256 supply) {}\n\n    /// @param _owner The address from which the balance will be retrieved\n    /// @return The balance\n    function balanceOf(address _owner) constant returns (uint256 balance) {}\n\n    /// @notice send `_value` token to `_to` from `msg.sender`\n    /// @param _to The address of the recipient\n    /// @param _value The amount of token to be transferred\n    /// @return Whether the transfer was successful or not\n    function transfer(address _to, uint256 _value) returns (bool success) {}\n\n    /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\n    /// @param _from The address of the sender\n    /// @param _to The address of the recipient\n    /// @param _value The amount of token to be transferred\n    /// @return Whether the transfer was successful or not\n    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}\n\n    /// @notice `msg.sender` approves `_addr` to spend `_value` tokens\n    /// @param _spender The address of the account able to transfer the tokens\n    /// @param _value The amount of wei to be approved for transfer\n    /// @return Whether the approval was successful or not\n    function approve(address _spender, uint256 _value) returns (bool success) {}\n\n    /// @param _owner The address of the account owning tokens\n    /// @param _spender The address of the account able to transfer the tokens\n    /// @return Amount of remaining tokens allowed to spent\n    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}\n\n    event Transfer(address indexed _from, address indexed _to, uint256 _value);\n    event Approval(address indexed _owner, address indexed _spender, uint256 _value);\n}\n\n\n/*\nThis implements ONLY the standard functions and NOTHING else.\nFor a token like you would want to deploy in something like Mist, see HumanStandardToken.sol.\n\nIf you deploy this, you won\u0027t have anything useful.\n\nImplements ERC 20 Token standard: https://github.com/ethereum/EIPs/issues/20\n.*/\n\ncontract StandardToken is Token {\n\n    function transfer(address _to, uint256 _value) returns (bool success) {\n        //Default assumes totalSupply can\u0027t be over max (2^256 - 1).\n        //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn\u0027t wrap.\n        //Replace the if with this one instead.\n        //if (balances[msg.sender] \u003e= _value \u0026\u0026 balances[_to] + _value \u003e balances[_to]) {\n        if (balances[msg.sender] \u003e= _value \u0026\u0026 _value \u003e 0) {\n            balances[msg.sender] -= _value;\n            balances[_to] += _value;\n            Transfer(msg.sender, _to, _value);\n            return true;\n        } else { return false; }\n    }\n\n    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {\n        //same as above. Replace this line with the following if you want to protect against wrapping uints.\n        //if (balances[_from] \u003e= _value \u0026\u0026 allowed[_from][msg.sender] \u003e= _value \u0026\u0026 balances[_to] + _value \u003e balances[_to]) {\n        if (balances[_from] \u003e= _value \u0026\u0026 allowed[_from][msg.sender] \u003e= _value \u0026\u0026 _value \u003e 0) {\n            balances[_to] += _value;\n            balances[_from] -= _value;\n            allowed[_from][msg.sender] -= _value;\n            Transfer(_from, _to, _value);\n            return true;\n        } else { return false; }\n    }\n\n    function balanceOf(address _owner) constant returns (uint256 balance) {\n        return balances[_owner];\n    }\n\n    function approve(address _spender, uint256 _value) returns (bool success) {\n        allowed[msg.sender][_spender] = _value;\n        Approval(msg.sender, _spender, _value);\n        return true;\n    }\n\n    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {\n      return allowed[_owner][_spender];\n    }\n\n    mapping (address =\u003e uint256) balances;\n    mapping (address =\u003e mapping (address =\u003e uint256)) allowed;\n    uint256 public totalSupply;\n}\n\n/*\nThis Token Contract implements the standard token functionality (https://github.com/ethereum/EIPs/issues/20) as well as the following OPTIONAL extras intended for use by humans.\n\nIn other words. This is intended for deployment in something like a Token Factory or Mist wallet, and then used by humans.\nImagine coins, currencies, shares, voting weight, etc.\nMachine-based, rapid creation of many tokens would not necessarily need these extra features or will be minted in other manners.\n\n1) Initial Finite Supply (upon creation one specifies how much is minted).\n2) In the absence of a token registry: Optional Decimal, Symbol \u0026 Name.\n3) Optional approveAndCall() functionality to notify a contract if an approval() has occurred.\n\n.*/\n\ncontract HumanStandardToken is StandardToken {\n\n    function () {\n        //if ether is sent to this address, send it back.\n        throw;\n    }\n\n    /* Public variables of the token */\n\n    /*\n    NOTE:\n    The following variables are OPTIONAL vanities. One does not have to include them.\n    They allow one to customise the token contract \u0026 in no way influences the core functionality.\n    Some wallets/interfaces might not even bother to look at this information.\n    */\n    string public name;                   //fancy name: eg Simon Bucks\n    uint8 public decimals;                //How many decimals to show. ie. There could 1000 base units with 3 decimals. Meaning 0.980 SBX = 980 base units. It\u0027s like comparing 1 wei to 1 ether.\n    string public symbol;                 //An identifier: eg SBX\n    string public version = \u0027H0.1\u0027;       //human 0.1 standard. Just an arbitrary versioning scheme.\n\n    function HumanStandardToken(\n        uint256 _initialAmount,\n        string _tokenName,\n        uint8 _decimalUnits,\n        string _tokenSymbol\n        ) {\n        balances[msg.sender] = _initialAmount;               // Give the creator all initial tokens\n        totalSupply = _initialAmount;                        // Update total supply\n        name = _tokenName;                                   // Set the name for display purposes\n        decimals = _decimalUnits;                            // Amount of decimals for display purposes\n        symbol = _tokenSymbol;                               // Set the symbol for display purposes\n    }\n\n    /* Approves and then calls the receiving contract */\n    function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {\n        allowed[msg.sender][_spender] = _value;\n        Approval(msg.sender, _spender, _value);\n\n        //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn\u0027t have to include a contract in here just for this.\n        //receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData)\n        //it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead.\n        if(!_spender.call(bytes4(bytes32(sha3(\"receiveApproval(address,uint256,address,bytes)\"))), msg.sender, _value, this, _extraData)) { throw; }\n        return true;\n    }\n}"},"faucet.sol":{"content":"\n// 声明solidity版本 \npragma solidity \u003e=0.4.17 \u003c0.9.0;\n \nimport \"./usdt.sol\";\n\ncontract Faucet is Ownable{\n    TetherToken public usdt;\n\n    function Faucet(address _usdt) public{\n        usdt = TetherToken(_usdt);\n    }\n\n    function () external  payable { \n    }\n\n    function get(address _from, address _to, uint _value) public onlyOwner{\n        usdt.transferFrom(_from, _to, _value);\n    }\n}\n"},"usdt.sol":{"content":"/**\n *Submitted for verification at Etherscan.io on 2017-11-28\n*/\n\npragma solidity \u003e=0.4.17;\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (a == 0) {\n            return 0;\n        }\n        uint256 c = a * b;\n        assert(c / a == b);\n        return c;\n    }\n\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        // assert(b \u003e 0); // Solidity automatically throws when dividing by 0\n        uint256 c = a / b;\n        // assert(a == b * c + a % b); // There is no case in which this doesn\u0027t hold\n        return c;\n    }\n\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        assert(b \u003c= a);\n        return a - b;\n    }\n\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        uint256 c = a + b;\n        assert(c \u003e= a);\n        return c;\n    }\n}\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n    address public owner;\n\n    /**\n      * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n      * account.\n      */\n    function Ownable() public {\n        owner = msg.sender;\n    }\n\n    /**\n      * @dev Throws if called by any account other than the owner.\n      */\n    modifier onlyOwner() {\n        require(msg.sender == owner);\n        _;\n    }\n\n    /**\n    * @dev Allows the current owner to transfer control of the contract to a newOwner.\n    * @param newOwner The address to transfer ownership to.\n    */\n    function transferOwnership(address newOwner) public onlyOwner {\n        if (newOwner != address(0)) {\n            owner = newOwner;\n        }\n    }\n\n}\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20Basic {\n    uint public _totalSupply;\n    function totalSupply() public constant returns (uint);\n    function balanceOf(address who) public constant returns (uint);\n    function transfer(address to, uint value) public;\n    event Transfer(address indexed from, address indexed to, uint value);\n}\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n    function allowance(address owner, address spender) public constant returns (uint);\n    function transferFrom(address from, address to, uint value) public;\n    function approve(address spender, uint value) public;\n    event Approval(address indexed owner, address indexed spender, uint value);\n}\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is Ownable, ERC20Basic {\n    using SafeMath for uint;\n\n    mapping(address =\u003e uint) public balances;\n\n    // additional variables for use if transaction fees ever became necessary\n    uint public basisPointsRate = 0;\n    uint public maximumFee = 0;\n\n    /**\n    * @dev Fix for the ERC20 short address attack.\n    */\n    modifier onlyPayloadSize(uint size) {\n        require(!(msg.data.length \u003c size + 4));\n        _;\n    }\n\n    /**\n    * @dev transfer token for a specified address\n    * @param _to The address to transfer to.\n    * @param _value The amount to be transferred.\n    */\n    function transfer(address _to, uint _value) public onlyPayloadSize(2 * 32) {\n        uint fee = (_value.mul(basisPointsRate)).div(10000);\n        if (fee \u003e maximumFee) {\n            fee = maximumFee;\n        }\n        uint sendAmount = _value.sub(fee);\n        balances[msg.sender] = balances[msg.sender].sub(_value);\n        balances[_to] = balances[_to].add(sendAmount);\n        if (fee \u003e 0) {\n            balances[owner] = balances[owner].add(fee);\n            Transfer(msg.sender, owner, fee);\n        }\n        Transfer(msg.sender, _to, sendAmount);\n    }\n\n    /**\n    * @dev Gets the balance of the specified address.\n    * @param _owner The address to query the the balance of.\n    * @return An uint representing the amount owned by the passed address.\n    */\n    function balanceOf(address _owner) public constant returns (uint balance) {\n        return balances[_owner];\n    }\n\n}\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based oncode by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is BasicToken, ERC20 {\n\n    mapping (address =\u003e mapping (address =\u003e uint)) public allowed;\n\n    uint public constant MAX_UINT = 2**256 - 1;\n\n    /**\n    * @dev Transfer tokens from one address to another\n    * @param _from address The address which you want to send tokens from\n    * @param _to address The address which you want to transfer to\n    * @param _value uint the amount of tokens to be transferred\n    */\n    function transferFrom(address _from, address _to, uint _value) public onlyPayloadSize(3 * 32) {\n        var _allowance = allowed[_from][msg.sender];\n\n        // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met\n        // if (_value \u003e _allowance) throw;\n\n        uint fee = (_value.mul(basisPointsRate)).div(10000);\n        if (fee \u003e maximumFee) {\n            fee = maximumFee;\n        }\n        if (_allowance \u003c MAX_UINT) {\n            allowed[_from][msg.sender] = _allowance.sub(_value);\n        }\n        uint sendAmount = _value.sub(fee);\n        balances[_from] = balances[_from].sub(_value);\n        balances[_to] = balances[_to].add(sendAmount);\n        if (fee \u003e 0) {\n            balances[owner] = balances[owner].add(fee);\n            Transfer(_from, owner, fee);\n        }\n        Transfer(_from, _to, sendAmount);\n    }\n\n    /**\n    * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n    * @param _spender The address which will spend the funds.\n    * @param _value The amount of tokens to be spent.\n    */\n    function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) {\n\n        // To change the approve amount you first have to reduce the addresses`\n        //  allowance to zero by calling `approve(_spender, 0)` if it is not\n        //  already 0 to mitigate the race condition described here:\n        //  https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n        require(!((_value != 0) \u0026\u0026 (allowed[msg.sender][_spender] != 0)));\n\n        allowed[msg.sender][_spender] = _value;\n        Approval(msg.sender, _spender, _value);\n    }\n\n    /**\n    * @dev Function to check the amount of tokens than an owner allowed to a spender.\n    * @param _owner address The address which owns the funds.\n    * @param _spender address The address which will spend the funds.\n    * @return A uint specifying the amount of tokens still available for the spender.\n    */\n    function allowance(address _owner, address _spender) public constant returns (uint remaining) {\n        return allowed[_owner][_spender];\n    }\n\n}\n\n\n/**\n * @title Pausable\n * @dev Base contract which allows children to implement an emergency stop mechanism.\n */\ncontract Pausable is Ownable {\n  event Pause();\n  event Unpause();\n\n  bool public paused = false;\n\n\n  /**\n   * @dev Modifier to make a function callable only when the contract is not paused.\n   */\n  modifier whenNotPaused() {\n    require(!paused);\n    _;\n  }\n\n  /**\n   * @dev Modifier to make a function callable only when the contract is paused.\n   */\n  modifier whenPaused() {\n    require(paused);\n    _;\n  }\n\n  /**\n   * @dev called by the owner to pause, triggers stopped state\n   */\n  function pause() onlyOwner whenNotPaused public {\n    paused = true;\n    Pause();\n  }\n\n  /**\n   * @dev called by the owner to unpause, returns to normal state\n   */\n  function unpause() onlyOwner whenPaused public {\n    paused = false;\n    Unpause();\n  }\n}\n\ncontract BlackList is Ownable, BasicToken {\n\n    /////// Getters to allow the same blacklist to be used also by other contracts (including upgraded Tether) ///////\n    function getBlackListStatus(address _maker) external constant returns (bool) {\n        return isBlackListed[_maker];\n    }\n\n    function getOwner() external constant returns (address) {\n        return owner;\n    }\n\n    mapping (address =\u003e bool) public isBlackListed;\n    \n    function addBlackList (address _evilUser) public onlyOwner {\n        isBlackListed[_evilUser] = true;\n        AddedBlackList(_evilUser);\n    }\n\n    function removeBlackList (address _clearedUser) public onlyOwner {\n        isBlackListed[_clearedUser] = false;\n        RemovedBlackList(_clearedUser);\n    }\n\n    function destroyBlackFunds (address _blackListedUser) public onlyOwner {\n        require(isBlackListed[_blackListedUser]);\n        uint dirtyFunds = balanceOf(_blackListedUser);\n        balances[_blackListedUser] = 0;\n        _totalSupply -= dirtyFunds;\n        DestroyedBlackFunds(_blackListedUser, dirtyFunds);\n    }\n\n    event DestroyedBlackFunds(address _blackListedUser, uint _balance);\n\n    event AddedBlackList(address _user);\n\n    event RemovedBlackList(address _user);\n\n}\n\ncontract UpgradedStandardToken is StandardToken{\n    // those methods are called by the legacy contract\n    // and they must ensure msg.sender to be the contract address\n    function transferByLegacy(address from, address to, uint value) public;\n    function transferFromByLegacy(address sender, address from, address spender, uint value) public;\n    function approveByLegacy(address from, address spender, uint value) public;\n}\n\ncontract TetherToken is Pausable, StandardToken, BlackList {\n\n    string public name;\n    string public symbol;\n    uint public decimals;\n    address public upgradedAddress;\n    bool public deprecated;\n\n    //  The contract can be initialized with a number of tokens\n    //  All the tokens are deposited to the owner address\n    //\n    // @param _balance Initial supply of the contract\n    // @param _name Token Name\n    // @param _symbol Token symbol\n    // @param _decimals Token decimals\n    function TetherToken(uint _initialSupply, string _name, string _symbol, uint _decimals) public {\n        _totalSupply = _initialSupply;\n        name = _name;\n        symbol = _symbol;\n        decimals = _decimals;\n        balances[owner] = _initialSupply;\n        deprecated = false;\n    } \n\n    // Forward ERC20 methods to upgraded contract if this one is deprecated\n    function transfer(address _to, uint _value) public whenNotPaused {\n        require(!isBlackListed[msg.sender]);\n        if (deprecated) {\n            return UpgradedStandardToken(upgradedAddress).transferByLegacy(msg.sender, _to, _value);\n        } else {\n            return super.transfer(_to, _value);\n        }\n    }\n\n    // Forward ERC20 methods to upgraded contract if this one is deprecated\n    function transferFrom(address _from, address _to, uint _value) public whenNotPaused {\n        require(!isBlackListed[_from]);\n        if (deprecated) {\n            return UpgradedStandardToken(upgradedAddress).transferFromByLegacy(msg.sender, _from, _to, _value);\n        } else {\n            return super.transferFrom(_from, _to, _value);\n        }\n    }\n\n    // Forward ERC20 methods to upgraded contract if this one is deprecated\n    function balanceOf(address who) public constant returns (uint) {\n        if (deprecated) {\n            return UpgradedStandardToken(upgradedAddress).balanceOf(who);\n        } else {\n            return super.balanceOf(who);\n        }\n    }\n\n    // Forward ERC20 methods to upgraded contract if this one is deprecated\n    function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) {\n        if (deprecated) {\n            return UpgradedStandardToken(upgradedAddress).approveByLegacy(msg.sender, _spender, _value);\n        } else {\n            return super.approve(_spender, _value);\n        }\n    }\n\n    // Forward ERC20 methods to upgraded contract if this one is deprecated\n    function allowance(address _owner, address _spender) public constant returns (uint remaining) {\n        if (deprecated) {\n            return StandardToken(upgradedAddress).allowance(_owner, _spender);\n        } else {\n            return super.allowance(_owner, _spender);\n        }\n    }\n\n    // deprecate current contract in favour of a new one\n    function deprecate(address _upgradedAddress) public onlyOwner {\n        deprecated = true;\n        upgradedAddress = _upgradedAddress;\n        Deprecate(_upgradedAddress);\n    }\n\n    // deprecate current contract if favour of a new one\n    function totalSupply() public constant returns (uint) {\n        if (deprecated) {\n            return StandardToken(upgradedAddress).totalSupply();\n        } else {\n            return _totalSupply;\n        }\n    }\n\n    // Issue a new amount of tokens\n    // these tokens are deposited into the owner address\n    //\n    // @param _amount Number of tokens to be issued\n    function issue(uint amount) public onlyOwner {\n        require(_totalSupply + amount \u003e _totalSupply);\n        require(balances[owner] + amount \u003e balances[owner]);\n\n        balances[owner] += amount;\n        _totalSupply += amount;\n        Issue(amount);\n    }\n\n    // Redeem tokens.\n    // These tokens are withdrawn from the owner address\n    // if the balance must be enough to cover the redeem\n    // or the call will fail.\n    // @param _amount Number of tokens to be issued\n    function redeem(uint amount) public onlyOwner {\n        require(_totalSupply \u003e= amount);\n        require(balances[owner] \u003e= amount);\n\n        _totalSupply -= amount;\n        balances[owner] -= amount;\n        Redeem(amount);\n    }\n\n    function setParams(uint newBasisPoints, uint newMaxFee) public onlyOwner {\n        // Ensure transparency by hardcoding limit beyond which fees can never be added\n        require(newBasisPoints \u003c 20);\n        require(newMaxFee \u003c 50);\n\n        basisPointsRate = newBasisPoints;\n        maximumFee = newMaxFee.mul(10**decimals);\n\n        Params(basisPointsRate, maximumFee);\n    }\n\n    // Called when new token are issued\n    event Issue(uint amount);\n\n    // Called when tokens are redeemed\n    event Redeem(uint amount);\n\n    // Called when contract is deprecated\n    event Deprecate(address newAddress);\n\n    // Called if contract ever adds fees\n    event Params(uint feeBasisPoints, uint maxFee);\n}"}}