Transaction Hash:
Block:
10616378 at Aug-08-2020 02:07:26 AM +UTC
Transaction Fee:
0.009481056 ETH
$20.36
Gas Used:
197,522 Gas / 48 Gwei
Emitted Events:
| 72 |
0xd2898a920f77ac32b379d1b09fc6d17ad8f2207d.0x45280672019b8c8276947211e7ce5ce2107c4025b10c503c426bafdb8caabdcf( 0x45280672019b8c8276947211e7ce5ce2107c4025b10c503c426bafdb8caabdcf, 0x00000000000000000000000041abddb05fff8ed52cfaf5435ae4e2a202ff31b6, 0x000000000000000000000000f39bde97539bd924f96bb29677c3994d53b3cebe, 0x000000000000000000000000000000000000000000000000001550f7dca70000, 000000000000000000000000000000000000000000000000000000005f2e08de, 0000000000000000000000000000000000000000000000000000000000001223, 0000000000000000000000000000000000000000000000000000000000001a91, 0000000000000000000000000000000000000000000000000000000000000000 )
|
| 73 |
0xd2898a920f77ac32b379d1b09fc6d17ad8f2207d.0xaa9c5ea0815809ae6234afa73aef7d42ef76537c06d6ce8f00f38c9c4dd94c97( 0xaa9c5ea0815809ae6234afa73aef7d42ef76537c06d6ce8f00f38c9c4dd94c97, 0x000000000000000000000000f39bde97539bd924f96bb29677c3994d53b3cebe, 0x0000000000000000000000000000000000000000000000000000000000000000, 000000000000000000000000000000000000000000000000000000005f2e08de )
|
| 74 |
0xd2898a920f77ac32b379d1b09fc6d17ad8f2207d.0xefffd168f9bcad9af2b2c24e22e39380303bafa6b19dc2438263c57dfdc0b28c( 0xefffd168f9bcad9af2b2c24e22e39380303bafa6b19dc2438263c57dfdc0b28c, 0x000000000000000000000000f39bde97539bd924f96bb29677c3994d53b3cebe, 0x00000000000000000000000041abddb05fff8ed52cfaf5435ae4e2a202ff31b6, 000000000000000000000000000000000000000000000000000000005f2e08de )
|
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
| 0x41AbdDb0...202fF31b6 | 0.00600126280612723 Eth | 0.01200126280612723 Eth | 0.006 | ||
|
0x52bc44d5...b7d7bE3b5
Miner
| (Nanopool) | 2,776.187032207983971109 Eth | 2,776.196513263983971109 Eth | 0.009481056 | |
| 0xd2898A92...AD8F2207D | |||||
| 0xF39bDe97...D53b3cEBE |
0.01764956 Eth
Nonce: 1
|
0.002168504 Eth
Nonce: 2
| 0.015481056 |
Execution Trace
ETH 0.006
0xd2898a920f77ac32b379d1b09fc6d17ad8f2207d.53b50b68( )
-
Coin.balanceOf( tokenOwner=0xF39bDe97539BD924f96Bb29677c3994D53b3cEBE ) => ( balance=0 )
- ETH 0.006
0x41abddb05fff8ed52cfaf5435ae4e2a202ff31b6.CALL( )
pragma solidity 0.5.11;
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
contract SafeMath {
function safeAdd(uint a, uint b) public pure returns(uint c) {
c = a + b;
require(c >= a);
}
function safeSub(uint a, uint b) public pure returns (uint c) {
require(b <= a);
c = a - b;
}
function safeMul(uint a, uint b) public pure returns (uint c) {
c = a * b;
require(a == 0 || c / a == b);
}
function safeDiv(uint a, uint b) public pure returns (uint c) {
require(b > 0);
c = a / b;
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// ----------------------------------------------------------------------------
contract ERC20Interface {
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
// ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ----------------------------------------------------------------------------
contract Coin is ERC20Interface, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
address owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
constructor(address _owner) public {
symbol = "ERON";
name = "Etheron Token";
decimals = 0;
_totalSupply = 100000;
balances[address(this)] = _totalSupply;
emit Transfer(address(0), address(this), _totalSupply);
owner = _owner;
}
// ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------
function totalSupply() public view returns (uint) {
return _totalSupply - balances[address(0)];
}
// ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------
function balanceOf(address tokenOwner) public view returns (uint balance) {
return balances[tokenOwner];
}
// ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
// ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
// ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - Spender must have sufficient allowance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
return true;
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
return allowed[tokenOwner][spender];
}
// ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------
function () external payable {
revert();
}
// ------------------------------------------------------------------------
// Get current sale price
// ------------------------------------------------------------------------
function getPrice() public view returns (uint price) {
return (_totalSupply - balances[address(this)]) * 0.0001 ether + 0.1 ether;
}
// ------------------------------------------------------------------------
// Buy one coin
// ------------------------------------------------------------------------
function buyOne() public payable returns (bool success) {
uint price = getPrice();
uint fee = price / 10;
require(msg.value == (price + fee), 'Wrong amount');
balances[address(this)] = safeSub(balances[address(this)], 1);
balances[msg.sender] = safeAdd(balances[msg.sender], 1);
emit Transfer(address(this), msg.sender, 1);
address(uint160(owner)).transfer(fee);
return true;
}
// ------------------------------------------------------------------------
// Sell one coin
// ------------------------------------------------------------------------
function sellOne() public returns (bool success) {
uint price = getPrice() - 0.0001 ether;
uint fee = price / 10;
balances[msg.sender] = safeSub(balances[msg.sender], 1);
balances[address(this)] = safeAdd(balances[address(this)], 1);
emit Transfer(msg.sender, address(this), 1);
msg.sender.transfer(price - fee);
address(uint160(owner)).transfer(fee);
return true;
}
}