Contract 0xEa3B6D1895129901Ca4207aB5aF0283A3b3Dc0bD 2

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x88263c14d4625907e6ef32ac2127a719e987d1bfe24b10dc9857c005e74eeeb3Vote265249912022-03-30 3:57:0894 days 19 hrs ago0xb239a77b6c912cd556f34a0b40b54bcc9f4517e0 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.000709737315 29.58471513
0x18e797395c08098592170c8c9b92c44c1882902bd38ed28b22f8ac2b9c277522Declare Winner264467882022-03-28 4:01:0096 days 19 hrs ago0xdafdc1bb93c61e0edc5546a0e56e9048e8fca2aa IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.002012152605 30.013761809
0xdef0601f6c1437981311d021a9d857c717d06014532547eb3cc0f50c7d225cd2Vote264466122022-03-28 3:54:5696 days 19 hrs ago0x39d097ffe8168563123367c935bca158ea1876e5 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.002926893761 30.626295005
0x7ad6f2e8bf1f19c87fc2199c4950854adfba58519e8bfc22f63bb0bab2aa9523Vote264464172022-03-28 3:46:0696 days 20 hrs ago0x98f5e6295fe68dce1aee28b73fc70df35db880b9 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.002967357729 31.049700002
0x9fd4ce53a4884617fe43a38fe7d9289ba37730d84134b06763d5c04d2efd809dVote264463892022-03-28 3:45:0696 days 20 hrs ago0xfe83302c2be58227be1d23b68f5c7c6c95614a42 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.00305245721 31.94016
0x0145ca399f49caa3434121de560a5a2b190fcc34fe6a1bf74d1026e0c30c97e9Vote264456272022-03-28 3:14:3896 days 20 hrs ago0xd9602d439e4563d124a5c3cec8bb7cb96e3f271f IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.003082948166 32.25920985
0xb83371f90368f4ced8e68d9737b36118dfa79a51bc48e6e35b2bd961f78d3badVote264453762022-03-28 3:06:0496 days 20 hrs ago0x0372eb65f115f4b79cfcc7f9dc796e4f161cd7f9 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.003188915458 33.368025469
0x01e1dad118d5eaeae3602b970ef55899b330f8f47b49e0a083321231813de7c2Vote264451702022-03-28 2:58:5696 days 20 hrs ago0xc0815b4dff71281f08fd34df5373d49456dde7e2 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.002937072229 30.732799993
0xd566f5e1b7ca0590f5ac14024d6fae21bbc58650dd47bb5e4d1be3a7bca376e6Vote264441822022-03-28 2:23:3896 days 21 hrs ago0x0a78fc8ac27da94fdf853cec14a43ffc7fb0de91 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.003033599676 31.74283941
0x1c8bce94a84b19950e4d6ee6f446c6ee491db5892c931d2b4121c5a7dfcb16b2Vote264440392022-03-28 2:16:0696 days 21 hrs ago0xf10a042626a8d6a4ca8c32eb66402abd2682447b IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.00292689376 30.626295003
0x22f7766ba0ecdbea2af893fdef1b6dc200d446890783b08a9f6e4616cdc90a17Vote264437892022-03-28 2:07:1496 days 21 hrs ago0xcb01f3d84f125667f87ed21a6c3854021c9d90db IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.002967357729 31.049700001
0xfea67774f8f53fd972a5f20ab9dec0ccdd1fd1325e18508e742d6b0da939b1cfVote264437062022-03-28 2:04:2096 days 21 hrs ago0xd70fa2c19dec3132ada957ee3049863ac232edf2 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.002926893762 30.626295025
0x6631e59a7f588ee8a94f67a3ed04fc6e398ea926b5bc24e001fc83236f4d7164Vote264436292022-03-28 2:01:2496 days 21 hrs ago0x582a794e552754373633e68356517cb70f73cd0b IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.003561200079 37.263520002
0x8f71a2a5503fbf01c3edd0f33e1a1a6904fe0146e0e104f0fd961e4ea1906fb8Vote264435832022-03-28 1:59:4896 days 21 hrs ago0xb6082751d6e4997d4755b700355181c6627272d0 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.002944845378 30.814136302
0x7980988744ddb17af113349a47dc991140ce69431922067870e392103731e8bfVote264435202022-03-28 1:57:4296 days 21 hrs ago0x8eda372d19b81b91860bb10fde3dd4f3c4287239 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.002967357729 31.049699999
0xea0cade3abc8b9e10b0df0d1170b4e8d57c0b5ea2378ec325092a6f22af610ffVote264434992022-03-28 1:56:5696 days 21 hrs ago0x8788512b8e41cb892966181dad61e14c3e3703e8 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.003525955212 36.894726397
0x361f4e82d303f086d66e6a114cae1c6bfdcff62bc2ec58ce17793db2d1167e86Vote264432982022-03-28 1:50:0296 days 21 hrs ago0x1ac34b44b2c04033445915ae73d87657044da894 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.003059131702 32.010000237
0x17852dbbe1af8e3a92e06b549e9e1000d30cc42e11066c7fdf660ebe87000dd8Vote264429822022-03-28 1:37:0296 days 22 hrs ago0x92353d9186a1d02be280f55c8a563762a9edc100 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.002886429791 30.202890001
0x6b72980e2dc09bf6bf10c425a34556f0843e4c51526fc73b05ec9e686df00583Vote264429502022-03-28 1:35:5896 days 22 hrs ago0xbc0a0ecb73eb819b130b8b4eb702da69026ad636 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.002997949047 31.369800015
0x7e22b488c016b22d24a6a7f54203bb0e5e74697e6bb375c103cf96ffd5f2f388Vote264426632022-03-28 1:23:4696 days 22 hrs ago0x94c7494810afa75892b54c56b32f54ea1dfa91d4 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.00430056 45
0x9914c95c0048039371c26127feb0e52987bf89db031b2c7206b5fb14bf301632Vote264424462022-03-28 1:16:2096 days 22 hrs ago0x59068bdaa75edfd06c19f966aa27c61b2099d1ec IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.004120892159 43.119999999
0xa969ae114c2c7b7cdb3e423a4fde397441986beb183b0d52f467ffc3f245c14fVote264423442022-03-28 1:12:4896 days 22 hrs ago0x61dc92b9df5a4fe11ed4846c06b0c89ccca08444 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.002937021967 30.732274059
0xe98c3817a08678435289f459c9f3d221766c25cf71190c0e463a4b90d42eb142Vote264422142022-03-28 1:06:5696 days 22 hrs ago0x8b2856fbd13d98b30c7bd47114284dffb7d223c9 IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.004497391857 47.059600046
0x7b8c59c563a918dd359cb252c48f2f3d45906ce3ec158c0b7817eadca06f9432Vote264421632022-03-28 1:03:5296 days 22 hrs ago0x23f8c7db7a1b656652e9726ab264c5b181418b9f IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.003066269654 32.084690004
0x34cfe6cba725c0cc361bc9be5dcbf5837f56620c62257bc5c5a8dd7148dc5d5aVote264421562022-03-28 1:03:3896 days 22 hrs ago0xc82b11e13d79824c392a1928afe182394c60397a IN  0xea3b6d1895129901ca4207ab5af0283a3b3dc0bd0 MATIC0.003066269654 32.084690003
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

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

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000007e506cc945b47ed08ac2d985f61b47ce4068823c00000000000000000000000000000000000000000000000000000000624132c00000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : stakingAddress (address): 0x7e506cc945b47ed08ac2d985f61b47ce4068823c
Arg [1] : _voteCloseTime (uint256): 1648440000
Arg [2] : questionOneAnswers (uint8[]): 1,2,3

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 0000000000000000000000007e506cc945b47ed08ac2d985f61b47ce4068823c
Arg [1] : 00000000000000000000000000000000000000000000000000000000624132c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000000


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.