ETH Price: $3,597.47 (+3.93%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GameLib

Compiler Version
v0.4.8+commit.60cc1668

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2017-02-07
*/

library ArrayLib {
  // Inserts to keep array sorted (assumes input array is sorted)
	function insertInPlace(uint8[] storage self, uint8 n) {
		uint8 insertingIndex = 0;

		while (self.length > 0 && insertingIndex < self.length && self[insertingIndex] < n) {
			insertingIndex += 1;
		}

		self.length += 1;
		for (uint8 i = uint8(self.length) - 1; i > insertingIndex; i--) {
			self[i] = self[i - 1];
		}

		self[insertingIndex] = n;
	}
}


library DeckLib {
	using ArrayLib for uint8[];

	enum Suit { Spades, Hearts, Clubs, Diamonds }
	uint8 constant cardsPerSuit = 13;
	uint8 constant suits = 4;
	uint8 constant totalCards = cardsPerSuit * suits;

	struct Deck {
		uint8[] usedCards; // always has to be sorted
		address player;
		uint256 gameID;
	}

	function init(Deck storage self, uint256 gameID)  {
		self.usedCards = new uint8[](0);
		self.player = msg.sender;
		self.gameID = gameID;
	}

	function getCard(Deck storage self, uint256 blockNumber)  returns (uint8)  {
		uint cardIndex = self.usedCards.length;
		if (cardIndex >= totalCards) throw;
		uint8 r = uint8(getRandomNumber(blockNumber, self.player, self.gameID, cardIndex, totalCards - cardIndex));

		for (uint8 i = 0; i < cardIndex; i++) {
			if (self.usedCards[i] <= r) r += 1;
		}

		self.usedCards.insertInPlace(r);

		return r;
	}

	function cardDescription(uint8 self) constant returns (Suit, uint8) {
		return (Suit(self / cardsPerSuit), cardFacevalue(self));
	}

	function cardEmojified(uint8 self) constant returns (uint8, string) {
		string memory emojiSuit;

		var (suit, number) = cardDescription(self);
		if (suit == Suit.Clubs) emojiSuit = "♣️";
		else if (suit == Suit.Diamonds) emojiSuit = "♦️";
		else if (suit == Suit.Hearts) emojiSuit = "♥️";
		else if (suit == Suit.Spades) emojiSuit = "♠️";

		return (number, emojiSuit);
	}

	function cardFacevalue(uint8 self) constant returns (uint8) {
		return 1 + self % cardsPerSuit;
	}

	function blackjackValue(uint8 self) constant returns (uint8) {
		uint8 cardValue = cardFacevalue(self);
		return cardValue < 10 ? cardValue : 10;
	}

	function getRandomNumber(uint b, address player, uint256 gameID, uint n, uint m) constant returns (uint) {
		// Uses blockhash as randomness source.
		// Credits: https://github.com/Bunjin/Rouleth/blob/master/Provably_Fair_No_Cheating.md
		bytes32 blockHash = block.blockhash(b);
		if (blockHash == 0x0) throw;
		return uint(uint256(keccak256(blockHash, player, gameID, n)) % m);

	}
}

library GameLib {
  using DeckLib for *;

  uint8 constant houseLimit = 17;
  uint8 constant target = 21;

  enum ComparaisonResult { First, Second, Tie }
  enum GameState { InitialCards, Waiting, Hit, Stand, Finished }
  enum GameResult { Ongoing, House, Tie, Player, PlayerNatural }

  struct Game {
    address player;
    uint256 bet;
    uint256 payout;
    uint256 gameID;

    DeckLib.Deck deck;
    uint8[] houseCards;
    uint8[] playerCards;

    uint256 actionBlock; // Block on which commitment to perform an action happens.

    GameState state;
    GameResult result;

    bool closed;
  }

  function init(Game storage self, uint256 gameID) {
    self.player = msg.sender;
    self.bet = msg.value;
    self.payout = 0;
    self.houseCards = new uint8[](0);
    self.playerCards = new uint8[](0);
    self.actionBlock = block.number;
    self.state = GameState.InitialCards;
    self.result = GameResult.Ongoing;
    self.closed = false;
    self.gameID = gameID;

    self.deck.init(gameID);
  }

  function tick(Game storage self)  returns (bool) {
    if (block.number <= self.actionBlock) return false; // Can't tick yet
    if (self.actionBlock + 255 < block.number) {
      endGame(self, GameResult.House);
      return true;
    }
    if (!needsTick(self)) return true; // not needed, everything is fine

    if (self.state == GameState.InitialCards) dealInitialCards(self);
    if (self.state == GameState.Hit) dealHitCard(self);

    if (self.state == GameState.Stand) {
      dealHouseCards(self);
      checkGameResult(self);
    } else {
      checkGameContinues(self);
    }

    return true;
  }

  function needsTick(Game storage self) constant returns (bool) {
    if (self.state == GameState.Waiting) return false;
    if (self.state == GameState.Finished) return false;

    return true;
  }

  function checkGameResult(Game storage self)  {
    uint8 houseHand = countHand(self.houseCards);

    if (houseHand == target && self.houseCards.length == 2) return endGame(self, GameResult.House); // House natural

    ComparaisonResult result = compareHands(houseHand, countHand(self.playerCards));
    if (result == ComparaisonResult.First) return endGame(self, GameResult.House);
    if (result == ComparaisonResult.Second) return endGame(self, GameResult.Player);

    endGame(self, GameResult.Tie);
  }

  function checkGameContinues(Game storage self)  {
    uint8 playerHand = countHand(self.playerCards);
    if (playerHand == target && self.playerCards.length == 2) return endGame(self, GameResult.PlayerNatural); // player natural
    if (playerHand > target) return endGame(self, GameResult.House); // Player busted
    if (playerHand == target) {
      // Player is forced to stand with 21
      uint256 currentActionBlock = self.actionBlock;
      playerDecision(self, GameState.Stand);
      self.actionBlock = currentActionBlock;
      if (!tick(self)) throw; // Forces tick, commitment to play actually happened past block
    }
  }

  function playerDecision(Game storage self, GameState decision)  {
    if (self.state != GameState.Waiting) throw;
    if (decision != GameState.Hit && decision != GameState.Stand) throw;

    self.state = decision;
    self.actionBlock = block.number;
  }

  function dealInitialCards(Game storage self) private {
    self.playerCards.push(self.deck.getCard(self.actionBlock));
    self.houseCards.push(self.deck.getCard(self.actionBlock));
    self.playerCards.push(self.deck.getCard(self.actionBlock));

    self.state = GameState.Waiting;
  }

  function dealHitCard(Game storage self) private {
    self.playerCards.push(self.deck.getCard(self.actionBlock));

    self.state = GameState.Waiting;
  }

  function dealHouseCards(Game storage self) private {
    self.houseCards.push(self.deck.getCard(self.actionBlock));

    if (countHand(self.houseCards) < houseLimit) dealHouseCards(self);
  }

  function endGame(Game storage self, GameResult result) {
    self.result = result;
    self.state = GameState.Finished;
    self.payout = payoutForResult(self.result, self.bet);

    closeGame(self);
  }

  function closeGame(Game storage self) private {
    if (self.closed) throw; // cannot re-close
    if (self.state != GameState.Finished) throw; // not closable

    self.closed = true;

    if (self.payout > 0) {
      if (!self.player.send(self.payout)) throw;
    }
  }

  function payoutForResult(GameResult result, uint256 bet) private returns (uint256) {
    if (result == GameResult.PlayerNatural) return bet * 5 / 2; // bet + 1.5x bet
    if (result == GameResult.Player) return bet * 2; // doubles bet
    if (result == GameResult.Tie) return bet; // returns bet

    return 0;
  }

  function countHand(uint8[] memory hand)  returns (uint8) {
    uint8[] memory possibleSums = new uint8[](1);

    for (uint i = 0; i < hand.length; i++) {
      uint8 value = hand[i].blackjackValue();
      uint l = possibleSums.length;
      for (uint j = 0; j < l; j++) {
        possibleSums[j] += value;
        if (value == 1) { // is Ace
          possibleSums = appendArray(possibleSums, possibleSums[j] + 10); // Fork possible sum with 11 as ace value.
        }
      }
    }

    return bestSum(possibleSums);
  }

  function bestSum(uint8[] possibleSums)  returns (uint8 bestSum) {
    bestSum = 50; // very bad hand
    for (uint i = 0; i < possibleSums.length; i++) {
      if (compareHands(bestSum, possibleSums[i]) == ComparaisonResult.Second) {
        bestSum = possibleSums[i];
      }
    }
    return;
  }

  function appendArray(uint8[] memory array, uint8 n)  returns (uint8[] memory) {
    uint8[] memory newArray = new uint8[](array.length + 1);
    for (uint8 i = 0; i < array.length; i++) {
      newArray[i] = array[i];
    }
    newArray[array.length] = n;
    return newArray;
  }

  function compareHands(uint8 a, uint8 b)  returns (ComparaisonResult) {
    if (a <= target && b <= target) {
      if (a > b) return ComparaisonResult.First;
      if (a < b) return ComparaisonResult.Second;
    }

    if (a > target && b > target) {
      if (a < b) return ComparaisonResult.First;
      if (a > b) return ComparaisonResult.Second;
    }

    if (a > target) return ComparaisonResult.Second;
    if (b > target) return ComparaisonResult.First;

    return ComparaisonResult.Tie;
  }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"a","type":"uint8"},{"name":"b","type":"uint8"}],"name":"compareHands","outputs":[{"name":"","type":"GameLib.ComparaisonResult"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"array","type":"uint8[]"},{"name":"n","type":"uint8"}],"name":"appendArray","outputs":[{"name":"","type":"uint8[]"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"self","type":"GameLib.Game storage"}],"name":"tick","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"self","type":"GameLib.Game storage"},{"name":"result","type":"GameLib.GameResult"}],"name":"endGame","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"self","type":"GameLib.Game storage"}],"name":"needsTick","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"self","type":"GameLib.Game storage"}],"name":"checkGameResult","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"self","type":"GameLib.Game storage"},{"name":"gameID","type":"uint256"}],"name":"init","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"self","type":"GameLib.Game storage"}],"name":"checkGameContinues","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"possibleSums","type":"uint8[]"}],"name":"bestSum","outputs":[{"name":"bestSum","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"self","type":"GameLib.Game storage"},{"name":"decision","type":"GameLib.GameState"}],"name":"playerDecision","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"hand","type":"uint8[]"}],"name":"countHand","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"}]

606060405234610000575b61142a806100196000396000f300606060405236156100935763ffffffff60e060020a60003504166330faa3e981146100985780633b7e9825146100cd578063517607691461017857806359d3c9a9146101975780635d9abc4e146101aa57806366a2eaff146101c9578063772b36aa146101d65780638d010393146101e657806391a5b0c7146101f3578063b14efa8114610254578063c9ae559414610267575b610000565b6100ac60ff600435811690602435166102c8565b6040518082600281116100005760ff16815260200191505060405180910390f35b61011d6004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496505050923560ff16925061038e915050565b6040805160208082528351818301528351919283929083019185810191028083838215610165575b80518252602083111561016557601f199092019160209182019101610145565b5050509050019250505060405180910390f35b610183600435610455565b604080519115158252519081900360200190f35b6101a860043560ff6024351661052a565b005b610183600435610584565b604080519115158252519081900360200190f35b6101a86004356105cf565b005b6101a8600435602435610751565b005b6101a86004356109fd565b005b61023e600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750949650610b0395505050505050565b6040805160ff9092168252519081900360200190f35b6101a860043560ff60243516610b67565b005b61023e600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750949650610bd795505050505050565b6040805160ff9092168252519081900360200190f35b6000601560ff8416118015906102e25750601560ff831611155b15610313578160ff168360ff1611156102fd57506000610388565b8160ff168360ff16101561031357506001610388565b5b601560ff841611801561032a5750601560ff8316115b1561035b578160ff168360ff16101561034557506000610388565b8160ff168360ff16111561035b57506001610388565b5b601560ff8416111561037057506001610388565b601560ff8316111561038457506000610388565b5060025b92915050565b60206040519081016040528060008152506020604051908101604052806000815250600084516001016040518059106103c45750595b908082528060200260200182016040525b509150600090505b84518160ff16101561042957848160ff1681518110156100005790602001906020020151828260ff1681518110156100005760ff9092166020928302909101909101525b6001016103dd565b8382865181518110156100005760ff90921660209283029091019091015290915081905b505092915050565b6009810154600090431161046b57506000610525565b43826009015460ff01101561048d5761048582600161052a565b506001610525565b61049682610584565b15156104a457506001610525565b6000600a83015460ff16600481116100005714156104c5576104c582610d41565b5b6002600a83015460ff16600481116100005714156104e7576104e782611058565b5b6003600a83015460ff1660048111610000571415610517576105098261116d565b610512826105cf565b610520565b610520826109fd565b5b5060015b919050565b600a8201805482919061ff0019166101008360048111610000570217905550600a8201805460ff191660041790819055600183015461057191610100900460ff1690611303565b600283015561057f82611360565b5b5050565b60006001600a83015460ff16600481116100005714156105a657506000610525565b6004600a83015460ff166004811161000057141561052057506000610525565b5060015b919050565b6000600061064c8360070180548060200260200160405190810160405280929190818152602001828054801561064257602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116106135790505b5050505050610bd7565b915060ff82166015148015610665575060078301546002145b1561067a5761067583600161052a565b61074b565b6106fc826106f78560080180548060200260200160405190810160405280929190818152602001828054801561064257602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116106135790505b5050505050610bd7565b6102c8565b90506000816002811161000057141561071f5761067583600161052a565b61074b565b600181600281116100005714156107405761067583600361052a565b61074b565b61074b83600261052a565b5b505050565b815473ffffffffffffffffffffffffffffffffffffffff19163373ffffffffffffffffffffffffffffffffffffffff161782553460018301556000600283018190556040518059106107a05750595b908082528060200260200182016040525b5082600701908051906020019082805482825590600052602060002090601f016020900481019282156108545791602002820160005b8382111561082557835183826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026107e7565b80156108525782816101000a81549060ff0219169055600101602081600001049283019260010302610825565b505b506108789291505b8082111561087457805460ff1916815560010161085c565b5090565b505060006040518059106108895750595b908082528060200260200182016040525b5082600801908051906020019082805482825590600052602060002090601f0160209004810192821561093d5791602002820160005b8382111561090e57835183826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026108d0565b801561093b5782816101000a81549060ff021916905560010160208160000104928301926001030261090e565b505b506109619291505b8082111561087457805460ff1916815560010161085c565b5090565b5050436009830155600a8201805462ffffff1916905560038201819055604080517f187a4b0500000000000000000000000000000000000000000000000000000000815260048085019082015260248101839052905173__DeckLib_______________________________9163187a4b05916044808301926000929190829003018186803b156100005760325a03f415610000575050505b5050565b60006000610a7a8360080180548060200260200160405190810160405280929190818152602001828054801561064257602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116106135790505b5050505050610bd7565b915060ff82166015148015610a93575060088301546002145b15610aa85761067583600461052a565b61074b565b601560ff83161115610ac45761067583600161052a565b61074b565b60ff82166015141561074b57506009820154610ae1836003610b67565b60098301819055610af183610455565b151561074b57610000565b5b5b505050565b603260005b8251811015610b60576001610b31838584815181101561000057906020019060200201516102c8565b60028111610000571415610b575782818151811015610000579060200190602002015191505b5b600101610b08565b5b50919050565b6001600a83015460ff16600481116100005714610b8357610000565b600281600481116100005714158015610ba55750600381600481116100005714155b15610baf57610000565b600a8201805482919060ff1916600183600481116100005702179055504360098301555b5050565b6000602060405190810160405280600081525060006000600060006001604051805910610c015750595b908082528060200260200182016040525b509450600093505b8651841015610d2b57868481518110156100005760209081029091018101516040805160009084015280517fca949a1d00000000000000000000000000000000000000000000000000000000815260ff90921660048301525173__DeckLib_______________________________9263ca949a1d9260248082019391829003018186803b156100005760325a03f415610000575050604051518651909450925060009150505b81811015610d1f57828582815181101561000057602090810290910101805160ff92018216905260019084161415610d1657610d1385868381518110156100005790602001906020020151600a0161038e565b94505b5b600101610cc0565b5b600190930192610c1a565b610d3485610b03565b95505b5050505050919050565b806008018054806001018281815481835581811511610d9557601f016020900481601f01602090048360005260206000209182019101610d9591905b808211156108745760008155600101610d7d565b5090565b5b50505091600052602060002090602091828204019190065b8360040173__DeckLib_______________________________639f341e13909186600901546000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100005760325a03f4156100005750505060405180519050909190916101000a81548160ff021916908360ff16021790555050806007018054806001018281815481835581811511610e9657601f016020900481601f01602090048360005260206000209182019101610e9691905b808211156108745760008155600101610d7d565b5090565b5b50505091600052602060002090602091828204019190065b8360040173__DeckLib_______________________________639f341e13909186600901546000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100005760325a03f4156100005750505060405180519050909190916101000a81548160ff021916908360ff16021790555050806008018054806001018281815481835581811511610f9757601f016020900481601f01602090048360005260206000209182019101610f9791905b808211156108745760008155600101610d7d565b5090565b5b50505091600052602060002090602091828204019190065b8360040173__DeckLib_______________________________639f341e13909186600901546000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100005760325a03f4156100005750506040515183546101009390930a60ff818102199094169390911602919091179091555050600a8101805460ff191660011790555b50565b806008018054806001018281815481835581811511610f9757601f016020900481601f01602090048360005260206000209182019101610f9791905b808211156108745760008155600101610d7d565b5090565b5b50505091600052602060002090602091828204019190065b8360040173__DeckLib_______________________________639f341e13909186600901546000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100005760325a03f4156100005750506040515183546101009390930a60ff818102199094169390911602919091179091555050600a8101805460ff191660011790555b50565b8060070180548060010182818154818355818115116111c157601f016020900481601f016020900483600052602060002091820191016111c191905b808211156108745760008155600101610d7d565b5090565b5b50505091600052602060002090602091828204019190065b8360040173__DeckLib_______________________________639f341e13909186600901546000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100005760325a03f4156100005750505060405180519050909190916101000a81548160ff021916908360ff16021790555050601160ff166112ec8260070180548060200260200160405190810160405280929190818152602001828054801561064257602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116106135790505b5050505050610bd7565b60ff161015611055576110558161116d565b5b5b50565b600060048360048111610000571415611323575060026005820204610388565b6003836004811161000057141561133e575060028102610388565b60028360048111610000571415611356575080610388565b5060005b92915050565b600a81015462010000900460ff161561137857610000565b6004600a82015460ff1660048111610000571461139457610000565b600a8101805462ff000019166201000017905560028101546000901115611055578054600282015460405173ffffffffffffffffffffffffffffffffffffffff9092169181156108fc0291906000818181858888f19350505050151561105557610000565b5b5b505600a165627a7a723058204f84dbcde81b7a430469dd8479fb2cb1c7a704dbccdf62382e8a23f23dc1f9500029

Deployed Bytecode

0x606060405236156100935763ffffffff60e060020a60003504166330faa3e981146100985780633b7e9825146100cd578063517607691461017857806359d3c9a9146101975780635d9abc4e146101aa57806366a2eaff146101c9578063772b36aa146101d65780638d010393146101e657806391a5b0c7146101f3578063b14efa8114610254578063c9ae559414610267575b610000565b6100ac60ff600435811690602435166102c8565b6040518082600281116100005760ff16815260200191505060405180910390f35b61011d6004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496505050923560ff16925061038e915050565b6040805160208082528351818301528351919283929083019185810191028083838215610165575b80518252602083111561016557601f199092019160209182019101610145565b5050509050019250505060405180910390f35b610183600435610455565b604080519115158252519081900360200190f35b6101a860043560ff6024351661052a565b005b610183600435610584565b604080519115158252519081900360200190f35b6101a86004356105cf565b005b6101a8600435602435610751565b005b6101a86004356109fd565b005b61023e600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750949650610b0395505050505050565b6040805160ff9092168252519081900360200190f35b6101a860043560ff60243516610b67565b005b61023e600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750949650610bd795505050505050565b6040805160ff9092168252519081900360200190f35b6000601560ff8416118015906102e25750601560ff831611155b15610313578160ff168360ff1611156102fd57506000610388565b8160ff168360ff16101561031357506001610388565b5b601560ff841611801561032a5750601560ff8316115b1561035b578160ff168360ff16101561034557506000610388565b8160ff168360ff16111561035b57506001610388565b5b601560ff8416111561037057506001610388565b601560ff8316111561038457506000610388565b5060025b92915050565b60206040519081016040528060008152506020604051908101604052806000815250600084516001016040518059106103c45750595b908082528060200260200182016040525b509150600090505b84518160ff16101561042957848160ff1681518110156100005790602001906020020151828260ff1681518110156100005760ff9092166020928302909101909101525b6001016103dd565b8382865181518110156100005760ff90921660209283029091019091015290915081905b505092915050565b6009810154600090431161046b57506000610525565b43826009015460ff01101561048d5761048582600161052a565b506001610525565b61049682610584565b15156104a457506001610525565b6000600a83015460ff16600481116100005714156104c5576104c582610d41565b5b6002600a83015460ff16600481116100005714156104e7576104e782611058565b5b6003600a83015460ff1660048111610000571415610517576105098261116d565b610512826105cf565b610520565b610520826109fd565b5b5060015b919050565b600a8201805482919061ff0019166101008360048111610000570217905550600a8201805460ff191660041790819055600183015461057191610100900460ff1690611303565b600283015561057f82611360565b5b5050565b60006001600a83015460ff16600481116100005714156105a657506000610525565b6004600a83015460ff166004811161000057141561052057506000610525565b5060015b919050565b6000600061064c8360070180548060200260200160405190810160405280929190818152602001828054801561064257602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116106135790505b5050505050610bd7565b915060ff82166015148015610665575060078301546002145b1561067a5761067583600161052a565b61074b565b6106fc826106f78560080180548060200260200160405190810160405280929190818152602001828054801561064257602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116106135790505b5050505050610bd7565b6102c8565b90506000816002811161000057141561071f5761067583600161052a565b61074b565b600181600281116100005714156107405761067583600361052a565b61074b565b61074b83600261052a565b5b505050565b815473ffffffffffffffffffffffffffffffffffffffff19163373ffffffffffffffffffffffffffffffffffffffff161782553460018301556000600283018190556040518059106107a05750595b908082528060200260200182016040525b5082600701908051906020019082805482825590600052602060002090601f016020900481019282156108545791602002820160005b8382111561082557835183826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026107e7565b80156108525782816101000a81549060ff0219169055600101602081600001049283019260010302610825565b505b506108789291505b8082111561087457805460ff1916815560010161085c565b5090565b505060006040518059106108895750595b908082528060200260200182016040525b5082600801908051906020019082805482825590600052602060002090601f0160209004810192821561093d5791602002820160005b8382111561090e57835183826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026108d0565b801561093b5782816101000a81549060ff021916905560010160208160000104928301926001030261090e565b505b506109619291505b8082111561087457805460ff1916815560010161085c565b5090565b5050436009830155600a8201805462ffffff1916905560038201819055604080517f187a4b05000000000000000000000000000000000000000000000000000000008152600480850190820152602481018390529051738afe99cee656b11f514816db8b61ae9324a9f1119163187a4b05916044808301926000929190829003018186803b156100005760325a03f415610000575050505b5050565b60006000610a7a8360080180548060200260200160405190810160405280929190818152602001828054801561064257602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116106135790505b5050505050610bd7565b915060ff82166015148015610a93575060088301546002145b15610aa85761067583600461052a565b61074b565b601560ff83161115610ac45761067583600161052a565b61074b565b60ff82166015141561074b57506009820154610ae1836003610b67565b60098301819055610af183610455565b151561074b57610000565b5b5b505050565b603260005b8251811015610b60576001610b31838584815181101561000057906020019060200201516102c8565b60028111610000571415610b575782818151811015610000579060200190602002015191505b5b600101610b08565b5b50919050565b6001600a83015460ff16600481116100005714610b8357610000565b600281600481116100005714158015610ba55750600381600481116100005714155b15610baf57610000565b600a8201805482919060ff1916600183600481116100005702179055504360098301555b5050565b6000602060405190810160405280600081525060006000600060006001604051805910610c015750595b908082528060200260200182016040525b509450600093505b8651841015610d2b57868481518110156100005760209081029091018101516040805160009084015280517fca949a1d00000000000000000000000000000000000000000000000000000000815260ff909216600483015251738afe99cee656b11f514816db8b61ae9324a9f1119263ca949a1d9260248082019391829003018186803b156100005760325a03f415610000575050604051518651909450925060009150505b81811015610d1f57828582815181101561000057602090810290910101805160ff92018216905260019084161415610d1657610d1385868381518110156100005790602001906020020151600a0161038e565b94505b5b600101610cc0565b5b600190930192610c1a565b610d3485610b03565b95505b5050505050919050565b806008018054806001018281815481835581811511610d9557601f016020900481601f01602090048360005260206000209182019101610d9591905b808211156108745760008155600101610d7d565b5090565b5b50505091600052602060002090602091828204019190065b83600401738afe99cee656b11f514816db8b61ae9324a9f111639f341e13909186600901546000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100005760325a03f4156100005750505060405180519050909190916101000a81548160ff021916908360ff16021790555050806007018054806001018281815481835581811511610e9657601f016020900481601f01602090048360005260206000209182019101610e9691905b808211156108745760008155600101610d7d565b5090565b5b50505091600052602060002090602091828204019190065b83600401738afe99cee656b11f514816db8b61ae9324a9f111639f341e13909186600901546000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100005760325a03f4156100005750505060405180519050909190916101000a81548160ff021916908360ff16021790555050806008018054806001018281815481835581811511610f9757601f016020900481601f01602090048360005260206000209182019101610f9791905b808211156108745760008155600101610d7d565b5090565b5b50505091600052602060002090602091828204019190065b83600401738afe99cee656b11f514816db8b61ae9324a9f111639f341e13909186600901546000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100005760325a03f4156100005750506040515183546101009390930a60ff818102199094169390911602919091179091555050600a8101805460ff191660011790555b50565b806008018054806001018281815481835581811511610f9757601f016020900481601f01602090048360005260206000209182019101610f9791905b808211156108745760008155600101610d7d565b5090565b5b50505091600052602060002090602091828204019190065b83600401738afe99cee656b11f514816db8b61ae9324a9f111639f341e13909186600901546000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100005760325a03f4156100005750506040515183546101009390930a60ff818102199094169390911602919091179091555050600a8101805460ff191660011790555b50565b8060070180548060010182818154818355818115116111c157601f016020900481601f016020900483600052602060002091820191016111c191905b808211156108745760008155600101610d7d565b5090565b5b50505091600052602060002090602091828204019190065b83600401738afe99cee656b11f514816db8b61ae9324a9f111639f341e13909186600901546000604051602001526040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b156100005760325a03f4156100005750505060405180519050909190916101000a81548160ff021916908360ff16021790555050601160ff166112ec8260070180548060200260200160405190810160405280929190818152602001828054801561064257602002820191906000526020600020906000905b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116106135790505b5050505050610bd7565b60ff161015611055576110558161116d565b5b5b50565b600060048360048111610000571415611323575060026005820204610388565b6003836004811161000057141561133e575060028102610388565b60028360048111610000571415611356575080610388565b5060005b92915050565b600a81015462010000900460ff161561137857610000565b6004600a82015460ff1660048111610000571461139457610000565b600a8101805462ff000019166201000017905560028101546000901115611055578054600282015460405173ffffffffffffffffffffffffffffffffffffffff9092169181156108fc0291906000818181858888f19350505050151561105557610000565b5b5b505600a165627a7a723058204f84dbcde81b7a430469dd8479fb2cb1c7a704dbccdf62382e8a23f23dc1f9500029

Swarm Source

bzzr://4f84dbcde81b7a430469dd8479fb2cb1c7a704dbccdf62382e8a23f23dc1f950

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

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.