Contract Address Details

0x6d28afD25a1FBC5409B1BeFFf6AEfEEe2902D89F

Contract Name
TimelockController
Creator
0x4c0e79–9cea42 at 0xf2376a–112dca
Balance
0 AVAX
Tokens
Fetching tokens...
Transactions
Transfers
Gas Used
Last Balance Update
6203322
Contract name:
TimelockController




Optimization enabled
false
Compiler version
v0.6.12+commit.27d51765




EVM Version
default




Verified at
2021-06-01 21:17:17.427115Z

Constructor Arguments

00000000000000000000000000000000000000000000000000000000000151800000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
              

Contract source code

// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/math/SafeMath.sol
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b > a) return (false, 0);
return (true, a - b);
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a / b);
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a % b);
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) return 0;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv}.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a % b;
}
}
// File: @openzeppelin/contracts/utils/EnumerableSet.sol
pragma solidity >=0.6.0 <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;
// When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
// so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.
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] = toDeleteIndex + 1; // All indexes are 1-based
// 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) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
// 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);
}
// 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))));
}
// 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));
}
}
// File: @openzeppelin/contracts/utils/Address.sol
pragma solidity >=0.6.2 <0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// File: @openzeppelin/contracts/utils/Context.sol
pragma solidity >=0.6.0 <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 GSN 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 payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
// File: @openzeppelin/contracts/access/AccessControl.sol
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* 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 {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @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 {_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) public view returns (bool) {
return _roles[role].members.contains(account);
}
/**
* @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 returns (uint256) {
return _roles[role].members.length();
}
/**
* @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 returns (address) {
return _roles[role].members.at(index);
}
/**
* @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 returns (bytes32) {
return _roles[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 {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");
_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 {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");
_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 granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual {
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}.
* ====
*/
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 {
emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
_roles[role].adminRole = adminRole;
}
function _grantRole(bytes32 role, address account) private {
if (_roles[role].members.add(account)) {
emit RoleGranted(role, account, _msgSender());
}
}
function _revokeRole(bytes32 role, address account) private {
if (_roles[role].members.remove(account)) {
emit RoleRevoked(role, account, _msgSender());
}
}
}
// File: @openzeppelin/contracts/access/TimelockController.sol
pragma solidity >=0.6.9 <0.8.0;
pragma experimental ABIEncoderV2;
/**
* @dev Contract module which acts as a timelocked controller. When set as the
* owner of an `Ownable` smart contract, it enforces a timelock on all
* `onlyOwner` maintenance operations. This gives time for users of the
* controlled contract to exit before a potentially dangerous maintenance
* operation is applied.
*
* By default, this contract is self administered, meaning administration tasks
* have to go through the timelock process. The proposer (resp executor) role
* is in charge of proposing (resp executing) operations. A common use case is
* to position this {TimelockController} as the owner of a smart contract, with
* a multisig or a DAO as the sole proposer.
*
* _Available since v3.3._
*/
contract TimelockController is AccessControl {
bytes32 public constant TIMELOCK_ADMIN_ROLE = keccak256("TIMELOCK_ADMIN_ROLE");
bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE");
bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE");
uint256 internal constant _DONE_TIMESTAMP = uint256(1);
mapping(bytes32 => uint256) private _timestamps;
uint256 private _minDelay;
/**
* @dev Emitted when a call is scheduled as part of operation `id`.
*/
event CallScheduled(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data, bytes32 predecessor, uint256 delay);
/**
* @dev Emitted when a call is performed as part of operation `id`.
*/
event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data);
/**
* @dev Emitted when operation `id` is cancelled.
*/
event Cancelled(bytes32 indexed id);
/**
* @dev Emitted when the minimum delay for future operations is modified.
*/
event MinDelayChange(uint256 oldDuration, uint256 newDuration);
/**
* @dev Initializes the contract with a given `minDelay`.
*/
constructor(uint256 minDelay, address[] memory proposers, address[] memory executors) public {
_setRoleAdmin(TIMELOCK_ADMIN_ROLE, TIMELOCK_ADMIN_ROLE);
_setRoleAdmin(PROPOSER_ROLE, TIMELOCK_ADMIN_ROLE);
_setRoleAdmin(EXECUTOR_ROLE, TIMELOCK_ADMIN_ROLE);
// deployer + self administration
_setupRole(TIMELOCK_ADMIN_ROLE, _msgSender());
_setupRole(TIMELOCK_ADMIN_ROLE, address(this));
// register proposers
for (uint256 i = 0; i < proposers.length; ++i) {
_setupRole(PROPOSER_ROLE, proposers[i]);
}
// register executors
for (uint256 i = 0; i < executors.length; ++i) {
_setupRole(EXECUTOR_ROLE, executors[i]);
}
_minDelay = minDelay;
emit MinDelayChange(0, minDelay);
}
/**
* @dev Modifier to make a function callable only by a certain role. In
* addition to checking the sender's role, `address(0)` 's role is also
* considered. Granting a role to `address(0)` is equivalent to enabling
* this role for everyone.
*/
modifier onlyRole(bytes32 role) {
require(hasRole(role, _msgSender()) || hasRole(role, address(0)), "TimelockController: sender requires permission");
_;
}
/**
* @dev Contract might receive/hold ETH as part of the maintenance process.
*/
receive() external payable {}
/**
* @dev Returns whether an id correspond to a registered operation. This
* includes both Pending, Ready and Done operations.
*/
function isOperation(bytes32 id) public view virtual returns (bool pending) {
return getTimestamp(id) > 0;
}
/**
* @dev Returns whether an operation is pending or not.
*/
function isOperationPending(bytes32 id) public view virtual returns (bool pending) {
return getTimestamp(id) > _DONE_TIMESTAMP;
}
/**
* @dev Returns whether an operation is ready or not.
*/
function isOperationReady(bytes32 id) public view virtual returns (bool ready) {
uint256 timestamp = getTimestamp(id);
// solhint-disable-next-line not-rely-on-time
return timestamp > _DONE_TIMESTAMP && timestamp <= block.timestamp;
}
/**
* @dev Returns whether an operation is done or not.
*/
function isOperationDone(bytes32 id) public view virtual returns (bool done) {
return getTimestamp(id) == _DONE_TIMESTAMP;
}
/**
* @dev Returns the timestamp at with an operation becomes ready (0 for
* unset operations, 1 for done operations).
*/
function getTimestamp(bytes32 id) public view virtual returns (uint256 timestamp) {
return _timestamps[id];
}
/**
* @dev Returns the minimum delay for an operation to become valid.
*
* This value can be changed by executing an operation that calls `updateDelay`.
*/
function getMinDelay() public view virtual returns (uint256 duration) {
return _minDelay;
}
/**
* @dev Returns the identifier of an operation containing a single
* transaction.
*/
function hashOperation(address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt) public pure virtual returns (bytes32 hash) {
return keccak256(abi.encode(target, value, data, predecessor, salt));
}
/**
* @dev Returns the identifier of an operation containing a batch of
* transactions.
*/
function hashOperationBatch(address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt) public pure virtual returns (bytes32 hash) {
return keccak256(abi.encode(targets, values, datas, predecessor, salt));
}
/**
* @dev Schedule an operation containing a single transaction.
*
* Emits a {CallScheduled} event.
*
* Requirements:
*
* - the caller must have the 'proposer' role.
*/
function schedule(address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt, uint256 delay) public virtual onlyRole(PROPOSER_ROLE) {
bytes32 id = hashOperation(target, value, data, predecessor, salt);
_schedule(id, delay);
emit CallScheduled(id, 0, target, value, data, predecessor, delay);
}
/**
* @dev Schedule an operation containing a batch of transactions.
*
* Emits one {CallScheduled} event per transaction in the batch.
*
* Requirements:
*
* - the caller must have the 'proposer' role.
*/
function scheduleBatch(address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt, uint256 delay) public virtual onlyRole(PROPOSER_ROLE) {
require(targets.length == values.length, "TimelockController: length mismatch");
require(targets.length == datas.length, "TimelockController: length mismatch");
bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt);
_schedule(id, delay);
for (uint256 i = 0; i < targets.length; ++i) {
emit CallScheduled(id, i, targets[i], values[i], datas[i], predecessor, delay);
}
}
/**
* @dev Schedule an operation that is to becomes valid after a given delay.
*/
function _schedule(bytes32 id, uint256 delay) private {
require(!isOperation(id), "TimelockController: operation already scheduled");
require(delay >= getMinDelay(), "TimelockController: insufficient delay");
// solhint-disable-next-line not-rely-on-time
_timestamps[id] = SafeMath.add(block.timestamp, delay);
}
/**
* @dev Cancel an operation.
*
* Requirements:
*
* - the caller must have the 'proposer' role.
*/
function cancel(bytes32 id) public virtual onlyRole(PROPOSER_ROLE) {
require(isOperationPending(id), "TimelockController: operation cannot be cancelled");
delete _timestamps[id];
emit Cancelled(id);
}
/**
* @dev Execute an (ready) operation containing a single transaction.
*
* Emits a {CallExecuted} event.
*
* Requirements:
*
* - the caller must have the 'executor' role.
*/
function execute(address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt) public payable virtual onlyRole(EXECUTOR_ROLE) {
bytes32 id = hashOperation(target, value, data, predecessor, salt);
_beforeCall(predecessor);
_call(id, 0, target, value, data);
_afterCall(id);
}
/**
* @dev Execute an (ready) operation containing a batch of transactions.
*
* Emits one {CallExecuted} event per transaction in the batch.
*
* Requirements:
*
* - the caller must have the 'executor' role.
*/
function executeBatch(address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt) public payable virtual onlyRole(EXECUTOR_ROLE) {
require(targets.length == values.length, "TimelockController: length mismatch");
require(targets.length == datas.length, "TimelockController: length mismatch");
bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt);
_beforeCall(predecessor);
for (uint256 i = 0; i < targets.length; ++i) {
_call(id, i, targets[i], values[i], datas[i]);
}
_afterCall(id);
}
/**
* @dev Checks before execution of an operation's calls.
*/
function _beforeCall(bytes32 predecessor) private view {
require(predecessor == bytes32(0) || isOperationDone(predecessor), "TimelockController: missing dependency");
}
/**
* @dev Checks after execution of an operation's calls.
*/
function _afterCall(bytes32 id) private {
require(isOperationReady(id), "TimelockController: operation is not ready");
_timestamps[id] = _DONE_TIMESTAMP;
}
/**
* @dev Execute an operation's call.
*
* Emits a {CallExecuted} event.
*/
function _call(bytes32 id, uint256 index, address target, uint256 value, bytes calldata data) private {
// solhint-disable-next-line avoid-low-level-calls
(bool success,) = target.call{value: value}(data);
require(success, "TimelockController: underlying transaction reverted");
emit CallExecuted(id, index, target, value, data);
}
/**
* @dev Changes the minimum timelock duration for future operations.
*
* Emits a {MinDelayChange} event.
*
* Requirements:
*
* - the caller must be the timelock itself. This can only be achieved by scheduling and later executing
* an operation where the timelock is the target and the data is the ABI-encoded call to this function.
*/
function updateDelay(uint256 newDelay) external virtual {
require(msg.sender == address(this), "TimelockController: caller must be timelock");
emit MinDelayChange(_minDelay, newDelay);
_minDelay = newDelay;
}
}

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"uint256","name":"minDelay","internalType":"uint256"},{"type":"address[]","name":"proposers","internalType":"address[]"},{"type":"address[]","name":"executors","internalType":"address[]"}]},{"type":"event","name":"CallExecuted","inputs":[{"type":"bytes32","name":"id","internalType":"bytes32","indexed":true},{"type":"uint256","name":"index","internalType":"uint256","indexed":true},{"type":"address","name":"target","internalType":"address","indexed":false},{"type":"uint256","name":"value","internalType":"uint256","indexed":false},{"type":"bytes","name":"data","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"CallScheduled","inputs":[{"type":"bytes32","name":"id","internalType":"bytes32","indexed":true},{"type":"uint256","name":"index","internalType":"uint256","indexed":true},{"type":"address","name":"target","internalType":"address","indexed":false},{"type":"uint256","name":"value","internalType":"uint256","indexed":false},{"type":"bytes","name":"data","internalType":"bytes","indexed":false},{"type":"bytes32","name":"predecessor","internalType":"bytes32","indexed":false},{"type":"uint256","name":"delay","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Cancelled","inputs":[{"type":"bytes32","name":"id","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"MinDelayChange","inputs":[{"type":"uint256","name":"oldDuration","internalType":"uint256","indexed":false},{"type":"uint256","name":"newDuration","internalType":"uint256","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":"DEFAULT_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"EXECUTOR_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"PROPOSER_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"TIMELOCK_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cancel","inputs":[{"type":"bytes32","name":"id","internalType":"bytes32"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"execute","inputs":[{"type":"address","name":"target","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"},{"type":"bytes32","name":"predecessor","internalType":"bytes32"},{"type":"bytes32","name":"salt","internalType":"bytes32"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"executeBatch","inputs":[{"type":"address[]","name":"targets","internalType":"address[]"},{"type":"uint256[]","name":"values","internalType":"uint256[]"},{"type":"bytes[]","name":"datas","internalType":"bytes[]"},{"type":"bytes32","name":"predecessor","internalType":"bytes32"},{"type":"bytes32","name":"salt","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"duration","internalType":"uint256"}],"name":"getMinDelay","inputs":[]},{"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":"view","outputs":[{"type":"uint256","name":"timestamp","internalType":"uint256"}],"name":"getTimestamp","inputs":[{"type":"bytes32","name":"id","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":"pure","outputs":[{"type":"bytes32","name":"hash","internalType":"bytes32"}],"name":"hashOperation","inputs":[{"type":"address","name":"target","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"},{"type":"bytes32","name":"predecessor","internalType":"bytes32"},{"type":"bytes32","name":"salt","internalType":"bytes32"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"bytes32","name":"hash","internalType":"bytes32"}],"name":"hashOperationBatch","inputs":[{"type":"address[]","name":"targets","internalType":"address[]"},{"type":"uint256[]","name":"values","internalType":"uint256[]"},{"type":"bytes[]","name":"datas","internalType":"bytes[]"},{"type":"bytes32","name":"predecessor","internalType":"bytes32"},{"type":"bytes32","name":"salt","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"pending","internalType":"bool"}],"name":"isOperation","inputs":[{"type":"bytes32","name":"id","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"done","internalType":"bool"}],"name":"isOperationDone","inputs":[{"type":"bytes32","name":"id","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"pending","internalType":"bool"}],"name":"isOperationPending","inputs":[{"type":"bytes32","name":"id","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"ready","internalType":"bool"}],"name":"isOperationReady","inputs":[{"type":"bytes32","name":"id","internalType":"bytes32"}]},{"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":"schedule","inputs":[{"type":"address","name":"target","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"},{"type":"bytes32","name":"predecessor","internalType":"bytes32"},{"type":"bytes32","name":"salt","internalType":"bytes32"},{"type":"uint256","name":"delay","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"scheduleBatch","inputs":[{"type":"address[]","name":"targets","internalType":"address[]"},{"type":"uint256[]","name":"values","internalType":"uint256[]"},{"type":"bytes[]","name":"datas","internalType":"bytes[]"},{"type":"bytes32","name":"predecessor","internalType":"bytes32"},{"type":"bytes32","name":"salt","internalType":"bytes32"},{"type":"uint256","name":"delay","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateDelay","inputs":[{"type":"uint256","name":"newDelay","internalType":"uint256"}]},{"type":"receive","stateMutability":"payable"}]
            

Deployed ByteCode

0x60806040526004361061016a5760003560e01c80638065657f116100d1578063b1c5f4271161008a578063d45c443511610064578063d45c443514610596578063d547741f146105d3578063e38335e5146105fc578063f27a0c921461061857610171565b8063b1c5f427146104f3578063c4d252f514610530578063ca15c8731461055957610171565b80638065657f146103bd5780638f2a0bb0146103fa5780638f61f4f5146104235780639010d07c1461044e57806391d148541461048b578063a217fddf146104c857610171565b80632ab0f529116101235780632ab0f5291461028b5780632f2ff15d146102c857806331d50750146102f157806336568abe1461032e578063584b153e1461035757806364d623531461039457610171565b806301d5062a1461017657806307bd02651461019f5780630d3cf6fc146101ca578063134008d3146101f557806313bc9f2014610211578063248a9ca31461024e57610171565b3661017157005b600080fd5b34801561018257600080fd5b5061019d600480360381019061019891906119b5565b610643565b005b3480156101ab57600080fd5b506101b4610731565b6040516101c19190612617565b60405180910390f35b3480156101d657600080fd5b506101df610755565b6040516101ec9190612617565b60405180910390f35b61020f600480360381019061020a9190611923565b610779565b005b34801561021d57600080fd5b5061023860048036038101906102339190611c07565b610839565b60405161024591906125fc565b60405180910390f35b34801561025a57600080fd5b5061027560048036038101906102709190611c07565b61085f565b6040516102829190612617565b60405180910390f35b34801561029757600080fd5b506102b260048036038101906102ad9190611c07565b61087e565b6040516102bf91906125fc565b60405180910390f35b3480156102d457600080fd5b506102ef60048036038101906102ea9190611c30565b610893565b005b3480156102fd57600080fd5b5061031860048036038101906103139190611c07565b610906565b60405161032591906125fc565b60405180910390f35b34801561033a57600080fd5b5061035560048036038101906103509190611c30565b61091a565b005b34801561036357600080fd5b5061037e60048036038101906103799190611c07565b61099d565b60405161038b91906125fc565b60405180910390f35b3480156103a057600080fd5b506103bb60048036038101906103b69190611ca8565b6109b2565b005b3480156103c957600080fd5b506103e460048036038101906103df9190611923565b610a65565b6040516103f19190612617565b60405180910390f35b34801561040657600080fd5b50610421600480360381019061041c9190611b28565b610aa4565b005b34801561042f57600080fd5b50610438610c8d565b6040516104459190612617565b60405180910390f35b34801561045a57600080fd5b5061047560048036038101906104709190611c6c565b610cb1565b604051610482919061247b565b60405180910390f35b34801561049757600080fd5b506104b260048036038101906104ad9190611c30565b610ce2565b6040516104bf91906125fc565b60405180910390f35b3480156104d457600080fd5b506104dd610d13565b6040516104ea9190612617565b60405180910390f35b3480156104ff57600080fd5b5061051a60048036038101906105159190611a5c565b610d1a565b6040516105279190612617565b60405180910390f35b34801561053c57600080fd5b5061055760048036038101906105529190611c07565b610d5f565b005b34801561056557600080fd5b50610580600480360381019061057b9190611c07565b610e72565b60405161058d91906127f2565b60405180910390f35b3480156105a257600080fd5b506105bd60048036038101906105b89190611c07565b610e98565b6040516105ca91906127f2565b60405180910390f35b3480156105df57600080fd5b506105fa60048036038101906105f59190611c30565b610eb5565b005b61061660048036038101906106119190611a5c565b610f28565b005b34801561062457600080fd5b5061062d6110e3565b60405161063a91906127f2565b60405180910390f35b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc16106758161067061111d565b610ce2565b806106875750610686816000610ce2565b5b6106c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106bd906126b2565b60405180910390fd5b60006106d6898989898989610a65565b90506106e28184611125565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161071e96959493929190612532565b60405180910390a3505050505050505050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b7f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e636107ab816107a661111d565b610ce2565b806107bd57506107bc816000610ce2565b5b6107fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f3906126b2565b60405180910390fd5b600061080c888888888888610a65565b9050610817846111dd565b6108268160008a8a8a8a611235565b61082f8161132d565b5050505050505050565b60008061084583610e98565b90506001811180156108575750428111155b915050919050565b6000806000838152602001908152602001600020600201549050919050565b6000600161088b83610e98565b149050919050565b6108b9600080848152602001908152602001600020600201546108b461111d565b610ce2565b6108f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ef90612672565b60405180910390fd5b6109028282611390565b5050565b60008061091283610e98565b119050919050565b61092261111d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461098f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610986906127b2565b60405180910390fd5b6109998282611423565b5050565b600060016109aa83610e98565b119050919050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1790612792565b60405180910390fd5b7f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d560025482604051610a5392919061280d565b60405180910390a18060028190555050565b6000868686868686604051602001610a82969594939291906124d6565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1610ad681610ad161111d565b610ce2565b80610ae85750610ae7816000610ce2565b5b610b27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1e906126b2565b60405180910390fd5b878790508a8a905014610b6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6690612692565b60405180910390fd5b858590508a8a905014610bb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bae90612692565b60405180910390fd5b6000610bc98b8b8b8b8b8b8b8b610d1a565b9050610bd58184611125565b60005b8b8b9050811015610c7f5780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610c1257fe5b9050602002016020810190610c2791906118fa565b8d8d86818110610c3357fe5b905060200201358c8c87818110610c4657fe5b9050602002810190610c589190612836565b8c8b604051610c6c96959493929190612532565b60405180910390a3806001019050610bd8565b505050505050505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b6000610cda826000808681526020019081526020016000206000016114b690919063ffffffff16565b905092915050565b6000610d0b826000808681526020019081526020016000206000016114d090919063ffffffff16565b905092915050565b6000801b81565b60008888888888888888604051602001610d3b98979695949392919061258e565b60405160208183030381529060405280519060200120905098975050505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1610d9181610d8c61111d565b610ce2565b80610da35750610da2816000610ce2565b5b610de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd9906126b2565b60405180910390fd5b610deb8261099d565b610e2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2190612772565b60405180910390fd5b6001600083815260200190815260200160002060009055817fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7060405160405180910390a25050565b6000610e91600080848152602001908152602001600020600001611500565b9050919050565b600060016000838152602001908152602001600020549050919050565b610edb60008084815260200190815260200160002060020154610ed661111d565b610ce2565b610f1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f11906126f2565b60405180910390fd5b610f248282611423565b5050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610f5a81610f5561111d565b610ce2565b80610f6c5750610f6b816000610ce2565b5b610fab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa2906126b2565b60405180910390fd5b868690508989905014610ff3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fea90612692565b60405180910390fd5b84849050898990501461103b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103290612692565b60405180910390fd5b600061104d8a8a8a8a8a8a8a8a610d1a565b9050611058846111dd565b60005b8a8a90508110156110cd576110c282828d8d8581811061107757fe5b905060200201602081019061108c91906118fa565b8c8c8681811061109857fe5b905060200201358b8b878181106110ab57fe5b90506020028101906110bd9190612836565b611235565b80600101905061105b565b506110d78161132d565b50505050505050505050565b6000600254905090565b6000611115836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611515565b905092915050565b600033905090565b61112e82610906565b1561116e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116590612732565b60405180910390fd5b6111766110e3565b8110156111b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111af90612712565b60405180910390fd5b6111c24282611585565b60016000848152602001908152602001600020819055505050565b6000801b8114806111f357506111f28161087e565b5b611232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122990612652565b60405180910390fd5b50565b60008473ffffffffffffffffffffffffffffffffffffffff1684848460405161125f929190612462565b60006040518083038185875af1925050503d806000811461129c576040519150601f19603f3d011682016040523d82523d6000602084013e6112a1565b606091505b50509050806112e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112dc906127d2565b60405180910390fd5b85877fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588787878760405161131c9493929190612496565b60405180910390a350505050505050565b61133681610839565b611375576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136c90612752565b60405180910390fd5b60018060008381526020019081526020016000208190555050565b6113b7816000808581526020019081526020016000206000016110ed90919063ffffffff16565b1561141f576113c461111d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b61144a816000808581526020019081526020016000206000016115da90919063ffffffff16565b156114b25761145761111d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b60006114c5836000018361160a565b60001c905092915050565b60006114f8836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611677565b905092915050565b600061150e8260000161169a565b9050919050565b60006115218383611677565b61157a57826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905061157f565b600090505b92915050565b6000808284019050838110156115d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c7906126d2565b60405180910390fd5b8091505092915050565b6000611602836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6116ab565b905092915050565b600081836000018054905011611655576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164c90612632565b60405180910390fd5b82600001828154811061166457fe5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b600081600001805490509050919050565b6000808360010160008481526020019081526020016000205490506000811461178757600060018203905060006001866000018054905003905060008660000182815481106116f657fe5b906000526020600020015490508087600001848154811061171357fe5b906000526020600020018190555060018301876001016000838152602001908152602001600020819055508660000180548061174b57fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061178d565b60009150505b92915050565b6000813590506117a281612a0c565b92915050565b60008083601f8401126117ba57600080fd5b8235905067ffffffffffffffff8111156117d357600080fd5b6020830191508360208202830111156117eb57600080fd5b9250929050565b60008083601f84011261180457600080fd5b8235905067ffffffffffffffff81111561181d57600080fd5b60208301915083602082028301111561183557600080fd5b9250929050565b60008083601f84011261184e57600080fd5b8235905067ffffffffffffffff81111561186757600080fd5b60208301915083602082028301111561187f57600080fd5b9250929050565b60008135905061189581612a23565b92915050565b60008083601f8401126118ad57600080fd5b8235905067ffffffffffffffff8111156118c657600080fd5b6020830191508360018202830111156118de57600080fd5b9250929050565b6000813590506118f481612a3a565b92915050565b60006020828403121561190c57600080fd5b600061191a84828501611793565b91505092915050565b60008060008060008060a0878903121561193c57600080fd5b600061194a89828a01611793565b965050602061195b89828a016118e5565b955050604087013567ffffffffffffffff81111561197857600080fd5b61198489828a0161189b565b9450945050606061199789828a01611886565b92505060806119a889828a01611886565b9150509295509295509295565b600080600080600080600060c0888a0312156119d057600080fd5b60006119de8a828b01611793565b97505060206119ef8a828b016118e5565b965050604088013567ffffffffffffffff811115611a0c57600080fd5b611a188a828b0161189b565b95509550506060611a2b8a828b01611886565b9350506080611a3c8a828b01611886565b92505060a0611a4d8a828b016118e5565b91505092959891949750929550565b60008060008060008060008060a0898b031215611a7857600080fd5b600089013567ffffffffffffffff811115611a9257600080fd5b611a9e8b828c016117a8565b9850985050602089013567ffffffffffffffff811115611abd57600080fd5b611ac98b828c0161183c565b9650965050604089013567ffffffffffffffff811115611ae857600080fd5b611af48b828c016117f2565b94509450506060611b078b828c01611886565b9250506080611b188b828c01611886565b9150509295985092959890939650565b600080600080600080600080600060c08a8c031215611b4657600080fd5b60008a013567ffffffffffffffff811115611b6057600080fd5b611b6c8c828d016117a8565b995099505060208a013567ffffffffffffffff811115611b8b57600080fd5b611b978c828d0161183c565b975097505060408a013567ffffffffffffffff811115611bb657600080fd5b611bc28c828d016117f2565b95509550506060611bd58c828d01611886565b9350506080611be68c828d01611886565b92505060a0611bf78c828d016118e5565b9150509295985092959850929598565b600060208284031215611c1957600080fd5b6000611c2784828501611886565b91505092915050565b60008060408385031215611c4357600080fd5b6000611c5185828601611886565b9250506020611c6285828601611793565b9150509250929050565b60008060408385031215611c7f57600080fd5b6000611c8d85828601611886565b9250506020611c9e858286016118e5565b9150509250929050565b600060208284031215611cba57600080fd5b6000611cc8848285016118e5565b91505092915050565b6000611cdd8383611cff565b60208301905092915050565b6000611cf6848484611e66565b90509392505050565b611d088161299a565b82525050565b611d178161299a565b82525050565b6000611d2983856128bb565b9350611d348261288d565b8060005b85811015611d6d57611d4a828461292c565b611d548882611cd1565b9750611d5f836128a1565b925050600181019050611d38565b5085925050509392505050565b6000611d8683856128cc565b935083602084028501611d9884612897565b8060005b87811015611dde578484038952611db38284612943565b611dbe868284611ce9565b9550611dc9846128ae565b935060208b019a505050600181019050611d9c565b50829750879450505050509392505050565b6000611dfc83856128dd565b93507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115611e2b57600080fd5b602083029250611e3c8385846129ec565b82840190509392505050565b611e51816129ac565b82525050565b611e60816129b8565b82525050565b6000611e7283856128ee565b9350611e7f8385846129ec565b611e88836129fb565b840190509392505050565b6000611e9f83856128ff565b9350611eac8385846129ec565b611eb5836129fb565b840190509392505050565b6000611ecc8385612910565b9350611ed98385846129ec565b82840190509392505050565b6000611ef260228361291b565b91507f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60008301527f64730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611f5860268361291b565b91507f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e67206465706560008301527f6e64656e637900000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611fbe602f8361291b565b91507f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008301527f2061646d696e20746f206772616e7400000000000000000000000000000000006020830152604082019050919050565b600061202460238361291b565b91507f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d6160008301527f74636800000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061208a602e8361291b565b91507f54696d656c6f636b436f6e74726f6c6c65723a2073656e64657220726571756960008301527f726573207065726d697373696f6e0000000000000000000000000000000000006020830152604082019050919050565b60006120f0601b8361291b565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b600061213060308361291b565b91507f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008301527f2061646d696e20746f207265766f6b65000000000000000000000000000000006020830152604082019050919050565b600061219660268361291b565b91507f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e7460008301527f2064656c617900000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006121fc602f8361291b565b91507f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60008301527f7265616479207363686564756c656400000000000000000000000000000000006020830152604082019050919050565b6000612262602a8361291b565b91507f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20697360008301527f206e6f74207265616479000000000000000000000000000000000000000000006020830152604082019050919050565b60006122c860318361291b565b91507f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20636160008301527f6e6e6f742062652063616e63656c6c65640000000000000000000000000000006020830152604082019050919050565b600061232e602b8361291b565b91507f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060008301527f62652074696d656c6f636b0000000000000000000000000000000000000000006020830152604082019050919050565b6000612394602f8361291b565b91507f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008301527f20726f6c657320666f722073656c6600000000000000000000000000000000006020830152604082019050919050565b60006123fa60338361291b565b91507f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e67207460008301527f72616e73616374696f6e207265766572746564000000000000000000000000006020830152604082019050919050565b61245c816129e2565b82525050565b600061246f828486611ec0565b91508190509392505050565b60006020820190506124906000830184611d0e565b92915050565b60006060820190506124ab6000830187611d0e565b6124b86020830186612453565b81810360408301526124cb818486611e93565b905095945050505050565b600060a0820190506124eb6000830189611d0e565b6124f86020830188612453565b818103604083015261250b818688611e93565b905061251a6060830185611e57565b6125276080830184611e57565b979650505050505050565b600060a0820190506125476000830189611d0e565b6125546020830188612453565b8181036040830152612567818688611e93565b90506125766060830185611e57565b6125836080830184612453565b979650505050505050565b600060a08201905081810360008301526125a9818a8c611d1d565b905081810360208301526125be81888a611df0565b905081810360408301526125d3818688611d7a565b90506125e26060830185611e57565b6125ef6080830184611e57565b9998505050505050505050565b60006020820190506126116000830184611e48565b92915050565b600060208201905061262c6000830184611e57565b92915050565b6000602082019050818103600083015261264b81611ee5565b9050919050565b6000602082019050818103600083015261266b81611f4b565b9050919050565b6000602082019050818103600083015261268b81611fb1565b9050919050565b600060208201905081810360008301526126ab81612017565b9050919050565b600060208201905081810360008301526126cb8161207d565b9050919050565b600060208201905081810360008301526126eb816120e3565b9050919050565b6000602082019050818103600083015261270b81612123565b9050919050565b6000602082019050818103600083015261272b81612189565b9050919050565b6000602082019050818103600083015261274b816121ef565b9050919050565b6000602082019050818103600083015261276b81612255565b9050919050565b6000602082019050818103600083015261278b816122bb565b9050919050565b600060208201905081810360008301526127ab81612321565b9050919050565b600060208201905081810360008301526127cb81612387565b9050919050565b600060208201905081810360008301526127eb816123ed565b9050919050565b60006020820190506128076000830184612453565b92915050565b60006040820190506128226000830185612453565b61282f6020830184612453565b9392505050565b6000808335600160200384360303811261284f57600080fd5b80840192508235915067ffffffffffffffff82111561286d57600080fd5b60208301925060018202360383131561288557600080fd5b509250929050565b6000819050919050565b6000819050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061293b6020840184611793565b905092915050565b6000808335600160200384360303811261295c57600080fd5b83810192508235915060208301925067ffffffffffffffff82111561298057600080fd5b60018202360384131561299257600080fd5b509250929050565b60006129a5826129c2565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b6000601f19601f8301169050919050565b612a158161299a565b8114612a2057600080fd5b50565b612a2c816129b8565b8114612a3757600080fd5b50565b612a43816129e2565b8114612a4e57600080fd5b5056fea26469706673582212200aa1981c3ff8d8bbfacd3629002a2f0aeb5d84fcf31680e461d30da9f668f06964736f6c634300060c0033