Address Contract Partially Verified
Address
0xEC6BEDE35c796D4d990c2CbB4665aEc1Ed82FF15
Balance
0 ETH
Nonce
1
Code Size
4141 bytes
Creator
0xB7A0946B...8940 at tx 0xf03a3c15...3f6895
Indexed Transactions
0 (1 on-chain, 1.1% indexed)
Contract Bytecode
4141 bytes
0x60806040526004361061010b577c0100000000000000000000000000000000000000000000000000000000600035046306fdde038114610110578063095ea7b31461019a57806318160ddd146101e757806323b872dd1461020e578063313ce5671461025157806342966c681461027c57806370a08231146102a6578063718ccce9146102d957806379c650681461030c57806379cc6790146103455780638da5cb5b1461037e57806395d89b41146103af578063a153e708146103c4578063a9059cbb146103f7578063b414d4b614610430578063cae9ca5114610463578063dd62ed3e1461052b578063e2ab691d14610566578063e724529c146105a5578063f2fde38b146105e0575b600080fd5b34801561011c57600080fd5b50610125610615565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015f578181015183820152602001610147565b50505050905090810190601f16801561018c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101a657600080fd5b506101d3600480360360408110156101bd57600080fd5b50600160a060020a0381351690602001356106a2565b604080519115158252519081900360200190f35b3480156101f357600080fd5b506101fc610708565b60408051918252519081900360200190f35b34801561021a57600080fd5b506101d36004803603606081101561023157600080fd5b50600160a060020a0381358116916020810135909116906040013561070e565b34801561025d57600080fd5b506102666107ac565b6040805160ff9092168252519081900360200190f35b34801561028857600080fd5b506101d36004803603602081101561029f57600080fd5b50356107b5565b3480156102b257600080fd5b506101fc600480360360208110156102c957600080fd5b5035600160a060020a0316610854565b3480156102e557600080fd5b506101fc600480360360208110156102fc57600080fd5b5035600160a060020a0316610866565b34801561031857600080fd5b506101d36004803603604081101561032f57600080fd5b50600160a060020a038135169060200135610878565b34801561035157600080fd5b506101d36004803603604081101561036857600080fd5b50600160a060020a038135169060200135610932565b34801561038a57600080fd5b50610393610a6f565b60408051600160a060020a039092168252519081900360200190f35b3480156103bb57600080fd5b50610125610a7e565b3480156103d057600080fd5b506101fc600480360360208110156103e757600080fd5b5035600160a060020a0316610ad6565b34801561040357600080fd5b506101d36004803603604081101561041a57600080fd5b50600160a060020a038135169060200135610ae8565b34801561043c57600080fd5b506101d36004803603602081101561045357600080fd5b5035600160a060020a0316610afe565b34801561046f57600080fd5b506101d36004803603606081101561048657600080fd5b600160a060020a03823516916020810135918101906060810160408201356401000000008111156104b657600080fd5b8201836020820111156104c857600080fd5b803590602001918460018302840111640100000000831117156104ea57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610b13945050505050565b34801561053757600080fd5b506101fc6004803603604081101561054e57600080fd5b50600160a060020a0381358116916020013516610c31565b34801561057257600080fd5b506101d36004803603606081101561058957600080fd5b50600160a060020a038135169060208101359060400135610c4e565b3480156105b157600080fd5b506101d3600480360360408110156105c857600080fd5b50600160a060020a0381351690602001351515610c93565b3480156105ec57600080fd5b506106136004803603602081101561060357600080fd5b5035600160a060020a0316610d14565b005b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561069a5780601f1061066f5761010080835404028352916020019161069a565b820191906000526020600020905b81548152906001019060200180831161067d57829003601f168201915b505050505081565b336000818152600660209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60045481565b600160a060020a038316600090815260066020908152604080832033845290915281205482111561073e57600080fd5b600160a060020a0384166000908152600660209081526040808320338452909152902054610772908363ffffffff610d5a16565b600160a060020a03851660009081526006602090815260408083203384529091529020556107a1848484610dd1565b5060015b9392505050565b60035460ff1681565b336000908152600560205260408120548211156107d157600080fd5b336000908152600560205260409020546107f1908363ffffffff610d5a16565b336000908152600560205260409020819055610813908363ffffffff610d5a16565b60045560408051838152905133917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2506001919050565b60056020526000908152604090205481565b60086020526000908152604090205481565b60008054600160a060020a0316331461089057600080fd5b600160a060020a0383166000908152600560205260409020546108b9908363ffffffff610f8d16565b600160a060020a0384166000908152600560205260409020556004546108e5908363ffffffff610f8d16565b600455604080518381529051600160a060020a038516916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b600160a060020a03821660009081526005602052604081205482111561095757600080fd5b600160a060020a038316600090815260066020908152604080832033845290915290205482111561098757600080fd5b600160a060020a0383166000908152600560205260409020546109b0908363ffffffff610d5a16565b600160a060020a03841660009081526005602090815260408083209390935560068152828220338352905220546109ed908363ffffffff610d5a16565b600160a060020a0384166000908152600660209081526040808320338452909152902055600454610a24908363ffffffff610d5a16565b600455604080518381529051600160a060020a038516917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a250600192915050565b600054600160a060020a031681565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561069a5780601f1061066f5761010080835404028352916020019161069a565b60096020526000908152604090205481565b6000610af5338484610dd1565b50600192915050565b60076020526000908152604090205460ff1681565b600083610b2081856106a2565b15610c29576040517f8f4ffcb10000000000000000000000000000000000000000000000000000000081523360048201818152602483018790523060448401819052608060648501908152875160848601528751600160a060020a03871695638f4ffcb195948b94938b939192909160a490910190602085019080838360005b83811015610bb8578181015183820152602001610ba0565b50505050905090810190601f168015610be55780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015610c0757600080fd5b505af1158015610c1b573d6000803e3d6000fd5b5050505060019150506107a5565b509392505050565b600660209081526000928352604080842090915290825290205481565b60008054600160a060020a03163314610c6657600080fd5b50600160a060020a0392909216600090815260086020908152604080832093909355600990522055600190565b60008054600160a060020a03163314610cab57600080fd5b600160a060020a038316600081815260076020908152604091829020805460ff191686151590811790915582519384529083015280517f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a59281900390910190a150600192915050565b600054600160a060020a03163314610d2b57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610dcb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600160a060020a038316600090815260086020526040902054421180610e1b5750600160a060020a0383166000908152600560209081526040808320546009909252909120548201105b1515610e2657600080fd5b600160a060020a0382161515610e3b57600080fd5b600160a060020a038316600090815260056020526040902054811115610e6057600080fd5b600160a060020a0382166000908152600560205260409020548181011015610e8757600080fd5b600160a060020a03831660009081526007602052604090205460ff1615610ead57600080fd5b600160a060020a03821660009081526007602052604090205460ff1615610ed357600080fd5b600160a060020a038316600090815260056020526040902054610efc908263ffffffff610d5a16565b600160a060020a038085166000908152600560205260408082209390935590841681522054610f31908263ffffffff610f8d16565b600160a060020a0380841660008181526005602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828201838110156107a557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fdfea165627a7a72305820179f2569322e7cf0e755206acef964f8dbebcc7ca22572d7245440e5a93ad7640029
Verified Source Code Partial Match
Compiler: v0.5.1+commit.c8a2cb62
EVM: byzantium
Optimization: Yes (200 runs)
ERC20ext.sol 344 lines
pragma solidity >=0.4.22 <0.6.0;
/**
* @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-contracts/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;
}
}
contract owned {
address public owner;
constructor() public {
owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
function transferOwnership(address newOwner) onlyOwner public {
owner = newOwner;
}
}
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; }
contract TokenERC20 {
using SafeMath for uint256;
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
// This generates a public event on the blockchain that will notify clients
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
constructor(
uint256 initialSupply,
string memory tokenName,
string memory tokenSymbol
) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens
name = tokenName; // Set the name for display purposes
symbol = tokenSymbol; // Set the symbol for display purposes
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != address(0x0));
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value > balanceOf[_to]);
// Save this for an assertion in the future
uint previousBalances = balanceOf[_from] + balanceOf[_to];
// Subtract from the sender
balanceOf[_from] = balanceOf[_from].sub(_value);
// Add the same to the recipient
balanceOf[_to] = balanceOf[_to].add(_value);
emit Transfer(_from, _to, _value);
// Asserts are used to use static analysis to find bugs in your code. They should never fail
assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public returns (bool success) {
_transfer(msg.sender, _to, _value);
return true;
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);
_transfer(_from, _to, _value);
return true;
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, address(this), _extraData);
return true;
}
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); // Subtract from the sender
totalSupply = balanceOf[msg.sender].sub(_value); // Updates totalSupply
emit Burn(msg.sender, _value);
return true;
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] = balanceOf[_from].sub(_value); // Subtract from the targeted balance
allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value); // Subtract from the sender's allowance
totalSupply = totalSupply.sub(_value);
emit Burn(_from, _value);
return true;
}
}
/******************************************/
/* ADVANCED TOKEN STARTS HERE */
/******************************************/
contract ERC20ext is owned, TokenERC20 {
using SafeMath for uint256;
mapping (address => bool) public frozenAccount;
mapping (address => uint256) public lockedAccount;
mapping (address => uint256) public lockedAmount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contract */
constructor(
uint256 initialSupply,
string memory tokenName,
string memory tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
/* Internal transfer, only can be called by this contract */
function _transfer(address _from, address _to, uint _value) internal {
require ((block.timestamp > lockedAccount[_from]) || lockedAmount[_from] + _value < balanceOf[_from]);
require (_to != address(0x0)); // Prevent transfer to 0x0 address. Use burn() instead
require (balanceOf[_from] >= _value); // Check if the sender has enough
require (balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows
require(!frozenAccount[_from]); // Check if sender is frozen
require(!frozenAccount[_to]); // Check if recipient is frozen
balanceOf[_from] = balanceOf[_from].sub(_value);
balanceOf[_to] = balanceOf[_to].add(_value); // Add the same to the recipient
emit Transfer(_from, _to, _value);
}
/// @notice Create `mintedAmount` tokens and send it to `target`
/// @param target Address to receive the tokens
/// @param mintedAmount the amount of tokens it will receive
function mintToken(address target, uint256 mintedAmount) onlyOwner public returns (bool success){
balanceOf[target] = balanceOf[target].add(mintedAmount);
totalSupply = totalSupply.add(mintedAmount);
// emit Transfer(address(0), address(this), mintedAmount);
emit Transfer(address(0), target, mintedAmount);
return true;
}
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not
function freezeAccount(address target, bool freeze) onlyOwner public returns (bool success){
frozenAccount[target] = freeze;
emit FrozenFunds(target, freeze);
return true;
}
function lock(address target, uint256 time, uint256 amount) onlyOwner public returns (bool success){
lockedAccount[target] = time;
lockedAmount[target] = amount;
return true;
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
frozenAccount 0xb414d4b6 → bool
lockedAccount 0x718ccce9 → uint256
lockedAmount 0xa153e708 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 10 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
approveAndCall 0xcae9ca51
address _spender
uint256 _value
bytes _extraData
returns: bool
burn 0x42966c68
uint256 _value
returns: bool
burnFrom 0x79cc6790
address _from
uint256 _value
returns: bool
freezeAccount 0xe724529c
address target
bool freeze
returns: bool
lock 0xe2ab691d
address target
uint256 time
uint256 amount
returns: bool
mintToken 0x79c65068
address target
uint256 mintedAmount
returns: bool
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
This address has 1 on-chain transactions, but only 1.1% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →