S Price: $0.476025 (+0.82%)

Contract

0x304951d7172bCAdA54ccAC1E4674862b3d5b3d5b

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00
Transaction Hash
Method
Block
From
To
Set Operator204819082025-04-16 2:54:0711 hrs ago1744772047IN
0x304951d7...b3d5b3d5b
0 S0.0025450755
Set Operator113561452025-03-03 8:20:5044 days ago1740990050IN
0x304951d7...b3d5b3d5b
0 S0.0016045755
Set Operator113560832025-03-03 8:20:2444 days ago1740990024IN
0x304951d7...b3d5b3d5b
0 S0.0025450755
Set Operator113273542025-03-03 4:57:0144 days ago1740977821IN
0x304951d7...b3d5b3d5b
0 S0.0014510655
Set Operator113273142025-03-03 4:56:3744 days ago1740977797IN
0x304951d7...b3d5b3d5b
0 S0.0025450755
Set Operator6557992024-12-19 4:17:32118 days ago1734581852IN
0x304951d7...b3d5b3d5b
0 S0.00005091.1
Set Operator6557972024-12-19 4:17:28118 days ago1734581848IN
0x304951d7...b3d5b3d5b
0 S0.00005091.1
Set Operator6557912024-12-19 4:17:25118 days ago1734581845IN
0x304951d7...b3d5b3d5b
0 S0.00005091.1
Set Operator6557882024-12-19 4:17:22118 days ago1734581842IN
0x304951d7...b3d5b3d5b
0 S0.00005091.1
Set Operator6557832024-12-19 4:17:18118 days ago1734581838IN
0x304951d7...b3d5b3d5b
0 S0.00005091.1
Set Operator6557782024-12-19 4:17:15118 days ago1734581835IN
0x304951d7...b3d5b3d5b
0 S0.00005091.1
Set Operator6557732024-12-19 4:17:11118 days ago1734581831IN
0x304951d7...b3d5b3d5b
0 S0.00005091.1
Set Operator6557692024-12-19 4:17:07118 days ago1734581827IN
0x304951d7...b3d5b3d5b
0 S0.00005091.1
Set Operator6557662024-12-19 4:17:04118 days ago1734581824IN
0x304951d7...b3d5b3d5b
0 S0.00005091.1

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

Contract Source Code Verified (Exact Match)

Contract Name:
Operators

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion, MIT license
File 1 of 2 : Operators.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "@openzeppelin/contracts/utils/Context.sol";

contract Operators is Context {
    // level 1: normal operator
    // level 2: rewards and feed manager
    // level 3: admin
    // level 4: >admin <owner
    // level 5: owner
    mapping(address => uint256) operatorLevel;

    address public oldOwner;
    address public pendingOwner;

    modifier onlyOperator(uint256 level) {
        require(operatorLevel[_msgSender()] >= level, "invalid operator");
        _;
    }

    constructor() {
        operatorLevel[_msgSender()] = 5;
    }

    function setOperator(address op, uint256 level) external onlyOperator(5) {
        operatorLevel[op] = level;
    }

    function getOperatorLevel(address op) public view returns (uint256) {
        return operatorLevel[op];
    }

    function transferOwnership(address newOwner) external onlyOperator(5) {
        require(newOwner != address(0), "zero address");

        oldOwner = _msgSender();
        pendingOwner = newOwner;
    }

    function acceptOwnership() external {
        require(_msgSender() == pendingOwner, "not pendingOwner");

        operatorLevel[_msgSender()] = 5;
        operatorLevel[oldOwner] = 0;

        pendingOwner = address(0);
        oldOwner = address(0);
    }
}

File 2 of 2 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"op","type":"address"}],"name":"getOperatorLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oldOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"op","type":"address"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b503360009081526020819052604081206005905561038b90819061003490396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063777541361461006757806379ba50971461007c578063df07560514610084578063e30c3978146100c0578063f2fde38b146100eb578063f487404f146100fe575b600080fd5b61007a610075366004610309565b610111565b005b61007a610188565b6100ad610092366004610333565b6001600160a01b031660009081526020819052604090205490565b6040519081526020015b60405180910390f35b6002546100d3906001600160a01b031681565b6040516001600160a01b0390911681526020016100b7565b61007a6100f9366004610333565b610222565b6001546100d3906001600160a01b031681565b3360009081526020819052604090205460059081111561016b5760405162461bcd60e51b815260206004820152601060248201526f34b73b30b634b21037b832b930ba37b960811b60448201526064015b60405180910390fd5b506001600160a01b03909116600090815260208190526040902055565b6002546001600160a01b0316336001600160a01b0316146101de5760405162461bcd60e51b815260206004820152601060248201526f3737ba103832b73234b733a7bbb732b960811b6044820152606401610162565b3360009081526020819052604080822060059055600180546001600160a01b0316835290822091909155600280546001600160a01b03199081169091558154169055565b336000908152602081905260409020546005908111156102775760405162461bcd60e51b815260206004820152601060248201526f34b73b30b634b21037b832b930ba37b960811b6044820152606401610162565b6001600160a01b0382166102bc5760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610162565b50600180546001600160a01b03199081163317909155600280549091166001600160a01b0392909216919091179055565b80356001600160a01b038116811461030457600080fd5b919050565b6000806040838503121561031c57600080fd5b610325836102ed565b946020939093013593505050565b60006020828403121561034557600080fd5b61034e826102ed565b939250505056fea26469706673582212206ea233bb59ffb64c36ff4272636532dc1c20305e2f0c4dc9d134e85fc91e53ed64736f6c63430008090033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063777541361461006757806379ba50971461007c578063df07560514610084578063e30c3978146100c0578063f2fde38b146100eb578063f487404f146100fe575b600080fd5b61007a610075366004610309565b610111565b005b61007a610188565b6100ad610092366004610333565b6001600160a01b031660009081526020819052604090205490565b6040519081526020015b60405180910390f35b6002546100d3906001600160a01b031681565b6040516001600160a01b0390911681526020016100b7565b61007a6100f9366004610333565b610222565b6001546100d3906001600160a01b031681565b3360009081526020819052604090205460059081111561016b5760405162461bcd60e51b815260206004820152601060248201526f34b73b30b634b21037b832b930ba37b960811b60448201526064015b60405180910390fd5b506001600160a01b03909116600090815260208190526040902055565b6002546001600160a01b0316336001600160a01b0316146101de5760405162461bcd60e51b815260206004820152601060248201526f3737ba103832b73234b733a7bbb732b960811b6044820152606401610162565b3360009081526020819052604080822060059055600180546001600160a01b0316835290822091909155600280546001600160a01b03199081169091558154169055565b336000908152602081905260409020546005908111156102775760405162461bcd60e51b815260206004820152601060248201526f34b73b30b634b21037b832b930ba37b960811b6044820152606401610162565b6001600160a01b0382166102bc5760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610162565b50600180546001600160a01b03199081163317909155600280549091166001600160a01b0392909216919091179055565b80356001600160a01b038116811461030457600080fd5b919050565b6000806040838503121561031c57600080fd5b610325836102ed565b946020939093013593505050565b60006020828403121561034557600080fd5b61034e826102ed565b939250505056fea26469706673582212206ea233bb59ffb64c36ff4272636532dc1c20305e2f0c4dc9d134e85fc91e53ed64736f6c63430008090033

Block Transaction 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
[ 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.