ETH Price: $2,670.25 (-2.86%)

Contract

0x2791528f5617e187a6D73C30034ac211b2f47042
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Buy Raffle Ticke...77495842019-05-13 3:11:462111 days ago1557717106IN
0x2791528f...1b2f47042
0 ETH0.000049022.2
Buy Raffle Ticke...77495772019-05-13 3:09:402111 days ago1557716980IN
0x2791528f...1b2f47042
0 ETH0.000026961.21
Buy Raffle Ticke...77495772019-05-13 3:09:402111 days ago1557716980IN
0x2791528f...1b2f47042
0 ETH0.000022211
Buy Raffle Ticke...77495772019-05-13 3:09:402111 days ago1557716980IN
0x2791528f...1b2f47042
0 ETH0.000022211
Start Rare Raffl...66516632018-11-06 3:01:522299 days ago1541473312IN
0x2791528f...1b2f47042
0 ETH0.000312212
Start Rare Raffl...66460472018-11-05 4:51:182300 days ago1541393478IN
0x2791528f...1b2f47042
0 ETH0.000171716.6
Start Rare Raffl...66392452018-11-04 2:02:162301 days ago1541296936IN
0x2791528f...1b2f47042
0 ETH0.000165046.34375
Start Rare Raffl...66331242018-11-03 2:05:462302 days ago1541210746IN
0x2791528f...1b2f47042
0 ETH0.000208138
Start Rare Raffl...66271002018-11-02 2:18:452303 days ago1541125125IN
0x2791528f...1b2f47042
0 ETH0.000202937.8
Start Rare Raffl...66209532018-11-01 2:01:112304 days ago1541037671IN
0x2791528f...1b2f47042
0 ETH0.000143095.5
Start Rare Raffl...66148582018-10-31 2:02:372305 days ago1540951357IN
0x2791528f...1b2f47042
0 ETH0.00015616
Start Rare Raffl...66087922018-10-30 2:10:362306 days ago1540865436IN
0x2791528f...1b2f47042
0 ETH0.000140495.4
Start Rare Raffl...66026792018-10-29 2:10:222307 days ago1540779022IN
0x2791528f...1b2f47042
0 ETH0.000137895.3
Start Rare Raffl...65965522018-10-28 2:02:022308 days ago1540692122IN
0x2791528f...1b2f47042
0 ETH0.000182117
Start Rare Raffl...65904872018-10-27 2:06:212309 days ago1540605981IN
0x2791528f...1b2f47042
0 ETH0.00015616
Start Rare Raffl...65844532018-10-26 2:25:502310 days ago1540520750IN
0x2791528f...1b2f47042
0 ETH0.00015616
Start Rare Raffl...65782422018-10-25 2:14:252311 days ago1540433665IN
0x2791528f...1b2f47042
0 ETH0.0002861811
Start Rare Raffl...65720942018-10-24 2:10:522312 days ago1540347052IN
0x2791528f...1b2f47042
0 ETH0.00015616
Start Rare Raffl...65659492018-10-23 2:01:522313 days ago1540260112IN
0x2791528f...1b2f47042
0 ETH0.000106664.1
Start Rare Raffl...65598232018-10-22 2:01:032314 days ago1540173663IN
0x2791528f...1b2f47042
0 ETH0.000135285.2
Start Rare Raffl...65538352018-10-21 2:33:142315 days ago1540089194IN
0x2791528f...1b2f47042
0 ETH0.00015616
Start Rare Raffl...65475772018-10-20 2:00:542316 days ago1540000854IN
0x2791528f...1b2f47042
0 ETH0.00015616
Start Rare Raffl...65414752018-10-19 2:01:192317 days ago1539914479IN
0x2791528f...1b2f47042
0 ETH0.00015616
Start Rare Raffl...65353582018-10-18 2:01:232318 days ago1539828083IN
0x2791528f...1b2f47042
0 ETH0.000124884.8
Start Rare Raffl...65292272018-10-17 2:01:422319 days ago1539741702IN
0x2791528f...1b2f47042
0 ETH0.000150895.8
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CardsRaffle

Compiler Version
v0.4.21+commit.dfe3193c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-07-26
*/

pragma solidity ^0.4.18;
/* ==================================================================== */
/* Copyright (c) 2018 The MagicAcademy Project.  All rights reserved.
/* 
/* https://www.magicacademy.io One of the world's first idle strategy games of blockchain 
/*  
/* authors [email protected]/[email protected]
/*                 
/* ==================================================================== */
/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;

  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

  /*
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() public {
    owner = msg.sender;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }
}

contract AccessAdmin is Ownable {

  /// @dev Admin Address
  mapping (address => bool) adminContracts;

  /// @dev Trust contract
  mapping (address => bool) actionContracts;

  function setAdminContract(address _addr, bool _useful) public onlyOwner {
    require(_addr != address(0));
    adminContracts[_addr] = _useful;
  }

  modifier onlyAdmin {
    require(adminContracts[msg.sender]); 
    _;
  }

  function setActionContract(address _actionAddr, bool _useful) public onlyAdmin {
    actionContracts[_actionAddr] = _useful;
  }

  modifier onlyAccess() {
    require(actionContracts[msg.sender]);
    _;
  }
}

interface CardsInterface {
  function balanceOf(address player) public constant returns(uint256);
  function updatePlayersCoinByOut(address player) external;
  function updatePlayersCoinByPurchase(address player, uint256 purchaseCost) public;
  function removeUnitMultipliers(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) external;
  function upgradeUnitMultipliers(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) external;
}
interface RareInterface {
  function getRareItemsOwner(uint256 rareId) external view returns (address);
  function getRareItemsPrice(uint256 rareId) external view returns (uint256);
    function getRareInfo(uint256 _tokenId) external view returns (
    uint256 sellingPrice,
    address owner,
    uint256 nextPrice,
    uint256 rareClass,
    uint256 cardId,
    uint256 rareValue
  ); 
  function transferToken(address _from, address _to, uint256 _tokenId) external;
  function transferTokenByContract(uint256 _tokenId,address _to) external;
  function setRarePrice(uint256 _rareId, uint256 _price) external;
  function rareStartPrice() external view returns (uint256);
}
contract CardsRaffle is AccessAdmin {
  using SafeMath for SafeMath;

  function CardsRaffle() public {
    setAdminContract(msg.sender,true);
    setActionContract(msg.sender,true);
  }
  //data contract
  CardsInterface public cards ;
  RareInterface public rare;

  function setCardsAddress(address _address) external onlyOwner {
    cards = CardsInterface(_address);
  }

  //rare cards
  function setRareAddress(address _address) external onlyOwner {
    rare = RareInterface(_address);
  }

  function getRareAddress() public view returns (address) {
    return rare;
  }

  //event
  event UnitBought(address player, uint256 unitId, uint256 amount);
  event RaffleSuccessful(address winner);

  // Raffle structures
  struct TicketPurchases {
    TicketPurchase[] ticketsBought;
    uint256 numPurchases; // Allows us to reset without clearing TicketPurchase[] (avoids potential for gas limit)
    uint256 raffleRareId;
  }
    
  // Allows us to query winner without looping (avoiding potential for gas limit)
  struct TicketPurchase {
    uint256 startId;
    uint256 endId;
  }
    
  // Raffle tickets
  mapping(address => TicketPurchases) private ticketsBoughtByPlayer;
  mapping(uint256 => address[]) private rafflePlayers; // Keeping a seperate list for each raffle has it's benefits. 

  uint256 private constant RAFFLE_TICKET_BASE_PRICE = 10000;

  // Current raffle info  
  uint256 private raffleEndTime;
  uint256 private raffleRareId;
  uint256 private raffleTicketsBought;
  address private raffleWinner; // Address of winner
  bool private raffleWinningTicketSelected;
  uint256 private raffleTicketThatWon;

  // Raffle for rare items  
  function buyRaffleTicket(uint256 amount) external {
    require(raffleEndTime >= block.timestamp);  //close it if need test
    require(amount > 0);
        
    uint256 ticketsCost = SafeMath.mul(RAFFLE_TICKET_BASE_PRICE, amount);
    require(cards.balanceOf(msg.sender) >= ticketsCost);
        
    // Update player's jade  
    cards.updatePlayersCoinByPurchase(msg.sender, ticketsCost);
        
    // Handle new tickets
    TicketPurchases storage purchases = ticketsBoughtByPlayer[msg.sender];
        
    // If we need to reset tickets from a previous raffle
    if (purchases.raffleRareId != raffleRareId) {
      purchases.numPurchases = 0;
      purchases.raffleRareId = raffleRareId;
      rafflePlayers[raffleRareId].push(msg.sender); // Add user to raffle
    }
        
    // Store new ticket purchase 
    if (purchases.numPurchases == purchases.ticketsBought.length) {
      purchases.ticketsBought.length = SafeMath.add(purchases.ticketsBought.length,1);
    }
    purchases.ticketsBought[purchases.numPurchases++] = TicketPurchase(raffleTicketsBought, raffleTicketsBought + (amount - 1)); // (eg: buy 10, get id's 0-9)
        
    // Finally update ticket total
    raffleTicketsBought = SafeMath.add(raffleTicketsBought,amount);
    //event
    UnitBought(msg.sender,raffleRareId,amount);
  } 

  /// @dev start raffle
  function startRareRaffle(uint256 endTime, uint256 rareId) external onlyAdmin {
    require(rareId>0);
    require(rare.getRareItemsOwner(rareId) == getRareAddress());
    require(block.timestamp < endTime); //close it if need test

    if (raffleRareId != 0) { // Sanity to assure raffle has ended before next one starts
      require(raffleWinner != 0);
    }

    // Reset previous raffle info
    raffleWinningTicketSelected = false;
    raffleTicketThatWon = 0;
    raffleWinner = 0;
    raffleTicketsBought = 0;
        
    // Set current raffle info
    raffleEndTime = endTime;
    raffleRareId = rareId;
  }

  function awardRafflePrize(address checkWinner, uint256 checkIndex) external { 
    require(raffleEndTime < block.timestamp);  //close it if need test
    require(raffleWinner == 0);
    require(rare.getRareItemsOwner(raffleRareId) == getRareAddress());
        
    if (!raffleWinningTicketSelected) {
      drawRandomWinner(); // Ideally do it in one call (gas limit cautious)
    }
        
  // Reduce gas by (optionally) offering an address to _check_ for winner
    if (checkWinner != 0) {
      TicketPurchases storage tickets = ticketsBoughtByPlayer[checkWinner];
      if (tickets.numPurchases > 0 && checkIndex < tickets.numPurchases && tickets.raffleRareId == raffleRareId) {
        TicketPurchase storage checkTicket = tickets.ticketsBought[checkIndex];
        if (raffleTicketThatWon >= checkTicket.startId && raffleTicketThatWon <= checkTicket.endId) {
          assignRafflePrize(checkWinner); // WINNER!
          return;
        }
      }
    }
        
  // Otherwise just naively try to find the winner (will work until mass amounts of players)
    for (uint256 i = 0; i < rafflePlayers[raffleRareId].length; i++) {
      address player = rafflePlayers[raffleRareId][i];
      TicketPurchases storage playersTickets = ticketsBoughtByPlayer[player];
            
      uint256 endIndex = playersTickets.numPurchases - 1;
      // Minor optimization to avoid checking every single player
      if (raffleTicketThatWon >= playersTickets.ticketsBought[0].startId && raffleTicketThatWon <= playersTickets.ticketsBought[endIndex].endId) {
        for (uint256 j = 0; j < playersTickets.numPurchases; j++) {
          TicketPurchase storage playerTicket = playersTickets.ticketsBought[j];
          if (raffleTicketThatWon >= playerTicket.startId && raffleTicketThatWon <= playerTicket.endId) {
            assignRafflePrize(player); // WINNER!
            return;
          }
        }
      }
    }
  }

  function assignRafflePrize(address winner) internal {
    raffleWinner = winner;
    uint256 newPrice = (rare.rareStartPrice() * 25) / 20;
    rare.transferTokenByContract(raffleRareId,winner);
    rare.setRarePrice(raffleRareId,newPrice);
       
    cards.updatePlayersCoinByOut(winner);
    uint256 upgradeClass;
    uint256 unitId;
    uint256 upgradeValue;
    (,,,,upgradeClass, unitId, upgradeValue) = rare.getRareInfo(raffleRareId);
    
    cards.upgradeUnitMultipliers(winner, upgradeClass, unitId, upgradeValue);
    //event
    RaffleSuccessful(winner);
  }
  
  // Random enough for small contests (Owner only to prevent trial & error execution)
  function drawRandomWinner() public onlyAdmin {
    require(raffleEndTime < block.timestamp); //close it if need to test
    require(!raffleWinningTicketSelected);
        
    uint256 seed = SafeMath.add(raffleTicketsBought , block.timestamp);
    raffleTicketThatWon = addmod(uint256(block.blockhash(block.number-1)), seed, raffleTicketsBought);
    raffleWinningTicketSelected = true;
  }  

  // To allow clients to verify contestants
  function getRafflePlayers(uint256 raffleId) external constant returns (address[]) {
    return (rafflePlayers[raffleId]);
  }

    // To allow clients to verify contestants
  function getPlayersTickets(address player) external constant returns (uint256[], uint256[]) {
    TicketPurchases storage playersTickets = ticketsBoughtByPlayer[player];
        
    if (playersTickets.raffleRareId == raffleRareId) {
      uint256[] memory startIds = new uint256[](playersTickets.numPurchases);
      uint256[] memory endIds = new uint256[](playersTickets.numPurchases);
            
      for (uint256 i = 0; i < playersTickets.numPurchases; i++) {
        startIds[i] = playersTickets.ticketsBought[i].startId;
        endIds[i] = playersTickets.ticketsBought[i].endId;
      }
    }
        
    return (startIds, endIds);
  }


  // To display on website
  function getLatestRaffleInfo() external constant returns (uint256, uint256, uint256, address, uint256) {
    return (raffleEndTime, raffleRareId, raffleTicketsBought, raffleWinner, raffleTicketThatWon);
  }    
}

library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  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;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws 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;
  }

  /**
  * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"_addr","type":"address"},{"name":"_useful","type":"bool"}],"name":"setAdminContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getRareAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"player","type":"address"}],"name":"getPlayersTickets","outputs":[{"name":"","type":"uint256[]"},{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getLatestRaffleInfo","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"address"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"checkWinner","type":"address"},{"name":"checkIndex","type":"uint256"}],"name":"awardRafflePrize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"cards","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rare","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setCardsAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_actionAddr","type":"address"},{"name":"_useful","type":"bool"}],"name":"setActionContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setRareAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"raffleId","type":"uint256"}],"name":"getRafflePlayers","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"buyRaffleTicket","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"drawRandomWinner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"endTime","type":"uint256"},{"name":"rareId","type":"uint256"}],"name":"startRareRaffle","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"player","type":"address"},{"indexed":false,"name":"unitId","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"UnitBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"winner","type":"address"}],"name":"RaffleSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

6060604052341561000f57600080fd5b60008054600160a060020a03191633600160a060020a0381169190911790915561004790600164010000000061006481026103b21704565b61005f3360016401000000006108916100bf82021704565b610111565b60005433600160a060020a0390811691161461007f57600080fd5b600160a060020a038216151561009457600080fd5b600160a060020a03919091166000908152600160205260409020805460ff1916911515919091179055565b600160a060020a03331660009081526001602052604090205460ff1615156100e657600080fd5b600160a060020a03919091166000908152600260205260409020805460ff1916911515919091179055565b6112d0806101206000396000f3006060604052600436106100cc5763ffffffff60e060020a6000350416630865dadc81146100d15780632210d525146100f75780632693c15014610126578063431dbd9e146101de57806349c9dcf51461022b57806358a4903f1461024d5780636bb7b7a4146102605780636cdb1b75146102735780636fb642de1461029257806376f2ccb9146102b6578063789a12fd146102d55780638da5cb5b1461033e578063b9de1c4114610351578063c2de290914610367578063da7d57f91461037a578063f2fde38b14610393575b600080fd5b34156100dc57600080fd5b6100f5600160a060020a036004351660243515156103b2565b005b341561010257600080fd5b61010a61040d565b604051600160a060020a03909116815260200160405180910390f35b341561013157600080fd5b610145600160a060020a036004351661041d565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610189578082015183820152602001610171565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156101c85780820151838201526020016101b0565b5050505090500194505050505060405180910390f35b34156101e957600080fd5b6101f1610543565b6040519485526020850193909352604080850192909252600160a060020a03166060840152608083019190915260a0909101905180910390f35b341561023657600080fd5b6100f5600160a060020a0360043516602435610563565b341561025857600080fd5b61010a610829565b341561026b57600080fd5b61010a610838565b341561027e57600080fd5b6100f5600160a060020a0360043516610847565b341561029d57600080fd5b6100f5600160a060020a03600435166024351515610891565b34156102c157600080fd5b6100f5600160a060020a03600435166108e3565b34156102e057600080fd5b6102eb60043561092d565b60405160208082528190810183818151815260200191508051906020019060200280838360005b8381101561032a578082015183820152602001610312565b505050509050019250505060405180910390f35b341561034957600080fd5b61010a6109a8565b341561035c57600080fd5b6100f56004356109b7565b341561037257600080fd5b6100f5610c3b565b341561038557600080fd5b6100f5600435602435610cf6565b341561039e57600080fd5b6100f5600160a060020a0360043516610e0c565b60005433600160a060020a039081169116146103cd57600080fd5b600160a060020a03821615156103e257600080fd5b600160a060020a03919091166000908152600160205260409020805460ff1916911515919091179055565b600454600160a060020a03165b90565b6104256111ff565b61042d6111ff565b60006104376111ff565b61043f6111ff565b600160a060020a03861660009081526005602052604081206008546002820154919550141561053757836001015460405180591061047a5750595b90808252806020026020018201604052509250836001015460405180591061049f5750595b90808252806020026020018201604052509150600090505b83600101548110156105375783548490829081106104d157fe5b9060005260206000209060020201600001548382815181106104ef57fe5b60209081029091010152835484908290811061050757fe5b90600052602060002090600202016001015482828151811061052557fe5b602090810290910101526001016104b7565b50909590945092505050565b600754600854600954600a54600b54600160a060020a0390911691929394565b6000806000806000806000804260075410151561057f57600080fd5b600a54600160a060020a03161561059557600080fd5b61059d61040d565b600454600854600160a060020a0392831692909116906372eefb8a9060405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156105ef57600080fd5b5af115156105fc57600080fd5b50505060405180519050600160a060020a031614151561061b57600080fd5b600a5474010000000000000000000000000000000000000000900460ff16151561064757610647610c3b565b600160a060020a038a16156106e957600160a060020a038a16600090815260056020526040812060018101549099501180156106865750876001015489105b801561069757506008548860020154145b156106e957875488908a9081106106aa57fe5b906000526020600020906002020196508660000154600b54101580156106d657508660010154600b5411155b156106e9576106e48a610ea7565b61081d565b600095505b60085460009081526006602052604090205486101561081d57600854600090815260066020526040902080548790811061072457fe5b6000918252602080832090910154600160a060020a031680835260059091526040822060018101548154929850909650600019019450859190811061076557fe5b906000526020600020906002020160000154600b54101580156107a95750835484908490811061079157fe5b906000526020600020906002020160010154600b5411155b1561081257600091505b83600101548210156108125783548490839081106107cd57fe5b906000526020600020906002020190508060000154600b54101580156107f957508060010154600b5411155b15610807576106e485610ea7565b6001909101906107b3565b6001909501946106ee565b50505050505050505050565b600354600160a060020a031681565b600454600160a060020a031681565b60005433600160a060020a0390811691161461086257600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a03331660009081526001602052604090205460ff1615156108b857600080fd5b600160a060020a03919091166000908152600260205260409020805460ff1916911515919091179055565b60005433600160a060020a039081169116146108fe57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6109356111ff565b6006600083815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561099c57602002820191906000526020600020905b8154600160a060020a0316815260019091019060200180831161097e575b50505050509050919050565b600054600160a060020a031681565b60008042600754101515156109cb57600080fd5b600083116109d857600080fd5b6109e4612710846111ba565b6003549092508290600160a060020a03166370a082313360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610a3957600080fd5b5af11515610a4657600080fd5b5050506040518051905010151515610a5d57600080fd5b600354600160a060020a031663a1c90a11338460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610ab357600080fd5b5af11515610ac057600080fd5b505050600160a060020a0333166000908152600560205260409020600854600282015491925014610b4e576000600180830182905560085460028401819055825260066020526040909120805490918101610b1b8382611211565b506000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a03161790555b805460018201541415610b74578054610b689060016111f0565b610b72828261123a565b505b60408051908101604052600954808252840160001901602082015260018281018054918201905582548391908110610ba857fe5b90600052602060002090600202016000820151815560208201518160010155905050610bd6600954846111f0565b6009556008547fb6d35f558a34938047f09ebf800fa2e15ec407c357a8eab97a5dd67b4d015b5b903390856040518084600160a060020a0316600160a060020a03168152602001838152602001828152602001935050505060405180910390a1505050565b600160a060020a03331660009081526001602052604081205460ff161515610c6257600080fd5b600754429010610c7157600080fd5b600a5474010000000000000000000000000000000000000000900460ff1615610c9957600080fd5b610ca5600954426111f0565b9050600954801515610cb357fe5b8160001943014008600b5550600a805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600160a060020a03331660009081526001602052604090205460ff161515610d1d57600080fd5b60008111610d2a57600080fd5b610d3261040d565b600454600160a060020a0391821691166372eefb8a8360405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610d7e57600080fd5b5af11515610d8b57600080fd5b50505060405180519050600160a060020a0316141515610daa57600080fd5b42829010610db757600080fd5b60085415610dd657600a54600160a060020a03161515610dd657600080fd5b600a80546000600b81905574ffffffffffffffffffffffffffffffffffffffffff19909116909155600955600791909155600855565b60005433600160a060020a03908116911614610e2757600080fd5b600160a060020a0381161515610e3c57600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600a805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179091556004546000918291829182916014911663b4d0e5526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610f1757600080fd5b5af11515610f2457600080fd5b50505060405180519050601902811515610f3a57fe5b600454600854929091049550600160a060020a03169063da3678df908760405160e060020a63ffffffff85160281526004810192909252600160a060020a03166024820152604401600060405180830381600087803b1515610f9b57600080fd5b5af11515610fa857600080fd5b5050600454600854600160a060020a0390911691506373a55389908660405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b1515610fff57600080fd5b5af1151561100c57600080fd5b5050600354600160a060020a0316905063e3cbe7448660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b151561106057600080fd5b5af1151561106d57600080fd5b5050600454600854600160a060020a03909116915063275babee9060405160e060020a63ffffffff8416028152600481019190915260240160c060405180830381600087803b15156110be57600080fd5b5af115156110cb57600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805160035493995091975090955050600160a060020a03169250635edc9bff915087905085858560405160e060020a63ffffffff8716028152600160a060020a039094166004850152602484019290925260448301526064820152608401600060405180830381600087803b151561116657600080fd5b5af1151561117357600080fd5b5050507f7b646f14dfb470788710d7469f8c03ffce1aba2693e24050c5055c4cfa9baa5785604051600160a060020a03909116815260200160405180910390a15050505050565b6000808315156111cd57600091506111e9565b508282028284828115156111dd57fe5b04146111e557fe5b8091505b5092915050565b6000828201838110156111e557fe5b60206040519081016040526000815290565b81548183558181151161123557600083815260209020611235918101908301611266565b505050565b815481835581811511611235576002028160020283600052602060002091820191016112359190611284565b61041a91905b80821115611280576000815560010161126c565b5090565b61041a91905b80821115611280576000808255600182015560020161128a5600a165627a7a72305820bb99e956b79b66bf54f84b67871fce6b534acd5df592a1c790a80d703e9886f60029

Deployed Bytecode

0x6060604052600436106100cc5763ffffffff60e060020a6000350416630865dadc81146100d15780632210d525146100f75780632693c15014610126578063431dbd9e146101de57806349c9dcf51461022b57806358a4903f1461024d5780636bb7b7a4146102605780636cdb1b75146102735780636fb642de1461029257806376f2ccb9146102b6578063789a12fd146102d55780638da5cb5b1461033e578063b9de1c4114610351578063c2de290914610367578063da7d57f91461037a578063f2fde38b14610393575b600080fd5b34156100dc57600080fd5b6100f5600160a060020a036004351660243515156103b2565b005b341561010257600080fd5b61010a61040d565b604051600160a060020a03909116815260200160405180910390f35b341561013157600080fd5b610145600160a060020a036004351661041d565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610189578082015183820152602001610171565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156101c85780820151838201526020016101b0565b5050505090500194505050505060405180910390f35b34156101e957600080fd5b6101f1610543565b6040519485526020850193909352604080850192909252600160a060020a03166060840152608083019190915260a0909101905180910390f35b341561023657600080fd5b6100f5600160a060020a0360043516602435610563565b341561025857600080fd5b61010a610829565b341561026b57600080fd5b61010a610838565b341561027e57600080fd5b6100f5600160a060020a0360043516610847565b341561029d57600080fd5b6100f5600160a060020a03600435166024351515610891565b34156102c157600080fd5b6100f5600160a060020a03600435166108e3565b34156102e057600080fd5b6102eb60043561092d565b60405160208082528190810183818151815260200191508051906020019060200280838360005b8381101561032a578082015183820152602001610312565b505050509050019250505060405180910390f35b341561034957600080fd5b61010a6109a8565b341561035c57600080fd5b6100f56004356109b7565b341561037257600080fd5b6100f5610c3b565b341561038557600080fd5b6100f5600435602435610cf6565b341561039e57600080fd5b6100f5600160a060020a0360043516610e0c565b60005433600160a060020a039081169116146103cd57600080fd5b600160a060020a03821615156103e257600080fd5b600160a060020a03919091166000908152600160205260409020805460ff1916911515919091179055565b600454600160a060020a03165b90565b6104256111ff565b61042d6111ff565b60006104376111ff565b61043f6111ff565b600160a060020a03861660009081526005602052604081206008546002820154919550141561053757836001015460405180591061047a5750595b90808252806020026020018201604052509250836001015460405180591061049f5750595b90808252806020026020018201604052509150600090505b83600101548110156105375783548490829081106104d157fe5b9060005260206000209060020201600001548382815181106104ef57fe5b60209081029091010152835484908290811061050757fe5b90600052602060002090600202016001015482828151811061052557fe5b602090810290910101526001016104b7565b50909590945092505050565b600754600854600954600a54600b54600160a060020a0390911691929394565b6000806000806000806000804260075410151561057f57600080fd5b600a54600160a060020a03161561059557600080fd5b61059d61040d565b600454600854600160a060020a0392831692909116906372eefb8a9060405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156105ef57600080fd5b5af115156105fc57600080fd5b50505060405180519050600160a060020a031614151561061b57600080fd5b600a5474010000000000000000000000000000000000000000900460ff16151561064757610647610c3b565b600160a060020a038a16156106e957600160a060020a038a16600090815260056020526040812060018101549099501180156106865750876001015489105b801561069757506008548860020154145b156106e957875488908a9081106106aa57fe5b906000526020600020906002020196508660000154600b54101580156106d657508660010154600b5411155b156106e9576106e48a610ea7565b61081d565b600095505b60085460009081526006602052604090205486101561081d57600854600090815260066020526040902080548790811061072457fe5b6000918252602080832090910154600160a060020a031680835260059091526040822060018101548154929850909650600019019450859190811061076557fe5b906000526020600020906002020160000154600b54101580156107a95750835484908490811061079157fe5b906000526020600020906002020160010154600b5411155b1561081257600091505b83600101548210156108125783548490839081106107cd57fe5b906000526020600020906002020190508060000154600b54101580156107f957508060010154600b5411155b15610807576106e485610ea7565b6001909101906107b3565b6001909501946106ee565b50505050505050505050565b600354600160a060020a031681565b600454600160a060020a031681565b60005433600160a060020a0390811691161461086257600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a03331660009081526001602052604090205460ff1615156108b857600080fd5b600160a060020a03919091166000908152600260205260409020805460ff1916911515919091179055565b60005433600160a060020a039081169116146108fe57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6109356111ff565b6006600083815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561099c57602002820191906000526020600020905b8154600160a060020a0316815260019091019060200180831161097e575b50505050509050919050565b600054600160a060020a031681565b60008042600754101515156109cb57600080fd5b600083116109d857600080fd5b6109e4612710846111ba565b6003549092508290600160a060020a03166370a082313360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610a3957600080fd5b5af11515610a4657600080fd5b5050506040518051905010151515610a5d57600080fd5b600354600160a060020a031663a1c90a11338460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610ab357600080fd5b5af11515610ac057600080fd5b505050600160a060020a0333166000908152600560205260409020600854600282015491925014610b4e576000600180830182905560085460028401819055825260066020526040909120805490918101610b1b8382611211565b506000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a03161790555b805460018201541415610b74578054610b689060016111f0565b610b72828261123a565b505b60408051908101604052600954808252840160001901602082015260018281018054918201905582548391908110610ba857fe5b90600052602060002090600202016000820151815560208201518160010155905050610bd6600954846111f0565b6009556008547fb6d35f558a34938047f09ebf800fa2e15ec407c357a8eab97a5dd67b4d015b5b903390856040518084600160a060020a0316600160a060020a03168152602001838152602001828152602001935050505060405180910390a1505050565b600160a060020a03331660009081526001602052604081205460ff161515610c6257600080fd5b600754429010610c7157600080fd5b600a5474010000000000000000000000000000000000000000900460ff1615610c9957600080fd5b610ca5600954426111f0565b9050600954801515610cb357fe5b8160001943014008600b5550600a805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600160a060020a03331660009081526001602052604090205460ff161515610d1d57600080fd5b60008111610d2a57600080fd5b610d3261040d565b600454600160a060020a0391821691166372eefb8a8360405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610d7e57600080fd5b5af11515610d8b57600080fd5b50505060405180519050600160a060020a0316141515610daa57600080fd5b42829010610db757600080fd5b60085415610dd657600a54600160a060020a03161515610dd657600080fd5b600a80546000600b81905574ffffffffffffffffffffffffffffffffffffffffff19909116909155600955600791909155600855565b60005433600160a060020a03908116911614610e2757600080fd5b600160a060020a0381161515610e3c57600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600a805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116919091179091556004546000918291829182916014911663b4d0e5526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610f1757600080fd5b5af11515610f2457600080fd5b50505060405180519050601902811515610f3a57fe5b600454600854929091049550600160a060020a03169063da3678df908760405160e060020a63ffffffff85160281526004810192909252600160a060020a03166024820152604401600060405180830381600087803b1515610f9b57600080fd5b5af11515610fa857600080fd5b5050600454600854600160a060020a0390911691506373a55389908660405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b1515610fff57600080fd5b5af1151561100c57600080fd5b5050600354600160a060020a0316905063e3cbe7448660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b151561106057600080fd5b5af1151561106d57600080fd5b5050600454600854600160a060020a03909116915063275babee9060405160e060020a63ffffffff8416028152600481019190915260240160c060405180830381600087803b15156110be57600080fd5b5af115156110cb57600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805160035493995091975090955050600160a060020a03169250635edc9bff915087905085858560405160e060020a63ffffffff8716028152600160a060020a039094166004850152602484019290925260448301526064820152608401600060405180830381600087803b151561116657600080fd5b5af1151561117357600080fd5b5050507f7b646f14dfb470788710d7469f8c03ffce1aba2693e24050c5055c4cfa9baa5785604051600160a060020a03909116815260200160405180910390a15050505050565b6000808315156111cd57600091506111e9565b508282028284828115156111dd57fe5b04146111e557fe5b8091505b5092915050565b6000828201838110156111e557fe5b60206040519081016040526000815290565b81548183558181151161123557600083815260209020611235918101908301611266565b505050565b815481835581811511611235576002028160020283600052602060002091820191016112359190611284565b61041a91905b80821115611280576000815560010161126c565b5090565b61041a91905b80821115611280576000808255600182015560020161128a5600a165627a7a72305820bb99e956b79b66bf54f84b67871fce6b534acd5df592a1c790a80d703e9886f60029

Swarm Source

bzzr://bb99e956b79b66bf54f84b67871fce6b534acd5df592a1c790a80d703e9886f6

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.