Transaction Hash:
Block:
7254493 at Feb-22-2019 08:42:01 PM +UTC
Transaction Fee:
0.00025888 ETH
$0.56
Gas Used:
51,776 Gas / 5 Gwei
Emitted Events:
| 81 |
YHYL.Transfer( from=[Sender] 0xb7a2b52f8bf883346ba8cc3fe91ac7c5d923e971, to=0x51a569adbE2C2C866f8e5C748CE4576a809F2745, tokens=1000000000 )
|
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
|
0x829BD824...93333A830
Miner
| (F2Pool Old) | 7,133.980904552163452003 Eth | 7,133.981163432163452003 Eth | 0.00025888 | |
| 0xb7a2b52f...5D923E971 |
3.16900368 Eth
Nonce: 3297
|
3.1687448 Eth
Nonce: 3298
| 0.00025888 | ||
| 0xfFA39dcB...3a411052C |
Execution Trace
YHYL.transfer( _to=0x51a569adbE2C2C866f8e5C748CE4576a809F2745, _value=1000000000 ) => ( True )
transfer[YHYL (ln:96)]
Transfer[YHYL (ln:104)]
pragma solidity ^0.4.25;
library SafeMath {
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;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0); // Solidity only automatically asserts 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 c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a);
uint256 c = a - b;
return c;
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a);
return c;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
}
contract YHYL {
mapping(address => uint256) public balances;
mapping(address => mapping (address => uint256)) public allowed;
using SafeMath for uint256;
address public owner;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 private constant MAX_UINT256 = 2**256 -1 ;
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
bool lock = false;
constructor(
uint256 _initialAmount,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol
) public {
owner = msg.sender;
balances[msg.sender] = _initialAmount;
totalSupply = _initialAmount;
name = _tokenName;
decimals = _decimalUnits;
symbol = _tokenSymbol;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
modifier isLock {
require(!lock);
_;
}
function setLock(bool _lock) onlyOwner public{
lock = _lock;
}
function transferOwnership(address newOwner) onlyOwner public {
if (newOwner != address(0)) {
owner = newOwner;
}
}
function transfer(
address _to,
uint256 _value
) public returns (bool) {
require(balances[msg.sender] >= _value);
require(msg.sender == _to || balances[_to] <= MAX_UINT256 - _value);
balances[msg.sender] -= _value;
balances[_to] += _value;
emit Transfer(msg.sender, _to, _value);
return true;
}
function transferFrom(
address _from,
address _to,
uint256 _value
) public returns (bool) {
uint256 allowance = allowed[_from][msg.sender];
require(balances[_from] >= _value);
require(_from == _to || balances[_to] <= MAX_UINT256 -_value);
require(allowance >= _value);
balances[_from] -= _value;
balances[_to] += _value;
if (allowance < MAX_UINT256) {
allowed[_from][msg.sender] -= _value;
}
emit Transfer(_from, _to, _value);
return true;
}
function balanceOf(
address _owner
) public view returns (uint256) {
return balances[_owner];
}
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];
}
}