Contract 0x137e711202E078EC346b6208f686f613F96383C7

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x6ca1ec8d54ece5e37cd57b6ebf5874d1a53a91ce986acbe4ce0f3d4d9bd54e1fVote275617242022-04-25 14:44:5068 days 8 hrs ago0xbb3beabd86237987603bb6943a5c1b02fd72662e IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.001320413355 55.040156543
0x40061beab8daeb3de90d28d4a25a56fc87b9881790f9ec25d3a4cc0f12f76045Declare Winner274970232022-04-23 23:00:4470 days 7 mins ago0xdafdc1bb93c61e0edc5546a0e56e9048e8fca2aa IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.002547921143 37.996348527
0xe683ca8c2666d5a88397d697da6ab970199a334fba218abe56d53bb20bccbe73Vote274668082022-04-23 3:36:1770 days 19 hrs ago0xd880ddd44d6f7f188354d952e89d8be04393f22b IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.002970077196 31.07815583
0x53035b90a0d4f2645c94a4645c17d91bd083d5d64955b3e424908babe9e3ddcdVote274656752022-04-23 2:54:5970 days 20 hrs ago0x32f347d2e73fa330ca12911132bcfbab084ff769 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.003244533606 33.950000073
0x34f31a8da926ac7eeb73f73f63d5c2241f5ef8068815dd5b5174e1ac5b9aad2dVote274652912022-04-23 2:41:4270 days 20 hrs ago0x01c38875ab789cb12efcd791db91217a00fd01fa IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.003724779833 38.975178238
0x5b655a479126f9664a55abb322b4609a1355344d72619ff3475ce82725cc33daVote274648512022-04-23 2:20:0970 days 20 hrs ago0x3e05fc835a92fa1ad481c623d1f5097bfd55bb18 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.003085506308 32.285977613
0xb3e64433b748b21ae3777f11f06277cd6366eb3f9918fe4415cc927f230286c0Vote274630192022-04-23 1:12:4070 days 21 hrs ago0x38bf30d3f1528bbd2bb8a242e9a0f4405affb8d0 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.003596797247 37.635999998
0x0af10b36221b773fbef7795b38b9a53643f650d1c8260798dca76315486c6214Vote274628142022-04-23 1:05:3870 days 22 hrs ago0x46f9e20ec18dc8609bc2949066e357687c0790f3 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.0037080384 38.8
0x248b4e1ba95b20a9d7bba7161f544d8fcd1152865f142fef6ac5bd64a6da298aVote274623002022-04-23 0:47:5870 days 22 hrs ago0xafb1cfe43f51599bf24c5a001542b45c19852413 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.003547041675 37.115369953
0x8370e68bc52354758baca67a44932378e64b3c2024a0853c95b36d63be476a27Vote274617732022-04-23 0:27:3970 days 22 hrs ago0x178e934421c498fe287aa3f2771fe29267c2c72c IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.00287372976 30.070000001
0x01a401c2a9ebb4313b2e46e5d1a8dec13591a7343ea5489f55b6401cc47ea110Vote274614662022-04-23 0:16:4470 days 22 hrs ago0xdc57092b80e87c571013a381cfb83b54e6c49dfb IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.0016602035 48.500000016
0x09e0b28a48cad92d045528e33f4c5f0211d260d19816a898cc1328036cd334cbVote274614632022-04-23 0:16:3870 days 22 hrs ago0xdc57092b80e87c571013a381cfb83b54e6c49dfb IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.004635047999 48.499999998
0x4c87a86616406ed6ebac705d9e80dc680a1b238042a18de69b8e372b38f076c5Vote274613332022-04-23 0:12:1070 days 22 hrs ago0x2c434867d28da51549dff76fb127ce22b9aa46c6 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.004181276943 43.751851496
0x21d2427cbc03bd5ddb04d34ded3c579c8e7814d86ab8501c909f7def86651bcfVote274593862022-04-22 23:04:5871 days 2 mins ago0x01ab4a84d25d6cf4c944d3439199a174383c970d IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.002879273602 30.128009406
0x6c24227cbe0f55f3366a2d0f34e8095497396f4b350f89fccee439f82b1ba983Vote274592962022-04-22 23:01:5471 days 5 mins ago0x95bfb3e3b4cb60af4a30bf770290547a82040593 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.0032779824 34.3
0x6218b108a3c40fcc2d8d98e953f6ff8eb7dae16d2b5c3a2deeac3cc142d63df7Vote274588812022-04-22 22:47:4071 days 20 mins ago0x0e5a18e175af74042c9bbf552bb0594198c0018d IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.003205645551 33.543085041
0xcd168a8c6e62ccbb3c216fd4c848cd500f7da85c878ff8b754104fcf042d0c3dVote274587112022-04-22 22:41:4871 days 26 mins ago0x06c8270541b2fb47a987b129a2eeea44287f70fe IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.00324523573 33.95734692
0xd1293fb7b47fc4f911001c4342925d938d3a81fda70a2272a8d6a5dd589ba682Vote274569602022-04-22 21:39:1171 days 1 hr ago0x44a8079fcd763b075750fea9c125789ed47f2ea4 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.002996828204 31.358071783
0x85bf48e6227983afca99f2977fb513712ecc70b469576d15daa73f3beaacb370Vote274567972022-04-22 21:33:3371 days 1 hr ago0x786c0705bc0d9424368fbf48bbb0e34a796d227e IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.004396128001 46.000000014
0xc95ffedd93da4e2f133e8b2f8820cec7cb551c6a690a29594d3e7f434210173fVote274565022022-04-22 21:23:2371 days 1 hr ago0x036d78c5e87e0aa07bf61815d1effe10c9fd5275 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.002997949046 31.369800001
0xa5ab59e969ee117750bf9119b094e55a9b6a3d3ff4b443bc39f1e75e86d2d430Vote274561612022-04-22 21:10:4171 days 1 hr ago0xc59af5b5730fd0d7541af26d5e7f9dd13a514947 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.003066269653 32.084689994
0x4f44715f23eb8b231eebde01b86de967069e5b5b78c2e5b63d8b0b12ffda5412Vote274556832022-04-22 20:53:0971 days 2 hrs ago0x400f5edab54b9d01b764b9fd7ce93addf6215c5e IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.003671340294 38.416000063
0x2acad702205046323d84d6ecf3fa4117e641f5701c2959a85446a0927a496b2eVote274556252022-04-22 20:49:2171 days 2 hrs ago0xd2199db00dcc6d72a262c04f3be04d0426fb5746 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.003084711906 32.277665188
0x0c32fda13f3fff04a1fb4aa8f1b1c6f742b797ccedb99e6b0984b5ab72c5086aVote274555682022-04-22 20:47:0371 days 2 hrs ago0x1a16b5426c9b917314c65e92985605ba46bfb4b6 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.002961323429 30.986558571
0x1bfd9df5d093ec35e6c1415031ef997fc0b044218d85ed06e77ce97916e99bffVote274535652022-04-22 19:35:5771 days 3 hrs ago0xb111dabb8edd8260b5c1e471945a62be2ee24470 IN  0x137e711202e078ec346b6208f686f613f96383c70 MATIC0.003323106933 34.772172
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xEa3B6D1895129901Ca4207aB5aF0283A3b3Dc0bD

Contract Name:
RaiderStakerVoting

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 4 : RaiderStakerVoting.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";

interface RaiderStakingLocking { 
  function addressStakedBalance(address _address) external view returns (uint);
  function showLockTimeRemaining(address _address) external view returns (uint);
}

contract RaiderStakerVoting is Ownable, Pausable {
  mapping(uint256 => mapping(uint8 => uint256)) public totalVotes; // ident to choice to amount voted
  mapping(address => mapping(uint256 => uint8)) public stakerVotes; // voter to ident to choice voted
  mapping(address => uint256) public votesPerAddress; //voter to staked balance voted with
  mapping(uint256 => uint8[]) public questionsToAnswers; //ident to available choices

  mapping(uint8 => uint8) public winners; //ident to choice

  uint8 public constant QUESTION_1_IDENT = 1;
  uint8 public constant QUESTION_2_IDENT = 2;
  uint256 public voteCloseTime;

  RaiderStakingLocking immutable internal stakingContract;

  // EVENTS

  event Voted(address indexed _from, uint amt, uint8 indexed questionOneAnswer, uint8 indexed questionTwoAnswer);
  event VoteBalanceExtended(address indexed _from, uint amt);
  event WinnerDeclared(uint8 questionIdent, uint8 questionAnswer);

  // Constructor

  constructor(address stakingAddress, uint256 _voteCloseTime, uint8[] memory questionOneAnswers, uint8[] memory questionTwoAnswers) {
    require(_voteCloseTime >= block.timestamp,"Time must be in future");
    require(stakingAddress != address(0),"Valid address required");
    require(questionOneAnswers.length != 0,"Valid answers for Q1 required");
    //require(questionTwoAnswers.length != 0,"Valid answers for Q2 required");

    stakingContract = RaiderStakingLocking(stakingAddress);
    voteCloseTime = _voteCloseTime;
    questionsToAnswers[1] = questionOneAnswers;
    questionsToAnswers[2] = questionTwoAnswers;
  }

   modifier isOpen {
      require(block.timestamp < voteCloseTime,"Voting closed");
      _;
   }

   modifier validIdent(uint8 ident) {
     require(questionsToAnswers[ident].length != 0, "Invalid Question Ident");
     _;
   }

  function vote(uint8 questionOneAnswer, uint8 questionTwoAnswer) external isOpen whenNotPaused {
    uint thisBalance = stakingContract.addressStakedBalance(msg.sender);
    require(questionOneAnswer != 0,"Valid Answer required");
    require(votesPerAddress[msg.sender] == 0, "You have already voted");
    require(thisBalance > 0,"Not a staker");
    require(stakingContract.showLockTimeRemaining(msg.sender) > timeUntilClose(), "Your lockup ends before voting closes");
    stakerVotes[msg.sender][QUESTION_1_IDENT] = questionOneAnswer;
    stakerVotes[msg.sender][QUESTION_2_IDENT] = questionTwoAnswer;

    votesPerAddress[msg.sender] = thisBalance;


    totalVotes[QUESTION_1_IDENT][questionOneAnswer] += thisBalance;
    totalVotes[QUESTION_2_IDENT][questionTwoAnswer] += thisBalance;

    emit Voted(msg.sender, thisBalance, questionOneAnswer, questionTwoAnswer);
  }

  function timeUntilClose() public view isOpen returns(uint) {
    return voteCloseTime - block.timestamp;
  }

  function checkForTies(uint8 questionIdent) public view validIdent(questionIdent) returns (bool){
    uint256 lastNumber = 0;
    for(uint i = 0; i < questionsToAnswers[questionIdent].length; i++){
      uint8 thisChoice = questionsToAnswers[questionIdent][i];
      uint256 thisVal = totalVotes[questionIdent][thisChoice];
      if (thisVal != 0 && thisVal == lastNumber) {
        return true;
      }
      lastNumber = thisVal;
    }

    return false;
  }

  function extendStake() external isOpen whenNotPaused {
    require(votesPerAddress[msg.sender] > 0,"You must have voted already");
    uint thisBalance = stakingContract.addressStakedBalance(msg.sender);
    require(thisBalance > votesPerAddress[msg.sender],"Your balance must have grown");


    uint256 diff = thisBalance - votesPerAddress[msg.sender];

    votesPerAddress[msg.sender] += diff;

    totalVotes[QUESTION_1_IDENT][stakerVotes[msg.sender][QUESTION_1_IDENT]] += diff;
    totalVotes[QUESTION_2_IDENT][stakerVotes[msg.sender][QUESTION_2_IDENT]] += diff;
    emit VoteBalanceExtended(msg.sender, diff);
  }

  function updateClosingTime(uint256 newTime) external onlyOwner {
    voteCloseTime = newTime;
  }

  function getHighestVoteCount(uint8 questionIdent) public view validIdent(questionIdent) returns(uint8) {
    require(!checkForTies(questionIdent),"Tied!");
    uint256 biggestAmount = 0;
    uint8 biggestIdent = 0;

    for(uint256 i = 0; i < questionsToAnswers[questionIdent].length; i++){
      uint8 thisChoice = questionsToAnswers[questionIdent][i];
      uint256 thisVal = totalVotes[questionIdent][thisChoice];
      //No tie check needed again.
      
      if (thisVal > biggestAmount) {
        biggestIdent = thisChoice;
        biggestAmount = thisVal;
      }
    }

    return biggestIdent;
  }


  function declareWinner(uint8 questionIdent) external onlyOwner validIdent(questionIdent) returns(uint8) {
    require(block.timestamp > voteCloseTime,"Voting must be closed");
    uint8 result = getHighestVoteCount(questionIdent);
    require(result != 0,"No Winner yet");
    winners[questionIdent] = result;
    emit WinnerDeclared(questionIdent, result);
    return winners[questionIdent];
  }

  function pause() external onlyOwner {
    _pause();
  }

  function unpause() external onlyOwner {
    _unpause();
  }
}

File 2 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 4 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 4 of 4 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"stakingAddress","type":"address"},{"internalType":"uint256","name":"_voteCloseTime","type":"uint256"},{"internalType":"uint8[]","name":"questionOneAnswers","type":"uint8[]"},{"internalType":"uint8[]","name":"questionTwoAnswers","type":"uint8[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"}],"name":"VoteBalanceExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"questionOneAnswer","type":"uint8"},{"indexed":true,"internalType":"uint8","name":"questionTwoAnswer","type":"uint8"}],"name":"Voted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"questionIdent","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"questionAnswer","type":"uint8"}],"name":"WinnerDeclared","type":"event"},{"inputs":[],"name":"QUESTION_1_IDENT","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"QUESTION_2_IDENT","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"questionIdent","type":"uint8"}],"name":"checkForTies","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"questionIdent","type":"uint8"}],"name":"declareWinner","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"extendStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"questionIdent","type":"uint8"}],"name":"getHighestVoteCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"questionsToAnswers","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakerVotes","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeUntilClose","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"totalVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newTime","type":"uint256"}],"name":"updateClosingTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"questionOneAnswer","type":"uint8"},{"internalType":"uint8","name":"questionTwoAnswer","type":"uint8"}],"name":"vote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"voteCloseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"votesPerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"winners","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]

60a06040523480156200001157600080fd5b506040516200178f3803806200178f8339810160408190526200003491620003c6565b6200003f33620001eb565b6000805460ff60a01b1916905542831015620000a25760405162461bcd60e51b815260206004820152601660248201527f54696d65206d75737420626520696e206675747572650000000000000000000060448201526064015b60405180910390fd5b6001600160a01b038416620000fa5760405162461bcd60e51b815260206004820152601660248201527f56616c6964206164647265737320726571756972656400000000000000000000604482015260640162000099565b81516200014a5760405162461bcd60e51b815260206004820152601d60248201527f56616c696420616e737765727320666f72205131207265717569726564000000604482015260640162000099565b6001600160601b0319606085901b1660805260068390556001600052600460209081528251620001a0917fabd6e7cb50984ff9c2f3e18a2660c3353dadf4e3291deeb275dae2cd1e44fe0591908501906200023b565b506002600052600460209081528151620001e0917f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a791908401906200023b565b50505050506200046c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805482825590600052602060002090601f01602090048101928215620002d65791602002820160005b83821115620002a557835183826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030262000265565b8015620002d45782816101000a81549060ff0219169055600101602081600001049283019260010302620002a5565b505b50620002e4929150620002e8565b5090565b5b80821115620002e45760008155600101620002e9565b600082601f83011262000310578081fd5b815160206001600160401b03808311156200032f576200032f62000456565b8260051b604051601f19603f8301168101818110848211171562000357576200035762000456565b6040528481528381019250868401828801850189101562000376578687fd5b8692505b85831015620003a3576200038e81620003af565b8452928401926001929092019184016200037a565b50979650505050505050565b805160ff81168114620003c157600080fd5b919050565b60008060008060808587031215620003dc578384fd5b84516001600160a01b0381168114620003f3578485fd5b6020860151604087015191955093506001600160401b038082111562000417578384fd5b6200042588838901620002ff565b935060608701519150808211156200043b578283fd5b506200044a87828801620002ff565b91505092959194509250565b634e487b7160e01b600052604160045260246000fd5b60805160601c6112f662000499600039600081816106fb015281816109b70152610b3501526112f66000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80638456cb59116100b8578063df49c4de1161007c578063df49c4de1461028b578063e41b49781461029e578063ed7d5d57146102b1578063ee573698146102b9578063f2fde38b146102e7578063f830cbd6146102fa57600080fd5b80638456cb59146102225780638da5cb5b1461022a578063a5132d4614610245578063c35aef7b14610270578063d93597731461027857600080fd5b8063715018a6116100ff578063715018a6146101c8578063762a4f35146101d05780637f7b0f10146101e3578063810fd980146101eb5780638388a3281461021957600080fd5b80631798b2ae1461013c57806318985377146101665780633f4ba83a146101895780634df37e39146101935780635c975abb146101b6575b600080fd5b61014f61014a366004611167565b610302565b60405160ff90911681526020015b60405180910390f35b610179610174366004611167565b610477565b604051901515815260200161015d565b610191610573565b005b61014f6101a1366004611167565b60056020526000908152604090205460ff1681565b600054600160a01b900460ff16610179565b6101916105a7565b6101916101de3660046110eb565b6105db565b61014f600181565b61020b6101f93660046110a1565b60036020526000908152604090205481565b60405190815260200161015d565b61020b60065481565b61019161060a565b6000546040516001600160a01b03909116815260200161015d565b61020b61025336600461113c565b600160209081526000928352604080842090915290825290205481565b61019161063c565b61014f61028636600461111b565b610911565b610191610299366004611181565b610954565b61014f6102ac366004611167565b610d29565b61020b610e51565b61014f6102c73660046110c2565b600260209081526000928352604080842090915290825290205460ff1681565b6101916102f53660046110a1565b610e87565b61014f600281565b600080546001600160a01b031633146103365760405162461bcd60e51b815260040161032d9061122b565b60405180910390fd5b60ff821660009081526004602052604090205482906103675760405162461bcd60e51b815260040161032d906111fb565b60065442116103b05760405162461bcd60e51b8152602060048201526015602482015274159bdd1a5b99c81b5d5cdd0818994818db1bdcd959605a1b604482015260640161032d565b60006103bb84610d29565b905060ff81166103fd5760405162461bcd60e51b815260206004820152600d60248201526c139bc815da5b9b995c881e595d609a1b604482015260640161032d565b60ff848116600081815260056020908152604091829020805460ff1916948616948517905581519283528201929092527f61660ad89d5767f474541357fe1371c75956c2fe9b016585afb6336cf5f4c407910160405180910390a15060ff8084166000908152600560205260409020541691505b50919050565b60ff811660009081526004602052604081205482906104a85760405162461bcd60e51b815260040161032d906111fb565b6000805b60ff85166000908152600460205260409020548110156105685760ff851660009081526004602052604081208054839081106104f857634e487b7160e01b600052603260045260246000fd5b60009182526020808320818304015460ff8a81168552600183526040808620601f9095166101000a909204168085529290915290912054909150801580159061054057508381145b15610552576001955050505050610471565b92508190506105608161128f565b9150506104ac565b506000949350505050565b6000546001600160a01b0316331461059d5760405162461bcd60e51b815260040161032d9061122b565b6105a5610f22565b565b6000546001600160a01b031633146105d15760405162461bcd60e51b815260040161032d9061122b565b6105a56000610fbf565b6000546001600160a01b031633146106055760405162461bcd60e51b815260040161032d9061122b565b600655565b6000546001600160a01b031633146106345760405162461bcd60e51b815260040161032d9061122b565b6105a561100f565b600654421061065d5760405162461bcd60e51b815260040161032d906111aa565b600054600160a01b900460ff16156106875760405162461bcd60e51b815260040161032d906111d1565b336000908152600360205260409020546106e35760405162461bcd60e51b815260206004820152601b60248201527f596f75206d757374206861766520766f74656420616c72656164790000000000604482015260640161032d565b604051630d774cdd60e41b81523360048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d774cdd09060240160206040518083038186803b15801561074557600080fd5b505afa158015610759573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077d9190611103565b3360009081526003602052604090205490915081116107de5760405162461bcd60e51b815260206004820152601c60248201527f596f75722062616c616e6365206d75737420686176652067726f776e00000000604482015260640161032d565b336000908152600360205260408120546107f89083611278565b3360009081526003602052604081208054929350839290919061081c908490611260565b90915550503360009081526002602090815260408083206001845282528083205460ff1683527fcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792f90915281208054839290610878908490611260565b90915550503360009081526002602081815260408084209284529181528183205460ff1683527fd9d16d34ffb15ba3a3d852f0d403e2ce1d691fb54de27ac87cd2f993f3ec330f9052812080548392906108d3908490611260565b909155505060405181815233907f0437b421b7c137af400576c580c32ee59dacc00eec453b6b05bab6a7643fcd7e9060200160405180910390a25050565b6004602052816000526040600020818154811061092d57600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460ff1681565b60065442106109755760405162461bcd60e51b815260040161032d906111aa565b600054600160a01b900460ff161561099f5760405162461bcd60e51b815260040161032d906111d1565b604051630d774cdd60e41b81523360048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d774cdd09060240160206040518083038186803b158015610a0157600080fd5b505afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190611103565b905060ff8316610a835760405162461bcd60e51b815260206004820152601560248201527415985b1a5908105b9cddd95c881c995c5d5a5c9959605a1b604482015260640161032d565b3360009081526003602052604090205415610ad95760405162461bcd60e51b8152602060048201526016602482015275165bdd481a185d9948185b1c9958591e481d9bdd195960521b604482015260640161032d565b60008111610b185760405162461bcd60e51b815260206004820152600c60248201526b2737ba10309039ba30b5b2b960a11b604482015260640161032d565b610b20610e51565b60405163029fc7b560e41b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906329fc7b509060240160206040518083038186803b158015610b7f57600080fd5b505afa158015610b93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb79190611103565b11610c125760405162461bcd60e51b815260206004820152602560248201527f596f7572206c6f636b757020656e6473206265666f726520766f74696e6720636044820152646c6f73657360d81b606482015260840161032d565b336000818152600260208181526040808420600185528252808420805460ff1990811660ff8b81169182179093559486528286208054909116918916919091179055938352600381528383208590559082527fcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792f90529081208054839290610c9a908490611260565b909155505060ff821660009081527fd9d16d34ffb15ba3a3d852f0d403e2ce1d691fb54de27ac87cd2f993f3ec330f602052604081208054839290610ce0908490611260565b909155505060405181815260ff808416919085169033907f4b41c99641ccbc1ea9c1319a6243ce8938c3aa1a661122a4a71b18256519e0f39060200160405180910390a4505050565b60ff81166000908152600460205260408120548290610d5a5760405162461bcd60e51b815260040161032d906111fb565b610d6383610477565b15610d985760405162461bcd60e51b8152602060048201526005602482015264546965642160d81b604482015260640161032d565b60008060005b60ff8616600090815260046020526040902054811015610e485760ff86166000908152600460205260408120805483908110610dea57634e487b7160e01b600052603260045260246000fd5b60009182526020808320818304015460ff8b81168552600183526040808620601f9095166101000a90920416808552929091529091205490915084811115610e33578193508094505b50508080610e409061128f565b915050610d9e565b50949350505050565b60006006544210610e745760405162461bcd60e51b815260040161032d906111aa565b42600654610e829190611278565b905090565b6000546001600160a01b03163314610eb15760405162461bcd60e51b815260040161032d9061122b565b6001600160a01b038116610f165760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161032d565b610f1f81610fbf565b50565b600054600160a01b900460ff16610f725760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161032d565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff16156110395760405162461bcd60e51b815260040161032d906111d1565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fa23390565b80356001600160a01b038116811461108b57600080fd5b919050565b803560ff8116811461108b57600080fd5b6000602082840312156110b2578081fd5b6110bb82611074565b9392505050565b600080604083850312156110d4578081fd5b6110dd83611074565b946020939093013593505050565b6000602082840312156110fc578081fd5b5035919050565b600060208284031215611114578081fd5b5051919050565b6000806040838503121561112d578182fd5b50508035926020909101359150565b6000806040838503121561114e578182fd5b8235915061115e60208401611090565b90509250929050565b600060208284031215611178578081fd5b6110bb82611090565b60008060408385031215611193578182fd5b61119c83611090565b915061115e60208401611090565b6020808252600d908201526c159bdd1a5b99c818db1bdcd959609a1b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b602080825260169082015275125b9d985b1a5908145d595cdd1a5bdb881259195b9d60521b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611273576112736112aa565b500190565b60008282101561128a5761128a6112aa565b500390565b60006000198214156112a3576112a36112aa565b5060010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220b04d099e7dcc8b93ddd6db5e585901ec879b4bc4a2d3510e9bb440d661821af864736f6c634300080400330000000000000000000000007e506cc945b47ed08ac2d985f61b47ce4068823c00000000000000000000000000000000000000000000000000000000624132c00000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.