Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- OracleDaemonConfig
- Optimization enabled
- true
- Compiler version
- v0.8.9+commit.e5eed63a
- Optimization runs
- 80
- EVM Version
- istanbul
- Verified at
- 2024-11-06T09:30:20.936931Z
Constructor Arguments
0x0000000000000000000000009f3cafa814362af8963560070ea8636b39c84a7000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000
Arg [0] (address) : 0x9f3cafa814362af8963560070ea8636b39c84a70
Arg [1] (address[]) : []
contracts/0.8.9/OracleDaemonConfig.sol
// SPDX-FileCopyrightText: 2023 Lido <info@lido.fi>
// SPDX-License-Identifier: GPL-3.0
/* See contracts/COMPILERS.md */
pragma solidity 0.8.9;
import {AccessControlEnumerable} from "./utils/access/AccessControlEnumerable.sol";
contract OracleDaemonConfig is AccessControlEnumerable {
bytes32 public constant CONFIG_MANAGER_ROLE = keccak256("CONFIG_MANAGER_ROLE");
mapping(string => bytes) private values;
constructor(address _admin, address[] memory _configManagers) {
if (_admin == address(0)) revert ZeroAddress();
_grantRole(DEFAULT_ADMIN_ROLE, _admin);
for (uint256 i = 0; i < _configManagers.length; ) {
if (_configManagers[i] == address(0)) revert ZeroAddress();
_grantRole(CONFIG_MANAGER_ROLE, _configManagers[i]);
unchecked {
++i;
}
}
}
function set(string calldata _key, bytes calldata _value) external onlyRole(CONFIG_MANAGER_ROLE) {
if (values[_key].length > 0) revert ValueExists(_key);
if (_value.length == 0) revert EmptyValue(_key);
values[_key] = _value;
emit ConfigValueSet(_key, _value);
}
function update(string calldata _key, bytes calldata _value) external onlyRole(CONFIG_MANAGER_ROLE) {
if (values[_key].length == 0) revert ValueDoesntExist(_key);
if (_value.length == 0) revert EmptyValue(_key);
if (keccak256(values[_key]) == keccak256(_value)) revert ValueIsSame(_key, _value);
values[_key] = _value;
emit ConfigValueUpdated(_key, _value);
}
function unset(string calldata _key) external onlyRole(CONFIG_MANAGER_ROLE) {
if (values[_key].length == 0) revert ValueDoesntExist(_key);
delete values[_key];
emit ConfigValueUnset(_key);
}
function get(string calldata _key) external view returns (bytes memory) {
if (values[_key].length == 0) revert ValueDoesntExist(_key);
return values[_key];
}
function getList(string[] calldata _keys) external view returns (bytes[] memory) {
bytes[] memory results = new bytes[](_keys.length);
for (uint256 i = 0; i < _keys.length; ) {
if (values[_keys[i]].length == 0) revert ValueDoesntExist(_keys[i]);
results[i] = values[_keys[i]];
unchecked {
++i;
}
}
return results;
}
error ValueExists(string key);
error EmptyValue(string key);
error ValueDoesntExist(string key);
error ZeroAddress();
error ValueIsSame(string key, bytes value);
event ConfigValueSet(string key, bytes value);
event ConfigValueUpdated(string key, bytes value);
event ConfigValueUnset(string key);
}
@openzeppelin/contracts-v4.4/utils/introspection/ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
@openzeppelin/contracts-v4.4/utils/introspection/IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
@openzeppelin/contracts-v4.4/utils/structs/EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)
pragma solidity ^0.8.0;
/**
* @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.
*
* ```
* 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.
*/
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 of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping(bytes32 => uint256) _indexes;
}
/**
* @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._indexes[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 read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 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 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
if (lastIndex != toDeleteIndex) {
bytes32 lastvalue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastvalue;
// Update the index for the moved value
set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[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._indexes[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) {
return _values(set._inner);
}
// 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;
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 on 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;
assembly {
result := store
}
return result;
}
}
contracts/0.8.9/utils/access/AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)
//
// A modified AccessControl contract using unstructured storage. Copied from tree:
// https://github.com/OpenZeppelin/openzeppelin-contracts/tree/6bd6b76/contracts/access
//
/* See contracts/COMPILERS.md */
pragma solidity 0.8.9;
import "@openzeppelin/contracts-v4.4/access/IAccessControl.sol";
import "@openzeppelin/contracts-v4.4/utils/Context.sol";
import "@openzeppelin/contracts-v4.4/utils/Strings.sol";
import "@openzeppelin/contracts-v4.4/utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
/// @dev Storage slot: mapping(bytes32 => RoleData) _roles
bytes32 private constant ROLES_POSITION = keccak256("openzeppelin.AccessControl._roles");
function _storageRoles() private pure returns (mapping(bytes32 => RoleData) storage _roles) {
bytes32 position = ROLES_POSITION;
assembly { _roles.slot := position }
}
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role, _msgSender());
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view override returns (bool) {
return _storageRoles()[role].members[account];
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
return _storageRoles()[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_storageRoles()[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_storageRoles()[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_storageRoles()[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}
contracts/0.8.9/utils/access/AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControlEnumerable.sol)
//
// A modified AccessControlEnumerable contract using unstructured storage. Copied from tree:
// https://github.com/OpenZeppelin/openzeppelin-contracts/tree/6bd6b76/contracts/access
//
/* See contracts/COMPILERS.md */
pragma solidity 0.8.9;
import "@openzeppelin/contracts-v4.4/access/IAccessControlEnumerable.sol";
import "@openzeppelin/contracts-v4.4/utils/structs/EnumerableSet.sol";
import "./AccessControl.sol";
/**
* @dev Extension of {AccessControl} that allows enumerating the members of each role.
*/
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
using EnumerableSet for EnumerableSet.AddressSet;
/// @dev Storage slot: mapping(bytes32 => EnumerableSet.AddressSet) _roleMembers
bytes32 private constant ROLE_MEMBERS_POSITION = keccak256("openzeppelin.AccessControlEnumerable._roleMembers");
function _storageRoleMembers() private pure returns (
mapping(bytes32 => EnumerableSet.AddressSet) storage _roleMembers
) {
bytes32 position = ROLE_MEMBERS_POSITION;
assembly { _roleMembers.slot := position }
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {
return _storageRoleMembers()[role].at(index);
}
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) public view override returns (uint256) {
return _storageRoleMembers()[role].length();
}
/**
* @dev Overload {_grantRole} to track enumerable memberships
*/
function _grantRole(bytes32 role, address account) internal virtual override {
super._grantRole(role, account);
_storageRoleMembers()[role].add(account);
}
/**
* @dev Overload {_revokeRole} to track enumerable memberships
*/
function _revokeRole(bytes32 role, address account) internal virtual override {
super._revokeRole(role, account);
_storageRoleMembers()[role].remove(account);
}
}
@openzeppelin/contracts-v4.4/access/IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}
@openzeppelin/contracts-v4.4/access/IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
/**
* @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
*/
interface IAccessControlEnumerable is IAccessControl {
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) external view returns (address);
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) external view returns (uint256);
}
@openzeppelin/contracts-v4.4/utils/Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
@openzeppelin/contracts-v4.4/utils/Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
Compiler Settings
{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"],"":["ast"]}},"optimizer":{"runs":80,"enabled":true},"libraries":{},"evmVersion":"istanbul"}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_admin","internalType":"address"},{"type":"address[]","name":"_configManagers","internalType":"address[]"}]},{"type":"error","name":"EmptyValue","inputs":[{"type":"string","name":"key","internalType":"string"}]},{"type":"error","name":"ValueDoesntExist","inputs":[{"type":"string","name":"key","internalType":"string"}]},{"type":"error","name":"ValueExists","inputs":[{"type":"string","name":"key","internalType":"string"}]},{"type":"error","name":"ValueIsSame","inputs":[{"type":"string","name":"key","internalType":"string"},{"type":"bytes","name":"value","internalType":"bytes"}]},{"type":"error","name":"ZeroAddress","inputs":[]},{"type":"event","name":"ConfigValueSet","inputs":[{"type":"string","name":"key","internalType":"string","indexed":false},{"type":"bytes","name":"value","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"ConfigValueUnset","inputs":[{"type":"string","name":"key","internalType":"string","indexed":false}],"anonymous":false},{"type":"event","name":"ConfigValueUpdated","inputs":[{"type":"string","name":"key","internalType":"string","indexed":false},{"type":"bytes","name":"value","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"previousAdminRole","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"newAdminRole","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"CONFIG_MANAGER_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DEFAULT_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes","name":"","internalType":"bytes"}],"name":"get","inputs":[{"type":"string","name":"_key","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes[]","name":"","internalType":"bytes[]"}],"name":"getList","inputs":[{"type":"string[]","name":"_keys","internalType":"string[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getRoleAdmin","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getRoleMember","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getRoleMemberCount","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"set","inputs":[{"type":"string","name":"_key","internalType":"string"},{"type":"bytes","name":"_value","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unset","inputs":[{"type":"string","name":"_key","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"update","inputs":[{"type":"string","name":"_key","internalType":"string"},{"type":"bytes","name":"_value","internalType":"bytes"}]}]
Contract Creation Code
0x60806040523480156200001157600080fd5b5060405162001a3338038062001a338339810160408190526200003491620002d0565b6001600160a01b0382166200005c5760405163d92e233d60e01b815260040160405180910390fd5b6200006960008362000127565b60005b81518110156200011e5760006001600160a01b0316828281518110620000965762000096620003b9565b60200260200101516001600160a01b03161415620000c75760405163d92e233d60e01b815260040160405180910390fd5b620001157fbbfb55d933c2bfa638763473275b1d84c4418e58d26cf9d2cd5758237756d9f0838381518110620001015762000101620003b9565b60200260200101516200012760201b60201c565b6001016200006c565b505050620003cf565b6200013e82826200018860201b620009f11760201c565b62000183817f8f8c450dae5029cd48cd91dd9db65da48fb742893edfc7941250f6721d93cbbe6000858152602091825260409020919062000a686200022b821b17901c565b505050565b600082815260008051602062001a13833981519152602090815260408083206001600160a01b038516845290915290205460ff166200022757600082815260008051602062001a13833981519152602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45b5050565b600062000242836001600160a01b0384166200024b565b90505b92915050565b6000818152600183016020526040812054620002945750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000245565b50600062000245565b80516001600160a01b0381168114620002b557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215620002e457600080fd5b620002ef836200029d565b602084810151919350906001600160401b03808211156200030f57600080fd5b818601915086601f8301126200032457600080fd5b815181811115620003395762000339620002ba565b8060051b604051601f19603f83011681018181108582111715620003615762000361620002ba565b6040529182528482019250838101850191898311156200038057600080fd5b938501935b82851015620003a95762000399856200029d565b8452938501939285019262000385565b8096505050505050509250929050565b634e487b7160e01b600052603260045260246000fd5b61163480620003df6000396000f3fe608060405234801561001057600080fd5b50600436106100d55760003560e01c80639010d07c116100875780639010d07c1461019157806391d14854146101bc578063a0c7f799146101cf578063a1e6f45d146101e4578063a217fddf14610204578063bb6e19721461020c578063ca15c8731461021f578063d547741f1461023257600080fd5b8063017bf9b4146100da57806301ffc9a7146100ef578063248a9ca3146101175780632b29c0fa146101385780632f2ff15d1461014b57806336568abe1461015e578063693ec85e14610171575b600080fd5b6100ed6100e836600461107c565b610245565b005b6101026100fd3660046110bd565b610321565b60405190151581526020015b60405180910390f35b61012a6101253660046110e7565b61034c565b60405190815260200161010e565b6100ed610146366004611100565b61036a565b6100ed61015936600461116b565b610469565b6100ed61016c36600461116b565b61048b565b61018461017f36600461107c565b610509565b60405161010e9190611203565b6101a461019f366004611216565b61060c565b6040516001600160a01b03909116815260200161010e565b6101026101ca36600461116b565b610636565b61012a6000805160206115df83398151915281565b6101f76101f2366004611238565b61066a565b60405161010e91906112ac565b61012a600081565b6100ed61021a366004611100565b610853565b61012a61022d3660046110e7565b6109b3565b6100ed61024036600461116b565b6109d4565b6000805160206115df83398151915261025e8133610a7d565b6000838360405161027092919061130e565b908152602001604051809103902080546102899061131e565b151590506102b757828260405163d102798d60e01b81526004016102ae929190611382565b60405180910390fd5b600083836040516102c992919061130e565b908152602001604051809103902060006102e39190610f5e565b7f51058c913b42448a4a91c14d785efbd1d43cb2d051309714149b46602683b6878383604051610314929190611382565b60405180910390a1505050565b60006001600160e01b03198216635a05180f60e01b1480610346575061034682610ae1565b92915050565b6000610356610b16565b600092835260205250604090206001015490565b6000805160206115df8339815191526103838133610a7d565b600080868660405161039692919061130e565b908152602001604051809103902080546103af9061131e565b905011156103d4578484604051630166a77d60e61b81526004016102ae929190611382565b816103f6578484604051632b8f831760e01b81526004016102ae929190611382565b82826000878760405161040a92919061130e565b908152604051908190036020019020610424929091610f9b565b507ff61a2f474b0f2f33c031ab3fef3d2a286ed33bdf5d3a0774416be647b0b3c3318585858560405161045a949392919061139e565b60405180910390a15050505050565b6104728261034c565b61047c8133610a7d565b6104868383610b3a565b505050565b6001600160a01b03811633146104fb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016102ae565b6105058282610b65565b5050565b60606000838360405161051d92919061130e565b908152602001604051809103902080546105369061131e565b1515905061055b57828260405163d102798d60e01b81526004016102ae929190611382565b6000838360405161056d92919061130e565b908152602001604051809103902080546105869061131e565b80601f01602080910402602001604051908101604052809291908181526020018280546105b29061131e565b80156105ff5780601f106105d4576101008083540402835291602001916105ff565b820191906000526020600020905b8154815290600101906020018083116105e257829003601f168201915b5050505050905092915050565b600061062f8261061a610b90565b60008681526020919091526040902090610bb4565b9392505050565b6000610640610b16565b6000938452602090815260408085206001600160a01b039490941685529290525090205460ff1690565b60606000826001600160401b03811115610686576106866113d0565b6040519080825280602002602001820160405280156106b957816020015b60608152602001906001900390816106a45790505b50905060005b8381101561084b5760008585838181106106db576106db6113e6565b90506020028101906106ed91906113fc565b6040516106fb92919061130e565b908152602001604051809103902080546107149061131e565b1515905061075b5784848281811061072e5761072e6113e6565b905060200281019061074091906113fc565b60405163d102798d60e01b81526004016102ae929190611382565b600085858381811061076f5761076f6113e6565b905060200281019061078191906113fc565b60405161078f92919061130e565b908152602001604051809103902080546107a89061131e565b80601f01602080910402602001604051908101604052809291908181526020018280546107d49061131e565b80156108215780601f106107f657610100808354040283529160200191610821565b820191906000526020600020905b81548152906001019060200180831161080457829003601f168201915b5050505050828281518110610838576108386113e6565b60209081029190910101526001016106bf565b509392505050565b6000805160206115df83398151915261086c8133610a7d565b6000858560405161087e92919061130e565b908152602001604051809103902080546108979061131e565b151590506108bc57848460405163d102798d60e01b81526004016102ae929190611382565b816108de578484604051632b8f831760e01b81526004016102ae929190611382565b82826040516108ee92919061130e565b60405180910390206000868660405161090892919061130e565b90815260405190819003602001812061092091611442565b6040518091039020141561094f57848484846040516331e0c31f60e11b81526004016102ae949392919061139e565b82826000878760405161096392919061130e565b90815260405190819003602001902061097d929091610f9b565b507fb095ed057610c63dba9ab6e5947cac0517b71f68ba2343310bfa26a3d11ad3e68585858560405161045a949392919061139e565b60006103466109c0610b90565b600084815260209190915260409020610bc0565b6109dd8261034c565b6109e78133610a7d565b6104868383610b65565b6109fb8282610636565b610505576001610a09610b16565b6000848152602091825260408082206001600160a01b0386168084529352808220805460ff1916941515949094179093559151339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b600061062f836001600160a01b038416610bca565b610a878282610636565b61050557610a9f816001600160a01b03166014610c19565b610aaa836020610c19565b604051602001610abb9291906114de565b60408051601f198184030181529082905262461bcd60e51b82526102ae91600401611203565b60006001600160e01b03198216637965db0b60e01b148061034657506301ffc9a760e01b6001600160e01b0319831614610346565b7f9a627a5d4aa7c17f87ff26e3fe9a42c2b6c559e8b41a42282d0ecebb17c0e4d390565b610b4482826109f1565b61048681610b50610b90565b60008581526020919091526040902090610a68565b610b6f8282610db4565b61048681610b7b610b90565b60008581526020919091526040902090610e2c565b7f8f8c450dae5029cd48cd91dd9db65da48fb742893edfc7941250f6721d93cbbe90565b600061062f8383610e41565b6000610346825490565b6000818152600183016020526040812054610c1157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610346565b506000610346565b60606000610c28836002611563565b610c33906002611582565b6001600160401b03811115610c4a57610c4a6113d0565b6040519080825280601f01601f191660200182016040528015610c74576020820181803683370190505b509050600360fc1b81600081518110610c8f57610c8f6113e6565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610cbe57610cbe6113e6565b60200101906001600160f81b031916908160001a9053506000610ce2846002611563565b610ced906001611582565b90505b6001811115610d65576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610d2157610d216113e6565b1a60f81b828281518110610d3757610d376113e6565b60200101906001600160f81b031916908160001a90535060049490941c93610d5e8161159a565b9050610cf0565b50831561062f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016102ae565b610dbe8282610636565b15610505576000610dcd610b16565b6000848152602091825260408082206001600160a01b0386168084529352808220805460ff1916941515949094179093559151339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061062f836001600160a01b038416610e6b565b6000826000018281548110610e5857610e586113e6565b9060005260206000200154905092915050565b60008181526001830160205260408120548015610f54576000610e8f6001836115b1565b8554909150600090610ea3906001906115b1565b9050818114610f08576000866000018281548110610ec357610ec36113e6565b9060005260206000200154905080876000018481548110610ee657610ee66113e6565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610f1957610f196115c8565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610346565b6000915050610346565b508054610f6a9061131e565b6000825580601f10610f7a575050565b601f016020900490600052602060002090810190610f98919061101f565b50565b828054610fa79061131e565b90600052602060002090601f016020900481019282610fc9576000855561100f565b82601f10610fe25782800160ff1982351617855561100f565b8280016001018555821561100f579182015b8281111561100f578235825591602001919060010190610ff4565b5061101b92915061101f565b5090565b5b8082111561101b5760008155600101611020565b60008083601f84011261104657600080fd5b5081356001600160401b0381111561105d57600080fd5b60208301915083602082850101111561107557600080fd5b9250929050565b6000806020838503121561108f57600080fd5b82356001600160401b038111156110a557600080fd5b6110b185828601611034565b90969095509350505050565b6000602082840312156110cf57600080fd5b81356001600160e01b03198116811461062f57600080fd5b6000602082840312156110f957600080fd5b5035919050565b6000806000806040858703121561111657600080fd5b84356001600160401b038082111561112d57600080fd5b61113988838901611034565b9096509450602087013591508082111561115257600080fd5b5061115f87828801611034565b95989497509550505050565b6000806040838503121561117e57600080fd5b8235915060208301356001600160a01b038116811461119c57600080fd5b809150509250929050565b60005b838110156111c25781810151838201526020016111aa565b838111156111d1576000848401525b50505050565b600081518084526111ef8160208601602086016111a7565b601f01601f19169290920160200192915050565b60208152600061062f60208301846111d7565b6000806040838503121561122957600080fd5b50508035926020909101359150565b6000806020838503121561124b57600080fd5b82356001600160401b038082111561126257600080fd5b818501915085601f83011261127657600080fd5b81358181111561128557600080fd5b8660208260051b850101111561129a57600080fd5b60209290920196919550909350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561130157603f198886030184526112ef8583516111d7565b945092850192908501906001016112d3565b5092979650505050505050565b8183823760009101908152919050565b600181811c9082168061133257607f821691505b6020821081141561135357634e487b7160e01b600052602260045260246000fd5b50919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000611396602083018486611359565b949350505050565b6040815260006113b2604083018688611359565b82810360208401526113c5818587611359565b979650505050505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261141357600080fd5b8301803591506001600160401b0382111561142d57600080fd5b60200191503681900382131561107557600080fd5b600080835481600182811c91508083168061145e57607f831692505b602080841082141561147e57634e487b7160e01b86526022600452602486fd5b81801561149257600181146114a3576114d0565b60ff198616895284890196506114d0565b60008a81526020902060005b868110156114c85781548b8201529085019083016114af565b505084890196505b509498975050505050505050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516115108160178501602088016111a7565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516115418160288401602088016111a7565b01602801949350505050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561157d5761157d61154d565b500290565b600082198211156115955761159561154d565b500190565b6000816115a9576115a961154d565b506000190190565b6000828210156115c3576115c361154d565b500390565b634e487b7160e01b600052603160045260246000fdfebbfb55d933c2bfa638763473275b1d84c4418e58d26cf9d2cd5758237756d9f0a2646970667358221220d2516f8e16a11b3d2c0cc0110d1fd58fa6bd14a6b359e838d5a1f9d91a4bc83464736f6c634300080900339a627a5d4aa7c17f87ff26e3fe9a42c2b6c559e8b41a42282d0ecebb17c0e4d30000000000000000000000009f3cafa814362af8963560070ea8636b39c84a7000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106100d55760003560e01c80639010d07c116100875780639010d07c1461019157806391d14854146101bc578063a0c7f799146101cf578063a1e6f45d146101e4578063a217fddf14610204578063bb6e19721461020c578063ca15c8731461021f578063d547741f1461023257600080fd5b8063017bf9b4146100da57806301ffc9a7146100ef578063248a9ca3146101175780632b29c0fa146101385780632f2ff15d1461014b57806336568abe1461015e578063693ec85e14610171575b600080fd5b6100ed6100e836600461107c565b610245565b005b6101026100fd3660046110bd565b610321565b60405190151581526020015b60405180910390f35b61012a6101253660046110e7565b61034c565b60405190815260200161010e565b6100ed610146366004611100565b61036a565b6100ed61015936600461116b565b610469565b6100ed61016c36600461116b565b61048b565b61018461017f36600461107c565b610509565b60405161010e9190611203565b6101a461019f366004611216565b61060c565b6040516001600160a01b03909116815260200161010e565b6101026101ca36600461116b565b610636565b61012a6000805160206115df83398151915281565b6101f76101f2366004611238565b61066a565b60405161010e91906112ac565b61012a600081565b6100ed61021a366004611100565b610853565b61012a61022d3660046110e7565b6109b3565b6100ed61024036600461116b565b6109d4565b6000805160206115df83398151915261025e8133610a7d565b6000838360405161027092919061130e565b908152602001604051809103902080546102899061131e565b151590506102b757828260405163d102798d60e01b81526004016102ae929190611382565b60405180910390fd5b600083836040516102c992919061130e565b908152602001604051809103902060006102e39190610f5e565b7f51058c913b42448a4a91c14d785efbd1d43cb2d051309714149b46602683b6878383604051610314929190611382565b60405180910390a1505050565b60006001600160e01b03198216635a05180f60e01b1480610346575061034682610ae1565b92915050565b6000610356610b16565b600092835260205250604090206001015490565b6000805160206115df8339815191526103838133610a7d565b600080868660405161039692919061130e565b908152602001604051809103902080546103af9061131e565b905011156103d4578484604051630166a77d60e61b81526004016102ae929190611382565b816103f6578484604051632b8f831760e01b81526004016102ae929190611382565b82826000878760405161040a92919061130e565b908152604051908190036020019020610424929091610f9b565b507ff61a2f474b0f2f33c031ab3fef3d2a286ed33bdf5d3a0774416be647b0b3c3318585858560405161045a949392919061139e565b60405180910390a15050505050565b6104728261034c565b61047c8133610a7d565b6104868383610b3a565b505050565b6001600160a01b03811633146104fb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016102ae565b6105058282610b65565b5050565b60606000838360405161051d92919061130e565b908152602001604051809103902080546105369061131e565b1515905061055b57828260405163d102798d60e01b81526004016102ae929190611382565b6000838360405161056d92919061130e565b908152602001604051809103902080546105869061131e565b80601f01602080910402602001604051908101604052809291908181526020018280546105b29061131e565b80156105ff5780601f106105d4576101008083540402835291602001916105ff565b820191906000526020600020905b8154815290600101906020018083116105e257829003601f168201915b5050505050905092915050565b600061062f8261061a610b90565b60008681526020919091526040902090610bb4565b9392505050565b6000610640610b16565b6000938452602090815260408085206001600160a01b039490941685529290525090205460ff1690565b60606000826001600160401b03811115610686576106866113d0565b6040519080825280602002602001820160405280156106b957816020015b60608152602001906001900390816106a45790505b50905060005b8381101561084b5760008585838181106106db576106db6113e6565b90506020028101906106ed91906113fc565b6040516106fb92919061130e565b908152602001604051809103902080546107149061131e565b1515905061075b5784848281811061072e5761072e6113e6565b905060200281019061074091906113fc565b60405163d102798d60e01b81526004016102ae929190611382565b600085858381811061076f5761076f6113e6565b905060200281019061078191906113fc565b60405161078f92919061130e565b908152602001604051809103902080546107a89061131e565b80601f01602080910402602001604051908101604052809291908181526020018280546107d49061131e565b80156108215780601f106107f657610100808354040283529160200191610821565b820191906000526020600020905b81548152906001019060200180831161080457829003601f168201915b5050505050828281518110610838576108386113e6565b60209081029190910101526001016106bf565b509392505050565b6000805160206115df83398151915261086c8133610a7d565b6000858560405161087e92919061130e565b908152602001604051809103902080546108979061131e565b151590506108bc57848460405163d102798d60e01b81526004016102ae929190611382565b816108de578484604051632b8f831760e01b81526004016102ae929190611382565b82826040516108ee92919061130e565b60405180910390206000868660405161090892919061130e565b90815260405190819003602001812061092091611442565b6040518091039020141561094f57848484846040516331e0c31f60e11b81526004016102ae949392919061139e565b82826000878760405161096392919061130e565b90815260405190819003602001902061097d929091610f9b565b507fb095ed057610c63dba9ab6e5947cac0517b71f68ba2343310bfa26a3d11ad3e68585858560405161045a949392919061139e565b60006103466109c0610b90565b600084815260209190915260409020610bc0565b6109dd8261034c565b6109e78133610a7d565b6104868383610b65565b6109fb8282610636565b610505576001610a09610b16565b6000848152602091825260408082206001600160a01b0386168084529352808220805460ff1916941515949094179093559151339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b600061062f836001600160a01b038416610bca565b610a878282610636565b61050557610a9f816001600160a01b03166014610c19565b610aaa836020610c19565b604051602001610abb9291906114de565b60408051601f198184030181529082905262461bcd60e51b82526102ae91600401611203565b60006001600160e01b03198216637965db0b60e01b148061034657506301ffc9a760e01b6001600160e01b0319831614610346565b7f9a627a5d4aa7c17f87ff26e3fe9a42c2b6c559e8b41a42282d0ecebb17c0e4d390565b610b4482826109f1565b61048681610b50610b90565b60008581526020919091526040902090610a68565b610b6f8282610db4565b61048681610b7b610b90565b60008581526020919091526040902090610e2c565b7f8f8c450dae5029cd48cd91dd9db65da48fb742893edfc7941250f6721d93cbbe90565b600061062f8383610e41565b6000610346825490565b6000818152600183016020526040812054610c1157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610346565b506000610346565b60606000610c28836002611563565b610c33906002611582565b6001600160401b03811115610c4a57610c4a6113d0565b6040519080825280601f01601f191660200182016040528015610c74576020820181803683370190505b509050600360fc1b81600081518110610c8f57610c8f6113e6565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610cbe57610cbe6113e6565b60200101906001600160f81b031916908160001a9053506000610ce2846002611563565b610ced906001611582565b90505b6001811115610d65576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610d2157610d216113e6565b1a60f81b828281518110610d3757610d376113e6565b60200101906001600160f81b031916908160001a90535060049490941c93610d5e8161159a565b9050610cf0565b50831561062f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016102ae565b610dbe8282610636565b15610505576000610dcd610b16565b6000848152602091825260408082206001600160a01b0386168084529352808220805460ff1916941515949094179093559151339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061062f836001600160a01b038416610e6b565b6000826000018281548110610e5857610e586113e6565b9060005260206000200154905092915050565b60008181526001830160205260408120548015610f54576000610e8f6001836115b1565b8554909150600090610ea3906001906115b1565b9050818114610f08576000866000018281548110610ec357610ec36113e6565b9060005260206000200154905080876000018481548110610ee657610ee66113e6565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610f1957610f196115c8565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610346565b6000915050610346565b508054610f6a9061131e565b6000825580601f10610f7a575050565b601f016020900490600052602060002090810190610f98919061101f565b50565b828054610fa79061131e565b90600052602060002090601f016020900481019282610fc9576000855561100f565b82601f10610fe25782800160ff1982351617855561100f565b8280016001018555821561100f579182015b8281111561100f578235825591602001919060010190610ff4565b5061101b92915061101f565b5090565b5b8082111561101b5760008155600101611020565b60008083601f84011261104657600080fd5b5081356001600160401b0381111561105d57600080fd5b60208301915083602082850101111561107557600080fd5b9250929050565b6000806020838503121561108f57600080fd5b82356001600160401b038111156110a557600080fd5b6110b185828601611034565b90969095509350505050565b6000602082840312156110cf57600080fd5b81356001600160e01b03198116811461062f57600080fd5b6000602082840312156110f957600080fd5b5035919050565b6000806000806040858703121561111657600080fd5b84356001600160401b038082111561112d57600080fd5b61113988838901611034565b9096509450602087013591508082111561115257600080fd5b5061115f87828801611034565b95989497509550505050565b6000806040838503121561117e57600080fd5b8235915060208301356001600160a01b038116811461119c57600080fd5b809150509250929050565b60005b838110156111c25781810151838201526020016111aa565b838111156111d1576000848401525b50505050565b600081518084526111ef8160208601602086016111a7565b601f01601f19169290920160200192915050565b60208152600061062f60208301846111d7565b6000806040838503121561122957600080fd5b50508035926020909101359150565b6000806020838503121561124b57600080fd5b82356001600160401b038082111561126257600080fd5b818501915085601f83011261127657600080fd5b81358181111561128557600080fd5b8660208260051b850101111561129a57600080fd5b60209290920196919550909350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561130157603f198886030184526112ef8583516111d7565b945092850192908501906001016112d3565b5092979650505050505050565b8183823760009101908152919050565b600181811c9082168061133257607f821691505b6020821081141561135357634e487b7160e01b600052602260045260246000fd5b50919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000611396602083018486611359565b949350505050565b6040815260006113b2604083018688611359565b82810360208401526113c5818587611359565b979650505050505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261141357600080fd5b8301803591506001600160401b0382111561142d57600080fd5b60200191503681900382131561107557600080fd5b600080835481600182811c91508083168061145e57607f831692505b602080841082141561147e57634e487b7160e01b86526022600452602486fd5b81801561149257600181146114a3576114d0565b60ff198616895284890196506114d0565b60008a81526020902060005b868110156114c85781548b8201529085019083016114af565b505084890196505b509498975050505050505050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516115108160178501602088016111a7565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516115418160288401602088016111a7565b01602801949350505050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561157d5761157d61154d565b500290565b600082198211156115955761159561154d565b500190565b6000816115a9576115a961154d565b506000190190565b6000828210156115c3576115c361154d565b500390565b634e487b7160e01b600052603160045260246000fdfebbfb55d933c2bfa638763473275b1d84c4418e58d26cf9d2cd5758237756d9f0a2646970667358221220d2516f8e16a11b3d2c0cc0110d1fd58fa6bd14a6b359e838d5a1f9d91a4bc83464736f6c63430008090033