Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00Multichain Info
N/A
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 5419194 | 117 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Administrator
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-2.0
pragma solidity ^0.8.20;
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { Constants } from "../libs/Constants.sol";
import { IBlackList } from "./interface/IBlackList.sol";
import { IPausable } from "./interface/IPausable.sol";
import { IRole } from "./interface/IRole.sol";
/**
* @dev The contract is used to manage roles, pausable and blacklist.
* It is inherited by other contracts to manage the roles, pausable and blacklist.
* ROLES - Admin, Manager, rewarder, minter and redeemer roles.
*/
contract Administrator is IRole, IPausable, IBlackList, Initializable {
mapping(bytes32 => mapping(address => bool)) private roles;
mapping(address => bool) private blackList;
mapping(address => bool) private paused;
bool private __protoPause;
// New state variables for timelock functionality for admin role
uint256 public timeLockPeriod;
mapping(address => uint256) public pendingAdmins; // Address => Eligible timestamp
uint256 public pendingTimeLockPeriod;
uint256 public timeLockUpdateEligibleAt;
// Event for tracking timelock operations
event AdminRoleGrantScheduled(address indexed account, uint256 eligibleAt);
event TimeLockUpdateScheduled(uint256 newPeriod, uint256 eligibleAt);
event TimeLockPeriodUpdated(address indexed caller, uint256 oldPeriod, uint256 newPeriod);
event CancelAdminRole(address indexed caller, address indexed account);
event CancelTimeLockUpdate(address indexed caller);
uint256[28] __gap;
/**
* @notice Disable initializer for the implementation contract
*/
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
function init(address admin) public initializer {
roles[Constants.ADMIN_ROLE][admin] = true;
}
modifier onlyAdmin() {
require(hasRole(Constants.ADMIN_ROLE, msg.sender), "!admin");
_;
}
modifier onlyManager() {
require(hasRole(Constants.MANAGER_ROLE, msg.sender), "!manager");
_;
}
/** Function of Roles **/
function hasRole(bytes32 _role, address _account) public view override returns (bool) {
return roles[_role][_account];
}
function hasRoles(bytes32[] calldata _role, address[] calldata _accounts) external view override returns (bool[] memory) {
require(_role.length == _accounts.length, "!length");
bool[] memory result = new bool[](_accounts.length);
for (uint256 i = 0; i < _accounts.length; i++) {
result[i] = roles[_role[i]][_accounts[i]];
}
return result;
}
// Grant role to multiple addresses except admin role
function grantRoles(bytes32 _role, address[] calldata _accounts) external override onlyAdmin {
require(_role != Constants.ADMIN_ROLE, "!admin");
for (uint256 i = 0; i < _accounts.length; i++) {
roles[_role][_accounts[i]] = true;
emit RoleGranted(_role, msg.sender, _accounts[i]);
}
}
/**
* @notice Schedule granting admin role to an account after timelock period
* @param _account Address to receive admin role
*/
function scheduleAdminRole(address _account) external onlyAdmin {
require(_account != address(0), "zero address");
require(!hasRole(Constants.ADMIN_ROLE, _account), "already admin");
uint256 eligibleAt = block.timestamp + timeLockPeriod;
pendingAdmins[_account] = eligibleAt;
emit AdminRoleGrantScheduled(_account, eligibleAt);
}
/**
* @notice Execute admin role grant after timelock period has passed
* @param _account Address to receive admin role
*/
function executeAdminRole(address _account) external {
uint256 eligibleAt = pendingAdmins[_account];
require(eligibleAt > 0, "not scheduled");
require(block.timestamp >= eligibleAt, "timelock not passed");
// Clear pending status
delete pendingAdmins[_account];
// Grant admin role
roles[Constants.ADMIN_ROLE][_account] = true;
emit RoleGranted(Constants.ADMIN_ROLE, msg.sender, _account);
}
/**
* @notice Cancel a scheduled admin role grant
* @param _account Address with pending admin role
*/
function cancelAdminRole(address _account) external onlyAdmin {
require(pendingAdmins[_account] > 0, "not scheduled");
delete pendingAdmins[_account];
emit CancelAdminRole(msg.sender, _account);
}
/**
* @notice Schedule updating the timelock period
* @param _newPeriod New timelock period in seconds
*/
function scheduleTimeLockUpdate(uint256 _newPeriod) external onlyAdmin {
require(_newPeriod > 0, "zero period");
// Calculate when this change will be eligible
timeLockUpdateEligibleAt = block.timestamp + timeLockPeriod;
pendingTimeLockPeriod = _newPeriod;
emit TimeLockUpdateScheduled(_newPeriod, timeLockUpdateEligibleAt);
}
/**
* @notice Execute timelock period update after current timelock period
*/
function executeTimeLockUpdate() external {
require(pendingTimeLockPeriod > 0 && timeLockUpdateEligibleAt > 0, "not scheduled");
require(block.timestamp >= timeLockUpdateEligibleAt, "timelock not passed");
uint256 oldPeriod = timeLockPeriod;
timeLockPeriod = pendingTimeLockPeriod;
// Clear pending status
pendingTimeLockPeriod = 0;
timeLockUpdateEligibleAt = 0;
emit TimeLockPeriodUpdated(msg.sender, oldPeriod, timeLockPeriod);
}
/**
* @notice Cancel a scheduled timelock period update
*/
function cancelTimeLockUpdate() external onlyAdmin {
require(pendingTimeLockPeriod > 0 && timeLockUpdateEligibleAt > 0, "not scheduled");
pendingTimeLockPeriod = 0;
timeLockUpdateEligibleAt = 0;
emit CancelTimeLockUpdate(msg.sender);
}
function revokeRoles(bytes32 _role, address[] calldata _accounts) external override onlyAdmin {
for (uint256 i = 0; i < _accounts.length; i++) {
roles[_role][_accounts[i]] = false;
emit RoleRevoked(_role, msg.sender, _accounts[i]);
}
}
/** Function of Pausable **/
function pause() external override onlyAdmin {
__protoPause = true;
emit Paused(msg.sender);
}
function unpause() external override onlyAdmin {
__protoPause = false;
emit Unpaused(msg.sender);
}
function pauseSC(address _sc) external override onlyAdmin {
paused[_sc] = true;
emit Paused(msg.sender, _sc);
}
function unpauseSC(address _sc) external override onlyAdmin {
paused[_sc] = false;
emit Unpaused(msg.sender, _sc);
}
function isPaused(address _sc) external view override returns (bool) {
return paused[_sc] || __protoPause;
}
/** Function of blacklist */
function blackListUsers(address[] calldata _evilUsers) external override onlyAdmin() {
for (uint256 i = 0; i < _evilUsers.length; i++) {
blackList[_evilUsers[i]] = true;
emit BlackListed(msg.sender, _evilUsers[i]);
}
}
function removeBlackListUsers(address[] calldata _clearedUsers) external override onlyAdmin() {
for (uint256 i = 0; i < _clearedUsers.length; i++) {
blackList[_clearedUsers[i]] = false;
emit BlackListCleared(msg.sender, _clearedUsers[i]);
}
}
function isBlackListed(address _user) external view override returns (bool) {
return blackList[_user];
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.20;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Storage of the initializable contract.
*
* It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
* when using with upgradeable contracts.
*
* @custom:storage-location erc7201:openzeppelin.storage.Initializable
*/
struct InitializableStorage {
/**
* @dev Indicates that the contract has been initialized.
*/
uint64 _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;
/**
* @dev The contract is already initialized.
*/
error InvalidInitialization();
/**
* @dev The contract is not initializing.
*/
error NotInitializing();
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint64 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
* number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
* production.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
// Cache values to avoid duplicated sloads
bool isTopLevelCall = !$._initializing;
uint64 initialized = $._initialized;
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reinitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;
if (!initialSetup && !construction) {
revert InvalidInitialization();
}
$._initialized = 1;
if (isTopLevelCall) {
$._initializing = true;
}
_;
if (isTopLevelCall) {
$._initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint64 version) {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing || $._initialized >= version) {
revert InvalidInitialization();
}
$._initialized = version;
$._initializing = true;
_;
$._initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
_checkInitializing();
_;
}
/**
* @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
*/
function _checkInitializing() internal view virtual {
if (!_isInitializing()) {
revert NotInitializing();
}
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing) {
revert InvalidInitialization();
}
if ($._initialized != type(uint64).max) {
$._initialized = type(uint64).max;
emit Initialized(type(uint64).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint64) {
return _getInitializableStorage()._initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _getInitializableStorage()._initializing;
}
/**
* @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.
*
* NOTE: Consider following the ERC-7201 formula to derive storage locations.
*/
function _initializableStorageSlot() internal pure virtual returns (bytes32) {
return INITIALIZABLE_STORAGE;
}
/**
* @dev Returns a pointer to the storage namespace.
*/
// solhint-disable-next-line var-name-mixedcase
function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
bytes32 slot = _initializableStorageSlot();
assembly {
$.slot := slot
}
}
}// SPDX-License-Identifier: GPL-2.0
pragma solidity ^0.8.20;
interface IBlackList {
//functions
function blackListUsers(address[] calldata _users) external;
function removeBlackListUsers(address[] calldata _clearedUsers) external;
function isBlackListed(address _user) external view returns (bool);
//events
event BlackListed(address indexed _sender, address indexed _user);
event BlackListCleared(address indexed _sender, address indexed _user);
}// SPDX-License-Identifier: GPL-2.0
pragma solidity ^0.8.20;
interface IPausable {
function pause() external;
function unpause() external;
function pauseSC(address _sc) external;
function unpauseSC(address _sc) external;
function isPaused(address _sc) external view returns (bool);
//events
event Paused(address indexed _sender);
event Unpaused(address indexed _sender);
event Paused(address indexed _sender, address indexed _sc);
event Unpaused(address indexed _sender, address indexed _sc);
}// SPDX-License-Identifier: GPL-2.0
pragma solidity ^0.8.20;
interface IRole {
//functions
function grantRoles(bytes32 _role, address[] calldata _accounts) external;
function revokeRoles(bytes32 _role, address[] calldata _accounts) external;
function hasRole(bytes32 _role, address _account) external view returns (bool);
function hasRoles(bytes32[] calldata _role, address[] calldata _accounts) external view returns (bool[] memory);
//events
event RoleGranted(bytes32 indexed _role, address indexed _sender, address indexed _account);
event RoleRevoked(bytes32 indexed _role, address indexed _sender, address indexed _account);
}// SPDX-License-Identifier: GPL-2.0
pragma solidity ^0.8.20;
library Constants {
// admin role
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN");
// role for minting and redeeming tokens
bytes32 public constant MINTER_AND_REDEEMER_ROLE = keccak256("MINTER_AND_REDEEMER");
// role for collateral manager who can transfer collateral
bytes32 public constant COLLATERAL_MANAGER_ROLE = keccak256("COLLATERAL_MANAGER");
// role for rewarder who can transfer reward
bytes32 public constant REWARDER_ROLE = keccak256("REWARDER");
// role for managing blacklist addresses
bytes32 public constant MANAGER_ROLE = keccak256("MANAGER");
// role assigned to bridges
bytes32 public constant BRIDGE_ROLE = keccak256("BRIDGE");
// role for perpetual bond
bytes32 public constant BOND_ROLE = keccak256("BOND");
// role for lockbox
bytes32 public constant LOCKBOX_ROLE = keccak256("LOCKBOX");
// role for yield
bytes32 public constant YIELD_ROLE = keccak256("YIELD");
uint256 constant PINT = 1e18;
uint256 constant HUNDRED_PERCENT = 100e18;
uint256 constant ONE_PERCENT = 1e18;
uint256 constant HUNDRED = 100;
// Period for vesting strategy rewards
uint256 constant VESTING_PERIOD = 24 hours;
// Bridge transaction types
bytes32 public constant BRIDGE_SEND_HASH = keccak256("BRIDGE_SEND");
}{
"evmVersion": "cancun",
"libraries": {},
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"remappings": [
"@layerzerolabs/oft-evm/=lib/devtools/packages/oft-evm/",
"@layerzerolabs/oapp-evm/=lib/devtools/packages/oapp-evm/",
"@layerzerolabs/lz-evm-protocol-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/protocol/",
"@layerzerolabs/lz-evm-messagelib-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/messagelib/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@openzeppelin-upgradeable/contracts/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@chainlink/contracts-ccip/=lib/chainlink/contracts/",
"@chainlink/contracts/=lib/chainlink/contracts/",
"solidity-bytes-utils/=lib/solidity-bytes-utils/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"chainlink/=lib/chainlink/",
"devtools/=lib/devtools/packages/toolbox-foundry/src/",
"ds-test/=lib/layerzero-v2/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"layerzero-v2/=lib/layerzero-v2/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
],
"viaIR": true
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"eligibleAt","type":"uint256"}],"name":"AdminRoleGrantScheduled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"address","name":"_user","type":"address"}],"name":"BlackListCleared","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"address","name":"_user","type":"address"}],"name":"BlackListed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"CancelAdminRole","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"}],"name":"CancelTimeLockUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"address","name":"_sc","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"address","name":"_account","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"address","name":"_account","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPeriod","type":"uint256"}],"name":"TimeLockPeriodUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"eligibleAt","type":"uint256"}],"name":"TimeLockUpdateScheduled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"address","name":"_sc","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address[]","name":"_evilUsers","type":"address[]"}],"name":"blackListUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"cancelAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelTimeLockUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"executeAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"executeTimeLockUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_role","type":"bytes32"},{"internalType":"address[]","name":"_accounts","type":"address[]"}],"name":"grantRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_role","type":"bytes32"},{"internalType":"address","name":"_account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_role","type":"bytes32[]"},{"internalType":"address[]","name":"_accounts","type":"address[]"}],"name":"hasRoles","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"isBlackListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sc","type":"address"}],"name":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sc","type":"address"}],"name":"pauseSC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"pendingAdmins","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingTimeLockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_clearedUsers","type":"address[]"}],"name":"removeBlackListUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_role","type":"bytes32"},{"internalType":"address[]","name":"_accounts","type":"address[]"}],"name":"revokeRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"scheduleAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPeriod","type":"uint256"}],"name":"scheduleTimeLockUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timeLockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeLockUpdateEligibleAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sc","type":"address"}],"name":"unpauseSC","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6080806040523460d0577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c1660c1576002600160401b03196001600160401b03821601605c575b6040516110eb90816100d58239f35b6001600160401b0319166001600160401b039081177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f80604d565b63f92ee8a960e01b5f5260045ffd5b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c8063196f0f6214610e3257806319ab453c14610cd05780632074949014610c4f5780633f4ba83a14610be75780633faf152414610b2d5780634560288f14610a5b5780634d374ec31461099b5780635b14f1831461094a57806378446bc11461092d57806381b1c9c61461080f5780638456cb59146107a45780638d4df7ab1461060657806391d14854146105b3578063931ff74414610596578063b9f21f1514610511578063d8fb683c1461048b578063deb9a3a2146103a5578063df8c9cd81461030e578063e299e744146102d6578063e47d606014610299578063e6a3ccf61461027c578063f853e061146101f35763f9911c7d14610116575f80fd5b346101ef5760203660031901126101ef5760043567ffffffffffffffff81116101ef57610147903690600401610eea565b335f9081525f8051602061107683398151915260205260409020549091906101719060ff16610f65565b5f5b82811061017c57005b6001906001600160a01b0361019a610195838787610f9a565b610faa565b165f528160205260405f208260ff19825416179055818060a01b036101c3610195838787610f9a565b16337f8d3f6de12b309bacac1a7e4a28e157347318f54430610ab38a06d0d3339e9e185f80a301610173565b5f80fd5b346101ef5760203660031901126101ef5761020c610f4f565b335f9081525f8051602061107683398151915260205260409020546102339060ff16610f65565b6001600160a01b03165f818152600260205260408120805460ff1916600117905533907f3dd4f37ca5eaf6c357698a52c806820426d7c9a26adb0991c3bebb09cf23352a9080a3005b346101ef575f3660031901126101ef576020600654604051908152f35b346101ef5760203660031901126101ef576001600160a01b036102ba610f4f565b165f526001602052602060ff60405f2054166040519015158152f35b346101ef5760203660031901126101ef576001600160a01b036102f7610f4f565b165f526005602052602060405f2054604051908152f35b346101ef5760203660031901126101ef57610327610f4f565b335f9081525f80516020611076833981519152602052604090205461034e9060ff16610f65565b6001600160a01b03165f81815260056020526040902054610370901515610fbe565b805f5260056020525f6040812055337f13d8fdc3ec5c7d0ea4c32874eb32c24961eae8aaffda0ebbacf7721c05b52a7d5f80a3005b346101ef576103b336610f1b565b335f9081525f8051602061107683398151915260205260409020549092906103dd9060ff16610f65565b6104097fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42821415610f65565b5f5b83811061041457005b600190825f525f60205260405f20610430610195838888610f9a565b838060a01b03165f5260205260405f208260ff19825416179055818060a01b0361045e610195838888610f9a565b1633847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a40161040b565b346101ef5760203660031901126101ef576104a4610f4f565b335f9081525f8051602061107683398151915260205260409020546104cb9060ff16610f65565b6001600160a01b03165f818152600260205260408120805460ff1916905533907f3d072963433794eb417a69355df67d08bbd73d5076ef653d6863861161d60af39080a3005b346101ef575f3660031901126101ef57335f9081525f8051602061107683398151915260205260409020546105489060ff16610f65565b60065415158061058b575b61055c90610fbe565b5f6006555f600755337ffefb43b106270681516ece0dd2705f11429023e6320803cf591b49907c3813a25f80a2005b506007541515610553565b346101ef575f3660031901126101ef576020600754604051908152f35b346101ef5760403660031901126101ef576024356001600160a01b03811681036101ef576004355f525f60205260405f209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b346101ef5760403660031901126101ef5760043567ffffffffffffffff81116101ef57610637903690600401610eea565b60243567ffffffffffffffff81116101ef57610657903690600401610eea565b9290838303610775576106698461105d565b6040519490601f01601f1916850167ffffffffffffffff811186821017610761576040528085526106998161105d565b602086019490601f19013686375f5b8281106106f5578587604051918291602083019060208452518091526040830191905f5b8181106106da575050500390f35b825115158452859450602093840193909201916001016106cc565b610700818387610f9a565b355f525f60205260405f20610719610195838688610f9a565b60018060a01b03165f5260205260ff60405f20541690875181101561074d57600191151560208260051b8a010152016106a8565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52604160045260245ffd5b60405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b6044820152606490fd5b346101ef575f3660031901126101ef57335f9081525f8051602061107683398151915260205260409020546107db9060ff16610f65565b600160ff196003541617600355337f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2585f80a2005b346101ef5760203660031901126101ef57610828610f4f565b335f9081525f80516020611076833981519152602052604090205461084f9060ff16610f65565b6001600160a01b031680156108f9575f8181525f80516020611076833981519152602052604090205460ff166108c4577f6eecb09d489b0f8a8de819952b210c1f4801907ec1aa1b91869624f30001dba360206108ae6004544261103c565b835f52600582528060405f2055604051908152a2005b60405162461bcd60e51b815260206004820152600d60248201526c30b63932b0b23c9030b236b4b760991b6044820152606490fd5b60405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606490fd5b346101ef575f3660031901126101ef576020600454604051908152f35b346101ef5760203660031901126101ef576001600160a01b0361096b610f4f565b165f52600260205260ff60405f205416801561098f575b6020906040519015158152f35b5060035460ff16610982565b346101ef5760203660031901126101ef576001600160a01b036109bc610f4f565b16805f5260056020526109e060405f20546109d8811515610fbe565b421015610ffa565b5f8181526005602090815260408083208390555f805160206110768339815191529091528120805460ff1916600117905533907fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4005b346101ef5760203660031901126101ef5760043567ffffffffffffffff81116101ef57610a8c903690600401610eea565b335f9081525f805160206110768339815191526020526040902054909190610ab69060ff16610f65565b5f5b828110610ac157005b6001906001600160a01b03610ada610195838787610f9a565b165f528160205260405f2060ff198154169055818060a01b03610b01610195838787610f9a565b16337f9c671c2ccc2744599fa7382f3f7d5a1117ab43a14217345ab3d6a17bd49b46a75f80a301610ab8565b346101ef5760203660031901126101ef57335f9081525f80516020611076833981519152602052604090205460043590610b699060ff16610f65565b8015610bb45760407f1de8ae3d006f7f211558ad348cd3f857105482f1d48a468439371706b89c9b9d91610b9f6004544261103c565b806007558160065582519182526020820152a1005b60405162461bcd60e51b815260206004820152600b60248201526a1e995c9bc81c195c9a5bd960aa1b6044820152606490fd5b346101ef575f3660031901126101ef57335f9081525f805160206110768339815191526020526040902054610c1e9060ff16610f65565b60ff1960035416600355337f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5f80a2005b346101ef575f3660031901126101ef5760065480151580610cc5575b610c7490610fbe565b610c82600754421015610ffa565b60045490806004555f6006555f60075560405191825260208201527fc596e801759523bb1a4428bba670765c2c00b317e4ab0eae784c40f9aa2fca0a60403392a2005b506007541515610c6b565b346101ef5760203660031901126101ef57610ce9610f4f565b5f80516020611096833981519152549060ff8260401c16159167ffffffffffffffff811680159081610e2a575b6001149081610e20575b159081610e17575b50610e085767ffffffffffffffff1981166001175f805160206110968339815191525582610ddc575b506001600160a01b03165f9081525f8051602061107683398151915260205260409020805460ff19166001179055610d8557005b68ff0000000000000000195f8051602061109683398151915254165f80516020611096833981519152557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b68ffffffffffffffffff191668010000000000000001175f805160206110968339815191525582610d51565b63f92ee8a960e01b5f5260045ffd5b90501584610d28565b303b159150610d20565b849150610d16565b346101ef57610e4036610f1b565b335f9081525f805160206110768339815191526020526040902054909290610e6a9060ff16610f65565b5f5b838110610e7557005b600190825f525f60205260405f20610e91610195838888610f9a565b838060a01b03165f5260205260405f2060ff198154169055818060a01b03610ebd610195838888610f9a565b1633847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a401610e6c565b9181601f840112156101ef5782359167ffffffffffffffff83116101ef576020808501948460051b0101116101ef57565b9060406003198301126101ef57600435916024359067ffffffffffffffff82116101ef57610f4b91600401610eea565b9091565b600435906001600160a01b03821682036101ef57565b15610f6c57565b60405162461bcd60e51b815260206004820152600660248201526510b0b236b4b760d11b6044820152606490fd5b919081101561074d5760051b0190565b356001600160a01b03811681036101ef5790565b15610fc557565b60405162461bcd60e51b815260206004820152600d60248201526c1b9bdd081cd8da19591d5b1959609a1b6044820152606490fd5b1561100157565b60405162461bcd60e51b81526020600482015260136024820152721d1a5b595b1bd8dac81b9bdd081c185cdcd959606a1b6044820152606490fd5b9190820180921161104957565b634e487b7160e01b5f52601160045260245ffd5b67ffffffffffffffff81116107615760051b6020019056fe5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b7f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a264697066735822122074ca6988c74e412efbf82bf13b2cd42ecc024a1ecd28b130088130d1fae2cc8464736f6c634300081a0033
Deployed Bytecode
0x60806040526004361015610011575f80fd5b5f3560e01c8063196f0f6214610e3257806319ab453c14610cd05780632074949014610c4f5780633f4ba83a14610be75780633faf152414610b2d5780634560288f14610a5b5780634d374ec31461099b5780635b14f1831461094a57806378446bc11461092d57806381b1c9c61461080f5780638456cb59146107a45780638d4df7ab1461060657806391d14854146105b3578063931ff74414610596578063b9f21f1514610511578063d8fb683c1461048b578063deb9a3a2146103a5578063df8c9cd81461030e578063e299e744146102d6578063e47d606014610299578063e6a3ccf61461027c578063f853e061146101f35763f9911c7d14610116575f80fd5b346101ef5760203660031901126101ef5760043567ffffffffffffffff81116101ef57610147903690600401610eea565b335f9081525f8051602061107683398151915260205260409020549091906101719060ff16610f65565b5f5b82811061017c57005b6001906001600160a01b0361019a610195838787610f9a565b610faa565b165f528160205260405f208260ff19825416179055818060a01b036101c3610195838787610f9a565b16337f8d3f6de12b309bacac1a7e4a28e157347318f54430610ab38a06d0d3339e9e185f80a301610173565b5f80fd5b346101ef5760203660031901126101ef5761020c610f4f565b335f9081525f8051602061107683398151915260205260409020546102339060ff16610f65565b6001600160a01b03165f818152600260205260408120805460ff1916600117905533907f3dd4f37ca5eaf6c357698a52c806820426d7c9a26adb0991c3bebb09cf23352a9080a3005b346101ef575f3660031901126101ef576020600654604051908152f35b346101ef5760203660031901126101ef576001600160a01b036102ba610f4f565b165f526001602052602060ff60405f2054166040519015158152f35b346101ef5760203660031901126101ef576001600160a01b036102f7610f4f565b165f526005602052602060405f2054604051908152f35b346101ef5760203660031901126101ef57610327610f4f565b335f9081525f80516020611076833981519152602052604090205461034e9060ff16610f65565b6001600160a01b03165f81815260056020526040902054610370901515610fbe565b805f5260056020525f6040812055337f13d8fdc3ec5c7d0ea4c32874eb32c24961eae8aaffda0ebbacf7721c05b52a7d5f80a3005b346101ef576103b336610f1b565b335f9081525f8051602061107683398151915260205260409020549092906103dd9060ff16610f65565b6104097fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42821415610f65565b5f5b83811061041457005b600190825f525f60205260405f20610430610195838888610f9a565b838060a01b03165f5260205260405f208260ff19825416179055818060a01b0361045e610195838888610f9a565b1633847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a40161040b565b346101ef5760203660031901126101ef576104a4610f4f565b335f9081525f8051602061107683398151915260205260409020546104cb9060ff16610f65565b6001600160a01b03165f818152600260205260408120805460ff1916905533907f3d072963433794eb417a69355df67d08bbd73d5076ef653d6863861161d60af39080a3005b346101ef575f3660031901126101ef57335f9081525f8051602061107683398151915260205260409020546105489060ff16610f65565b60065415158061058b575b61055c90610fbe565b5f6006555f600755337ffefb43b106270681516ece0dd2705f11429023e6320803cf591b49907c3813a25f80a2005b506007541515610553565b346101ef575f3660031901126101ef576020600754604051908152f35b346101ef5760403660031901126101ef576024356001600160a01b03811681036101ef576004355f525f60205260405f209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b346101ef5760403660031901126101ef5760043567ffffffffffffffff81116101ef57610637903690600401610eea565b60243567ffffffffffffffff81116101ef57610657903690600401610eea565b9290838303610775576106698461105d565b6040519490601f01601f1916850167ffffffffffffffff811186821017610761576040528085526106998161105d565b602086019490601f19013686375f5b8281106106f5578587604051918291602083019060208452518091526040830191905f5b8181106106da575050500390f35b825115158452859450602093840193909201916001016106cc565b610700818387610f9a565b355f525f60205260405f20610719610195838688610f9a565b60018060a01b03165f5260205260ff60405f20541690875181101561074d57600191151560208260051b8a010152016106a8565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52604160045260245ffd5b60405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b6044820152606490fd5b346101ef575f3660031901126101ef57335f9081525f8051602061107683398151915260205260409020546107db9060ff16610f65565b600160ff196003541617600355337f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2585f80a2005b346101ef5760203660031901126101ef57610828610f4f565b335f9081525f80516020611076833981519152602052604090205461084f9060ff16610f65565b6001600160a01b031680156108f9575f8181525f80516020611076833981519152602052604090205460ff166108c4577f6eecb09d489b0f8a8de819952b210c1f4801907ec1aa1b91869624f30001dba360206108ae6004544261103c565b835f52600582528060405f2055604051908152a2005b60405162461bcd60e51b815260206004820152600d60248201526c30b63932b0b23c9030b236b4b760991b6044820152606490fd5b60405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606490fd5b346101ef575f3660031901126101ef576020600454604051908152f35b346101ef5760203660031901126101ef576001600160a01b0361096b610f4f565b165f52600260205260ff60405f205416801561098f575b6020906040519015158152f35b5060035460ff16610982565b346101ef5760203660031901126101ef576001600160a01b036109bc610f4f565b16805f5260056020526109e060405f20546109d8811515610fbe565b421015610ffa565b5f8181526005602090815260408083208390555f805160206110768339815191529091528120805460ff1916600117905533907fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4005b346101ef5760203660031901126101ef5760043567ffffffffffffffff81116101ef57610a8c903690600401610eea565b335f9081525f805160206110768339815191526020526040902054909190610ab69060ff16610f65565b5f5b828110610ac157005b6001906001600160a01b03610ada610195838787610f9a565b165f528160205260405f2060ff198154169055818060a01b03610b01610195838787610f9a565b16337f9c671c2ccc2744599fa7382f3f7d5a1117ab43a14217345ab3d6a17bd49b46a75f80a301610ab8565b346101ef5760203660031901126101ef57335f9081525f80516020611076833981519152602052604090205460043590610b699060ff16610f65565b8015610bb45760407f1de8ae3d006f7f211558ad348cd3f857105482f1d48a468439371706b89c9b9d91610b9f6004544261103c565b806007558160065582519182526020820152a1005b60405162461bcd60e51b815260206004820152600b60248201526a1e995c9bc81c195c9a5bd960aa1b6044820152606490fd5b346101ef575f3660031901126101ef57335f9081525f805160206110768339815191526020526040902054610c1e9060ff16610f65565b60ff1960035416600355337f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5f80a2005b346101ef575f3660031901126101ef5760065480151580610cc5575b610c7490610fbe565b610c82600754421015610ffa565b60045490806004555f6006555f60075560405191825260208201527fc596e801759523bb1a4428bba670765c2c00b317e4ab0eae784c40f9aa2fca0a60403392a2005b506007541515610c6b565b346101ef5760203660031901126101ef57610ce9610f4f565b5f80516020611096833981519152549060ff8260401c16159167ffffffffffffffff811680159081610e2a575b6001149081610e20575b159081610e17575b50610e085767ffffffffffffffff1981166001175f805160206110968339815191525582610ddc575b506001600160a01b03165f9081525f8051602061107683398151915260205260409020805460ff19166001179055610d8557005b68ff0000000000000000195f8051602061109683398151915254165f80516020611096833981519152557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b68ffffffffffffffffff191668010000000000000001175f805160206110968339815191525582610d51565b63f92ee8a960e01b5f5260045ffd5b90501584610d28565b303b159150610d20565b849150610d16565b346101ef57610e4036610f1b565b335f9081525f805160206110768339815191526020526040902054909290610e6a9060ff16610f65565b5f5b838110610e7557005b600190825f525f60205260405f20610e91610195838888610f9a565b838060a01b03165f5260205260405f2060ff198154169055818060a01b03610ebd610195838888610f9a565b1633847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a401610e6c565b9181601f840112156101ef5782359167ffffffffffffffff83116101ef576020808501948460051b0101116101ef57565b9060406003198301126101ef57600435916024359067ffffffffffffffff82116101ef57610f4b91600401610eea565b9091565b600435906001600160a01b03821682036101ef57565b15610f6c57565b60405162461bcd60e51b815260206004820152600660248201526510b0b236b4b760d11b6044820152606490fd5b919081101561074d5760051b0190565b356001600160a01b03811681036101ef5790565b15610fc557565b60405162461bcd60e51b815260206004820152600d60248201526c1b9bdd081cd8da19591d5b1959609a1b6044820152606490fd5b1561100157565b60405162461bcd60e51b81526020600482015260136024820152721d1a5b595b1bd8dac81b9bdd081c185cdcd959606a1b6044820152606490fd5b9190820180921161104957565b634e487b7160e01b5f52601160045260245ffd5b67ffffffffffffffff81116107615760051b6020019056fe5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b7f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a264697066735822122074ca6988c74e412efbf82bf13b2cd42ecc024a1ecd28b130088130d1fae2cc8464736f6c634300081a0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.