Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xE478d4F4a87D4D641AF97ca0b5Cc3dB61e266357
Balance 0 ETH
Nonce 1
Code Size 3839 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

3839 bytes
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad57806395d89b411161007157806395d89b4114610126578063a457c2d714610332578063a9059cbb1461035e578063dd62ed3e1461038a578063f2fde38b146103b857610121565b806370a08231146102ac57806379cc6790146102d25780638456cb59146102fe5780638da5cb5b146103065780638f32d59b1461032a57610121565b8063313ce567116100f4578063313ce5671461023357806339509351146102515780633f4ba83a1461027d57806342966c68146102875780635c975abb146102a457610121565b806306fdde0314610126578063095ea7b3146101a357806318160ddd146101e357806323b872dd146101fd575b600080fd5b61012e6103de565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b0381351690602001356103ff565b604080519115158252519081900360200190f35b6101eb61045c565b60408051918252519081900360200190f35b6101cf6004803603606081101561021357600080fd5b506001600160a01b03813581169160208101359091169060400135610462565b61023b6104c1565b6040805160ff9092168252519081900360200190f35b6101cf6004803603604081101561026757600080fd5b506001600160a01b0381351690602001356104c6565b61028561051c565b005b6102856004803603602081101561029d57600080fd5b50356105df565b6101cf61062f565b6101eb600480360360208110156102c257600080fd5b50356001600160a01b031661063f565b610285600480360360408110156102e857600080fd5b506001600160a01b03813516906020013561065a565b6102856106ab565b61030e610775565b604080516001600160a01b039092168252519081900360200190f35b6101cf610784565b6101cf6004803603604081101561034857600080fd5b506001600160a01b038135169060200135610795565b6101cf6004803603604081101561037457600080fd5b506001600160a01b0381351690602001356107eb565b6101eb600480360360408110156103a057600080fd5b506001600160a01b0381358116916020013516610841565b610285600480360360208110156103ce57600080fd5b50356001600160a01b031661086c565b604051806040016040528060058152602001644c55434b5960d81b81525081565b600354600090600160a01b900460ff161561044b5760405162461bcd60e51b815260040180806020018281038252602e815260200180610e59602e913960400191505060405180910390fd5b61045583836108b8565b9392505050565b60025490565b600354600090600160a01b900460ff16156104ae5760405162461bcd60e51b815260040180806020018281038252602e815260200180610e59602e913960400191505060405180910390fd5b6104b98484846108ce565b949350505050565b601281565b600354600090600160a01b900460ff16156105125760405162461bcd60e51b815260040180806020018281038252602e815260200180610e59602e913960400191505060405180910390fd5b6104558383610925565b610524610784565b61055f5760405162461bcd60e51b8152600401808060200182810382526021815260200180610eaa6021913960400191505060405180910390fd5b600354600160a01b900460ff166105a75760405162461bcd60e51b815260040180806020018281038252602a815260200180610e2f602a913960400191505060405180910390fd5b6003805460ff60a01b191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6105e7610784565b6106225760405162461bcd60e51b8152600401808060200182810382526021815260200180610eaa6021913960400191505060405180910390fd5b61062c3382610961565b50565b600354600160a01b900460ff1681565b6001600160a01b031660009081526020819052604090205490565b610662610784565b61069d5760405162461bcd60e51b8152600401808060200182810382526021815260200180610eaa6021913960400191505060405180910390fd5b6106a78282610a43565b5050565b6106b3610784565b6106ee5760405162461bcd60e51b8152600401808060200182810382526021815260200180610eaa6021913960400191505060405180910390fd5b600354600160a01b900460ff16156107375760405162461bcd60e51b815260040180806020018281038252602e815260200180610e59602e913960400191505060405180910390fd5b6003805460ff60a01b1916600160a01b1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b6003546001600160a01b031690565b6003546001600160a01b0316331490565b600354600090600160a01b900460ff16156107e15760405162461bcd60e51b815260040180806020018281038252602e815260200180610e59602e913960400191505060405180910390fd5b6104558383610a88565b600354600090600160a01b900460ff16156108375760405162461bcd60e51b815260040180806020018281038252602e815260200180610e59602e913960400191505060405180910390fd5b6104558383610ac4565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610874610784565b6108af5760405162461bcd60e51b8152600401808060200182810382526021815260200180610eaa6021913960400191505060405180910390fd5b61062c81610ad1565b60006108c5338484610b72565b50600192915050565b60006108db848484610c5e565b6001600160a01b03841660009081526001602090815260408083203380855292529091205461091b918691610916908663ffffffff610d5b16565b610b72565b5060019392505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916108c5918590610916908663ffffffff610d7016565b6001600160a01b0382166109a65760405162461bcd60e51b8152600401808060200182810382526029815260200180610dc66029913960400191505060405180910390fd5b6001600160a01b0382166000908152602081905260409020546109cf908263ffffffff610d5b16565b6001600160a01b0383166000908152602081905260409020556002546109fb908263ffffffff610d5b16565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b610a4d8282610961565b6001600160a01b0382166000908152600160209081526040808320338085529252909120546106a7918491610916908563ffffffff610d5b16565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916108c5918590610916908663ffffffff610d5b16565b60006108c5338484610c5e565b6001600160a01b038116610b165760405162461bcd60e51b8152600401808060200182810382526040815260200180610def6040913960400191505060405180910390fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038216610bb75760405162461bcd60e51b8152600401808060200182810382526022815260200180610d836022913960400191505060405180910390fd5b6001600160a01b038316610bfc5760405162461bcd60e51b8152600401808060200182810382526021815260200180610da56021913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038216610ca35760405162461bcd60e51b8152600401808060200182810382526023815260200180610e876023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054610ccc908263ffffffff610d5b16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610d01908263ffffffff610d7016565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610d6a57600080fd5b50900390565b60008282018381101561045557600080fdfe43616e6e6f7420617070726f766520746f20746865207a65726f20616464726573735365747465722063616e6e6f7420626520746865207a65726f20616464726573735374616e64617264546f6b656e3a206275726e2066726f6d20746865207a65726f20616464726573734f776e61626c653a2063616e6e6f74207472616e7366657220636f6e74726f6c206f662074686520636f6e747261637420746f207a65726f20616464726573735061757361626c653a206f6e6c79207768656e2074686520636f6e7472616374206973207061757365645061757361626c653a206f6e6c79207768656e2074686520636f6e7472616374206973206e6f742070617573656443616e6e6f74207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a207468652063616c6c6572206d757374206265206f776e6572a265627a7a72315820f4c47bf0c5d595ce07dc349a6ec97611a754482d45a97f31240c0423ca7054c664736f6c634300050f0032

Verified Source Code Partial Match

Compiler: v0.5.15+commit.6a57276f EVM: istanbul Optimization: Yes (200 runs)
LUCKYToken.sol 410 lines
pragma solidity 0.5.15;

/**
 * @title SafeMath 
 * @dev Unsigned math operations with safety checks that revert on error.
 */
library SafeMath {
    /**
     * @dev Multiplie two unsigned integers, revert 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, revert 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 Subtract two unsigned integers, revert on underflow (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 Add two unsigned integers, revert on overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);

        return c;
    }
}


/**
 * @title ERC20 interface
 * @dev See https://eips.ethereum.org/EIPS/eip-20
 */
interface IERC20 {
    function transfer(address to, uint256 value) external returns (bool); 

    function approve(address spender, uint256 value) external returns (bool); 

    function transferFrom(address from, address to, uint256 value) external returns (bool); 

    function totalSupply() external view returns (uint256); 

    function balanceOf(address who) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256); 

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

    event Approval(address indexed owner, address indexed spender, uint256 value); 
}


/**
 * @title Standard ERC20 token
 * @dev Implementation of the basic standard token.
 */
contract StandardToken is IERC20 {
    using SafeMath for uint256; 
    
    mapping (address => uint256) internal _balances; 
    mapping (address => mapping (address => uint256)) internal _allowed; 
    
    uint256 internal _totalSupply; 
    
    /**
     * @dev Total number of tokens in existence.
     */
    function totalSupply() public view returns (uint256) {
        return _totalSupply; 
    }

    /**
     * @dev Get 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 The address which owns the funds.
     * @param spender 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 tokens 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 The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value 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 tokens for a specified address.
     * @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(to != address(0), "Cannot transfer to the zero address"); 
        _balances[from] = _balances[from].sub(value); 
        _balances[to] = _balances[to].add(value); 
        emit Transfer(from, to, 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(spender != address(0), "Cannot approve to the zero address"); 
        require(owner != address(0), "Setter cannot be the zero address"); 
	    _allowed[owner][spender] = value;
        emit Approval(owner, spender, value); 
    }

     /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 value) internal {
        require(account != address(0), "StandardToken: burn from the zero address");

        _balances[account] = _balances[account].sub(value);
        _totalSupply = _totalSupply.sub(value);
        emit Transfer(account, address(0), value);
    }

    /**
     * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal {
        _burn(account, amount);
        _approve(account, msg.sender, _allowed[account][msg.sender].sub(amount));
    }

}


/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address internal _owner;

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

    /**
     * @return the address of the owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: the caller must be owner");
        _;
    }

    /**
     * @return true if `msg.sender` is the owner of the contract.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: cannot transfer control of the contract to zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
    event Pause();
    event Unpause();

    bool public paused = false;

    /**
    * @dev Modifier to make a function callable only when the contract is not paused.
    */
    modifier whenNotPaused() {
        require(!paused, "Pausable: only when the contract is not paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     */
    modifier whenPaused() {
        require(paused, "Pausable: only when the contract is paused");
        _;
    }

    /**
     * @dev Called by the owner to pause, trigger stopped state
     */
    function pause() public onlyOwner whenNotPaused {
        paused = true;
        emit Pause();
    }

    /**
     * @dev Called by the owner to unpause, return to normal state
     */
    function unpause() public onlyOwner whenPaused {
        paused = false;
        emit Unpause();
    }
}


/**
 * @title PausableToken
 * @dev ERC20 modified with pausable transfers.
 */
contract PausableToken is StandardToken, Pausable {

    function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
        return super.transfer(_to, _value);
    }

    function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
        return super.transferFrom(_from, _to, _value);
    }

    function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) {
        return super.approve(_spender, _value);
    }

    function increaseAllowance(address _spender, uint _addedValue) public whenNotPaused returns (bool success) {
        return super.increaseAllowance(_spender, _addedValue);
    }

    function decreaseAllowance(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) {
        return super.decreaseAllowance(_spender, _subtractedValue);
    }
}

/**
 * @title BurnableToken
 * @dev Implement the function of ERC20 token burning.
 */
contract BurnableToken is StandardToken, Ownable {

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public onlyOwner {
        _burn(msg.sender, amount);
    }

    /**
     * @dev See {ERC20-_burnFrom}.
     */
    function burnFrom(address account, uint256 amount) public onlyOwner {
        _burnFrom(account, amount);
    }
}


contract LUCKYToken is BurnableToken, PausableToken {
    string public constant name = "LUCKY";  
    string public constant symbol = "LUCKY";  
    uint8 public constant decimals = 18;
    uint256 internal constant INIT_TOTALSUPPLY = 10000000000;
    address internal constant _tokenOwner = 0x6d881594c2638e21eF8BE440d341AECE3C81875F;
    
    /**
     * @dev Constructor, initialize the basic information of contract.
     */
    constructor() public {
        _totalSupply = INIT_TOTALSUPPLY * 10 ** uint256(decimals);
        _owner = _tokenOwner;
        emit OwnershipTransferred(address(0), _owner);
        _balances[_owner] = _totalSupply;
        emit Transfer(address(0), _owner, _totalSupply);
    }
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
isOwner 0x8f32d59b → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
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
burnFrom 0x79cc6790
address account
uint256 amount
decreaseAllowance 0xa457c2d7
address _spender
uint256 _subtractedValue
returns: bool
increaseAllowance 0x39509351
address _spender
uint256 _addedValue
returns: bool
pause 0x8456cb59
No parameters
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
unpause 0x3f4ba83a
No parameters

Recent Transactions

No transactions found for this address