Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 15 from a total of 15 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Gov Withdraw | 11644263 | 1306 days ago | IN | 0 ETH | 0.00306119 | ||||
Buy Power | 11513344 | 1326 days ago | IN | 10 ETH | 0.0066662 | ||||
Buy Power | 11506951 | 1327 days ago | IN | 1 ETH | 0.0029302 | ||||
Gov Withdraw | 11465017 | 1333 days ago | IN | 0 ETH | 0.00263247 | ||||
Transfer Ownersh... | 11379271 | 1346 days ago | IN | 0 ETH | 0.00131891 | ||||
Buy Power | 11378028 | 1347 days ago | IN | 1 ETH | 0.0014651 | ||||
Buy Power | 11361020 | 1349 days ago | IN | 1 ETH | 0.01245335 | ||||
Buy Power | 11359084 | 1350 days ago | IN | 1 ETH | 0.00196616 | ||||
Gov Withdraw | 11328705 | 1354 days ago | IN | 0 ETH | 0.00067716 | ||||
Buy Power | 11325444 | 1355 days ago | IN | 1 ETH | 0.0043953 | ||||
Buy Power | 11318331 | 1356 days ago | IN | 5 ETH | 0.00864409 | ||||
Gov Withdraw | 11312289 | 1357 days ago | IN | 0 ETH | 0.00131623 | ||||
Buy Power | 11312202 | 1357 days ago | IN | 1 ETH | 0.00307671 | ||||
Buy Power | 11309136 | 1357 days ago | IN | 1 ETH | 0.0044657 | ||||
0x60806040 | 11299503 | 1359 days ago | IN | 0 ETH | 0.02288124 |
Loading...
Loading
Contract Name:
ETH2Validator
Compiler Version
v0.5.16+commit.9c3226ce
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-11-21 */ pragma solidity ^0.5.16; /** * Math operations with safety checks */ library SafeMath { function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint a, uint b) internal pure returns (uint) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) { require(b <= a, errorMessage); uint c = a - b; return c; } function mul(uint a, uint b) internal pure returns (uint) { if (a == 0) { return 0; } uint c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint a, uint b) internal pure returns (uint) { return div(a, b, "SafeMath: division by zero"); } function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint c = a / b; return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract ETH2Validator is Ownable{ using SafeMath for uint; mapping (address => uint8) private _vipPowerMap; mapping (uint32 => address) private _userList; uint32 private _currentUserCount; event BuyPower(address indexed from, uint256 amount); event GovWithdraw(address indexed to, uint256 value); uint constant private basePrice = 1 ether; constructor()public { } function buyPower() public payable{ uint8 addP = uint8(msg.value/ basePrice); uint8 oldP = _vipPowerMap[msg.sender]; uint8 newP = oldP + addP; require(newP > 0, "vip level over min"); require(newP <= 10, "vip level over max"); require(addP* basePrice == msg.value, "1 to 10 ether only"); if(oldP==0){ _userList[_currentUserCount] = msg.sender; _currentUserCount++; } _vipPowerMap[msg.sender] = newP; emit BuyPower(msg.sender, msg.value); } function govWithdraw(uint256 _amount)onlyOwner public { require(_amount > 0, "!zero input"); msg.sender.transfer(_amount); emit GovWithdraw(msg.sender, _amount); } function powerOf(address account) public view returns (uint) { return _vipPowerMap[account]; } function currentUserCount() public view returns (uint32) { return _currentUserCount; } function userList(uint32 i) public view returns (address) { return _userList[i]; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BuyPower","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"GovWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"constant":false,"inputs":[],"name":"buyPower","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"currentUserCount","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"govWithdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"powerOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint32","name":"i","type":"uint32"}],"name":"userList","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610993806100606000396000f3fe6080604052600436106100705760003560e01c80638da5cb5b1161004e5780638da5cb5b1461014c578063b1773c41146101a3578063d9084ea1146101ad578063f2fde38b1461022e57610070565b806307ceeee4146100755780631ac84690146100b05780636d0cac8e14610115575b600080fd5b34801561008157600080fd5b506100ae6004803603602081101561009857600080fd5b810190808035906020019092919050505061027f565b005b3480156100bc57600080fd5b506100ff600480360360208110156100d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103e6565b6040518082815260200191505060405180910390f35b34801561012157600080fd5b5061012a61043f565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b34801561015857600080fd5b50610161610459565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101ab61047e565b005b3480156101b957600080fd5b506101ec600480360360208110156101d057600080fd5b81019080803563ffffffff1690602001909291905050506107c4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561023a57600080fd5b5061027d6004803603602081101561025157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061080d565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102d857600080fd5b6000811161034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f217a65726f20696e70757400000000000000000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610394573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167fbab948c05df3e6bb363b70ccd842ada769c20139583b7b4014c4b23ef26cd6fe826040518082815260200191505060405180910390a250565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff169050919050565b6000600360009054906101000a900463ffffffff16905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000670de0b6b3a7640000348161049157fe5b0490506000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1690506000828201905060008160ff1611610565576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f766970206c6576656c206f766572206d696e000000000000000000000000000081525060200191505060405180910390fd5b600a8160ff1611156105df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f766970206c6576656c206f766572206d6178000000000000000000000000000081525060200191505060405180910390fd5b34670de0b6b3a76400008460ff160214610661576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f3120746f203130206574686572206f6e6c79000000000000000000000000000081525060200191505060405180910390fd5b60008260ff161415610719573360026000600360009054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506003600081819054906101000a900463ffffffff168092919060010191906101000a81548163ffffffff021916908363ffffffff160217905550505b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f9da4b9bfc16f5a2e2b249774082dba60a9d1d94f89915823af2fc0a5dc79b264346040518082815260200191505060405180910390a2505050565b6000600260008363ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461086657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156108a057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fea265627a7a72315820128481bf3bb7e3341b0dc62b166ee87762334328175fbc5ed6a7d505a6857a5b64736f6c63430005100032
Deployed Bytecode
0x6080604052600436106100705760003560e01c80638da5cb5b1161004e5780638da5cb5b1461014c578063b1773c41146101a3578063d9084ea1146101ad578063f2fde38b1461022e57610070565b806307ceeee4146100755780631ac84690146100b05780636d0cac8e14610115575b600080fd5b34801561008157600080fd5b506100ae6004803603602081101561009857600080fd5b810190808035906020019092919050505061027f565b005b3480156100bc57600080fd5b506100ff600480360360208110156100d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103e6565b6040518082815260200191505060405180910390f35b34801561012157600080fd5b5061012a61043f565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b34801561015857600080fd5b50610161610459565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101ab61047e565b005b3480156101b957600080fd5b506101ec600480360360208110156101d057600080fd5b81019080803563ffffffff1690602001909291905050506107c4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561023a57600080fd5b5061027d6004803603602081101561025157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061080d565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102d857600080fd5b6000811161034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f217a65726f20696e70757400000000000000000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610394573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167fbab948c05df3e6bb363b70ccd842ada769c20139583b7b4014c4b23ef26cd6fe826040518082815260200191505060405180910390a250565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff169050919050565b6000600360009054906101000a900463ffffffff16905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000670de0b6b3a7640000348161049157fe5b0490506000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1690506000828201905060008160ff1611610565576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f766970206c6576656c206f766572206d696e000000000000000000000000000081525060200191505060405180910390fd5b600a8160ff1611156105df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f766970206c6576656c206f766572206d6178000000000000000000000000000081525060200191505060405180910390fd5b34670de0b6b3a76400008460ff160214610661576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f3120746f203130206574686572206f6e6c79000000000000000000000000000081525060200191505060405180910390fd5b60008260ff161415610719573360026000600360009054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506003600081819054906101000a900463ffffffff168092919060010191906101000a81548163ffffffff021916908363ffffffff160217905550505b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f9da4b9bfc16f5a2e2b249774082dba60a9d1d94f89915823af2fc0a5dc79b264346040518082815260200191505060405180910390a2505050565b6000600260008363ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461086657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156108a057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fea265627a7a72315820128481bf3bb7e3341b0dc62b166ee87762334328175fbc5ed6a7d505a6857a5b64736f6c63430005100032
Deployed Bytecode Sourcemap
2296:1544:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3310:197;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3310:197:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3310:197:0;;;;;;;;;;;;;;;;;:::i;:::-;;3515:108;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3515:108:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3515:108:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3631:100;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3631:100:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1440:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1440:20:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2722:580;;;:::i;:::-;;3739:96;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3739:96:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3739:96:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2097:192;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2097:192:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2097:192:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;3310:197;1892:5;;;;;;;;;;;1878:19;;:10;:19;;;1870:28;;;;;;3393:1;3383:7;:11;3375:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3423:10;:19;;:28;3443:7;3423:28;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3423:28:0;3479:10;3467:32;;;3491:7;3467:32;;;;;;;;;;;;;;;;;;3310:197;:::o;3515:108::-;3570:4;3594:12;:21;3607:7;3594:21;;;;;;;;;;;;;;;;;;;;;;;;;3587:28;;;;3515:108;;;:::o;3631:100::-;3680:6;3706:17;;;;;;;;;;;3699:24;;3631:100;:::o;1440:20::-;;;;;;;;;;;;;:::o;2722:580::-;2767:10;2670:7;2786:9;:20;;;;;;2767:40;;2818:10;2831:12;:24;2844:10;2831:24;;;;;;;;;;;;;;;;;;;;;;;;;2818:37;;2866:10;2886:4;2879;:11;2866:24;;2916:1;2909:4;:8;;;2901:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2967:2;2959:4;:10;;;;2951:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3030:9;2670:7;3011:4;:15;;;:28;3003:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3092:1;3086:4;:7;;;3083:113;;;3140:10;3109:9;:28;3119:17;;;;;;;;;;;3109:28;;;;;;;;;;;;;;;;:41;;;;;;;;;;;;;;;;;;3165:17;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3083:113;3243:4;3216:12;:24;3229:10;3216:24;;;;;;;;;;;;;;;;:31;;;;;;;;;;;;;;;;;;3272:10;3263:31;;;3284:9;3263:31;;;;;;;;;;;;;;;;;;2722:580;;;:::o;3739:96::-;3788:7;3815:9;:12;3825:1;3815:12;;;;;;;;;;;;;;;;;;;;;;;;;3808:19;;3739:96;;;:::o;2097:192::-;1892:5;;;;;;;;;;;1878:19;;:10;:19;;;1870:28;;;;;;2198:1;2178:22;;:8;:22;;;;2170:31;;;;;;2245:8;2217:37;;2238:5;;;;;;;;;;;2217:37;;;;;;;;;;;;2273:8;2265:5;;:16;;;;;;;;;;;;;;;;;;2097:192;:::o
Swarm Source
bzzr://128481bf3bb7e3341b0dc62b166ee87762334328175fbc5ed6a7d505a6857a5b
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.