Contract 0x6e731a6bdde2243175141344993bce9889023279

Contract Overview

Balance:
0 MATIC
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x97a48004d703c514ab4dc32beae6e27e36bd548f68666aa0ff2b935b1d2b9eec0x60806040219301852021-11-26 2:53:379 days 18 hrs ago0x69cfb2f90e4a32e72f907779b637c00e01808ae5 IN  Contract Creation0 MATIC0.001655311
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ViteDao

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at polygonscan.com on 2021-11-26
*/

// SPDX-License-Identifier: MIT
pragma solidity >=0.4.21 <0.7.0;

contract ViteDao {
  uint public voteEnd;
  bool ended;

  struct Voter {
    bool claimed;
    uint votetime;
  }
  address owner;
  mapping(address => Voter) public voters;

  constructor(uint _biddingTime) public {
    owner = msg.sender;
    voteEnd = now + _biddingTime;
  }

  function extend(uint _extendTime) public {
    require(owner == msg.sender, 'need owner privilege!');
    voteEnd = now + _extendTime;
  }

  function claim() public {
    require(now >= voteEnd, "Vote not yet ended.");
    require(!ended, "vote ended.");
    Voter storage voter = voters[msg.sender];
    require( !voter.claimed, "Already Claimed." );
    voters[msg.sender].claimed = true;
  }

  function vote() public{
    bool claimed = voters[msg.sender].claimed;
    require(claimed, "claim vote right first!");
    voters[msg.sender].votetime += 1;
  }

  function votetime() public view returns (uint number){
    bool claimed = voters[msg.sender].claimed;
    require(claimed, "claim vote right first!");
    number = voters[msg.sender].votetime;
  }
}

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_biddingTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_extendTime","type":"uint256"}],"name":"extend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"voteEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"voters","outputs":[{"internalType":"bool","name":"claimed","type":"bool"},{"internalType":"uint256","name":"votetime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votetime","outputs":[{"internalType":"uint256","name":"number","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060405161076a38038061076a8339818101604052602081101561003357600080fd5b8101908080519060200190929190505050336001806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550804201600081905550506106cd8061009d6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80634e71d92d14610067578063632a9a52146100715780639714378c1461007b578063a3ec138d146100a9578063ddbe8f091461010a578063fbbbfa6314610128575b600080fd5b61006f610146565b005b610079610367565b005b6100a76004803603602081101561009157600080fd5b8101908080359060200190929190505050610482565b005b6100eb600480360360208110156100bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061054f565b6040518083151581526020018281526020019250505060405180910390f35b610112610580565b6040518082815260200191505060405180910390f35b610130610586565b6040518082815260200191505060405180910390f35b6000544210156101be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f566f7465206e6f742079657420656e6465642e0000000000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900460ff1615610241576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f766f746520656e6465642e00000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff1615610309576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f416c726561647920436c61696d65642e0000000000000000000000000000000081525060200191505060405180910390fd5b6001600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff02191690831515021790555050565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1690508061042e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f636c61696d20766f74652072696768742066697273742100000000000000000081525060200191505060405180910390fd5b6001600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254019250508190555050565b3373ffffffffffffffffffffffffffffffffffffffff1660018054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610543576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f6e656564206f776e65722070726976696c65676521000000000000000000000081525060200191505060405180910390fd5b80420160008190555050565b60026020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154905082565b60005481565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1690508061064e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f636c61696d20766f74652072696768742066697273742100000000000000000081525060200191505060405180910390fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549150509056fea2646970667358221220cdcd4f3463d8183650a440d7d649cebbfc1853f38f2bbbd44b1400545db09d6864736f6c634300060c003300000000000000000000000069cfb2f90e4a32e72f907779b637c00e01808ae5

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

00000000000000000000000069cfb2f90e4a32e72f907779b637c00e01808ae5

-----Decoded View---------------
Arg [0] : _biddingTime (uint256): 604075875928798660017785070115788000123007568613

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000069cfb2f90e4a32e72f907779b637c00e01808ae5


Deployed ByteCode Sourcemap

69:1085:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;515:259;;;:::i;:::-;;780:165;;;:::i;:::-;;368:141;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;212:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;91:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;951:200;;;:::i;:::-;;;;;;;;;;;;;;;;;;;515:259;561:7;;554:3;:14;;546:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;608:5;;;;;;;;;;;607:6;599:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;636:19;658:6;:18;665:10;658:18;;;;;;;;;;;;;;;636:40;;693:5;:13;;;;;;;;;;;;692:14;683:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;764:4;735:6;:18;742:10;735:18;;;;;;;;;;;;;;;:26;;;:33;;;;;;;;;;;;;;;;;;515:259;:::o;780:165::-;809:12;824:6;:18;831:10;824:18;;;;;;;;;;;;;;;:26;;;;;;;;;;;;809:41;;865:7;857:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;938:1;907:6;:18;914:10;907:18;;;;;;;;;;;;;;;:27;;;:32;;;;;;;;;;;780:165;:::o;368:141::-;433:10;424:19;;:5;;;;;;;;;;:19;;;416:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;492:11;486:3;:17;476:7;:27;;;;368:141;:::o;212:39::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;91:19::-;;;;:::o;951:200::-;992:11;1011:12;1026:6;:18;1033:10;1026:18;;;;;;;;;;;;;;;:26;;;;;;;;;;;;1011:41;;1067:7;1059:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1118:6;:18;1125:10;1118:18;;;;;;;;;;;;;;;:27;;;1109:36;;951:200;;:::o

Swarm Source

ipfs://cdcd4f3463d8183650a440d7d649cebbfc1853f38f2bbbd44b1400545db09d68
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading