Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xb5f7504BC2464CD9a7AdFd72EE8fd4a00a3c7B2E
Balance 0 ETH
Nonce 1
Code Size 1893 bytes
Last Active
Indexed Transactions 6 (10,630,76710,630,824)
Value (indexed) ↓ 0.250321 ETH
Gas Used (indexed) 228,771
External Etherscan · Sourcify

Contract Bytecode

1893 bytes
0x60806040526004361061007b5760003560e01c8063bc02d8cb1161004e578063bc02d8cb14610123578063d792eea11461014e578063deea9e9c14610179578063e3cfef60146101d05761007b565b80634e71d92d14610080578063827d1bae146100975780638da5cb5b146100c2578063974c86b514610119575b600080fd5b34801561008c57600080fd5b506100956101fb565b005b3480156100a357600080fd5b506100ac61049d565b6040518082815260200191505060405180910390f35b3480156100ce57600080fd5b506100d76104a3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101216104c9565b005b34801561012f57600080fd5b506101386106ac565b6040518082815260200191505060405180910390f35b34801561015a57600080fd5b506101636106b2565b6040518082815260200191505060405180910390f35b34801561018557600080fd5b5061018e6106bc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101dc57600080fd5b506101e56106e2565b6040518082815260200191505060405180910390f35b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000546201518001421015610282576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061070b6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610325576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4e6f2063757272656e74207768616c65732e000000000000000000000000000081525060200191505060405180910390fd5b60006001819055506000600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc603247816103b557fe5b049081150290604051600060405180830381858888f193505050501580156103e1573d6000803e3d6000fd5b5060004790508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561042d573d6000803e3d6000fd5b507f1504e40bf894d2b010eafcb1e3f071487f992ec3621a66e43c8c09f6759908738282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15050565b60005481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6001543411610540576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f496e73756666696369656e7420696e7075742e0000000000000000000000000081525060200191505060405180910390fd5b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105ef578073ffffffffffffffffffffffffffffffffffffffff166108fc6002600154816105c157fe5b049081150290604051600060405180830381858888f193505050501580156105ed573d6000803e3d6000fd5b505b33600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600081905550346001819055507f3ec0acad139f72d24bfb618f88f86d70536f0105a015edbcf3fddb3b3f72245e3334604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b60015481565b6000600154905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054620151800142106106fa5760009050610707565b4260005462015180010390505b9056fe4d757374207761697420323420686f75727320746f20636c61696d2077696e6e696e67732ea26469706673582212200d7c37e9090ca68c66db473f710cd4aa2c134a16d9f0bdd699ca5d02c5778b4464736f6c63430006000033

Verified Source Code Partial Match

Compiler: v0.6.0+commit.26b70077 EVM: istanbul Optimization: No
PaytoWin.sol 60 lines
pragma solidity ^0.6.0;


contract PaytoWin {
  uint256 public lastblock;
  uint256 public lastbuy;
  address payable public biggestWhale;
  address payable public owner;
   
  constructor() public {
    owner = msg.sender;
  }

  event BiggerWhale(address whale, uint256 buyin);
  event RoundEnded(address whale, uint256 pot);

  /**
   * @dev End the current round and pay the pot to the biggest whale.
   * Note: Only callable after 1 day has passed since the last contribution.
   * Throws if there is no current highest whale.
  */
  function claim() external {
    address payable whale = biggestWhale;
    require(now >= 1 days + lastblock, "Must wait 24 hours to claim winnings.");
    require(whale != address(0), "No current whales.");
    lastbuy = 0;
    biggestWhale = address(0);
    owner.transfer(address(this).balance / 50);
    uint256 pot = address(this).balance;
    whale.transfer(pot);
    emit RoundEnded(whale, pot);
  }

  /**
   * @dev buy into the pot and become the biggest whale.
   * If another whale currently has the highest spot,
   * refund half their contribution.
   * Note: msg.value must be greater than `lastbuy`
  */
  function Buy() external payable {
    require(msg.value > lastbuy, "Insufficient input.");
    address payable whale = biggestWhale;
    if (whale != address(0)) whale.transfer(lastbuy / 2);
    biggestWhale = msg.sender;
    lastblock = now;
    lastbuy = msg.value;
    emit BiggerWhale(msg.sender, msg.value);
  }

  /**
   * @dev Check the time remaining in the current round.
   */
  function timeRemaining() external view returns (uint256) {
    if (now >= 1 days + lastblock) return 0;
    return (1 days + lastblock) - now;
  }    function lstbuy() public view returns (uint) {
        return lastbuy;

    }
    }

Read Contract

biggestWhale 0xdeea9e9c → address
lastblock 0x827d1bae → uint256
lastbuy 0xbc02d8cb → uint256
lstbuy 0xd792eea1 → uint256
owner 0x8da5cb5b → address
timeRemaining 0xe3cfef60 → uint256

Write Contract 2 functions

These functions modify contract state and require a wallet transaction to execute.

Buy 0x974c86b5
No parameters
claim 0x4e71d92d
No parameters

Top Interactions

AddressTxnsSentReceived
0xa71A51A4...80A7 6 6

Recent Transactions

CSV
|
Hash Method Block Age From/To Value Txn Fee Type
0x2043fc21...ee5e8c 0x974c86b5 10,630,824 IN 0xa71A51A4...80A7 0.050200 ETH 0.00452207 ETH Legacy
0x95af9071...6c95c6 Fail 0x974c86b5 10,630,817 IN 0xa71A51A4...80A7 0.050020 ETH 0.00226297 ETH Legacy
0x08720515...33a081 Fail 0x974c86b5 10,630,813 IN 0xa71A51A4...80A7 0.050001 ETH 0.00221860 ETH Legacy
0x5620c721...8d319d 0x974c86b5 10,630,804 IN 0xa71A51A4...80A7 0.050100 ETH 0.00452207 ETH Legacy
0x9acfd170...d12cb6 0x974c86b5 10,630,782 IN 0xa71A51A4...80A7 0.050000 ETH 0.00709071 ETH Legacy
0x97f947bd...ed01c2 0x4e71d92d 10,630,767 IN 0xa71A51A4...80A7 0 ETH 0.00255260 ETH Legacy