ETH Price: $2,120.13 (-2.04%)

Transaction Decoder

Block:
7622297 at Apr-23-2019 06:52:05 AM +UTC
Transaction Fee:
0.000658134 ETH $1.40
Gas Used:
36,563 Gas / 18 Gwei

Emitted Events:

Account State Difference:

  Address   Before After State Difference Code
(Uleypool)
0.213577726540004555 Eth0.214235860540004555 Eth0.000658134
0xc1E1A219...3Ef49941e
0.014501441085 Eth
Nonce: 191
0.013843307085 Eth
Nonce: 192
0.000658134
0xE474c6f0...9BC4EF03f

Execution Trace

POCBGHToken.transfer( to=0x44E103Dc994D53dD15755736BdB12da8f77D449C, tokens=500000000000000000000 ) => ( success=True )
pragma solidity >=0.4.22 <0.7.0;

contract POCBGHToken{


    // -------------------------SafeMath Start-----------------------------------------------
    //
    function safeAdd(uint a, uint b) private pure returns (uint c) { c = a + b; require(c >= a); }
    function safeSub(uint a, uint b) private pure returns (uint c) { require(b <= a); c = a - b; }
    function safeMul(uint a, uint b) private pure returns (uint c) { c = a * b; require(a == 0 || c / a == b);}
    function safeDiv(uint a, uint b) private pure returns (uint c) { require(b > 0); c = a / b; }
    //
    // -------------------------SafeMath End-------------------------------------------------

    // -------------------------Owned Start-----------------------------------------------
    //
    address public owner;
    address public newOwner;

    // constructor() public {
    //     owner = msg.sender;
    // }

    event OwnershipTransferred(address indexed _from, address indexed _to);
    modifier onlyOwner { require(msg.sender == owner); _; }

    function transferOwnership(address _newOwner) public onlyOwner {
        newOwner = _newOwner;
    }
    function acceptOwnership() public {
        require(msg.sender == newOwner);
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
        newOwner = address(0);
    }
    //
    // -------------------------Owned End-------------------------------------------------

    // -------------------------ERC20Interface Start-----------------------------------------------
    //
    string public symbol = "POCBGH";
    string public name = "POC Big Gold Hammer";
    uint8 public decimals = 18;
    uint public totalSupply = 21e24;//总量2100万
    bool public allowTransfer = true;//是否允许交易

    mapping(address => uint) private balances;

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);

    address private retentionAddress = 0xB4c5baF0450Af948DEBbe8aA8A20B9A05a3475c0;

    constructor() public {
        owner = msg.sender;

        balances[owner] = 7e24;
        balances[retentionAddress] = 14e24;
        emit Transfer(address(0), owner, balances[owner]);
        emit Transfer(address(0), retentionAddress, balances[retentionAddress]);
    }
    function balanceOf(address tokenOwner) public view returns (uint balance) {
        balance = balances[tokenOwner];
    }
    function allowance(address tokenOwner, address spender) public pure returns (uint remaining) {
        require(tokenOwner != spender);
        //------do nothing------
        remaining = 0;
    }
    function transfer(address to, uint tokens) public returns (bool success) {
        require(allowTransfer && tokens > 0);
        require(to != msg.sender);

        balances[msg.sender] = safeSub(balances[msg.sender], tokens);
        balances[to] = safeAdd(balances[to], tokens);
        emit Transfer(msg.sender, to, tokens);
        success = true;
    }
    function approve(address spender, uint tokens) public pure returns (bool success) {
        require(address(0) != spender);
        require(tokens > 0);
        //------do nothing------
        success = false;
    }
    function transferFrom(address from, address to, uint tokens) public pure returns (bool success) {
        require(from != to);
        require(tokens > 0);
        //------do nothing------
        success = false;
    }
    //
    // -------------------------ERC20Interface End-------------------------------------------------

    // -------------------------Others-----------------------------------------------
    //
    function chAllowTransfer(bool _allowTransfer) public onlyOwner {
        allowTransfer = _allowTransfer;
    }
    function sendToken(address[] memory _to, uint[] memory _tokens) public onlyOwner {
        if (_to.length != _tokens.length) {
            revert();
        }
        uint count = 0;
        for (uint i = 0; i < _tokens.length; i++) {
            count = safeAdd(count, _tokens[i]);
        }
        if (count > balances[msg.sender]) {
            revert();
        }
        for (uint i = 0; i < _to.length; i++) {
            transfer(_to[i], _tokens[i]);
        }
    }
}