Address Contract Verified
Address
0x1211d07F0EBeA8994F23EC26e1e512929FC8Ab08
Balance
0 ETH
Nonce
1
Code Size
1563 bytes
Creator
0x2e9E7337...E1be at tx 0xdde6afbf...2504f1
Indexed Transactions
0
Contract Bytecode
1563 bytes
0x608060405234801561001057600080fd5b50600436106101165760003560e01c80639e106dc7116100a2578063ce28716011610071578063ce28716014610322578063d71c72e014610349578063e048241314610370578063ec3a461314610397578063f2fde38b146103aa57600080fd5b80639e106dc714610286578063a1bd302d146102ad578063a8720195146102d4578063bffdc2a4146102fb57600080fd5b8063715018a6116100e9578063715018a6146101ec57806375fd4ca9146101f65780637f3c8ff51461021d5780638da5cb5b146102445780639943ad671461025f57600080fd5b8063265cbca91461011b57806338dd8c2c1461015557806347164d3b1461019e57806348a166e6146101c5575b600080fd5b6101427feefbfa32ce9dd99a431be27221a8732bc1e7b3d032ff4cbd56226b17783f741381565b6040519081526020015b60405180910390f35b61018e610163366004610554565b6001600160a01b03919091166000908152600160209081526040808320938352929052205460ff1690565b604051901515815260200161014c565b6101427f4b1cf52f49d174a2779824195ac83ffb0173882d2de2b8017a7a2ad31efa9bac81565b6101427f25472c26f712486e36393fa63e6b8c68e6b8766eb9afb8ed886cc3f05d53697681565b6101f46103bd565b005b6101427f627ab07b7d1e807a81e987070dfc0a2d891e418df2b352b2282d752b91f53b7181565b6101427f46c2ab528350fb4f59e61eb6c0382446a3636f13f7846680a2734e5f829735a481565b6000546040516001600160a01b03909116815260200161014c565b6101427faa85d4d7655b58b3177edbbb41bc17f2e2ebffd26ace9d6b56244a5ee16c780681565b6101427f3d37afab23e5cac313ed6bbbd4cc033efdc5d534544a422062560607f0a47c9181565b6101427f79bb2eff4b96ce24cc809a1642a7365c4980ebeb15be2580a619e03726e41a9881565b6101427fcf3889b3d647b5db8c87e0e05aca2acdd693a72c71726764f2198ee27a21c72881565b6101427faeffe8a027d13ff1f9fbecaa8f7fc0ff2c5c5d71561a1a572f6bafeeba68abfd81565b6101427f3e008573b76fa95febaab72c06ec152363f92f2b27dcaf00fbd0bb77a70593db81565b6101427fb0487bdd3330b4d082e49dfc24e1aa23706abcc632f9215fee20a474a9a8845781565b6101427fc8e17e1f507bc6ac21ffd444ba9d6c9d6ea2defdac21571990ea0eb8bcde3a2481565b6101f46103a536600461057e565b6103d1565b6101f46103b83660046105c3565b610478565b6103c56104bb565b6103cf60006104e8565b565b6103d96104bb565b6001600160a01b038316158015906103f057508115155b61040d576040516354fae39d60e11b815260040160405180910390fd5b6001600160a01b0383166000818152600160209081526040808320868452825291829020805460ff191685151590811790915591519182528492917fbf768a8bd7016d5df999ce7e5dcbd90856578a89eb68c5a1d5fc1d4a3360107e910160405180910390a3505050565b6104806104bb565b6001600160a01b0381166104af57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6104b8816104e8565b50565b6000546001600160a01b031633146103cf5760405163118cdaa760e01b81523360048201526024016104a6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461054f57600080fd5b919050565b6000806040838503121561056757600080fd5b61057083610538565b946020939093013593505050565b60008060006060848603121561059357600080fd5b61059c84610538565b925060208401359150604084013580151581146105b857600080fd5b809150509250925092565b6000602082840312156105d557600080fd5b6105de82610538565b939250505056fea26469706673582212207ea128a2a155e7f2518ee47a9dbb0ce99ff924f3f4d3ab1d95f989ed482ac91b64736f6c634300081c0033
Verified Source Code Full Match
Compiler: v0.8.28+commit.7893614a
EVM: london
Optimization: Yes (200 runs)
Roles.sol 58 lines
// SPDX-License-Identifier: BSL-1.1
pragma solidity =0.8.28;
/*
_____ _____ __ ____ _____
| | _ | | | \| _ |
| | | | | |__| | | |
|_|_|_|__|__|_____|____/|__|__|
*/
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IRoles} from "./interfaces/IRoles.sol";
contract Roles is Ownable, IRoles {
// ----------- STORAGE ------------
mapping(address => mapping(bytes32 => bool)) private _roles;
bytes32 public constant REBALANCER = keccak256("REBALANCER");
bytes32 public constant PAUSE_MANAGER = keccak256("PAUSE_MANAGER");
bytes32 public constant REBALANCER_EOA = keccak256("REBALANCER_EOA");
bytes32 public constant GUARDIAN_PAUSE = keccak256("GUARDIAN_PAUSE");
bytes32 public constant CHAINS_MANAGER = keccak256("CHAINS_MANAGER");
bytes32 public constant PROOF_FORWARDER = keccak256("PROOF_FORWARDER");
bytes32 public constant PROOF_BATCH_FORWARDER = keccak256("PROOF_BATCH_FORWARDER");
bytes32 public constant SEQUENCER = keccak256("SEQUENCER");
bytes32 public constant GUARDIAN_BRIDGE = keccak256("GUARDIAN_BRIDGE");
bytes32 public constant GUARDIAN_ORACLE = keccak256("GUARDIAN_ORACLE");
bytes32 public constant GUARDIAN_RESERVE = keccak256("GUARDIAN_RESERVE");
bytes32 public constant GUARDIAN_BORROW_CAP = keccak256("GUARDIAN_BORROW_CAP");
bytes32 public constant GUARDIAN_SUPPLY_CAP = keccak256("GUARDIAN_SUPPLY_CAP");
/**
* @notice emitted when role is set
*/
event Allowed(address indexed _contract, bytes32 indexed _role, bool _allowed);
constructor(address _owner) Ownable(_owner) {}
// ----------- VIEW ------------
function isAllowedFor(address _contract, bytes32 _role) external view override returns (bool) {
return _roles[_contract][_role];
}
// ----------- OWNER ------------
/**
* @notice Abiltity to allow a contract for a role or not
* @param _contract the contract's address.
* @param _role the bytes32 role.
* @param _allowed the new status.
*/
function allowFor(address _contract, bytes32 _role, bool _allowed) external onlyOwner {
require(_contract != address(0) && _role != bytes32(0), Roles_InputNotValid());
_roles[_contract][_role] = _allowed;
emit Allowed(_contract, _role, _allowed);
}
}
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
IRoles.sol 85 lines
// SPDX-License-Identifier: BSL-1.1
pragma solidity =0.8.28;
/*
_____ _____ __ ____ _____
| | _ | | | \| _ |
| | | | | |__| | | |
|_|_|_|__|__|_____|____/|__|__|
*/
interface IRoles {
error Roles_InputNotValid();
/**
* @notice Returns REBALANCER role
*/
function REBALANCER() external view returns (bytes32);
/**
* @notice Returns REBALANCER_EOA role
*/
function REBALANCER_EOA() external view returns (bytes32);
/**
* @notice Returns GUARDIAN_PAUSE role
*/
function GUARDIAN_PAUSE() external view returns (bytes32);
/**
* @notice Returns GUARDIAN_BRIDGE role
*/
function GUARDIAN_BRIDGE() external view returns (bytes32);
/**
* @notice Returns GUARDIAN_BORROW_CAP role
*/
function GUARDIAN_BORROW_CAP() external view returns (bytes32);
/**
* @notice Returns GUARDIAN_SUPPLY_CAP role
*/
function GUARDIAN_SUPPLY_CAP() external view returns (bytes32);
/**
* @notice Returns GUARDIAN_RESERVE role
*/
function GUARDIAN_RESERVE() external view returns (bytes32);
/**
* @notice Returns PROOF_FORWARDER role
*/
function PROOF_FORWARDER() external view returns (bytes32);
/**
* @notice Returns PROOF_BATCH_FORWARDER role
*/
function PROOF_BATCH_FORWARDER() external view returns (bytes32);
/**
* @notice Returns SEQUENCER role
*/
function SEQUENCER() external view returns (bytes32);
/**
* @notice Returns PAUSE_MANAGER role
*/
function PAUSE_MANAGER() external view returns (bytes32);
/**
* @notice Returns CHAINS_MANAGER role
*/
function CHAINS_MANAGER() external view returns (bytes32);
/**
* @notice Returns GUARDIAN_ORACLE role
*/
function GUARDIAN_ORACLE() external view returns (bytes32);
/**
* @notice Returns allowance status for a contract and a role
* @param _contract the contract address
* @param _role the bytes32 role
*/
function isAllowedFor(address _contract, bytes32 _role) external view returns (bool);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
}
Read Contract
CHAINS_MANAGER 0xe0482413 → bytes32
GUARDIAN_BORROW_CAP 0x265cbca9 → bytes32
GUARDIAN_BRIDGE 0xce287160 → bytes32
GUARDIAN_ORACLE 0x7f3c8ff5 → bytes32
GUARDIAN_PAUSE 0xbffdc2a4 → bytes32
GUARDIAN_RESERVE 0xd71c72e0 → bytes32
GUARDIAN_SUPPLY_CAP 0x9943ad67 → bytes32
PAUSE_MANAGER 0x47164d3b → bytes32
PROOF_BATCH_FORWARDER 0xa1bd302d → bytes32
PROOF_FORWARDER 0xa8720195 → bytes32
REBALANCER 0x9e106dc7 → bytes32
REBALANCER_EOA 0x48a166e6 → bytes32
SEQUENCER 0x75fd4ca9 → bytes32
isAllowedFor 0x38dd8c2c → bool
owner 0x8da5cb5b → address
Write Contract 3 functions
These functions modify contract state and require a wallet transaction to execute.
allowFor 0xec3a4613
address _contract
bytes32 _role
bool _allowed
renounceOwnership 0x715018a6
No parameters
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address