Address Contract Partially Verified
Address
0xfF48643575fc19Cf51FE247c0b2A7DDF0Fd7181a
Balance
0 ETH
Nonce
1
Code Size
8041 bytes
Creator
0xE1b89934...7957 at tx 0xff5fe92e...f78a2a
Indexed Transactions
0 (1 on-chain, 1.0% indexed)
Contract Bytecode
8041 bytes
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad578063a457c2d711610071578063a457c2d7146105d4578063a9059cbb1461063a578063b187bd26146106a0578063dd62ed3e146106c2578063e53863d11461073a57610121565b806342966c68146104475780634abda84a1461048d57806370a08231146104af5780638da5cb5b1461050757806395d89b411461055157610121565b806318160ddd116100f457806318160ddd146102b357806323b872dd146102d1578063313ce56714610357578063395093511461037b57806340c10f19146103e157610121565b806306fdde0314610126578063095ea7b3146101a957806313af40351461020f57806316c38b3c1461026b575b600080fd5b61012e61075c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016e578082015181840152602081019050610153565b50505050905090810190601f16801561019b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101f5600480360360408110156101bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107fe565b604051808215151515815260200191505060405180910390f35b6102516004803603602081101561022557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610895565b604051808215151515815260200191505060405180910390f35b6102996004803603602081101561028157600080fd5b81019080803515159060200190929190505050610a92565b604051808215151515815260200191505060405180910390f35b6102bb610b69565b6040518082815260200191505060405180910390f35b61033d600480360360608110156102e757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b73565b604051808215151515815260200191505060405180910390f35b61035f610ce4565b604051808260ff1660ff16815260200191505060405180910390f35b6103c76004803603604081101561039157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cfb565b604051808215151515815260200191505060405180910390f35b61042d600480360360408110156103f757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d92565b604051808215151515815260200191505060405180910390f35b6104736004803603602081101561045d57600080fd5b8101908080359060200190929190505050610f71565b604051808215151515815260200191505060405180910390f35b610495611009565b604051808215151515815260200191505060405180910390f35b6104f1600480360360208110156104c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061101c565b6040518082815260200191505060405180910390f35b61050f611064565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61055961108e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561059957808201518184015260208101905061057e565b50505050905090810190601f1680156105c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610620600480360360408110156105ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611130565b604051808215151515815260200191505060405180910390f35b6106866004803603604081101561065057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506111c7565b604051808215151515815260200191505060405180910390f35b6106a861125e565b604051808215151515815260200191505060405180910390f35b610724600480360360408110156106d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611275565b6040518082815260200191505060405180910390f35b6107426112fc565b604051808215151515815260200191505060405180910390f35b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107f45780601f106107c9576101008083540402835291602001916107f4565b820191906000526020600020905b8154815290600101906020018083116107d757829003601f168201915b5050505050905090565b6000600360149054906101000a900460ff1615610883576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f706175736564000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b61088d83836113e3565b905092915050565b6000600360149054906101000a900460ff161561091a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f706175736564000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6f776e6572206973206e6f74206d73672e73656e64657200000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f6f776e6572206973207a65726f2061646472657373000000000000000000000081525060200191505060405180910390fd5b610a89826113fa565b60019050919050565b60003373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b57576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6f776e6572206973206e6f74206d73672e73656e64657200000000000000000081525060200191505060405180910390fd5b610b60826114a1565b60019050919050565b6000600254905090565b6000600360149054906101000a900460ff1615610bf8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f706175736564000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b81610c038533611275565b1015610c77576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4e6f7420656e6f7567682066756e647320616c6c6f776564000000000000000081525060200191505060405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610ca28533611275565b14610cce57610ccd8433610cc885610cba8933611275565b6114f990919063ffffffff16565b611519565b5b610cd9848484611710565b600190509392505050565b6000600660009054906101000a900460ff16905090565b6000600360149054906101000a900460ff1615610d80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f706175736564000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b610d8a83836119ac565b905092915050565b6000600360149054906101000a900460ff1615610e17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f706175736564000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610eda576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6f776e6572206973206e6f74206d73672e73656e64657200000000000000000081525060200191505060405180910390fd5b600360159054906101000a900460ff1615610f5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4d696e74206973206c6f636b656400000000000000000000000000000000000081525060200191505060405180910390fd5b610f678383611a51565b6001905092915050565b6000600360149054906101000a900460ff1615610ff6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f706175736564000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6110003383611c0c565b60019050919050565b600360159054906101000a900460ff1681565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111265780601f106110fb57610100808354040283529160200191611126565b820191906000526020600020905b81548152906001019060200180831161110957829003601f168201915b5050505050905090565b6000600360149054906101000a900460ff16156111b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f706175736564000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6111bf8383611daa565b905092915050565b6000600360149054906101000a900460ff161561124c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f706175736564000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6112568383611e4f565b905092915050565b6000600360149054906101000a900460ff16905090565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60003373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6f776e6572206973206e6f74206d73672e73656e64657200000000000000000081525060200191505060405180910390fd5b6001600360156101000a81548160ff0219169083151502179055506001905090565b60006113f0338484611519565b6001905092915050565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f3edd90e7770f06fafde38004653b33870066c33bfc923ff6102acd601f85dfbc81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b80600360146101000a81548160ff0219169083151502179055507f140eb9f8b591138e129e4caf389c92df4f0545b902523eee9e63153ecdb2026e81604051808215151515815260200191505060405180910390a150565b60008282111561150857600080fd5b600082840390508091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561159f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611f116024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611625576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611ea96022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611796576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611eec6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561181c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611e866023913960400191505060405180910390fd5b61186d816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114f990919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611900816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e6690919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000611a473384611a4285600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e6690919063ffffffff16565b611519565b6001905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611af4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b611b0981600254611e6690919063ffffffff16565b600281905550611b60816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e6690919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611c92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611ecb6021913960400191505060405180910390fd5b611ca7816002546114f990919063ffffffff16565b600281905550611cfe816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114f990919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000611e453384611e4085600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114f990919063ffffffff16565b611519565b6001905092915050565b6000611e5c338484611710565b6001905092915050565b600080828401905083811015611e7b57600080fd5b809150509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a265627a7a72315820e07c63acfb110ffdefcc1939ec17b90b67623a36d3bfb4b9296054307e934af964736f6c634300050b0032
Verified Source Code Partial Match
Compiler: v0.5.11+commit.c082d0b4
EVM: petersburg
Optimization: No
Token.sol 431 lines
pragma solidity 0.5.11;
/**
* @title ERC20 interface
* @dev see https://eips.ethereum.org/EIPS/eip-20
*/
contract IERC20 {
function transfer(address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function allowance(address owner, address spender) public view returns (uint256);
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on 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);
return c;
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns(uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns(uint256) {
require(b <= a);
uint256 c = a - b;
return c;
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns(uint256) {
uint256 c = a + b;
require(c >= a);
return c;
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns(uint256) {
require(b != 0);
return a % b;
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://eips.ethereum.org/EIPS/eip-20
* Using OpenZepplein https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/ERC20.sol
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
* This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for
* all accounts just by listening to said events. Note that this isn't required by the specification, and other
* compliant implementations may not do it.
*/
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowed;
uint256 private _totalSupply;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns(uint256) {
return _totalSupply;
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns(uint256) {
return _balances[owner];
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view returns(uint256) {
return _allowed[owner][spender];
}
/**
* @dev Transfer token to a specified address
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public returns(bool) {
_transfer(msg.sender, to, value);
return true;
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint256 value) public returns(bool) {
_approve(msg.sender, spender, value);
return true;
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public returns(bool) {
_transfer(from, to, value);
_approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
return true;
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns(bool) {
_approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue));
return true;
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns(bool) {
_approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue));
return true;
}
/**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(value);
_balances[account] = _balances[account].add(value);
emit Transfer(address(0), account, value);
}
/**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burn(address account, uint256 value) internal {
require(account != address(0), "ERC20: burn from the zero address");
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint256 value) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowed[owner][spender] = value;
emit Approval(owner, spender, value);
}
/**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* Emits an Approval event (reflecting the reduced allowance).
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burnFrom(address account, uint256 value) internal {
_burn(account, value);
_approve(account, msg.sender, _allowed[account][msg.sender].sub(value));
}
}
/**
* @title Role
* @dev Implementation of the Role contract
*/
contract Role {
address private _owner;
bool private _paused;
event NewOwner(address owner);
event SetPause(bool paused);
modifier onlyOwner {
require(_owner == msg.sender, "owner is not msg.sender");
_;
}
modifier notPaused {
require(!_paused, "paused");
_;
}
function owner() public view returns (address) {
return _owner;
}
function isPaused() public view returns (bool) {
return _paused;
}
function _setOwner(address newOwner) internal {
_owner = newOwner;
emit NewOwner(newOwner);
}
function _setPaused(bool paused) internal {
_paused = paused;
emit SetPause(paused);
}
}
/**
* @title ERC20Base
* @dev Implementation of the ERC20Base contract
*/
contract ERC20Base is ERC20, Role {
bool public mintlock;
function transfer(address _to, uint256 _value) public notPaused returns(bool) {
return super.transfer(_to, _value);
}
// override
function transferFrom(address _from, address _to, uint256 _value) public notPaused returns(bool) {
require(allowance(_from, msg.sender) >= _value, "Not enough funds allowed");
// save gas when allowance is maximal by not reducing it (see https://github.com/ethereum/EIPs/issues/717)
if (allowance(_from, msg.sender) != (2 ** 256) - 1) {
_approve(_from, msg.sender, allowance(_from, msg.sender).sub(_value));
}
_transfer(_from, _to, _value);
return true;
}
function approve(address _spender, uint256 _value) public notPaused returns(bool) {
return super.approve(_spender, _value);
}
function increaseAllowance(address _spender, uint _addedValue) public notPaused returns(bool success) {
return super.increaseAllowance(_spender, _addedValue);
}
function decreaseAllowance(address _spender, uint _subtractedValue) public notPaused returns(bool success) {
return super.decreaseAllowance(_spender, _subtractedValue);
}
function mint(address _to, uint256 _amount) public notPaused onlyOwner returns(bool) {
require(!mintlock, "Mint is locked");
_mint(_to, _amount);
return true;
}
function burn(uint256 _amount) public notPaused returns(bool) {
_burn(msg.sender, _amount);
return true;
}
function setOwner(address _owner) public notPaused onlyOwner returns(bool) {
require(_owner != address(0), "owner is zero address");
_setOwner(_owner);
return true;
}
function setMintlock() public onlyOwner returns(bool) {
mintlock = true;
return true;
}
function setPaused(bool _paused) public onlyOwner returns(bool) {
_setPaused(_paused);
return true;
}
}
/**
* @title Token
* @dev Implementation of the Token contract
*/
contract Token is ERC20Base {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(string memory name, string memory symbol, uint8 decimals, uint256 _value) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
_setOwner(msg.sender);
_mint(msg.sender, _value);
}
/**
* @return the name of the token.
*/
function name() public view returns(string memory) {
return _name;
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns(string memory) {
return _symbol;
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns(uint8) {
return _decimals;
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
isPaused 0xb187bd26 → bool
mintlock 0x4abda84a → bool
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
burn 0x42966c68
uint256 _amount
returns: bool
decreaseAllowance 0xa457c2d7
address _spender
uint256 _subtractedValue
returns: bool
increaseAllowance 0x39509351
address _spender
uint256 _addedValue
returns: bool
mint 0x40c10f19
address _to
uint256 _amount
returns: bool
setMintlock 0xe53863d1
No parameters
returns: bool
setOwner 0x13af4035
address _owner
returns: bool
setPaused 0x16c38b3c
bool _paused
returns: bool
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
Recent Transactions
This address has 1 on-chain transactions, but only 1.0% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →