ETH Price: $1,977.61 (+0.55%)

Transaction Decoder

Block:
5166874 at Feb-27-2018 06:31:25 PM +UTC
Transaction Fee:
0.006853704 ETH $13.55
Gas Used:
207,688 Gas / 33 Gwei

Emitted Events:

0 Hypes.NewOne( owner=[Sender] 0x2017182f6015fd8fe197338d7efa070f30779052, cost=51034919796285562, new_price=55628062577951195 )

Account State Difference:

  Address   Before After State Difference Code
0x15Fda64f...e1DE4Ea41 0.332823978136468667 Eth0.337417120918134362 Eth0.004593142781665695
0x2017182F...F30779052
0.181112980162216363 Eth
Nonce: 360
0.127817499147596496 Eth
Nonce: 361
0.053295481014619867
0x30B3E09d...fBc0B0586 0.988367108306165182 Eth0.992960251087830877 Eth0.004593142781665695
0x507Fc313...0935D016A 4.323018447931611313 Eth4.327611590713277008 Eth0.004593142781665695
(Nanopool)
3,860.204537284871706101 Eth3,860.211390988871706101 Eth0.006853704
0x62D5Be95...D708dA981 0.381361521238592171 Eth0.385954664020257866 Eth0.004593142781665695
0x96F38B66...DCe405171 0.000000000000001284 Eth0.000000000000001346 Eth0.000000000000000062
0xBa2aDE92...CccF5aF01 0.090729702831044721 Eth0.095322845612710416 Eth0.004593142781665695
0xCFE0be20...55a25b056 0.342509355392029831 Eth0.352205990153324076 Eth0.009696634761294245
0xDFEa4bE3...569c46202 0.302175862066607768 Eth0.306769004848273463 Eth0.004593142781665695
0xEb45e9b1...3d7D77B92 0.100109907439034195 Eth0.10470305022069989 Eth0.004593142781665695
0xf3c2F29b...d2065c4b3 1.324931536054409451 Eth1.329524678836075146 Eth0.004593142781665695

Execution Trace

ETH 0.051034919796285562 Hypes.CALL( )
  • ETH 0.004593142781665695 0xf3c2f29bd3199c33d26cbc31d440f66d2065c4b3.CALL( )
  • ETH 0.004593142781665695 0x507fc313f9d50ce32ff94e67df48f7b0935d016a.CALL( )
  • ETH 0.004593142781665695 0x15fda64fcdbca27a60aa8c6ca882aa3e1de4ea41.CALL( )
  • ETH 0.004593142781665695 0x2017182f6015fd8fe197338d7efa070f30779052.CALL( )
  • ETH 0.004593142781665695 0x62d5be95c330b512b35922e347319afd708da981.CALL( )
  • ETH 0.004593142781665695 0xeb45e9b1f4139dd80d5e228d1dcfa3e3d7d77b92.CALL( )
  • ETH 0.004593142781665695 0xba2ade9224f68c8d7153c5ebd5dc7cccccf5af01.CALL( )
  • ETH 0.004593142781665695 0x30b3e09d9a81d6b265a573edc7cc4c4fbc0b0586.CALL( )
  • ETH 0.004593142781665695 0xdfea4be32b1f777d82a6389a0d4f399569c46202.CALL( )
  • ETH 0.009696634761294245 0xcfe0be2056b20cdd6a3fb5dcd7b809155a25b056.CALL( )
  • 0x2017182f6015fd8fe197338d7efa070f30779052.CALL( )
    pragma solidity ^0.4.18;
    
    contract Hypes {
      event NewOne(address owner, uint256 cost, uint256 new_price);
    
      struct Hype {
        address owner;
        uint256 cost;
      }
    
      mapping (uint256 => Hype) public hypes;
      mapping (address => string) public msgs;
    
      address public ceoAddress;
      uint256 public seatPrice = 2500000000000000;
    
      modifier onlyCEO() { require(msg.sender == ceoAddress); _; }
    
      function Hypes() public {
        ceoAddress = msg.sender;
        hypes[1] = Hype(msg.sender, 0);
        hypes[2] = Hype(msg.sender, 0);
        hypes[3] = Hype(msg.sender, 0);
        hypes[4] = Hype(msg.sender, 0);
        hypes[5] = Hype(msg.sender, 0);
        hypes[6] = Hype(msg.sender, 0);
        hypes[7] = Hype(msg.sender, 0);
        hypes[8] = Hype(msg.sender, 0);
        hypes[9] = Hype(msg.sender, 0);
        msgs[msg.sender] = "Claim this spot!";
      }
    
      function getHype(uint256 _slot) public view returns (
        uint256 slot,
        address owner,
        uint256 cost,
        string message
      ) {
        slot = _slot;
        owner = hypes[_slot].owner;
        cost = hypes[_slot].cost;
        message = msgs[hypes[_slot].owner];
      }
    
      function purchase() public payable {
        require(msg.sender != address(0));
        require(msg.value >= seatPrice);
        uint256 excess = SafeMath.sub(msg.value, seatPrice);
        hypes[1].owner.transfer(uint256(SafeMath.mul(SafeMath.div(seatPrice, 100), 9)));
        hypes[2].owner.transfer(uint256(SafeMath.mul(SafeMath.div(seatPrice, 100), 9)));
        hypes[3].owner.transfer(uint256(SafeMath.mul(SafeMath.div(seatPrice, 100), 9)));
        hypes[4].owner.transfer(uint256(SafeMath.mul(SafeMath.div(seatPrice, 100), 9)));
        hypes[5].owner.transfer(uint256(SafeMath.mul(SafeMath.div(seatPrice, 100), 9)));
        hypes[6].owner.transfer(uint256(SafeMath.mul(SafeMath.div(seatPrice, 100), 9)));
        hypes[7].owner.transfer(uint256(SafeMath.mul(SafeMath.div(seatPrice, 100), 9)));
        hypes[8].owner.transfer(uint256(SafeMath.mul(SafeMath.div(seatPrice, 100), 9)));
        hypes[9].owner.transfer(uint256(SafeMath.mul(SafeMath.div(seatPrice, 100), 9)));
        hypes[9] = hypes[8]; hypes[8] = hypes[7]; hypes[7] = hypes[6];
        hypes[6] = hypes[5]; hypes[5] = hypes[4]; hypes[4] = hypes[3];
        hypes[3] = hypes[2]; hypes[2] = hypes[1];
        hypes[1] = Hype(msg.sender, seatPrice);
        ceoAddress.transfer(uint256(SafeMath.mul(SafeMath.div(seatPrice, 100), 19)));
        NewOne(msg.sender, seatPrice, SafeMath.mul(SafeMath.div(seatPrice, 100), 109));
        seatPrice = SafeMath.mul(SafeMath.div(seatPrice, 100), 109);
        msg.sender.transfer(excess);
      }
    
      function setMessage(string message) public payable {
        msgs[msg.sender] = message;
      }
    
      function payout() public onlyCEO {
        ceoAddress.transfer(this.balance);
      }
    }
    
    library SafeMath {
      function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
          return 0;
        }
        uint256 c = a * b;
        assert(c / a == b);
        return c;
      }
      function div(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a / b;
        return c;
      }
      function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(b <= a);
        return a - b;
      }
      function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        assert(c >= a);
        return c;
      }
    }