ETH Price: $3,710.22 (+3.23%)

Token

ERC-20: 以太猪 (ETZ)
 

Overview

Max Total Supply

1,000,000,000 ETZ

Holders

5,225

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
440 ETZ

Value
$0.00
0xE06B055182E239e55E856Be2CFcd165E96DA5273
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
TokenERC20

Compiler Version
v0.4.21+commit.dfe3193c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-11-03
*/

pragma solidity ^0.4.21;


library SafeMath {

  function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
    if (a == 0) {
      return 0;
    }
    c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    // uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return a / b;
  }

  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }


  function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
    c = a + b;
    assert(c >= a);
    return c;
  }
}
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }

contract Ownable {
  address public owner;

  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

  function Ownable() public {
    owner = msg.sender;
  }

  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    emit OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

contract TokenERC20 is Ownable {
	
    using SafeMath for uint256;
    
    string public constant name       = "以太猪";
    string public constant symbol     = "ETZ";
    uint32 public constant decimals   = 18;
    uint256 public totalSupply;

    mapping(address => uint256) balances;
	mapping(address => mapping (address => uint256)) internal allowed;

	

	event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

	
	function TokenERC20(
        uint256 initialSupply
    ) public {
        totalSupply = initialSupply * 10 ** uint256(decimals);  // Update total supply with the decimal amount
        balances[msg.sender] = totalSupply;                // Give the creator all initial tokens
    }
	
    function totalSupply() public view returns (uint256) {
		return totalSupply;
	}	
	
	function transfer(address _to, uint256 _value) public returns (bool) {
		require(_to != address(0));
		require(_value <= balances[msg.sender]);
		balances[msg.sender] = balances[msg.sender].sub(_value);
		balances[_to] = balances[_to].add(_value);
		emit Transfer(msg.sender, _to, _value);
		return true;
	}
	
	function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
		require(_to != address(0));
		require(_value <= balances[_from]);
		require(_value <= allowed[_from][msg.sender]);	
		balances[_from] = balances[_from].sub(_value);
		balances[_to] = balances[_to].add(_value);
		allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
		emit Transfer(_from, _to, _value);
		return true;
	}


    function approve(address _spender, uint256 _value) public returns (bool) {
		allowed[msg.sender][_spender] = _value;
		emit Approval(msg.sender, _spender, _value);
		return true;
	}

    function allowance(address _owner, address _spender) public view returns (uint256) {
		return allowed[_owner][_spender];
	}

	function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
		allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
		emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
		return true;
	}

	function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
		uint oldValue = allowed[msg.sender][_spender];
		if (_subtractedValue > oldValue) {
			allowed[msg.sender][_spender] = 0;
		} else {
			allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
		}
		emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
		return true;
	}
	
	function getBalance(address _a) internal constant returns(uint256) {

            return balances[_a];
       
    }
    
    function balanceOf(address _owner) public view returns (uint256 balance) {
        return getBalance( _owner );
    }
	

 
	
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"initialSupply","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

6060604052341561000f57600080fd5b6040516020806109ca8339810160405280805160008054600160a060020a033316600160a060020a031990911681178255670de0b6b3a7640000909202600181905591815260026020526040902055505061095b8061006f6000396000f3006060604052600436106100c45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100c9578063095ea7b31461015357806318160ddd1461018957806323b872dd146101ae578063313ce567146101d6578063661884631461020257806370a08231146102245780638da5cb5b1461024357806395d89b4114610272578063a9059cbb14610285578063d73dd623146102a7578063dd62ed3e146102c9578063f2fde38b146102ee575b600080fd5b34156100d457600080fd5b6100dc61030f565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610118578082015183820152602001610100565b50505050905090810190601f1680156101455780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015e57600080fd5b610175600160a060020a0360043516602435610346565b604051901515815260200160405180910390f35b341561019457600080fd5b61019c6103b2565b60405190815260200160405180910390f35b34156101b957600080fd5b610175600160a060020a03600435811690602435166044356103b8565b34156101e157600080fd5b6101e961053a565b60405163ffffffff909116815260200160405180910390f35b341561020d57600080fd5b610175600160a060020a036004351660243561053f565b341561022f57600080fd5b61019c600160a060020a0360043516610639565b341561024e57600080fd5b61025661064a565b604051600160a060020a03909116815260200160405180910390f35b341561027d57600080fd5b6100dc610659565b341561029057600080fd5b610175600160a060020a0360043516602435610690565b34156102b257600080fd5b610175600160a060020a036004351660243561078b565b34156102d457600080fd5b61019c600160a060020a036004358116906024351661082f565b34156102f957600080fd5b61030d600160a060020a036004351661085a565b005b60408051908101604052600981527fe4bba5e5a4aae78caa0000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260036020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b6000600160a060020a03831615156103cf57600080fd5b600160a060020a0384166000908152600260205260409020548211156103f457600080fd5b600160a060020a038085166000908152600360209081526040808320339094168352929052205482111561042757600080fd5b600160a060020a038416600090815260026020526040902054610450908363ffffffff6108f516565b600160a060020a038086166000908152600260205260408082209390935590851681522054610485908363ffffffff61090716565b600160a060020a038085166000908152600260209081526040808320949094558783168252600381528382203390931682529190915220546104cd908363ffffffff6108f516565b600160a060020a03808616600081815260036020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b601281565b600160a060020a0333811660009081526003602090815260408083209386168352929052908120548083111561059c57600160a060020a0333811660009081526003602090815260408083209388168352929052908120556105d3565b6105ac818463ffffffff6108f516565b600160a060020a033381166000908152600360209081526040808320938916835292905220555b600160a060020a0333811660008181526003602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600061064482610914565b92915050565b600054600160a060020a031681565b60408051908101604052600381527f45545a0000000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a03831615156106a757600080fd5b600160a060020a0333166000908152600260205260409020548211156106cc57600080fd5b600160a060020a0333166000908152600260205260409020546106f5908363ffffffff6108f516565b600160a060020a03338116600090815260026020526040808220939093559085168152205461072a908363ffffffff61090716565b600160a060020a0380851660008181526002602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a0333811660009081526003602090815260408083209386168352929052908120546107c3908363ffffffff61090716565b600160a060020a0333811660008181526003602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b60005433600160a060020a0390811691161461087557600080fd5b600160a060020a038116151561088a57600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561090157fe5b50900390565b8181018281101561064457fe5b600160a060020a0316600090815260026020526040902054905600a165627a7a723058208ba00f73f60e14240d99318ac0b6a6ff6820f94f63defbd8e7416e69e1976fd20029000000000000000000000000000000000000000000000000000000003b9aca00

Deployed Bytecode

0x6060604052600436106100c45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100c9578063095ea7b31461015357806318160ddd1461018957806323b872dd146101ae578063313ce567146101d6578063661884631461020257806370a08231146102245780638da5cb5b1461024357806395d89b4114610272578063a9059cbb14610285578063d73dd623146102a7578063dd62ed3e146102c9578063f2fde38b146102ee575b600080fd5b34156100d457600080fd5b6100dc61030f565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610118578082015183820152602001610100565b50505050905090810190601f1680156101455780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015e57600080fd5b610175600160a060020a0360043516602435610346565b604051901515815260200160405180910390f35b341561019457600080fd5b61019c6103b2565b60405190815260200160405180910390f35b34156101b957600080fd5b610175600160a060020a03600435811690602435166044356103b8565b34156101e157600080fd5b6101e961053a565b60405163ffffffff909116815260200160405180910390f35b341561020d57600080fd5b610175600160a060020a036004351660243561053f565b341561022f57600080fd5b61019c600160a060020a0360043516610639565b341561024e57600080fd5b61025661064a565b604051600160a060020a03909116815260200160405180910390f35b341561027d57600080fd5b6100dc610659565b341561029057600080fd5b610175600160a060020a0360043516602435610690565b34156102b257600080fd5b610175600160a060020a036004351660243561078b565b34156102d457600080fd5b61019c600160a060020a036004358116906024351661082f565b34156102f957600080fd5b61030d600160a060020a036004351661085a565b005b60408051908101604052600981527fe4bba5e5a4aae78caa0000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260036020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b6000600160a060020a03831615156103cf57600080fd5b600160a060020a0384166000908152600260205260409020548211156103f457600080fd5b600160a060020a038085166000908152600360209081526040808320339094168352929052205482111561042757600080fd5b600160a060020a038416600090815260026020526040902054610450908363ffffffff6108f516565b600160a060020a038086166000908152600260205260408082209390935590851681522054610485908363ffffffff61090716565b600160a060020a038085166000908152600260209081526040808320949094558783168252600381528382203390931682529190915220546104cd908363ffffffff6108f516565b600160a060020a03808616600081815260036020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b601281565b600160a060020a0333811660009081526003602090815260408083209386168352929052908120548083111561059c57600160a060020a0333811660009081526003602090815260408083209388168352929052908120556105d3565b6105ac818463ffffffff6108f516565b600160a060020a033381166000908152600360209081526040808320938916835292905220555b600160a060020a0333811660008181526003602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600061064482610914565b92915050565b600054600160a060020a031681565b60408051908101604052600381527f45545a0000000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a03831615156106a757600080fd5b600160a060020a0333166000908152600260205260409020548211156106cc57600080fd5b600160a060020a0333166000908152600260205260409020546106f5908363ffffffff6108f516565b600160a060020a03338116600090815260026020526040808220939093559085168152205461072a908363ffffffff61090716565b600160a060020a0380851660008181526002602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a0333811660009081526003602090815260408083209386168352929052908120546107c3908363ffffffff61090716565b600160a060020a0333811660008181526003602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b60005433600160a060020a0390811691161461087557600080fd5b600160a060020a038116151561088a57600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561090157fe5b50900390565b8181018281101561064457fe5b600160a060020a0316600090815260026020526040902054905600a165627a7a723058208ba00f73f60e14240d99318ac0b6a6ff6820f94f63defbd8e7416e69e1976fd20029

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

000000000000000000000000000000000000000000000000000000003b9aca00

-----Decoded View---------------
Arg [0] : initialSupply (uint256): 1000000000

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000003b9aca00


Swarm Source

bzzr://8ba00f73f60e14240d99318ac0b6a6ff6820f94f63defbd8e7416e69e1976fd2
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.