Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Minimal Proxy Contract for 0xa9c3fb2874ac0bd4980cfe45084befade7513fce
Contract Name:
FlatRoleManager
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)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: LGPL-3.0-onlypragma solidity ^0.8.19;import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";import "../../interfaces/IRoleManager.sol";import "../base/BaseOwnable.sol";/// @title TransferAuthorizer - Manages delegate-role mapping./// @author Cobo Safe Dev Team https://www.cobo.com/contract FlatRoleManager is IFlatRoleManager, BaseOwnable {bytes32 public constant NAME = "FlatRoleManager";uint256 public constant VERSION = 1;using EnumerableSet for EnumerableSet.Bytes32Set;using EnumerableSet for EnumerableSet.AddressSet;event DelegateAdded(address indexed delegate, address indexed sender);event DelegateRemoved(address indexed delegate, address indexed sender);event RoleAdded(bytes32 indexed role, address indexed sender);event RoleGranted(bytes32 indexed role, address indexed delegate, address indexed sender);event RoleRevoked(bytes32 indexed role, address indexed delegate, address indexed sender);EnumerableSet.AddressSet delegates;EnumerableSet.Bytes32Set roles;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol)// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.pragma solidity ^0.8.20;/*** @dev Library for managing* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive* types.** Sets have the following properties:** - Elements are added, removed, and checked for existence in constant time* (O(1)).* - Elements are enumerated in O(n). No guarantees are made on the ordering.** ```solidity* contract Example {* // Add the library methods* using EnumerableSet for EnumerableSet.AddressSet;** // Declare a set state variable* EnumerableSet.AddressSet private mySet;* }* ```
12345678910111213141516171819202122// SPDX-License-Identifier: LGPL-3.0-onlypragma solidity ^0.8.19;import "../src/Types.sol";interface IRoleManager {function getRoles(address delegate) external view returns (bytes32[] memory);function hasRole(address delegate, bytes32 role) external view returns (bool);}interface IFlatRoleManager is IRoleManager {function addRoles(bytes32[] calldata roles) external;function grantRoles(bytes32[] calldata roles, address[] calldata delegates) external;function revokeRoles(bytes32[] calldata roles, address[] calldata delegates) external;function getDelegates() external view returns (address[] memory);function getAllRoles() external view returns (bytes32[] memory);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: LGPL-3.0-onlypragma solidity ^0.8.19;import "../Errors.sol";import "./BaseVersion.sol";/// @title BaseOwnable - Simple ownership access control contract./// @author Cobo Safe Dev Team https://www.cobo.com//// @dev Can be used in both proxy and non-proxy mode.abstract contract BaseOwnable is BaseVersion {address public owner;address public pendingOwner;bool private initialized = false;event PendingOwnerSet(address indexed to);event NewOwnerSet(address indexed owner);modifier onlyOwner() {require(owner == msg.sender, Errors.CALLER_IS_NOT_OWNER);_;}/// @dev `owner` is set by argument, thus the owner can any address./// When used in non-proxy mode, `initialize` can not be called/// after deployment.constructor(address _owner) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: LGPL-3.0-onlypragma solidity ^0.8.19;struct CallData {uint256 flag; // 0x1 delegate call, 0x0 call.address to;uint256 value;bytes data; // calldatabytes hint;bytes extra; // for future support: signatures etc.}struct TransactionData {address from; // `msg.sender` who performs the transaction a.k.a wallet address.address delegate; // Delegate who calls executeTransactions().// Same as CallDatauint256 flag; // 0x1 delegate call, 0x0 call.address to;uint256 value;bytes data; // calldatabytes hint;bytes extra;}/// @dev Use enum instead of bool in case of when other status, like PENDING,/// is needed in the future.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: LGPL-3.0-onlypragma solidity ^0.8.19;/// @dev Common errors. This helps reducing the contract size.library Errors {// "E1";// Call/Static-call failed.string constant CALL_FAILED = "E2";// Argument's type not supported in View Variant.string constant INVALID_VIEW_ARG_SOL_TYPE = "E3";// Invalid length for variant raw data.string constant INVALID_VARIANT_RAW_DATA = "E4";// "E5";// Invalid variant type.string constant INVALID_VAR_TYPE = "E6";// Rule not existsstring constant RULE_NOT_EXISTS = "E7";// Variant name not found.string constant VAR_NAME_NOT_FOUND = "E8";
12345678910111213141516171819202122// SPDX-License-Identifier: LGPL-3.0-onlypragma solidity ^0.8.19;import "../../interfaces/IVersion.sol";/// @title BaseVersion - Provides version information/// @author Cobo Safe Dev Team https://www.cobo.com//// @dev/// Implement NAME() and VERSION() methods according to IVersion interface.////// Or just:/// bytes32 public constant NAME = "<Your contract name>";/// uint256 public constant VERSION = <Your contract version>;////// Change the NAME when writing new kind of contract./// Change the VERSION when upgrading existing contract.abstract contract BaseVersion is IVersion {/// @dev Convert to `string` which looks prettier on Etherscan viewer.function _NAME() external view virtual returns (string memory) {return string(abi.encodePacked(this.NAME()));}}
12345678// SPDX-License-Identifier: LGPL-3.0-onlypragma solidity ^0.8.19;interface IVersion {function NAME() external view returns (bytes32 name);function VERSION() external view returns (uint256 version);}
1234567891011121314151617181920212223242526{"remappings": ["openzeppelin/=lib/openzeppelin-contracts/","forge-std/=lib/forge-std/src/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","openzeppelin-contracts/=lib/openzeppelin-contracts/"],"optimizer": {"enabled": true,"runs": 200},"metadata": {"useLiteralContent": false,"bytecodeHash": "ipfs","appendCBOR": true},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata",
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"DelegateAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"DelegateRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"NewOwnerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"PendingOwnerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_roles","type":"bytes32[]"}],"name":"addRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllRoles","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDelegates","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"getRoles","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_roles","type":"bytes32[]"},{"internalType":"address[]","name":"_delegates","type":"address[]"}],"name":"grantRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegate","type":"address"},{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_roles","type":"bytes32[]"},{"internalType":"address[]","name":"_delegates","type":"address[]"}],"name":"revokeRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"setPendingOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.