Transaction Hash:
Block:
5090168 at Feb-14-2018 06:18:12 PM +UTC
Transaction Fee:
0.000072167 ETH
$0.18
Gas Used:
72,167 Gas / 1 Gwei
Emitted Events:
155 |
SimpleToken.Transfer( from=[Receiver] Sender, to=[Sender] 0x07916fd6e30d4ee7bc12d0e525046eca0d854500, value=2500000000 )
|
Account State Difference:
Address | Before | After | State Difference | ||
---|---|---|---|---|---|
0x07916fD6...a0d854500 |
0.000325763 Eth
Nonce: 2
|
0.000253595999999999 Eth
Nonce: 3
| 0.000072167000000001 | ||
0x3a26746D...5A307387E | |||||
0x9c821D1e...230D2Bf86 | 0.003642499802396288 Eth | 0.003642499802396289 Eth | 0.000000000000000001 | ||
0xb2930B35...e543a0347
Miner
| (MiningPoolHub: Old Address) | 16,941.587358776942712279 Eth | 16,941.587430943942712279 Eth | 0.000072167 |
Execution Trace
[Sender (ln:74)]
contribute[Sender (ln:75)]
transfer[Sender (ln:66)]
File 1 of 2: Sender
File 2 of 2: SimpleToken
pragma solidity ^0.4.11; /** * Token Batch assignments */ contract token { function balanceOf(address _owner) public returns (uint256 bal); function transfer(address _to, uint256 _value) public returns (bool); } /** * This contract is administered */ contract admined { address public admin; //Admin address is public /** * @dev This constructor set the initial admin of the contract */ function admined() internal { admin = msg.sender; //Set initial admin to contract creator Admined(admin); } modifier onlyAdmin() { //A modifier to define admin-only functions require(msg.sender == admin); _; } /** * @dev Transfer the adminship of the contract * @param _newAdmin The address of the new admin. */ function transferAdminship(address _newAdmin) onlyAdmin public { //Admin can be transfered require(_newAdmin != address(0)); admin = _newAdmin; TransferAdminship(admin); } //All admin actions have a log for public review event TransferAdminship(address newAdmin); event Admined(address administrador); } contract Sender is admined { token public ERC20Token; mapping (address => bool) public flag; //Balances mapping uint256 public price; //with all decimals function Sender (token _addressOfToken, uint256 _initialPrice) public { price = _initialPrice; ERC20Token = _addressOfToken; } function updatePrice(uint256 _newPrice) onlyAdmin public { price = _newPrice; } function contribute() public payable { //It takes an array of addresses and an amount require(flag[msg.sender] == false); flag[msg.sender] = true; ERC20Token.transfer(msg.sender,price); } function withdraw() onlyAdmin public{ require(admin.send(this.balance)); ERC20Token.transfer(admin, ERC20Token.balanceOf(this)); } function() public payable { contribute(); } }
File 2 of 2: SimpleToken
pragma solidity ^0.4.6; library SafeMath { function mul(uint a, uint b) internal returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint a, uint b) internal returns (uint) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint a, uint b) internal returns (uint) { assert(b <= a); return a - b; } function add(uint a, uint b) internal returns (uint) { uint c = a + b; assert(c >= a); return c; } function max64(uint64 a, uint64 b) internal constant returns (uint64) { return a >= b ? a : b; } function min64(uint64 a, uint64 b) internal constant returns (uint64) { return a < b ? a : b; } function max256(uint256 a, uint256 b) internal constant returns (uint256) { return a >= b ? a : b; } function min256(uint256 a, uint256 b) internal constant returns (uint256) { return a < b ? a : b; } function assert(bool assertion) internal { if (!assertion) { throw; } } } contract ERC20Basic { uint public totalSupply; function balanceOf(address who) constant returns (uint); function transfer(address to, uint value); event Transfer(address indexed from, address indexed to, uint value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint); function transferFrom(address from, address to, uint value); function approve(address spender, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract BasicToken is ERC20Basic { using SafeMath for uint; mapping(address => uint) balances; modifier onlyPayloadSize(uint size) { if(msg.data.length < size + 4) { throw; } _; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint representing the amount owned by the passed address. */ function balanceOf(address _owner) constant returns (uint balance) { return balances[_owner]; } } contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) allowed; /** * @dev Transfer tokens from one address to another * @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 uint the amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // if (_value > _allowance) throw; balances[_to] = balances[_to].add(_value); balances[_from] = balances[_from].sub(_value); allowed[_from][msg.sender] = _allowance.sub(_value); Transfer(_from, _to, _value); } /** * @dev Aprove the passed address to spend the specified amount of tokens on beahlf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint _value) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) throw; allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); } /** * @dev Function to check the amount of tokens than 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 uint specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) constant returns (uint remaining) { return allowed[_owner][_spender]; } } contract SimpleToken is StandardToken { string public name = "ETHERBTC"; string public symbol = "ETHB"; uint public decimals = 8; uint public INITIAL_SUPPLY = 2100000000000000; function SimpleToken() { totalSupply = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; } }