ETH Price: $3,465.08 (+4.12%)

Contract

0xe8f0FcDe81B702De0504A76c38E146e620775BDF
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040129239772021-07-30 0:51:271214 days ago1627606287IN
 Contract Creation
0 ETH0.0150319746

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x13CD7FbE...e8323d498
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
AdminControl

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : AdminControl.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

contract AdminControl {

  address public superAdmin;
  address public pendingSuperAdmin;
  address public admin;
  address public serviceAdmin;

  uint8 public constant SUPER_ADMIN = 0;
  uint8 public constant ADMIN = 1;
  uint8 public constant SERVICE_ADMIN = 2;

  modifier onlyRole(uint8 _role) {
    require(hasRole(_role, msg.sender), "no access");
    _;
  }

  function hasRole(uint8 _role, address _account) public view returns (bool) {
    if (_role == SUPER_ADMIN) {
      return _account == superAdmin;
    }
    if (_role == ADMIN) {
      return _account == superAdmin || _account == admin;
    }
    if (_role == SERVICE_ADMIN) {
      return _account == superAdmin || _account == admin || _account == serviceAdmin;
    }

    return false;
  }

  function updateAdmin(address _newAdmin) public onlyRole(ADMIN) {
    admin = _newAdmin;
  }

  function updateServiceAdmin(address _newServiceAdmin) public onlyRole(SUPER_ADMIN) {
    serviceAdmin = _newServiceAdmin;
  }

  function setPendingSuperAdmin(address _newPendingSuperAdmin) public {
    require(hasRole(SUPER_ADMIN, msg.sender) || superAdmin == address(0), "no access");
    pendingSuperAdmin = _newPendingSuperAdmin;
  }

  function acceptSuperAdmin() public {
    require(msg.sender == pendingSuperAdmin && msg.sender != address(0), "not pending");
    superAdmin = pendingSuperAdmin;
    pendingSuperAdmin = address(0);
  }

}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ADMIN","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SERVICE_ADMIN","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUPER_ADMIN","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptSuperAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_role","type":"uint8"},{"internalType":"address","name":"_account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingSuperAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"serviceAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newPendingSuperAdmin","type":"address"}],"name":"setPendingSuperAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"superAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"updateAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newServiceAdmin","type":"address"}],"name":"updateServiceAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063ad553eef11610071578063ad553eef14610156578063d39ca7de1461017e578063da998dca146101a4578063e2f273bd146101ac578063e7f9cefd146101d2578063f851a440146101da576100b4565b80630fe175bb146100b957806329575f6a146100d75780632a0acc6a146100fb57806348028d63146101035780637c7c7c3c1461010b5780639e97b8f614610113575b600080fd5b6100c16101e2565b6040805160ff9092168252519081900360200190f35b6100df6101e7565b604080516001600160a01b039092168252519081900360200190f35b6100c16101f6565b6100df6101fb565b6100c161020a565b6101426004803603604081101561012957600080fd5b50803560ff1690602001356001600160a01b031661020f565b604080519115158252519081900360200190f35b61017c6004803603602081101561016c57600080fd5b50356001600160a01b03166102c9565b005b61017c6004803603602081101561019457600080fd5b50356001600160a01b0316610335565b6100df6103b3565b61017c600480360360208110156101c257600080fd5b50356001600160a01b03166103c2565b61017c61042e565b6100df6104ad565b600281565b6000546001600160a01b031681565b600181565b6001546001600160a01b031681565b600081565b600060ff831661023057506000546001600160a01b038281169116146102c3565b60ff83166001141561026c576000546001600160a01b038381169116148061026557506002546001600160a01b038381169116145b90506102c3565b60ff8316600214156102bf576000546001600160a01b03838116911614806102a157506002546001600160a01b038381169116145b8061026557506003546001600160a01b0383811691161490506102c3565b5060005b92915050565b60006102d5813361020f565b610312576040805162461bcd60e51b81526020600482015260096024820152686e6f2061636365737360b81b604482015290519081900360640190fd5b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b61034060003361020f565b8061035457506000546001600160a01b0316155b610391576040805162461bcd60e51b81526020600482015260096024820152686e6f2061636365737360b81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b60016103ce813361020f565b61040b576040805162461bcd60e51b81526020600482015260096024820152686e6f2061636365737360b81b604482015290519081900360640190fd5b50600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314801561044757503315155b610486576040805162461bcd60e51b815260206004820152600b60248201526a6e6f742070656e64696e6760a81b604482015290519081900360640190fd5b60018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b03168156fea26469706673582212200ab514267e7cbecbd167c0f2304658921882bafc285ca776a2e6e2fecf88c54c64736f6c634300060c0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.