Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Grant Role | 20762640 | 542 days ago | IN | 0 ETH | 0.00197799 |
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| 0x60806040 | 20762639 | 542 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xE2f503D1...d8724Bf8c The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
RoleStore
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "../utils/EnumerableValues.sol";
import "./Role.sol";
import "../error/Errors.sol";
/**
* @title RoleStore
* @dev Stores roles and their members.
*/
contract RoleStore {
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
using EnumerableValues for EnumerableSet.AddressSet;
using EnumerableValues for EnumerableSet.Bytes32Set;
EnumerableSet.Bytes32Set internal roles;
mapping(bytes32 => EnumerableSet.AddressSet) internal roleMembers;
// checking if an account has a role is a frequently used function
// roleCache helps to save gas by offering a more efficient lookup
// vs calling roleMembers[key].contains(account)
mapping(address => mapping(bytes32 => bool)) roleCache;
modifier onlyRoleAdmin() {
if (!hasRole(msg.sender, Role.ROLE_ADMIN)) {
revert Errors.Unauthorized(msg.sender, "ROLE_ADMIN");
}
_;
}
constructor(address roleAdmin) {
_grantRole(roleAdmin, Role.ROLE_ADMIN);
}
/**
* @dev Grants the specified role to the given account.
*
* @param account The address of the account.
* @param roleKey The key of the role to grant.
*/
function grantRole(
address account,
bytes32 roleKey
) external onlyRoleAdmin {
_grantRole(account, roleKey);
}
/**
* @dev Revokes the specified role from the given account.
*
* @param account The address of the account.
* @param roleKey The key of the role to revoke.
*/
function revokeRole(
address account,
bytes32 roleKey
) external onlyRoleAdmin {
_revokeRole(account, roleKey);
}
/**
* @dev Returns true if the given account has the specified role.
*
* @param account The address of the account.
* @param roleKey The key of the role.
* @return True if the account has the role, false otherwise.
*/
function hasRole(
address account,
bytes32 roleKey
) public view returns (bool) {
return roleCache[account][roleKey];
}
/**
* @dev Returns the number of roles stored in the contract.
*
* @return The number of roles.
*/
function getRoleCount() external view returns (uint256) {
return roles.length();
}
/**
* @dev Returns the keys of the roles stored in the contract.
*
* @param start The starting index of the range of roles to return.
* @param end The ending index of the range of roles to return.
* @return The keys of the roles.
*/
function getRoles(
uint256 start,
uint256 end
) external view returns (bytes32[] memory) {
return roles.valuesAt(start, end);
}
/**
* @dev Returns the number of members of the specified role.
*
* @param roleKey The key of the role.
* @return The number of members of the role.
*/
function getRoleMemberCount(
bytes32 roleKey
) external view returns (uint256) {
return roleMembers[roleKey].length();
}
/**
* @dev Returns the members of the specified role.
*
* @param roleKey The key of the role.
* @param start the start index, the value for this index will be included.
* @param end the end index, the value for this index will not be included.
* @return The members of the role.
*/
function getRoleMembers(
bytes32 roleKey,
uint256 start,
uint256 end
) external view returns (address[] memory) {
return roleMembers[roleKey].valuesAt(start, end);
}
function _grantRole(address account, bytes32 roleKey) internal {
roles.add(roleKey);
roleMembers[roleKey].add(account);
roleCache[account][roleKey] = true;
}
function _revokeRole(address account, bytes32 roleKey) internal {
roleMembers[roleKey].remove(account);
roleCache[account][roleKey] = false;
if (roleMembers[roleKey].length() == 0) {
if (roleKey == Role.ROLE_ADMIN) {
revert Errors.ThereMustBeAtLeastOneRoleAdmin();
}
}
}
}// 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;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*
* [WARNING]
* ====
* Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
* unusable.
* See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
*
* In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
* array of EnumerableSet.
* ====
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position is the index of the value in the `values` array plus 1.
// Position 0 is used to mean a value is not in the set.
mapping(bytes32 value => uint256) _positions;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._positions[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We cache the value's position to prevent multiple reads from the same storage slot
uint256 position = set._positions[value];
if (position != 0) {
// Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 valueIndex = position - 1;
uint256 lastIndex = set._values.length - 1;
if (valueIndex != lastIndex) {
bytes32 lastValue = set._values[lastIndex];
// Move the lastValue to the index where the value to delete is
set._values[valueIndex] = lastValue;
// Update the tracked position of the lastValue (that was just moved)
set._positions[lastValue] = position;
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the tracked position for the deleted slot
delete set._positions[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._positions[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
bytes32[] memory store = _values(set._inner);
bytes32[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
library Errors {
// Generic errors
error CannotBeZero(string name);
error MustBeGreater(string name);
error MustBeLower(string name);
error IncorrectAmount(uint256 amount);
// Controller errors
error InsufficientEscrow(uint128 escrow, uint128 wanted);
error InsufficientBalance(uint256 balance, uint256 needed);
error SessionWaitingIteration(address player);
error CallRevert(bytes data);
error SendRevert(bytes data);
error SessionNotIterable(bytes32 key);
error SessionNotRefundable(bytes32 key);
error ProgramDidNotRefund(bytes32 key);
error RequestCouldNotFind(uint256 requestId);
// RoleModule errors
error Unauthorized(address msgSender, string role);
// RoleStore errors
error ThereMustBeAtLeastOneRoleAdmin();
error ThereMustBeAtLeastOneTimelockMultiSig();
// Budget errors
error ProgramHalted(address program);
error NoBudget(address program, address bankroll);
error LossOverBudget(
address program,
address token,
uint128 budget,
uint128 loss
);
error BudgetExceeded(
address program,
address token,
uint128 budget,
uint128 loss
);
// Operator errors
error NotOnSale(address program);
error OperatorBlocked(address operator);
error OperatorNotRegistered(address operator);
error AlreadyOperator(address operator);
// Randomizer router errors
error AlreadyFilled(uint256 requestId);
error NotScheduled(uint256 requestId);
error NotOnTargetTime(uint256 requestId);
error InvalidRandomNumber();
// Game errors
error GameOver(address client);
error GameHalted(address client);
error HasUncompletedGame(address client);
error AlreadyCompleted(address client);
error GameCountExceeded(uint8 given, uint8 max);
error ChoiceNotAllowed();
error MaxWagerExceeded(uint128 given, uint128 max);
error MinWagerNotMet(uint128 given, uint128 min);
error AlreadyClaimed(address client);
error NotPlayersTurn(address client);
error NoGame(address client);
error InvalidState();
error GameCountZero();
// Reward errors
error NoReward();
// Wheel errors
error NoClaim(address client);
error NeedClaim();
// Roulette errors
error MinChip(uint8 index, uint8 selection, uint8 min);
// Mines errors
error InvalidNumberCellsToReveal(uint32 numberCellsToReveal);
error GameEndsAfterReveal(address client);
error OnlyRevealAfterFill(address client);
error AlreadyRevealed(address client);
//Video Poker errors
error PayoutShouldGreaterThanOne(uint8 payout);
// Keno errors
error RandomIncorrect();
// Winr Bonanza errors
error InFreeSpin(uint8 index);
error NoFreeSpin(address client);
error FirstIndexMustBeZero(uint16 index);
error WeightSumIncorrect(uint32 sum);
error IndexOutOfBound(uint16 index);
error PayoutShouldGreaterThanZero(uint16 payout);
// Blackjack Utils errors
error HandNotAwaitingHit(uint8 status);
error HandCannotSplit();
error HandCannotSplitMore();
error AllCardsDrawn();
// Blackjack errors
error NotAwaitingRandom();
error BJGameInvalidState(uint8 state);
error InvalidAmountHands();
error AlreadyInsured();
error CannotInsure();
error DealerUnlucky();
error HandCannotDoubled();
error HandCannotBeDoubledAlreadyInsured();
error HandCannotBeSplitAlreadyInsured();
error HandAlreadyDoubled();
error MaxHandsExceeded();
error HandNotPlaying(uint8 status);
error HandNotYours(address client);
error NotYourTurn(uint8 status);
error WaitYourTurn(address client);
// Poker errors
error HandResultError(address client);
// Dragon Castle
error InvalidDifficultyMode(address client);
error NoWinStreak(address client);
error InvalidSlotChoice(address client, uint8 slotChoice);
// Referral errors
error AlreadyRegistered(string code);
error NotRegistered(string code);
error CantRegisterYourOwn(string code);
// Strategy errors
error NotOwner();
error OutOfBound(uint256 index);
// Badge errors
error NotFound(uint8 id);
error HasBadge(uint8 id);
// Environment errors
error EnvExist(string key);
// Vault Guard errors
error VaultHalted();
// Conditional Reward
error NoLoss();
error NoSpaceLeft();
error NotTime();
// Bridger errors
error InvalidToken(address token);
error InvalidAmount(uint256 amount);
error TransferFailed(address to, uint256 amount);
error InvalidAddress(address addr);
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.20;
/**
* @title Role
* @dev Library for role keys
*/
library Role {
/**
* @dev The ROLE_ADMIN role.
*/
bytes32 public constant ROLE_ADMIN = keccak256(abi.encode("ROLE_ADMIN"));
/**
* @dev The CONFIG_KEEPER role.
*/
bytes32 public constant CONFIG_KEEPER =
keccak256(abi.encode("CONFIG_KEEPER"));
/**
* @dev The CONTROLLER role.
*/
bytes32 public constant CONTROLLER = keccak256(abi.encode("CONTROLLER"));
/**
* @dev The VAULT role.
*/
bytes32 public constant VAULT = keccak256(abi.encode("VAULT"));
/**
* @dev The VAULT ADAPTER role.
*/
bytes32 public constant VAULT_ADAPTER =
keccak256(abi.encode("VAULT_ADAPTER"));
/**
* @dev The RANDOMIZER role.
*/
bytes32 public constant RANDOMIZER = keccak256(abi.encode("RANDOMIZER"));
/**
* @dev The RANDOMIZER_PROVIDER role.
*/
bytes32 public constant RANDOMIZER_PROVIDER =
keccak256(abi.encode("RANDOMIZER_PROVIDER"));
/**
* @dev The OPERATOR role.
*/
bytes32 public constant OPERATOR = keccak256(abi.encode("OPERATOR"));
/**
* @dev The WHITELIST_PROGRAM role.
*/
bytes32 public constant WHITELIST_PROGRAM =
keccak256(abi.encode("WHITELIST_PROGRAM"));
/**
* @dev The MIDDLEWARE role.
*/
bytes32 public constant MIDDLEWARE = keccak256(abi.encode("MIDDLEWARE"));
/**
* @dev The FEE_SHARE role.
*/
bytes32 public constant FEE_SHARE = keccak256(abi.encode("FEE_SHARE"));
/**
* @dev The BUDGET_MANAGER role.
*/
bytes32 public constant BUDGET_MANAGER =
keccak256(abi.encode("BUDGET_MANAGER"));
/**
* @dev The STATISTIC_MANAGER role.
*/
bytes32 public constant STATISTIC_MANAGER =
keccak256(abi.encode("STATISTIC_MANAGER"));
/**
* @dev The REWARD role.
*/
bytes32 public constant REWARD = keccak256(abi.encode("REWARD"));
/**
* @dev The BADGE_KEEPER role.
*/
bytes32 public constant BADGE_KEEPER =
keccak256(abi.encode("BADGE_KEEPER"));
/**
* @dev The BLACKJACK_ROUTER role.
*/
bytes32 public constant BLACKJACK_ROUTER =
keccak256(abi.encode("BLACKJACK_ROUTER"));
/**
* @dev The BLACKJACK_PROCESSOR role.
*/
bytes32 public constant BLACKJACK_PROCESSOR =
keccak256(abi.encode("BLACKJACK_PROCESSOR"));
/**
* @dev The THIRD_PARTY_KEEPER role.
*/
bytes32 public constant THIRD_PARTY_KEEPER =
keccak256(abi.encode("THIRD_PARTY_KEEPER"));
/**
* @dev The BRIDGE_KEEPER role.
*/
bytes32 public constant BRIDGE_KEEPER =
keccak256(abi.encode("BRIDGE_KEEPER"));
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
/**
* @title EnumerableValues
* @dev Library to extend the EnumerableSet library with functions to get
* valuesAt for a range
*/
library EnumerableValues {
using EnumerableSet for EnumerableSet.Bytes32Set;
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.UintSet;
/**
* Returns an array of bytes32 values from the given set, starting at the given
* start index and ending before the given end index.
*
* @param set The set to get the values from.
* @param start The starting index.
* @param end The ending index.
* @return An array of bytes32 values.
*/
function valuesAt(
EnumerableSet.Bytes32Set storage set,
uint256 start,
uint256 end
) internal view returns (bytes32[] memory) {
uint256 max = set.length();
if (end > max) {
end = max;
}
bytes32[] memory items = new bytes32[](end - start);
for (uint256 i = start; i < end; i++) {
items[i - start] = set.at(i);
}
return items;
}
/**
* Returns an array of address values from the given set, starting at the given
* start index and ending before the given end index.
*
* @param set The set to get the values from.
* @param start The starting index.
* @param end The ending index.
* @return An array of address values.
*/
function valuesAt(
EnumerableSet.AddressSet storage set,
uint256 start,
uint256 end
) internal view returns (address[] memory) {
uint256 max = set.length();
if (end > max) {
end = max;
}
address[] memory items = new address[](end - start);
for (uint256 i = start; i < end; i++) {
items[i - start] = set.at(i);
}
return items;
}
/**
* Returns an array of uint256 values from the given set, starting at the given
* start index and ending before the given end index, the item at the end index will not be returned.
*
* @param set The set to get the values from.
* @param start The starting index (inclusive, item at the start index will be returned).
* @param end The ending index (exclusive, item at the end index will not be returned).
* @return An array of uint256 values.
*/
function valuesAt(
EnumerableSet.UintSet storage set,
uint256 start,
uint256 end
) internal view returns (uint256[] memory) {
if (start >= set.length()) {
return new uint256[](0);
}
uint256 max = set.length();
if (end > max) {
end = max;
}
uint256[] memory items = new uint256[](end - start);
for (uint256 i = start; i < end; i++) {
items[i - start] = set.at(i);
}
return items;
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"roleAdmin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ThereMustBeAtLeastOneRoleAdmin","type":"error"},{"inputs":[{"internalType":"address","name":"msgSender","type":"address"},{"internalType":"string","name":"role","type":"string"}],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"getRoleCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"roleKey","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"roleKey","type":"bytes32"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getRoleMembers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getRoles","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"roleKey","type":"bytes32"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"roleKey","type":"bytes32"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"roleKey","type":"bytes32"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x608060405234801561001057600080fd5b50604051610a91380380610a9183398101604081905261002f91610152565b61008281604051602001610061906020808252600a90820152692927a622afa0a226a4a760b11b604082015260600190565b6040516020818303038152906040528051906020012061008860201b60201c565b50610182565b6100936000826100dd565b5060008181526002602052604090206100ac90836100f2565b506001600160a01b03909116600090815260036020908152604080832093835292905220805460ff19166001179055565b60006100e98383610103565b90505b92915050565b60006100e9836001600160a01b0384165b600081815260018301602052604081205461014a575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556100ec565b5060006100ec565b60006020828403121561016457600080fd5b81516001600160a01b038116811461017b57600080fd5b9392505050565b610900806101916000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806383d333191161005b57806383d33319146100e0578063ab2742dc146100f6578063ac4ab3fb14610109578063ca15c8731461015257600080fd5b8063208dd1ff146100825780632a861f5714610097578063821c1898146100c0575b600080fd5b6100956100903660046106bf565b610165565b005b6100aa6100a53660046106f7565b6101ef565b6040516100b79190610723565b60405180910390f35b6100d36100ce366004610770565b610213565b6040516100b79190610792565b6100e861022a565b6040519081526020016100b7565b6100956101043660046106bf565b61023b565b6101426101173660046106bf565b6001600160a01b03919091166000908152600360209081526040808320938352929052205460ff1690565b60405190151581526020016100b7565b6100e86101603660046107ca565b610277565b6101b933604051602001610178906107e3565b604051602081830303815290604052805190602001206001600160a01b03919091166000908152600360209081526040808320938352929052205460ff1690565b6101e1573360405163a35b150b60e01b81526004016101d8919061080d565b60405180910390fd5b6101eb828261028e565b5050565b600083815260026020526040902060609061020b90848461032d565b949350505050565b6060610221600084846103fb565b90505b92915050565b600061023660006104b2565b905090565b61024e33604051602001610178906107e3565b61026d573360405163a35b150b60e01b81526004016101d8919061080d565b6101eb82826104bc565b6000818152600260205260408120610224906104b2565b60008181526002602052604090206102a69083610511565b506001600160a01b03821660009081526003602090815260408083208484528252808320805460ff19169055600290915290206102e2906104b2565b6000036101eb576040516020016102f8906107e3565b6040516020818303038152906040528051906020012081036101eb57604051635bc1e44560e11b815260040160405180910390fd5b6060600061033a856104b2565b905080831115610348578092505b6000610354858561085c565b67ffffffffffffffff81111561036c5761036c61086f565b604051908082528060200260200182016040528015610395578160200160208202803683370190505b509050845b848110156103f1576103ac8782610526565b826103b7888461085c565b815181106103c7576103c7610885565b6001600160a01b0390921660209283029190910190910152806103e98161089b565b91505061039a565b5095945050505050565b60606000610408856104b2565b905080831115610416578092505b6000610422858561085c565b67ffffffffffffffff81111561043a5761043a61086f565b604051908082528060200260200182016040528015610463578160200160208202803683370190505b509050845b848110156103f15761047a8782610526565b82610485888461085c565b8151811061049557610495610885565b6020908102919091010152806104aa8161089b565b915050610468565b6000610224825490565b6104c7600082610532565b5060008181526002602052604090206104e0908361053e565b506001600160a01b03909116600090815260036020908152604080832093835292905220805460ff19166001179055565b6000610221836001600160a01b038416610553565b60006102218383610646565b60006102218383610670565b6000610221836001600160a01b038416610670565b6000818152600183016020526040812054801561063c57600061057760018361085c565b855490915060009061058b9060019061085c565b90508082146105f05760008660000182815481106105ab576105ab610885565b90600052602060002001549050808760000184815481106105ce576105ce610885565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610601576106016108b4565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610224565b6000915050610224565b600082600001828154811061065d5761065d610885565b9060005260206000200154905092915050565b60008181526001830160205260408120546106b757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610224565b506000610224565b600080604083850312156106d257600080fd5b82356001600160a01b03811681146106e957600080fd5b946020939093013593505050565b60008060006060848603121561070c57600080fd5b505081359360208301359350604090920135919050565b6020808252825182820181905260009190848201906040850190845b818110156107645783516001600160a01b03168352928401929184019160010161073f565b50909695505050505050565b6000806040838503121561078357600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b81811015610764578351835292840192918401916001016107ae565b6000602082840312156107dc57600080fd5b5035919050565b60208152600061022460208301600a8152692927a622afa0a226a4a760b11b602082015260400190565b6001600160a01b0382168152604060208201819052600a90820152692927a622afa0a226a4a760b11b6060820152600060808201610221565b634e487b7160e01b600052601160045260246000fd5b8181038181111561022457610224610846565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000600182016108ad576108ad610846565b5060010190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220f7c9f1a6234603bb74ac73ed17f790fc5a6ef54454be2a81887d895111b076ee64736f6c63430008140033000000000000000000000000e328a0b1e0be7043c9141c2073e408d1086e1175
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c806383d333191161005b57806383d33319146100e0578063ab2742dc146100f6578063ac4ab3fb14610109578063ca15c8731461015257600080fd5b8063208dd1ff146100825780632a861f5714610097578063821c1898146100c0575b600080fd5b6100956100903660046106bf565b610165565b005b6100aa6100a53660046106f7565b6101ef565b6040516100b79190610723565b60405180910390f35b6100d36100ce366004610770565b610213565b6040516100b79190610792565b6100e861022a565b6040519081526020016100b7565b6100956101043660046106bf565b61023b565b6101426101173660046106bf565b6001600160a01b03919091166000908152600360209081526040808320938352929052205460ff1690565b60405190151581526020016100b7565b6100e86101603660046107ca565b610277565b6101b933604051602001610178906107e3565b604051602081830303815290604052805190602001206001600160a01b03919091166000908152600360209081526040808320938352929052205460ff1690565b6101e1573360405163a35b150b60e01b81526004016101d8919061080d565b60405180910390fd5b6101eb828261028e565b5050565b600083815260026020526040902060609061020b90848461032d565b949350505050565b6060610221600084846103fb565b90505b92915050565b600061023660006104b2565b905090565b61024e33604051602001610178906107e3565b61026d573360405163a35b150b60e01b81526004016101d8919061080d565b6101eb82826104bc565b6000818152600260205260408120610224906104b2565b60008181526002602052604090206102a69083610511565b506001600160a01b03821660009081526003602090815260408083208484528252808320805460ff19169055600290915290206102e2906104b2565b6000036101eb576040516020016102f8906107e3565b6040516020818303038152906040528051906020012081036101eb57604051635bc1e44560e11b815260040160405180910390fd5b6060600061033a856104b2565b905080831115610348578092505b6000610354858561085c565b67ffffffffffffffff81111561036c5761036c61086f565b604051908082528060200260200182016040528015610395578160200160208202803683370190505b509050845b848110156103f1576103ac8782610526565b826103b7888461085c565b815181106103c7576103c7610885565b6001600160a01b0390921660209283029190910190910152806103e98161089b565b91505061039a565b5095945050505050565b60606000610408856104b2565b905080831115610416578092505b6000610422858561085c565b67ffffffffffffffff81111561043a5761043a61086f565b604051908082528060200260200182016040528015610463578160200160208202803683370190505b509050845b848110156103f15761047a8782610526565b82610485888461085c565b8151811061049557610495610885565b6020908102919091010152806104aa8161089b565b915050610468565b6000610224825490565b6104c7600082610532565b5060008181526002602052604090206104e0908361053e565b506001600160a01b03909116600090815260036020908152604080832093835292905220805460ff19166001179055565b6000610221836001600160a01b038416610553565b60006102218383610646565b60006102218383610670565b6000610221836001600160a01b038416610670565b6000818152600183016020526040812054801561063c57600061057760018361085c565b855490915060009061058b9060019061085c565b90508082146105f05760008660000182815481106105ab576105ab610885565b90600052602060002001549050808760000184815481106105ce576105ce610885565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610601576106016108b4565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610224565b6000915050610224565b600082600001828154811061065d5761065d610885565b9060005260206000200154905092915050565b60008181526001830160205260408120546106b757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610224565b506000610224565b600080604083850312156106d257600080fd5b82356001600160a01b03811681146106e957600080fd5b946020939093013593505050565b60008060006060848603121561070c57600080fd5b505081359360208301359350604090920135919050565b6020808252825182820181905260009190848201906040850190845b818110156107645783516001600160a01b03168352928401929184019160010161073f565b50909695505050505050565b6000806040838503121561078357600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b81811015610764578351835292840192918401916001016107ae565b6000602082840312156107dc57600080fd5b5035919050565b60208152600061022460208301600a8152692927a622afa0a226a4a760b11b602082015260400190565b6001600160a01b0382168152604060208201819052600a90820152692927a622afa0a226a4a760b11b6060820152600060808201610221565b634e487b7160e01b600052601160045260246000fd5b8181038181111561022457610224610846565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000600182016108ad576108ad610846565b5060010190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220f7c9f1a6234603bb74ac73ed17f790fc5a6ef54454be2a81887d895111b076ee64736f6c63430008140033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.