Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 8 from a total of 8 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Approve | 20981416 | 113 days ago | IN | 0 ETH | 0.00056149 | ||||
Approve | 20981416 | 113 days ago | IN | 0 ETH | 0.00065589 | ||||
Approve | 20981416 | 113 days ago | IN | 0 ETH | 0.00065673 | ||||
Approve | 20981414 | 113 days ago | IN | 0 ETH | 0.00067189 | ||||
Approve | 20981414 | 113 days ago | IN | 0 ETH | 0.00161715 | ||||
Approve | 20981414 | 113 days ago | IN | 0 ETH | 0.00757229 | ||||
Approve | 20981404 | 113 days ago | IN | 0 ETH | 0.00061045 | ||||
Approve | 20981398 | 113 days ago | IN | 0 ETH | 0.00044942 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
EtherWorldGovernanceToken
Compiler Version
v0.8.28+commit.7893614a
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // Compatible with OpenZeppelin Contracts ^5.0.0 pragma solidity ^0.8.20; import "@openzeppelin/[email protected]/token/ERC20/ERC20.sol"; import "@openzeppelin/[email protected]/token/ERC20/extensions/ERC20Permit.sol"; import "@openzeppelin/[email protected]/token/ERC20/extensions/ERC20Votes.sol"; import "@openzeppelin/[email protected]/access/manager/AccessManaged.sol"; contract EtherWorldGovernanceToken is ERC20, ERC20Permit, ERC20Votes, AccessManaged { constructor(address initialAuthority) ERC20("EtherWorld Governance Token", "eWGovernor") ERC20Permit("EtherWorld Governance Token") AccessManaged(initialAuthority) { _mint(msg.sender, 600000 * 10 ** decimals()); } function _update(address from, address to, uint256 value) internal override(ERC20, ERC20Votes) { super._update(from, to, value); } function nonces(address owner) public view override(ERC20Permit, Nonces) returns (uint256) { return super.nonces(owner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/manager/AccessManaged.sol) pragma solidity ^0.8.20; import {IAuthority} from "./IAuthority.sol"; import {AuthorityUtils} from "./AuthorityUtils.sol"; import {IAccessManager} from "./IAccessManager.sol"; import {IAccessManaged} from "./IAccessManaged.sol"; import {Context} from "../../utils/Context.sol"; /** * @dev This contract module makes available a {restricted} modifier. Functions decorated with this modifier will be * permissioned according to an "authority": a contract like {AccessManager} that follows the {IAuthority} interface, * implementing a policy that allows certain callers to access certain functions. * * IMPORTANT: The `restricted` modifier should never be used on `internal` functions, judiciously used in `public` * functions, and ideally only used in `external` functions. See {restricted}. */ abstract contract AccessManaged is Context, IAccessManaged { address private _authority; bool private _consumingSchedule; /** * @dev Initializes the contract connected to an initial authority. */ constructor(address initialAuthority) { _setAuthority(initialAuthority); } /** * @dev Restricts access to a function as defined by the connected Authority for this contract and the * caller and selector of the function that entered the contract. * * [IMPORTANT] * ==== * In general, this modifier should only be used on `external` functions. It is okay to use it on `public` * functions that are used as external entry points and are not called internally. Unless you know what you're * doing, it should never be used on `internal` functions. Failure to follow these rules can have critical security * implications! This is because the permissions are determined by the function that entered the contract, i.e. the * function at the bottom of the call stack, and not the function where the modifier is visible in the source code. * ==== * * [WARNING] * ==== * Avoid adding this modifier to the https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`] * function or the https://docs.soliditylang.org/en/v0.8.20/contracts.html#fallback-function[`fallback()`]. These * functions are the only execution paths where a function selector cannot be unambiguosly determined from the calldata * since the selector defaults to `0x00000000` in the `receive()` function and similarly in the `fallback()` function * if no calldata is provided. (See {_checkCanCall}). * * The `receive()` function will always panic whereas the `fallback()` may panic depending on the calldata length. * ==== */ modifier restricted() { _checkCanCall(_msgSender(), _msgData()); _; } /// @inheritdoc IAccessManaged function authority() public view virtual returns (address) { return _authority; } /// @inheritdoc IAccessManaged function setAuthority(address newAuthority) public virtual { address caller = _msgSender(); if (caller != authority()) { revert AccessManagedUnauthorized(caller); } if (newAuthority.code.length == 0) { revert AccessManagedInvalidAuthority(newAuthority); } _setAuthority(newAuthority); } /// @inheritdoc IAccessManaged function isConsumingScheduledOp() public view returns (bytes4) { return _consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0); } /** * @dev Transfers control to a new authority. Internal function with no access restriction. Allows bypassing the * permissions set by the current authority. */ function _setAuthority(address newAuthority) internal virtual { _authority = newAuthority; emit AuthorityUpdated(newAuthority); } /** * @dev Reverts if the caller is not allowed to call the function identified by a selector. Panics if the calldata * is less than 4 bytes long. */ function _checkCanCall(address caller, bytes calldata data) internal virtual { (bool immediate, uint32 delay) = AuthorityUtils.canCallWithDelay( authority(), caller, address(this), bytes4(data[0:4]) ); if (!immediate) { if (delay > 0) { _consumingSchedule = true; IAccessManager(authority()).consumeScheduledOp(caller, data); _consumingSchedule = false; } else { revert AccessManagedUnauthorized(caller); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Votes.sol) pragma solidity ^0.8.20; import {ERC20} from "../ERC20.sol"; import {Votes} from "../../../governance/utils/Votes.sol"; import {Checkpoints} from "../../../utils/structs/Checkpoints.sol"; /** * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's, * and supports token supply up to 2^208^ - 1, while COMP is limited to 2^96^ - 1. * * NOTE: This contract does not provide interface compatibility with Compound's COMP token. * * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting * power can be queried through the public accessors {getVotes} and {getPastVotes}. * * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. */ abstract contract ERC20Votes is ERC20, Votes { /** * @dev Total supply cap has been exceeded, introducing a risk of votes overflowing. */ error ERC20ExceededSafeSupply(uint256 increasedSupply, uint256 cap); /** * @dev Maximum token supply. Defaults to `type(uint208).max` (2^208^ - 1). * * This maximum is enforced in {_update}. It limits the total supply of the token, which is otherwise a uint256, * so that checkpoints can be stored in the Trace208 structure used by {{Votes}}. Increasing this value will not * remove the underlying limitation, and will cause {_update} to fail because of a math overflow in * {_transferVotingUnits}. An override could be used to further restrict the total supply (to a lower value) if * additional logic requires it. When resolving override conflicts on this function, the minimum should be * returned. */ function _maxSupply() internal view virtual returns (uint256) { return type(uint208).max; } /** * @dev Move voting power when tokens are transferred. * * Emits a {IVotes-DelegateVotesChanged} event. */ function _update(address from, address to, uint256 value) internal virtual override { super._update(from, to, value); if (from == address(0)) { uint256 supply = totalSupply(); uint256 cap = _maxSupply(); if (supply > cap) { revert ERC20ExceededSafeSupply(supply, cap); } } _transferVotingUnits(from, to, value); } /** * @dev Returns the voting units of an `account`. * * WARNING: Overriding this function may compromise the internal vote accounting. * `ERC20Votes` assumes tokens map to voting units 1:1 and this is not easy to change. */ function _getVotingUnits(address account) internal view virtual override returns (uint256) { return balanceOf(account); } /** * @dev Get number of checkpoints for `account`. */ function numCheckpoints(address account) public view virtual returns (uint32) { return _numCheckpoints(account); } /** * @dev Get the `pos`-th checkpoint for `account`. */ function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoints.Checkpoint208 memory) { return _checkpoints(account, pos); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol) pragma solidity ^0.8.20; import {IERC20Permit} from "./IERC20Permit.sol"; import {ERC20} from "../ERC20.sol"; import {ECDSA} from "../../../utils/cryptography/ECDSA.sol"; import {EIP712} from "../../../utils/cryptography/EIP712.sol"; import {Nonces} from "../../../utils/Nonces.sol"; /** * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { bytes32 private constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /** * @dev Permit deadline has expired. */ error ERC2612ExpiredSignature(uint256 deadline); /** * @dev Mismatched signature. */ error ERC2612InvalidSigner(address signer, address owner); /** * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. * * It's a good idea to use the same `name` that is defined as the ERC20 token name. */ constructor(string memory name) EIP712(name, "1") {} /** * @inheritdoc IERC20Permit */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { if (block.timestamp > deadline) { revert ERC2612ExpiredSignature(deadline); } bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSA.recover(hash, v, r, s); if (signer != owner) { revert ERC2612InvalidSigner(signer, owner); } _approve(owner, spender, value); } /** * @inheritdoc IERC20Permit */ function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) { return super.nonces(owner); } /** * @inheritdoc IERC20Permit */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view virtual returns (bytes32) { return _domainSeparatorV4(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/Checkpoints.sol) // This file was procedurally generated from scripts/generate/templates/Checkpoints.js. pragma solidity ^0.8.20; import {Math} from "../math/Math.sol"; /** * @dev This library defines the `Trace*` struct, for checkpointing values as they change at different points in * time, and later looking up past values by block number. See {Votes} as an example. * * To create a history of checkpoints define a variable type `Checkpoints.Trace*` in your contract, and store a new * checkpoint for the current transaction block using the {push} function. */ library Checkpoints { /** * @dev A value was attempted to be inserted on a past checkpoint. */ error CheckpointUnorderedInsertion(); struct Trace224 { Checkpoint224[] _checkpoints; } struct Checkpoint224 { uint32 _key; uint224 _value; } /** * @dev Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint. * * Returns previous value and new value. * * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint32).max` key set will disable the * library. */ function push(Trace224 storage self, uint32 key, uint224 value) internal returns (uint224, uint224) { return _insert(self._checkpoints, key, value); } /** * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if * there is none. */ function lowerLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { uint256 len = self._checkpoints.length; uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; } /** * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero * if there is none. */ function upperLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { uint256 len = self._checkpoints.length; uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; } /** * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero * if there is none. * * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high * keys). */ function upperLookupRecent(Trace224 storage self, uint32 key) internal view returns (uint224) { uint256 len = self._checkpoints.length; uint256 low = 0; uint256 high = len; if (len > 5) { uint256 mid = len - Math.sqrt(len); if (key < _unsafeAccess(self._checkpoints, mid)._key) { high = mid; } else { low = mid + 1; } } uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; } /** * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. */ function latest(Trace224 storage self) internal view returns (uint224) { uint256 pos = self._checkpoints.length; return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; } /** * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value * in the most recent checkpoint. */ function latestCheckpoint(Trace224 storage self) internal view returns (bool exists, uint32 _key, uint224 _value) { uint256 pos = self._checkpoints.length; if (pos == 0) { return (false, 0, 0); } else { Checkpoint224 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); return (true, ckpt._key, ckpt._value); } } /** * @dev Returns the number of checkpoint. */ function length(Trace224 storage self) internal view returns (uint256) { return self._checkpoints.length; } /** * @dev Returns checkpoint at given position. */ function at(Trace224 storage self, uint32 pos) internal view returns (Checkpoint224 memory) { return self._checkpoints[pos]; } /** * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, * or by updating the last one. */ function _insert(Checkpoint224[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) { uint256 pos = self.length; if (pos > 0) { // Copying to memory is important here. Checkpoint224 memory last = _unsafeAccess(self, pos - 1); // Checkpoint keys must be non-decreasing. if (last._key > key) { revert CheckpointUnorderedInsertion(); } // Update or push new checkpoint if (last._key == key) { _unsafeAccess(self, pos - 1)._value = value; } else { self.push(Checkpoint224({_key: key, _value: value})); } return (last._value, value); } else { self.push(Checkpoint224({_key: key, _value: value})); return (0, value); } } /** * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive * `high`. * * WARNING: `high` should not be greater than the array's length. */ function _upperBinaryLookup( Checkpoint224[] storage self, uint32 key, uint256 low, uint256 high ) private view returns (uint256) { while (low < high) { uint256 mid = Math.average(low, high); if (_unsafeAccess(self, mid)._key > key) { high = mid; } else { low = mid + 1; } } return high; } /** * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or * `high` if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and * exclusive `high`. * * WARNING: `high` should not be greater than the array's length. */ function _lowerBinaryLookup( Checkpoint224[] storage self, uint32 key, uint256 low, uint256 high ) private view returns (uint256) { while (low < high) { uint256 mid = Math.average(low, high); if (_unsafeAccess(self, mid)._key < key) { low = mid + 1; } else { high = mid; } } return high; } /** * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. */ function _unsafeAccess( Checkpoint224[] storage self, uint256 pos ) private pure returns (Checkpoint224 storage result) { assembly { mstore(0, self.slot) result.slot := add(keccak256(0, 0x20), pos) } } struct Trace208 { Checkpoint208[] _checkpoints; } struct Checkpoint208 { uint48 _key; uint208 _value; } /** * @dev Pushes a (`key`, `value`) pair into a Trace208 so that it is stored as the checkpoint. * * Returns previous value and new value. * * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint48).max` key set will disable the * library. */ function push(Trace208 storage self, uint48 key, uint208 value) internal returns (uint208, uint208) { return _insert(self._checkpoints, key, value); } /** * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if * there is none. */ function lowerLookup(Trace208 storage self, uint48 key) internal view returns (uint208) { uint256 len = self._checkpoints.length; uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; } /** * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero * if there is none. */ function upperLookup(Trace208 storage self, uint48 key) internal view returns (uint208) { uint256 len = self._checkpoints.length; uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; } /** * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero * if there is none. * * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high * keys). */ function upperLookupRecent(Trace208 storage self, uint48 key) internal view returns (uint208) { uint256 len = self._checkpoints.length; uint256 low = 0; uint256 high = len; if (len > 5) { uint256 mid = len - Math.sqrt(len); if (key < _unsafeAccess(self._checkpoints, mid)._key) { high = mid; } else { low = mid + 1; } } uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; } /** * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. */ function latest(Trace208 storage self) internal view returns (uint208) { uint256 pos = self._checkpoints.length; return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; } /** * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value * in the most recent checkpoint. */ function latestCheckpoint(Trace208 storage self) internal view returns (bool exists, uint48 _key, uint208 _value) { uint256 pos = self._checkpoints.length; if (pos == 0) { return (false, 0, 0); } else { Checkpoint208 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); return (true, ckpt._key, ckpt._value); } } /** * @dev Returns the number of checkpoint. */ function length(Trace208 storage self) internal view returns (uint256) { return self._checkpoints.length; } /** * @dev Returns checkpoint at given position. */ function at(Trace208 storage self, uint32 pos) internal view returns (Checkpoint208 memory) { return self._checkpoints[pos]; } /** * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, * or by updating the last one. */ function _insert(Checkpoint208[] storage self, uint48 key, uint208 value) private returns (uint208, uint208) { uint256 pos = self.length; if (pos > 0) { // Copying to memory is important here. Checkpoint208 memory last = _unsafeAccess(self, pos - 1); // Checkpoint keys must be non-decreasing. if (last._key > key) { revert CheckpointUnorderedInsertion(); } // Update or push new checkpoint if (last._key == key) { _unsafeAccess(self, pos - 1)._value = value; } else { self.push(Checkpoint208({_key: key, _value: value})); } return (last._value, value); } else { self.push(Checkpoint208({_key: key, _value: value})); return (0, value); } } /** * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive * `high`. * * WARNING: `high` should not be greater than the array's length. */ function _upperBinaryLookup( Checkpoint208[] storage self, uint48 key, uint256 low, uint256 high ) private view returns (uint256) { while (low < high) { uint256 mid = Math.average(low, high); if (_unsafeAccess(self, mid)._key > key) { high = mid; } else { low = mid + 1; } } return high; } /** * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or * `high` if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and * exclusive `high`. * * WARNING: `high` should not be greater than the array's length. */ function _lowerBinaryLookup( Checkpoint208[] storage self, uint48 key, uint256 low, uint256 high ) private view returns (uint256) { while (low < high) { uint256 mid = Math.average(low, high); if (_unsafeAccess(self, mid)._key < key) { low = mid + 1; } else { high = mid; } } return high; } /** * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. */ function _unsafeAccess( Checkpoint208[] storage self, uint256 pos ) private pure returns (Checkpoint208 storage result) { assembly { mstore(0, self.slot) result.slot := add(keccak256(0, 0x20), pos) } } struct Trace160 { Checkpoint160[] _checkpoints; } struct Checkpoint160 { uint96 _key; uint160 _value; } /** * @dev Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint. * * Returns previous value and new value. * * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint96).max` key set will disable the * library. */ function push(Trace160 storage self, uint96 key, uint160 value) internal returns (uint160, uint160) { return _insert(self._checkpoints, key, value); } /** * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if * there is none. */ function lowerLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { uint256 len = self._checkpoints.length; uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; } /** * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero * if there is none. */ function upperLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { uint256 len = self._checkpoints.length; uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; } /** * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero * if there is none. * * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high * keys). */ function upperLookupRecent(Trace160 storage self, uint96 key) internal view returns (uint160) { uint256 len = self._checkpoints.length; uint256 low = 0; uint256 high = len; if (len > 5) { uint256 mid = len - Math.sqrt(len); if (key < _unsafeAccess(self._checkpoints, mid)._key) { high = mid; } else { low = mid + 1; } } uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; } /** * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. */ function latest(Trace160 storage self) internal view returns (uint160) { uint256 pos = self._checkpoints.length; return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; } /** * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value * in the most recent checkpoint. */ function latestCheckpoint(Trace160 storage self) internal view returns (bool exists, uint96 _key, uint160 _value) { uint256 pos = self._checkpoints.length; if (pos == 0) { return (false, 0, 0); } else { Checkpoint160 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); return (true, ckpt._key, ckpt._value); } } /** * @dev Returns the number of checkpoint. */ function length(Trace160 storage self) internal view returns (uint256) { return self._checkpoints.length; } /** * @dev Returns checkpoint at given position. */ function at(Trace160 storage self, uint32 pos) internal view returns (Checkpoint160 memory) { return self._checkpoints[pos]; } /** * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, * or by updating the last one. */ function _insert(Checkpoint160[] storage self, uint96 key, uint160 value) private returns (uint160, uint160) { uint256 pos = self.length; if (pos > 0) { // Copying to memory is important here. Checkpoint160 memory last = _unsafeAccess(self, pos - 1); // Checkpoint keys must be non-decreasing. if (last._key > key) { revert CheckpointUnorderedInsertion(); } // Update or push new checkpoint if (last._key == key) { _unsafeAccess(self, pos - 1)._value = value; } else { self.push(Checkpoint160({_key: key, _value: value})); } return (last._value, value); } else { self.push(Checkpoint160({_key: key, _value: value})); return (0, value); } } /** * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive * `high`. * * WARNING: `high` should not be greater than the array's length. */ function _upperBinaryLookup( Checkpoint160[] storage self, uint96 key, uint256 low, uint256 high ) private view returns (uint256) { while (low < high) { uint256 mid = Math.average(low, high); if (_unsafeAccess(self, mid)._key > key) { high = mid; } else { low = mid + 1; } } return high; } /** * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or * `high` if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and * exclusive `high`. * * WARNING: `high` should not be greater than the array's length. */ function _lowerBinaryLookup( Checkpoint160[] storage self, uint96 key, uint256 low, uint256 high ) private view returns (uint256) { while (low < high) { uint256 mid = Math.average(low, high); if (_unsafeAccess(self, mid)._key < key) { low = mid + 1; } else { high = mid; } } return high; } /** * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. */ function _unsafeAccess( Checkpoint160[] storage self, uint256 pos ) private pure returns (Checkpoint160 storage result) { assembly { mstore(0, self.slot) result.slot := add(keccak256(0, 0x20), pos) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (governance/utils/Votes.sol) pragma solidity ^0.8.20; import {IERC5805} from "../../interfaces/IERC5805.sol"; import {Context} from "../../utils/Context.sol"; import {Nonces} from "../../utils/Nonces.sol"; import {EIP712} from "../../utils/cryptography/EIP712.sol"; import {Checkpoints} from "../../utils/structs/Checkpoints.sol"; import {SafeCast} from "../../utils/math/SafeCast.sol"; import {ECDSA} from "../../utils/cryptography/ECDSA.sol"; import {Time} from "../../utils/types/Time.sol"; /** * @dev This is a base abstract contract that tracks voting units, which are a measure of voting power that can be * transferred, and provides a system of vote delegation, where an account can delegate its voting units to a sort of * "representative" that will pool delegated voting units from different accounts and can then use it to vote in * decisions. In fact, voting units _must_ be delegated in order to count as actual votes, and an account has to * delegate those votes to itself if it wishes to participate in decisions and does not have a trusted representative. * * This contract is often combined with a token contract such that voting units correspond to token units. For an * example, see {ERC721Votes}. * * The full history of delegate votes is tracked on-chain so that governance protocols can consider votes as distributed * at a particular block number to protect against flash loans and double voting. The opt-in delegate system makes the * cost of this history tracking optional. * * When using this module the derived contract must implement {_getVotingUnits} (for example, make it return * {ERC721-balanceOf}), and can use {_transferVotingUnits} to track a change in the distribution of those units (in the * previous example, it would be included in {ERC721-_update}). */ abstract contract Votes is Context, EIP712, Nonces, IERC5805 { using Checkpoints for Checkpoints.Trace208; bytes32 private constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); mapping(address account => address) private _delegatee; mapping(address delegatee => Checkpoints.Trace208) private _delegateCheckpoints; Checkpoints.Trace208 private _totalCheckpoints; /** * @dev The clock was incorrectly modified. */ error ERC6372InconsistentClock(); /** * @dev Lookup to future votes is not available. */ error ERC5805FutureLookup(uint256 timepoint, uint48 clock); /** * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based * checkpoints (and voting), in which case {CLOCK_MODE} should be overridden as well to match. */ function clock() public view virtual returns (uint48) { return Time.blockNumber(); } /** * @dev Machine-readable description of the clock as specified in EIP-6372. */ // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() public view virtual returns (string memory) { // Check that the clock was not modified if (clock() != Time.blockNumber()) { revert ERC6372InconsistentClock(); } return "mode=blocknumber&from=default"; } /** * @dev Returns the current amount of votes that `account` has. */ function getVotes(address account) public view virtual returns (uint256) { return _delegateCheckpoints[account].latest(); } /** * @dev Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is * configured to use block numbers, this will return the value at the end of the corresponding block. * * Requirements: * * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. */ function getPastVotes(address account, uint256 timepoint) public view virtual returns (uint256) { uint48 currentTimepoint = clock(); if (timepoint >= currentTimepoint) { revert ERC5805FutureLookup(timepoint, currentTimepoint); } return _delegateCheckpoints[account].upperLookupRecent(SafeCast.toUint48(timepoint)); } /** * @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is * configured to use block numbers, this will return the value at the end of the corresponding block. * * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. * Votes that have not been delegated are still part of total supply, even though they would not participate in a * vote. * * Requirements: * * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. */ function getPastTotalSupply(uint256 timepoint) public view virtual returns (uint256) { uint48 currentTimepoint = clock(); if (timepoint >= currentTimepoint) { revert ERC5805FutureLookup(timepoint, currentTimepoint); } return _totalCheckpoints.upperLookupRecent(SafeCast.toUint48(timepoint)); } /** * @dev Returns the current total supply of votes. */ function _getTotalSupply() internal view virtual returns (uint256) { return _totalCheckpoints.latest(); } /** * @dev Returns the delegate that `account` has chosen. */ function delegates(address account) public view virtual returns (address) { return _delegatee[account]; } /** * @dev Delegates votes from the sender to `delegatee`. */ function delegate(address delegatee) public virtual { address account = _msgSender(); _delegate(account, delegatee); } /** * @dev Delegates votes from signer to `delegatee`. */ function delegateBySig( address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) public virtual { if (block.timestamp > expiry) { revert VotesExpiredSignature(expiry); } address signer = ECDSA.recover( _hashTypedDataV4(keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry))), v, r, s ); _useCheckedNonce(signer, nonce); _delegate(signer, delegatee); } /** * @dev Delegate all of `account`'s voting units to `delegatee`. * * Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}. */ function _delegate(address account, address delegatee) internal virtual { address oldDelegate = delegates(account); _delegatee[account] = delegatee; emit DelegateChanged(account, oldDelegate, delegatee); _moveDelegateVotes(oldDelegate, delegatee, _getVotingUnits(account)); } /** * @dev Transfers, mints, or burns voting units. To register a mint, `from` should be zero. To register a burn, `to` * should be zero. Total supply of voting units will be adjusted with mints and burns. */ function _transferVotingUnits(address from, address to, uint256 amount) internal virtual { if (from == address(0)) { _push(_totalCheckpoints, _add, SafeCast.toUint208(amount)); } if (to == address(0)) { _push(_totalCheckpoints, _subtract, SafeCast.toUint208(amount)); } _moveDelegateVotes(delegates(from), delegates(to), amount); } /** * @dev Moves delegated votes from one delegate to another. */ function _moveDelegateVotes(address from, address to, uint256 amount) private { if (from != to && amount > 0) { if (from != address(0)) { (uint256 oldValue, uint256 newValue) = _push( _delegateCheckpoints[from], _subtract, SafeCast.toUint208(amount) ); emit DelegateVotesChanged(from, oldValue, newValue); } if (to != address(0)) { (uint256 oldValue, uint256 newValue) = _push( _delegateCheckpoints[to], _add, SafeCast.toUint208(amount) ); emit DelegateVotesChanged(to, oldValue, newValue); } } } /** * @dev Get number of checkpoints for `account`. */ function _numCheckpoints(address account) internal view virtual returns (uint32) { return SafeCast.toUint32(_delegateCheckpoints[account].length()); } /** * @dev Get the `pos`-th checkpoint for `account`. */ function _checkpoints( address account, uint32 pos ) internal view virtual returns (Checkpoints.Checkpoint208 memory) { return _delegateCheckpoints[account].at(pos); } function _push( Checkpoints.Trace208 storage store, function(uint208, uint208) view returns (uint208) op, uint208 delta ) private returns (uint208, uint208) { return store.push(clock(), op(store.latest(), delta)); } function _add(uint208 a, uint208 b) private pure returns (uint208) { return a + b; } function _subtract(uint208 a, uint208 b) private pure returns (uint208) { return a - b; } /** * @dev Must return the voting units held by an account. */ function _getVotingUnits(address) internal view virtual returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol) pragma solidity ^0.8.20; /** * @dev Provides tracking nonces for addresses. Nonces will only increment. */ abstract contract Nonces { /** * @dev The nonce used for an `account` is not the expected current nonce. */ error InvalidAccountNonce(address account, uint256 currentNonce); mapping(address account => uint256) private _nonces; /** * @dev Returns the next unused nonce for an address. */ function nonces(address owner) public view virtual returns (uint256) { return _nonces[owner]; } /** * @dev Consumes a nonce. * * Returns the current value and increments nonce. */ function _useNonce(address owner) internal virtual returns (uint256) { // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be // decremented or reset. This guarantees that the nonce never overflows. unchecked { // It is important to do x++ and not ++x here. return _nonces[owner]++; } } /** * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. */ function _useCheckedNonce(address owner, uint256 nonce) internal virtual { uint256 current = _useNonce(owner); if (nonce != current) { revert InvalidAccountNonce(owner, current); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.20; import {MessageHashUtils} from "./MessageHashUtils.sol"; import {ShortStrings, ShortString} from "../ShortStrings.sol"; import {IERC5267} from "../../interfaces/IERC5267.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. * * @custom:oz-upgrades-unsafe-allow state-variable-immutable */ abstract contract EIP712 is IERC5267 { using ShortStrings for *; bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _cachedDomainSeparator; uint256 private immutable _cachedChainId; address private immutable _cachedThis; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { _name = name.toShortStringWithFallback(_nameFallback); _version = version.toShortStringWithFallback(_versionFallback); _hashedName = keccak256(bytes(name)); _hashedVersion = keccak256(bytes(version)); _cachedChainId = block.chainid; _cachedDomainSeparator = _buildDomainSeparator(); _cachedThis = address(this); } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _cachedThis && block.chainid == _cachedChainId) { return _cachedDomainSeparator; } else { return _buildDomainSeparator(); } } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {IERC-5267}. */ function eip712Domain() public view virtual returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { return ( hex"0f", // 01111 _EIP712Name(), _EIP712Version(), block.chainid, address(this), bytes32(0), new uint256[](0) ); } /** * @dev The name parameter for the EIP712 domain. * * NOTE: By default this function reads _name which is an immutable value. * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). */ // solhint-disable-next-line func-name-mixedcase function _EIP712Name() internal view returns (string memory) { return _name.toStringWithFallback(_nameFallback); } /** * @dev The version parameter for the EIP712 domain. * * NOTE: By default this function reads _version which is an immutable value. * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). */ // solhint-disable-next-line func-name-mixedcase function _EIP712Version() internal view returns (string memory) { return _version.toStringWithFallback(_versionFallback); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.20; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS } /** * @dev The signature derives the `address(0)`. */ error ECDSAInvalidSignature(); /** * @dev The signature has an invalid length. */ error ECDSAInvalidSignatureLength(uint256 length); /** * @dev The signature has an S value that is in the upper half order. */ error ECDSAInvalidSignatureS(bytes32 s); /** * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not * return address(0) without also returning an error description. Errors are documented using an enum (error type) * and a bytes32 providing additional information about the error. * * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) { unchecked { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); // We do not check for an overflow here since the shift operation results in 0 or 1. uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError, bytes32) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS, s); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature, bytes32(0)); } return (signer, RecoverError.NoError, bytes32(0)); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); _throwError(error, errorArg); return recovered; } /** * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. */ function _throwError(RecoverError error, bytes32 errorArg) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert ECDSAInvalidSignature(); } else if (error == RecoverError.InvalidSignatureLength) { revert ECDSAInvalidSignatureLength(uint256(errorArg)); } else if (error == RecoverError.InvalidSignatureS) { revert ECDSAInvalidSignatureS(errorArg); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAccessManaged.sol) pragma solidity ^0.8.20; interface IAccessManaged { /** * @dev Authority that manages this contract was updated. */ event AuthorityUpdated(address authority); error AccessManagedUnauthorized(address caller); error AccessManagedRequiredDelay(address caller, uint32 delay); error AccessManagedInvalidAuthority(address authority); /** * @dev Returns the current authority. */ function authority() external view returns (address); /** * @dev Transfers control to a new authority. The caller must be the current authority. */ function setAuthority(address) external; /** * @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs * attacker controlled calls. */ function isConsumingScheduledOp() external view returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAccessManager.sol) pragma solidity ^0.8.20; import {IAccessManaged} from "./IAccessManaged.sol"; import {Time} from "../../utils/types/Time.sol"; interface IAccessManager { /** * @dev A delayed operation was scheduled. */ event OperationScheduled( bytes32 indexed operationId, uint32 indexed nonce, uint48 schedule, address caller, address target, bytes data ); /** * @dev A scheduled operation was executed. */ event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce); /** * @dev A scheduled operation was canceled. */ event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce); /** * @dev Informational labelling for a roleId. */ event RoleLabel(uint64 indexed roleId, string label); /** * @dev Emitted when `account` is granted `roleId`. * * NOTE: The meaning of the `since` argument depends on the `newMember` argument. * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role, * otherwise it indicates the execution delay for this account and roleId is updated. */ event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember); /** * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous. */ event RoleRevoked(uint64 indexed roleId, address indexed account); /** * @dev Role acting as admin over a given `roleId` is updated. */ event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin); /** * @dev Role acting as guardian over a given `roleId` is updated. */ event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian); /** * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached. */ event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since); /** * @dev Target mode is updated (true = closed, false = open). */ event TargetClosed(address indexed target, bool closed); /** * @dev Role required to invoke `selector` on `target` is updated to `roleId`. */ event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId); /** * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached. */ event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since); error AccessManagerAlreadyScheduled(bytes32 operationId); error AccessManagerNotScheduled(bytes32 operationId); error AccessManagerNotReady(bytes32 operationId); error AccessManagerExpired(bytes32 operationId); error AccessManagerLockedAccount(address account); error AccessManagerLockedRole(uint64 roleId); error AccessManagerBadConfirmation(); error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId); error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector); error AccessManagerUnauthorizedConsume(address target); error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector); error AccessManagerInvalidInitialAdmin(address initialAdmin); /** * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule} * & {execute} workflow. * * This function is usually called by the targeted contract to control immediate execution of restricted functions. * Therefore we only return true if the call can be performed without any delay. If the call is subject to a * previously set delay (not zero), then the function should return false and the caller should schedule the operation * for future execution. * * If `immediate` is true, the delay can be disregarded and the operation can be immediately executed, otherwise * the operation can be executed if and only if delay is greater than 0. * * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail * to identify the indirect workflow, and will consider calls that require a delay to be forbidden. * * NOTE: This function does not report the permissions of this manager itself. These are defined by the * {_canCallSelf} function instead. */ function canCall( address caller, address target, bytes4 selector ) external view returns (bool allowed, uint32 delay); /** * @dev Expiration delay for scheduled proposals. Defaults to 1 week. * * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately, * disabling any scheduling usage. */ function expiration() external view returns (uint32); /** * @dev Minimum setback for all delay updates, with the exception of execution delays. It * can be increased without setback (and reset via {revokeRole} in the case event of an * accidental increase). Defaults to 5 days. */ function minSetback() external view returns (uint32); /** * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied. */ function isTargetClosed(address target) external view returns (bool); /** * @dev Get the role required to call a function. */ function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64); /** * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay. */ function getTargetAdminDelay(address target) external view returns (uint32); /** * @dev Get the id of the role that acts as an admin for the given role. * * The admin permission is required to grant the role, revoke the role and update the execution delay to execute * an operation that is restricted to this role. */ function getRoleAdmin(uint64 roleId) external view returns (uint64); /** * @dev Get the role that acts as a guardian for a given role. * * The guardian permission allows canceling operations that have been scheduled under the role. */ function getRoleGuardian(uint64 roleId) external view returns (uint64); /** * @dev Get the role current grant delay. * * Its value may change at any point without an event emitted following a call to {setGrantDelay}. * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event. */ function getRoleGrantDelay(uint64 roleId) external view returns (uint32); /** * @dev Get the access details for a given account for a given role. These details include the timepoint at which * membership becomes active, and the delay applied to all operation by this user that requires this permission * level. * * Returns: * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted. * [1] Current execution delay for the account. * [2] Pending execution delay for the account. * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled. */ function getAccess(uint64 roleId, address account) external view returns (uint48, uint32, uint32, uint48); /** * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this * permission might be associated with an execution delay. {getAccess} can provide more details. */ function hasRole(uint64 roleId, address account) external view returns (bool, uint32); /** * @dev Give a label to a role, for improved role discoverability by UIs. * * Requirements: * * - the caller must be a global admin * * Emits a {RoleLabel} event. */ function labelRole(uint64 roleId, string calldata label) external; /** * @dev Add `account` to `roleId`, or change its execution delay. * * This gives the account the authorization to call any function that is restricted to this role. An optional * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation * that is restricted to members of this role. The user will only be able to execute the operation after the delay has * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}). * * If the account has already been granted this role, the execution delay will be updated. This update is not * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any * operation executed in the 3 hours that follows this update was indeed scheduled before this update. * * Requirements: * * - the caller must be an admin for the role (see {getRoleAdmin}) * - granted role must not be the `PUBLIC_ROLE` * * Emits a {RoleGranted} event. */ function grantRole(uint64 roleId, address account, uint32 executionDelay) external; /** * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has * no effect. * * Requirements: * * - the caller must be an admin for the role (see {getRoleAdmin}) * - revoked role must not be the `PUBLIC_ROLE` * * Emits a {RoleRevoked} event if the account had the role. */ function revokeRole(uint64 roleId, address account) external; /** * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in * the role this call has no effect. * * Requirements: * * - the caller must be `callerConfirmation`. * * Emits a {RoleRevoked} event if the account had the role. */ function renounceRole(uint64 roleId, address callerConfirmation) external; /** * @dev Change admin role for a given role. * * Requirements: * * - the caller must be a global admin * * Emits a {RoleAdminChanged} event */ function setRoleAdmin(uint64 roleId, uint64 admin) external; /** * @dev Change guardian role for a given role. * * Requirements: * * - the caller must be a global admin * * Emits a {RoleGuardianChanged} event */ function setRoleGuardian(uint64 roleId, uint64 guardian) external; /** * @dev Update the delay for granting a `roleId`. * * Requirements: * * - the caller must be a global admin * * Emits a {RoleGrantDelayChanged} event. */ function setGrantDelay(uint64 roleId, uint32 newDelay) external; /** * @dev Set the role required to call functions identified by the `selectors` in the `target` contract. * * Requirements: * * - the caller must be a global admin * * Emits a {TargetFunctionRoleUpdated} event per selector. */ function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external; /** * @dev Set the delay for changing the configuration of a given target contract. * * Requirements: * * - the caller must be a global admin * * Emits a {TargetAdminDelayUpdated} event. */ function setTargetAdminDelay(address target, uint32 newDelay) external; /** * @dev Set the closed flag for a contract. * * Requirements: * * - the caller must be a global admin * * Emits a {TargetClosed} event. */ function setTargetClosed(address target, bool closed) external; /** * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the * operation is not yet scheduled, has expired, was executed, or was canceled. */ function getSchedule(bytes32 id) external view returns (uint48); /** * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never * been scheduled. */ function getNonce(bytes32 id) external view returns (uint32); /** * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays * required for the caller. The special value zero will automatically set the earliest possible time. * * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}. * * Emits a {OperationScheduled} event. * * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target * contract if it is using standard Solidity ABI encoding. */ function schedule(address target, bytes calldata data, uint48 when) external returns (bytes32, uint32); /** * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the * execution delay is 0. * * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the * operation wasn't previously scheduled (if the caller doesn't have an execution delay). * * Emits an {OperationExecuted} event only if the call was scheduled and delayed. */ function execute(address target, bytes calldata data) external payable returns (uint32); /** * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled * operation that is cancelled. * * Requirements: * * - the caller must be the proposer, a guardian of the targeted function, or a global admin * * Emits a {OperationCanceled} event. */ function cancel(address caller, address target, bytes calldata data) external returns (uint32); /** * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error. * * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager, * with all the verifications that it implies. * * Emit a {OperationExecuted} event. */ function consumeScheduledOp(address caller, bytes calldata data) external; /** * @dev Hashing function for delayed operations. */ function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32); /** * @dev Changes the authority of a target managed by this manager instance. * * Requirements: * * - the caller must be a global admin */ function updateAuthority(address target, address newAuthority) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/manager/AuthorityUtils.sol) pragma solidity ^0.8.20; import {IAuthority} from "./IAuthority.sol"; library AuthorityUtils { /** * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data. * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting. */ function canCallWithDelay( address authority, address caller, address target, bytes4 selector ) internal view returns (bool immediate, uint32 delay) { (bool success, bytes memory data) = authority.staticcall( abi.encodeCall(IAuthority.canCall, (caller, target, selector)) ); if (success) { if (data.length >= 0x40) { (immediate, delay) = abi.decode(data, (bool, uint32)); } else if (data.length >= 0x20) { immediate = abi.decode(data, (bool)); } } return (immediate, delay); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAuthority.sol) pragma solidity ^0.8.20; /** * @dev Standard interface for permissioning originally defined in Dappsys. */ interface IAuthority { /** * @dev Returns true if the caller can invoke on a target the function identified by a function selector. */ function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // 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. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { 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. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.20; interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol) pragma solidity ^0.8.20; import {StorageSlot} from "./StorageSlot.sol"; // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x BB | type ShortString is bytes32; /** * @dev This library provides functions to convert short memory strings * into a `ShortString` type that can be used as an immutable variable. * * Strings of arbitrary length can be optimized using this library if * they are short enough (up to 31 bytes) by packing them with their * length (1 byte) in a single EVM word (32 bytes). Additionally, a * fallback mechanism can be used for every other case. * * Usage example: * * ```solidity * contract Named { * using ShortStrings for *; * * ShortString private immutable _name; * string private _nameFallback; * * constructor(string memory contractName) { * _name = contractName.toShortStringWithFallback(_nameFallback); * } * * function name() external view returns (string memory) { * return _name.toStringWithFallback(_nameFallback); * } * } * ``` */ library ShortStrings { // Used as an identifier for strings longer than 31 bytes. bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); /** * @dev Encode a string of at most 31 chars into a `ShortString`. * * This will trigger a `StringTooLong` error is the input string is too long. */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); if (bstr.length > 31) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); } /** * @dev Decode a `ShortString` back to a "normal" string. */ function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = byteLength(sstr); // using `new string(len)` would work locally but is not memory safe. string memory str = new string(32); /// @solidity memory-safe-assembly assembly { mstore(str, len) mstore(add(str, 0x20), sstr) } return str; } /** * @dev Return the length of a `ShortString`. */ function byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; if (result > 31) { revert InvalidShortString(); } return result; } /** * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { if (bytes(value).length < 32) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; return ShortString.wrap(FALLBACK_SENTINEL); } } /** * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return toString(value); } else { return store; } } /** * @dev Return the length of a string that was encoded to `ShortString` or written to storage using * {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol) pragma solidity ^0.8.20; import {Strings} from "../Strings.sol"; /** * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. * * The library provides methods for generating a hash of a message that conforms to the * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] * specifications. */ library MessageHashUtils { /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing a bytes32 `messageHash` with * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with * keccak256, although any bytes32 value can be safely used because the final digest will * be re-hashed. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) } } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing an arbitrary `message` with * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { return keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x00` (data with intended validator). * * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended * `validator` address. Then hashing the result. * * See {ECDSA-recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked(hex"19_00", validator, data)); } /** * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`). * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `\x19\x01` and hashing the result. It corresponds to the hash signed by the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. * * See {ECDSA-recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, hex"19_01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) digest := keccak256(ptr, 0x42) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/types/Time.sol) pragma solidity ^0.8.20; import {Math} from "../math/Math.sol"; import {SafeCast} from "../math/SafeCast.sol"; /** * @dev This library provides helpers for manipulating time-related objects. * * It uses the following types: * - `uint48` for timepoints * - `uint32` for durations * * While the library doesn't provide specific types for timepoints and duration, it does provide: * - a `Delay` type to represent duration that can be programmed to change value automatically at a given point * - additional helper functions */ library Time { using Time for *; /** * @dev Get the block timestamp as a Timepoint. */ function timestamp() internal view returns (uint48) { return SafeCast.toUint48(block.timestamp); } /** * @dev Get the block number as a Timepoint. */ function blockNumber() internal view returns (uint48) { return SafeCast.toUint48(block.number); } // ==================================================== Delay ===================================================== /** * @dev A `Delay` is a uint32 duration that can be programmed to change value automatically at a given point in the * future. The "effect" timepoint describes when the transitions happens from the "old" value to the "new" value. * This allows updating the delay applied to some operation while keeping some guarantees. * * In particular, the {update} function guarantees that if the delay is reduced, the old delay still applies for * some time. For example if the delay is currently 7 days to do an upgrade, the admin should not be able to set * the delay to 0 and upgrade immediately. If the admin wants to reduce the delay, the old delay (7 days) should * still apply for some time. * * * The `Delay` type is 112 bits long, and packs the following: * * ``` * | [uint48]: effect date (timepoint) * | | [uint32]: value before (duration) * ↓ ↓ ↓ [uint32]: value after (duration) * 0xAAAAAAAAAAAABBBBBBBBCCCCCCCC * ``` * * NOTE: The {get} and {withUpdate} functions operate using timestamps. Block number based delays are not currently * supported. */ type Delay is uint112; /** * @dev Wrap a duration into a Delay to add the one-step "update in the future" feature */ function toDelay(uint32 duration) internal pure returns (Delay) { return Delay.wrap(duration); } /** * @dev Get the value at a given timepoint plus the pending value and effect timepoint if there is a scheduled * change after this timepoint. If the effect timepoint is 0, then the pending value should not be considered. */ function _getFullAt(Delay self, uint48 timepoint) private pure returns (uint32, uint32, uint48) { (uint32 valueBefore, uint32 valueAfter, uint48 effect) = self.unpack(); return effect <= timepoint ? (valueAfter, 0, 0) : (valueBefore, valueAfter, effect); } /** * @dev Get the current value plus the pending value and effect timepoint if there is a scheduled change. If the * effect timepoint is 0, then the pending value should not be considered. */ function getFull(Delay self) internal view returns (uint32, uint32, uint48) { return _getFullAt(self, timestamp()); } /** * @dev Get the current value. */ function get(Delay self) internal view returns (uint32) { (uint32 delay, , ) = self.getFull(); return delay; } /** * @dev Update a Delay object so that it takes a new duration after a timepoint that is automatically computed to * enforce the old delay at the moment of the update. Returns the updated Delay object and the timestamp when the * new delay becomes effective. */ function withUpdate( Delay self, uint32 newValue, uint32 minSetback ) internal view returns (Delay updatedDelay, uint48 effect) { uint32 value = self.get(); uint32 setback = uint32(Math.max(minSetback, value > newValue ? value - newValue : 0)); effect = timestamp() + setback; return (pack(value, newValue, effect), effect); } /** * @dev Split a delay into its components: valueBefore, valueAfter and effect (transition timepoint). */ function unpack(Delay self) internal pure returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) { uint112 raw = Delay.unwrap(self); valueAfter = uint32(raw); valueBefore = uint32(raw >> 32); effect = uint48(raw >> 64); return (valueBefore, valueAfter, effect); } /** * @dev pack the components into a Delay object. */ function pack(uint32 valueBefore, uint32 valueAfter, uint48 effect) internal pure returns (Delay) { return Delay.wrap((uint112(effect) << 64) | (uint112(valueBefore) << 32) | uint112(valueAfter)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.20; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such 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 SafeCast { /** * @dev Value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); /** * @dev An int value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedIntToUint(int256 value); /** * @dev Value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedIntDowncast(uint8 bits, int256 value); /** * @dev An uint value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedUintToInt(uint256 value); /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). * * Counterpart to Solidity's `uint248` operator. * * Requirements: * * - input must fit into 248 bits */ function toUint248(uint256 value) internal pure returns (uint248) { if (value > type(uint248).max) { revert SafeCastOverflowedUintDowncast(248, value); } return uint248(value); } /** * @dev Returns the downcasted uint240 from uint256, reverting on * overflow (when the input is greater than largest uint240). * * Counterpart to Solidity's `uint240` operator. * * Requirements: * * - input must fit into 240 bits */ function toUint240(uint256 value) internal pure returns (uint240) { if (value > type(uint240).max) { revert SafeCastOverflowedUintDowncast(240, value); } return uint240(value); } /** * @dev Returns the downcasted uint232 from uint256, reverting on * overflow (when the input is greater than largest uint232). * * Counterpart to Solidity's `uint232` operator. * * Requirements: * * - input must fit into 232 bits */ function toUint232(uint256 value) internal pure returns (uint232) { if (value > type(uint232).max) { revert SafeCastOverflowedUintDowncast(232, value); } return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { if (value > type(uint224).max) { revert SafeCastOverflowedUintDowncast(224, value); } return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits */ function toUint216(uint256 value) internal pure returns (uint216) { if (value > type(uint216).max) { revert SafeCastOverflowedUintDowncast(216, value); } return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits */ function toUint208(uint256 value) internal pure returns (uint208) { if (value > type(uint208).max) { revert SafeCastOverflowedUintDowncast(208, value); } return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits */ function toUint200(uint256 value) internal pure returns (uint200) { if (value > type(uint200).max) { revert SafeCastOverflowedUintDowncast(200, value); } return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits */ function toUint192(uint256 value) internal pure returns (uint192) { if (value > type(uint192).max) { revert SafeCastOverflowedUintDowncast(192, value); } return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits */ function toUint184(uint256 value) internal pure returns (uint184) { if (value > type(uint184).max) { revert SafeCastOverflowedUintDowncast(184, value); } return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits */ function toUint176(uint256 value) internal pure returns (uint176) { if (value > type(uint176).max) { revert SafeCastOverflowedUintDowncast(176, value); } return uint176(value); } /** * @dev Returns the downcasted uint168 from uint256, reverting on * overflow (when the input is greater than largest uint168). * * Counterpart to Solidity's `uint168` operator. * * Requirements: * * - input must fit into 168 bits */ function toUint168(uint256 value) internal pure returns (uint168) { if (value > type(uint168).max) { revert SafeCastOverflowedUintDowncast(168, value); } return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits */ function toUint160(uint256 value) internal pure returns (uint160) { if (value > type(uint160).max) { revert SafeCastOverflowedUintDowncast(160, value); } return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits */ function toUint152(uint256 value) internal pure returns (uint152) { if (value > type(uint152).max) { revert SafeCastOverflowedUintDowncast(152, value); } return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits */ function toUint144(uint256 value) internal pure returns (uint144) { if (value > type(uint144).max) { revert SafeCastOverflowedUintDowncast(144, value); } return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits */ function toUint136(uint256 value) internal pure returns (uint136) { if (value > type(uint136).max) { revert SafeCastOverflowedUintDowncast(136, value); } return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { if (value > type(uint128).max) { revert SafeCastOverflowedUintDowncast(128, value); } return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits */ function toUint120(uint256 value) internal pure returns (uint120) { if (value > type(uint120).max) { revert SafeCastOverflowedUintDowncast(120, value); } return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits */ function toUint112(uint256 value) internal pure returns (uint112) { if (value > type(uint112).max) { revert SafeCastOverflowedUintDowncast(112, value); } return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits */ function toUint104(uint256 value) internal pure returns (uint104) { if (value > type(uint104).max) { revert SafeCastOverflowedUintDowncast(104, value); } return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { if (value > type(uint96).max) { revert SafeCastOverflowedUintDowncast(96, value); } return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits */ function toUint88(uint256 value) internal pure returns (uint88) { if (value > type(uint88).max) { revert SafeCastOverflowedUintDowncast(88, value); } return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits */ function toUint80(uint256 value) internal pure returns (uint80) { if (value > type(uint80).max) { revert SafeCastOverflowedUintDowncast(80, value); } return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits */ function toUint72(uint256 value) internal pure returns (uint72) { if (value > type(uint72).max) { revert SafeCastOverflowedUintDowncast(72, value); } return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { if (value > type(uint64).max) { revert SafeCastOverflowedUintDowncast(64, value); } return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits */ function toUint56(uint256 value) internal pure returns (uint56) { if (value > type(uint56).max) { revert SafeCastOverflowedUintDowncast(56, value); } return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits */ function toUint48(uint256 value) internal pure returns (uint48) { if (value > type(uint48).max) { revert SafeCastOverflowedUintDowncast(48, value); } return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits */ function toUint40(uint256 value) internal pure returns (uint40) { if (value > type(uint40).max) { revert SafeCastOverflowedUintDowncast(40, value); } return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { if (value > type(uint32).max) { revert SafeCastOverflowedUintDowncast(32, value); } return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits */ function toUint24(uint256 value) internal pure returns (uint24) { if (value > type(uint24).max) { revert SafeCastOverflowedUintDowncast(24, value); } return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { if (value > type(uint16).max) { revert SafeCastOverflowedUintDowncast(16, value); } return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits */ function toUint8(uint256 value) internal pure returns (uint8) { if (value > type(uint8).max) { revert SafeCastOverflowedUintDowncast(8, value); } return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { if (value < 0) { revert SafeCastOverflowedIntToUint(value); } return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(248, value); } } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(240, value); } } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(232, value); } } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(224, value); } } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(216, value); } } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(208, value); } } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(200, value); } } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(192, value); } } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(184, value); } } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(176, value); } } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(168, value); } } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(160, value); } } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(152, value); } } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(144, value); } } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(136, value); } } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(128, value); } } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(120, value); } } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(112, value); } } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(104, value); } } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(96, value); } } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(88, value); } } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(80, value); } } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(72, value); } } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(64, value); } } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(56, value); } } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(48, value); } } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(40, value); } } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(32, value); } } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(24, value); } } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(16, value); } } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(8, value); } } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive if (value > uint256(type(int256).max)) { revert SafeCastOverflowedUintToInt(value); } return int256(value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5805.sol) pragma solidity ^0.8.20; import {IVotes} from "../governance/utils/IVotes.sol"; import {IERC6372} from "./IERC6372.sol"; interface IERC5805 is IERC6372, IVotes {}
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; 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_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC6372.sol) pragma solidity ^0.8.20; interface IERC6372 { /** * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). */ function clock() external view returns (uint48); /** * @dev Description of the clock */ // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (governance/utils/IVotes.sol) pragma solidity ^0.8.20; /** * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts. */ interface IVotes { /** * @dev The signature used has expired. */ error VotesExpiredSignature(uint256 expiry); /** * @dev Emitted when an account changes their delegate. */ event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /** * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of voting units. */ event DelegateVotesChanged(address indexed delegate, uint256 previousVotes, uint256 newVotes); /** * @dev Returns the current amount of votes that `account` has. */ function getVotes(address account) external view returns (uint256); /** * @dev Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is * configured to use block numbers, this will return the value at the end of the corresponding block. */ function getPastVotes(address account, uint256 timepoint) external view returns (uint256); /** * @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is * configured to use block numbers, this will return the value at the end of the corresponding block. * * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. * Votes that have not been delegated are still part of total supply, even though they would not participate in a * vote. */ function getPastTotalSupply(uint256 timepoint) external view returns (uint256); /** * @dev Returns the delegate that `account` has chosen. */ function delegates(address account) external view returns (address); /** * @dev Delegates votes from the sender to `delegatee`. */ function delegate(address delegatee) external; /** * @dev Delegates votes from signer to `delegatee`. */ function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "remappings": [] }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"initialAuthority","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"authority","type":"address"}],"name":"AccessManagedInvalidAuthority","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"uint32","name":"delay","type":"uint32"}],"name":"AccessManagedRequiredDelay","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"AccessManagedUnauthorized","type":"error"},{"inputs":[],"name":"CheckpointUnorderedInsertion","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"uint256","name":"increasedSupply","type":"uint256"},{"internalType":"uint256","name":"cap","type":"uint256"}],"name":"ERC20ExceededSafeSupply","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ERC2612ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC2612InvalidSigner","type":"error"},{"inputs":[{"internalType":"uint256","name":"timepoint","type":"uint256"},{"internalType":"uint48","name":"clock","type":"uint48"}],"name":"ERC5805FutureLookup","type":"error"},{"inputs":[],"name":"ERC6372InconsistentClock","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"uint8","name":"bits","type":"uint8"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintDowncast","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"inputs":[{"internalType":"uint256","name":"expiry","type":"uint256"}],"name":"VotesExpiredSignature","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"authority","type":"address"}],"name":"AuthorityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousVotes","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newVotes","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"CLOCK_MODE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"authority","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint32","name":"pos","type":"uint32"}],"name":"checkpoints","outputs":[{"components":[{"internalType":"uint48","name":"_key","type":"uint48"},{"internalType":"uint208","name":"_value","type":"uint208"}],"internalType":"struct Checkpoints.Checkpoint208","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clock","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"timepoint","type":"uint256"}],"name":"getPastTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"timepoint","type":"uint256"}],"name":"getPastVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isConsumingScheduledOp","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAuthority","type":"address"}],"name":"setAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
610160604052348015610010575f5ffd5b506040516154453803806154458339818101604052810190610032919061111c565b806040518060400160405280601b81526020017f4574686572576f726c6420476f7665726e616e636520546f6b656e0000000000815250806040518060400160405280600181526020017f31000000000000000000000000000000000000000000000000000000000000008152506040518060400160405280601b81526020017f4574686572576f726c6420476f7665726e616e636520546f6b656e00000000008152506040518060400160405280600a81526020017f6557476f7665726e6f7200000000000000000000000000000000000000000000815250816003908161011b9190611384565b50806004908161012b9190611384565b50505061014260058361022660201b90919060201c565b610120818152505061015e60068261022660201b90919060201c565b6101408181525050818051906020012060e08181525050808051906020012061010081815250504660a0818152505061019b61027360201b60201c565b608081815250503073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff16815250505050506101e8816102cd60201b60201c565b50610220336101fb61034760201b60201c565b600a61020791906115bb565b620927c06102159190611605565b61034f60201b60201c565b50611a59565b5f60208351101561024757610240836103d460201b60201c565b905061026d565b826102578361043960201b60201c565b5f0190816102659190611384565b5060ff5f1b90505b92915050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60e0516101005146306040516020016102b295949392919061167c565b60405160208183030381529060405280519060200120905090565b80600b5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad8160405161033c91906116cd565b60405180910390a150565b5f6012905090565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036103bf575f6040517fec442f050000000000000000000000000000000000000000000000000000000081526004016103b691906116cd565b60405180910390fd5b6103d05f838361044260201b60201c565b5050565b5f5f829050601f8151111561042057826040517f305a27a9000000000000000000000000000000000000000000000000000000008152600401610417919061174c565b60405180910390fd5b80518161042c90611799565b5f1c175f1b915050919050565b5f819050919050565b61045383838361045860201b60201c565b505050565b61046983838361051e60201b60201c565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610508575f6104ab61073760201b60201c565b90505f6104bc61074060201b60201c565b9050808211156105055781816040517f1cb15d260000000000000000000000000000000000000000000000000000000081526004016104fc9291906117ff565b60405180910390fd5b50505b61051983838361076360201b60201c565b505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361056e578060025f8282546105629190611826565b9250508190555061063c565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156105f7578381836040517fe450d38c0000000000000000000000000000000000000000000000000000000081526004016105ee93929190611859565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610683578060025f82825403925050819055506106cd565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161072a919061188e565b60405180910390a3505050565b5f600254905090565b5f79ffffffffffffffffffffffffffffffffffffffffffffffffffff8016905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036107c2576107bf600a61085360201b610f0c176107b48461086860201b60201c565b6108d560201b60201c565b50505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108215761081e600a61091d60201b610f21176108138461086860201b60201c565b6108d560201b60201c565b50505b61084e6108338461093260201b60201c565b6108428461093260201b60201c565b8361099760201b60201c565b505050565b5f818361086091906118cc565b905092915050565b5f79ffffffffffffffffffffffffffffffffffffffffffffffffffff80168211156108cd5760d0826040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526004016108c4929190611952565b60405180910390fd5b819050919050565b5f5f6109116108e8610c2d60201b60201c565b6109016108fa88610c4160201b60201c565b868860201c565b87610ca960201b9092919060201c565b91509150935093915050565b5f818361092a9190611979565b905092915050565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156109d257505f81115b15610c28575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610aff575f5f610a7060095f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2061091d60201b610f2117610a658661086860201b60201c565b6108d560201b60201c565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff16915079ffffffffffffffffffffffffffffffffffffffffffffffffffff1691508473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051610af49291906117ff565b60405180910390a250505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610c27575f5f610b9860095f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2061085360201b610f0c17610b8d8661086860201b60201c565b6108d560201b60201c565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff16915079ffffffffffffffffffffffffffffffffffffffffffffffffffff1691508373ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051610c1c9291906117ff565b60405180910390a250505b5b505050565b5f610c3c610cca60201b60201c565b905090565b5f5f825f018054905090505f8114610c9f57610c71835f01600183610c6691906119c6565b610cdf60201b60201c565b5f0160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff16610ca1565b5f5b915050919050565b5f5f610cbe855f018585610cf160201b60201c565b91509150935093915050565b5f610cda4361106560201b60201c565b905090565b5f825f528160205f2001905092915050565b5f5f5f858054905090505f811115610f7d575f610d2087600184610d1591906119c6565b610cdf60201b60201c565b6040518060400160405290815f82015f9054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff1681526020015f820160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff1679ffffffffffffffffffffffffffffffffffffffffffffffffffff1679ffffffffffffffffffffffffffffffffffffffffffffffffffff168152505090508565ffffffffffff16815f015165ffffffffffff161115610e0b576040517f2520601d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8565ffffffffffff16815f015165ffffffffffff1603610e935784610e4288600185610e3791906119c6565b610cdf60201b60201c565b5f0160066101000a81548179ffffffffffffffffffffffffffffffffffffffffffffffffffff021916908379ffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550610f6c565b8660405180604001604052808865ffffffffffff1681526020018779ffffffffffffffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003905f5260205f20015f909190919091505f820151815f015f6101000a81548165ffffffffffff021916908365ffffffffffff1602179055506020820151815f0160066101000a81548179ffffffffffffffffffffffffffffffffffffffffffffffffffff021916908379ffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505b80602001518593509350505061105d565b8560405180604001604052808765ffffffffffff1681526020018679ffffffffffffffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003905f5260205f20015f909190919091505f820151815f015f6101000a81548165ffffffffffff021916908365ffffffffffff1602179055506020820151815f0160066101000a81548179ffffffffffffffffffffffffffffffffffffffffffffffffffff021916908379ffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505f8492509250505b935093915050565b5f65ffffffffffff80168211156110b6576030826040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526004016110ad929190611a32565b60405180910390fd5b819050919050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6110eb826110c2565b9050919050565b6110fb816110e1565b8114611105575f5ffd5b50565b5f81519050611116816110f2565b92915050565b5f60208284031215611131576111306110be565b5b5f61113e84828501611108565b91505092915050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806111c257607f821691505b6020821081036111d5576111d461117e565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026112377fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826111fc565b61124186836111fc565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f61128561128061127b84611259565b611262565b611259565b9050919050565b5f819050919050565b61129e8361126b565b6112b26112aa8261128c565b848454611208565b825550505050565b5f5f905090565b6112c96112ba565b6112d4818484611295565b505050565b5b818110156112f7576112ec5f826112c1565b6001810190506112da565b5050565b601f82111561133c5761130d816111db565b611316846111ed565b81016020851015611325578190505b611339611331856111ed565b8301826112d9565b50505b505050565b5f82821c905092915050565b5f61135c5f1984600802611341565b1980831691505092915050565b5f611374838361134d565b9150826002028217905092915050565b61138d82611147565b67ffffffffffffffff8111156113a6576113a5611151565b5b6113b082546111ab565b6113bb8282856112fb565b5f60209050601f8311600181146113ec575f84156113da578287015190505b6113e48582611369565b86555061144b565b601f1984166113fa866111db565b5f5b82811015611421578489015182556001820191506020850194506020810190506113fc565b8683101561143e578489015161143a601f89168261134d565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f8160011c9050919050565b5f5f8291508390505b60018511156114d5578086048111156114b1576114b0611453565b5b60018516156114c05780820291505b80810290506114ce85611480565b9450611495565b94509492505050565b5f826114ed57600190506115a8565b816114fa575f90506115a8565b8160018114611510576002811461151a57611549565b60019150506115a8565b60ff84111561152c5761152b611453565b5b8360020a91508482111561154357611542611453565b5b506115a8565b5060208310610133831016604e8410600b841016171561157e5782820a90508381111561157957611578611453565b5b6115a8565b61158b848484600161148c565b925090508184048111156115a2576115a1611453565b5b81810290505b9392505050565b5f60ff82169050919050565b5f6115c582611259565b91506115d0836115af565b92506115fd7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84846114de565b905092915050565b5f61160f82611259565b915061161a83611259565b925082820261162881611259565b9150828204841483151761163f5761163e611453565b5b5092915050565b5f819050919050565b61165881611646565b82525050565b61166781611259565b82525050565b611676816110e1565b82525050565b5f60a08201905061168f5f83018861164f565b61169c602083018761164f565b6116a9604083018661164f565b6116b6606083018561165e565b6116c3608083018461166d565b9695505050505050565b5f6020820190506116e05f83018461166d565b92915050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61171e82611147565b61172881856116e6565b93506117388185602086016116f6565b61174181611704565b840191505092915050565b5f6020820190508181035f8301526117648184611714565b905092915050565b5f81519050919050565b5f819050602082019050919050565b5f6117908251611646565b80915050919050565b5f6117a38261176c565b826117ad84611776565b90506117b881611785565b925060208210156117f8576117f37fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff836020036008026111fc565b831692505b5050919050565b5f6040820190506118125f83018561165e565b61181f602083018461165e565b9392505050565b5f61183082611259565b915061183b83611259565b925082820190508082111561185357611852611453565b5b92915050565b5f60608201905061186c5f83018661166d565b611879602083018561165e565b611886604083018461165e565b949350505050565b5f6020820190506118a15f83018461165e565b92915050565b5f79ffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6118d6826118a7565b91506118e1836118a7565b9250828201905079ffffffffffffffffffffffffffffffffffffffffffffffffffff81111561191357611912611453565b5b92915050565b5f819050919050565b5f61193c61193761193284611919565b611262565b6115af565b9050919050565b61194c81611922565b82525050565b5f6040820190506119655f830185611943565b611972602083018461165e565b9392505050565b5f611983826118a7565b915061198e836118a7565b9250828203905079ffffffffffffffffffffffffffffffffffffffffffffffffffff8111156119c0576119bf611453565b5b92915050565b5f6119d082611259565b91506119db83611259565b92508282039050818111156119f3576119f2611453565b5b92915050565b5f819050919050565b5f611a1c611a17611a12846119f9565b611262565b6115af565b9050919050565b611a2c81611a02565b82525050565b5f604082019050611a455f830185611a23565b611a52602083018461165e565b9392505050565b60805160a05160c05160e05161010051610120516101405161399b611aaa5f395f61151301525f6114d801525f61191b01525f6118fa01525f6110d401525f61112a01525f611153015261399b5ff3fe608060405234801561000f575f5ffd5b506004361061018c575f3560e01c80637ecebe00116100dc5780639ab24eb011610095578063c3cda5201161006f578063c3cda520146104da578063d505accf146104f6578063dd62ed3e14610512578063f1127ed8146105425761018c565b80639ab24eb01461045c578063a9059cbb1461048c578063bf7e214f146104bc5761018c565b80637ecebe001461037e57806384b0196e146103ae5780638e539e8c146103d25780638fb360371461040257806391ddadf41461042057806395d89b411461043e5761018c565b80633a46b1a8116101495780635c19a95c116101235780635c19a95c146102e65780636fcfff451461030257806370a08231146103325780637a9e5e4b146103625761018c565b80633a46b1a8146102685780634bf5d7e914610298578063587cde1e146102b65761018c565b806306fdde0314610190578063095ea7b3146101ae57806318160ddd146101de57806323b872dd146101fc578063313ce5671461022c5780633644e5151461024a575b5f5ffd5b610198610572565b6040516101a59190612c6b565b60405180910390f35b6101c860048036038101906101c39190612d1c565b610602565b6040516101d59190612d74565b60405180910390f35b6101e6610624565b6040516101f39190612d9c565b60405180910390f35b61021660048036038101906102119190612db5565b61062d565b6040516102239190612d74565b60405180910390f35b61023461065b565b6040516102419190612e20565b60405180910390f35b610252610663565b60405161025f9190612e51565b60405180910390f35b610282600480360381019061027d9190612d1c565b610671565b60405161028f9190612d9c565b60405180910390f35b6102a0610747565b6040516102ad9190612c6b565b60405180910390f35b6102d060048036038101906102cb9190612e6a565b6107db565b6040516102dd9190612ea4565b60405180910390f35b61030060048036038101906102fb9190612e6a565b610840565b005b61031c60048036038101906103179190612e6a565b610859565b6040516103299190612edb565b60405180910390f35b61034c60048036038101906103479190612e6a565b61086a565b6040516103599190612d9c565b60405180910390f35b61037c60048036038101906103779190612e6a565b6108af565b005b61039860048036038101906103939190612e6a565b610999565b6040516103a59190612d9c565b60405180910390f35b6103b66109aa565b6040516103c99796959493929190612fe5565b60405180910390f35b6103ec60048036038101906103e79190613067565b610a4f565b6040516103f99190612d9c565b60405180910390f35b61040a610ae9565b60405161041791906130cc565b60405180910390f35b610428610b15565b6040516104359190613105565b60405180910390f35b610446610b23565b6040516104539190612c6b565b60405180910390f35b61047660048036038101906104719190612e6a565b610bb3565b6040516104839190612d9c565b60405180910390f35b6104a660048036038101906104a19190612d1c565b610c1c565b6040516104b39190612d74565b60405180910390f35b6104c4610c3e565b6040516104d19190612ea4565b60405180910390f35b6104f460048036038101906104ef9190613172565b610c66565b005b610510600480360381019061050b91906131fb565b610d2b565b005b61052c60048036038101906105279190613298565b610e70565b6040516105399190612d9c565b60405180910390f35b61055c60048036038101906105579190613300565b610ef2565b60405161056991906133ae565b60405180910390f35b606060038054610581906133f4565b80601f01602080910402602001604051908101604052809291908181526020018280546105ad906133f4565b80156105f85780601f106105cf576101008083540402835291602001916105f8565b820191905f5260205f20905b8154815290600101906020018083116105db57829003601f168201915b5050505050905090565b5f5f61060c610f36565b9050610619818585610f3d565b600191505092915050565b5f600254905090565b5f5f610637610f36565b9050610644858285610f4f565b61064f858585610fe1565b60019150509392505050565b5f6012905090565b5f61066c6110d1565b905090565b5f5f61067b610b15565b90508065ffffffffffff1683106106cb5782816040517fecd3f81e0000000000000000000000000000000000000000000000000000000081526004016106c2929190613424565b60405180910390fd5b6107226106d784611187565b60095f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206111e090919063ffffffff16565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff1691505092915050565b60606107516112d0565b65ffffffffffff16610761610b15565b65ffffffffffff16146107a0576040517f6ff0714000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060400160405280601d81526020017f6d6f64653d626c6f636b6e756d6265722666726f6d3d64656661756c74000000815250905090565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f610849610f36565b905061085581836112df565b5050565b5f610863826113ef565b9050919050565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b5f6108b8610f36565b90506108c2610c3e565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461093157806040517f068ca9d80000000000000000000000000000000000000000000000000000000081526004016109289190612ea4565b60405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff163b0361098c57816040517fc2f31e5e0000000000000000000000000000000000000000000000000000000081526004016109839190612ea4565b60405180910390fd5b61099582611444565b5050565b5f6109a3826114be565b9050919050565b5f6060805f5f5f60606109bb6114cf565b6109c361150a565b46305f5f1b5f67ffffffffffffffff8111156109e2576109e161344b565b5b604051908082528060200260200182016040528015610a105781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b5f5f610a59610b15565b90508065ffffffffffff168310610aa95782816040517fecd3f81e000000000000000000000000000000000000000000000000000000008152600401610aa0929190613424565b60405180910390fd5b610ac5610ab584611187565b600a6111e090919063ffffffff16565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff16915050919050565b5f600b60149054906101000a900460ff16610b07575f60e01b610b10565b638fb3603760e01b5b905090565b5f610b1e6112d0565b905090565b606060048054610b32906133f4565b80601f0160208091040260200160405190810160405280929190818152602001828054610b5e906133f4565b8015610ba95780601f10610b8057610100808354040283529160200191610ba9565b820191905f5260205f20905b815481529060010190602001808311610b8c57829003601f168201915b5050505050905090565b5f610bf960095f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20611545565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff169050919050565b5f5f610c26610f36565b9050610c33818585610fe1565b600191505092915050565b5f600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b83421115610cab57836040517f4683af0e000000000000000000000000000000000000000000000000000000008152600401610ca29190612d9c565b60405180910390fd5b5f610d0c610d047fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf898989604051602001610ce99493929190613478565b604051602081830303815290604052805190602001206115a7565b8585856115c0565b9050610d1881876115ee565b610d2281886112df565b50505050505050565b83421115610d7057836040517f62791302000000000000000000000000000000000000000000000000000000008152600401610d679190612d9c565b60405180910390fd5b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610d9e8c611645565b89604051602001610db4969594939291906134bb565b6040516020818303038152906040528051906020012090505f610dd6826115a7565b90505f610de5828787876115c0565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610e5957808a6040517f4b800e46000000000000000000000000000000000000000000000000000000008152600401610e5092919061351a565b60405180910390fd5b610e648a8a8a610f3d565b50505050505050505050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b610efa612bbf565b610f048383611698565b905092915050565b5f8183610f19919061356e565b905092915050565b5f8183610f2e91906135bb565b905092915050565b5f33905090565b610f4a83838360016116f7565b505050565b5f610f5a8484610e70565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610fdb5781811015610fcc578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610fc393929190613608565b60405180910390fd5b610fda84848484035f6116f7565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611051575f6040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016110489190612ea4565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036110c1575f6040517fec442f050000000000000000000000000000000000000000000000000000000081526004016110b89190612ea4565b60405180910390fd5b6110cc8383836118c6565b505050565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614801561114c57507f000000000000000000000000000000000000000000000000000000000000000046145b15611179577f00000000000000000000000000000000000000000000000000000000000000009050611184565b6111816118d6565b90505b90565b5f65ffffffffffff80168211156111d8576030826040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526004016111cf92919061367f565b60405180910390fd5b819050919050565b5f5f835f018054905090505f5f90505f8290506005831115611264575f6112068461196b565b8461121191906136a6565b905061121f875f0182611a61565b5f015f9054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16101561125257809150611262565b60018161125f91906136d9565b92505b505b5f611273875f01878585611a73565b90505f81146112c257611294875f0160018361128f91906136a6565b611a61565b5f0160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff166112c4565b5f5b94505050505092915050565b5f6112da43611187565b905090565b5f6112e9836107db565b90508160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a46113ea81836113e586611ae8565b611af9565b505050565b5f61143d61143860095f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20611d69565b611d78565b9050919050565b80600b5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad816040516114b39190612ea4565b60405180910390a150565b5f6114c882611dcf565b9050919050565b606061150560057f0000000000000000000000000000000000000000000000000000000000000000611e1590919063ffffffff16565b905090565b606061154060067f0000000000000000000000000000000000000000000000000000000000000000611e1590919063ffffffff16565b905090565b5f5f825f018054905090505f811461159d5761156f835f0160018361156a91906136a6565b611a61565b5f0160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff1661159f565b5f5b915050919050565b5f6115b96115b36110d1565b83611ec2565b9050919050565b5f5f5f5f6115d088888888611f02565b9250925092506115e08282611fe9565b829350505050949350505050565b5f6115f883611645565b90508082146116405782816040517f752d88c000000000000000000000000000000000000000000000000000000000815260040161163792919061370c565b60405180910390fd5b505050565b5f60075f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050559050919050565b6116a0612bbf565b6116ef8260095f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2061214b90919063ffffffff16565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611767575f6040517fe602df0500000000000000000000000000000000000000000000000000000000815260040161175e9190612ea4565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036117d7575f6040517f94280d620000000000000000000000000000000000000000000000000000000081526004016117ce9190612ea4565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555080156118c0578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516118b79190612d9c565b60405180910390a35b50505050565b6118d183838361221a565b505050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000004630604051602001611950959493929190613733565b60405160208183030381529060405280519060200120905090565b5f5f820361197b575f9050611a5c565b5f6001611987846122c8565b901c6001901b905060018184816119a1576119a0613784565b5b048201901c905060018184816119ba576119b9613784565b5b048201901c905060018184816119d3576119d2613784565b5b048201901c905060018184816119ec576119eb613784565b5b048201901c90506001818481611a0557611a04613784565b5b048201901c90506001818481611a1e57611a1d613784565b5b048201901c90506001818481611a3757611a36613784565b5b048201901c9050611a5881828581611a5257611a51613784565b5b0461239f565b9150505b919050565b5f825f528160205f2001905092915050565b5f5b81831015611add575f611a8884846123b7565b90508465ffffffffffff16611a9d8783611a61565b5f015f9054906101000a900465ffffffffffff1665ffffffffffff161115611ac757809250611ad7565b600181611ad491906136d9565b93505b50611a75565b819050949350505050565b5f611af28261086a565b9050919050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611b3457505f81115b15611d64575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611c4e575f5f611bbf60095f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20610f21611bba866123dc565b612449565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff16915079ffffffffffffffffffffffffffffffffffffffffffffffffffff1691508473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611c439291906137b1565b60405180910390a250505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611d63575f5f611cd460095f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20610f0c611ccf866123dc565b612449565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff16915079ffffffffffffffffffffffffffffffffffffffffffffffffffff1691508373ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611d589291906137b1565b60405180910390a250505b5b505050565b5f815f01805490509050919050565b5f63ffffffff8016821115611dc7576020826040517f6dfcc650000000000000000000000000000000000000000000000000000000008152600401611dbe929190613811565b60405180910390fd5b819050919050565b5f60075f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b606060ff5f1b8314611e3157611e2a83612488565b9050611ebc565b818054611e3d906133f4565b80601f0160208091040260200160405190810160405280929190818152602001828054611e69906133f4565b8015611eb45780601f10611e8b57610100808354040283529160200191611eb4565b820191905f5260205f20905b815481529060010190602001808311611e9757829003601f168201915b505050505090505b92915050565b5f6040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b5f5f5f7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0845f1c1115611f3e575f600385925092509250611fdf565b5f6001888888886040515f8152602001604052604051611f619493929190613838565b6020604051602081039080840390855afa158015611f81573d5f5f3e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611fd2575f60015f5f1b93509350935050611fdf565b805f5f5f1b935093509350505b9450945094915050565b5f6003811115611ffc57611ffb61387b565b5b82600381111561200f5761200e61387b565b5b031561214757600160038111156120295761202861387b565b5b82600381111561203c5761203b61387b565b5b03612073576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260038111156120875761208661387b565b5b82600381111561209a5761209961387b565b5b036120de57805f1c6040517ffce698f70000000000000000000000000000000000000000000000000000000081526004016120d59190612d9c565b60405180910390fd5b6003808111156120f1576120f061387b565b5b8260038111156121045761210361387b565b5b0361214657806040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260040161213d9190612e51565b60405180910390fd5b5b5050565b612153612bbf565b825f018263ffffffff168154811061216e5761216d6138a8565b5b905f5260205f20016040518060400160405290815f82015f9054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff1681526020015f820160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff1679ffffffffffffffffffffffffffffffffffffffffffffffffffff1679ffffffffffffffffffffffffffffffffffffffffffffffffffff1681525050905092915050565b6122258383836124fa565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036122b8575f612261610624565b90505f61226c612713565b9050808211156122b55781816040517f1cb15d260000000000000000000000000000000000000000000000000000000081526004016122ac9291906137b1565b60405180910390fd5b50505b6122c3838383612736565b505050565b5f5f5f90505f608084901c11156122e757608083901c92506080810190505b5f604084901c111561230157604083901c92506040810190505b5f602084901c111561231b57602083901c92506020810190505b5f601084901c111561233557601083901c92506010810190505b5f600884901c111561234f57600883901c92506008810190505b5f600484901c111561236957600483901c92506004810190505b5f600284901c111561238357600283901c92506002810190505b5f600184901c1115612396576001810190505b80915050919050565b5f8183106123ad57816123af565b825b905092915050565b5f60028284186123c791906138d5565b8284166123d491906136d9565b905092915050565b5f79ffffffffffffffffffffffffffffffffffffffffffffffffffff80168211156124415760d0826040517f6dfcc65000000000000000000000000000000000000000000000000000000000815260040161243892919061393e565b60405180910390fd5b819050919050565b5f5f61247c612456610b15565b61246c61246288611545565b868863ffffffff16565b876127ee9092919063ffffffff16565b91509150935093915050565b60605f61249483612809565b90505f602067ffffffffffffffff8111156124b2576124b161344b565b5b6040519080825280601f01601f1916602001820160405280156124e45781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361254a578060025f82825461253e91906136d9565b92505081905550612618565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156125d3578381836040517fe450d38c0000000000000000000000000000000000000000000000000000000081526004016125ca93929190613608565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361265f578060025f82825403925050819055506126a9565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516127069190612d9c565b60405180910390a3505050565b5f79ffffffffffffffffffffffffffffffffffffffffffffffffffff8016905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036127825761277f600a610f0c61277a846123dc565b612449565b50505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036127ce576127cb600a610f216127c6846123dc565b612449565b50505b6127e96127da846107db565b6127e3846107db565b83611af9565b505050565b5f5f6127fd855f018585612857565b91509150935093915050565b5f5f60ff835f1c169050601f81111561284e576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b5f5f5f858054905090505f811115612ad7575f6128808760018461287b91906136a6565b611a61565b6040518060400160405290815f82015f9054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff1681526020015f820160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff1679ffffffffffffffffffffffffffffffffffffffffffffffffffff1679ffffffffffffffffffffffffffffffffffffffffffffffffffff168152505090508565ffffffffffff16815f015165ffffffffffff16111561296b576040517f2520601d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8565ffffffffffff16815f015165ffffffffffff16036129ed578461299c8860018561299791906136a6565b611a61565b5f0160066101000a81548179ffffffffffffffffffffffffffffffffffffffffffffffffffff021916908379ffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550612ac6565b8660405180604001604052808865ffffffffffff1681526020018779ffffffffffffffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003905f5260205f20015f909190919091505f820151815f015f6101000a81548165ffffffffffff021916908365ffffffffffff1602179055506020820151815f0160066101000a81548179ffffffffffffffffffffffffffffffffffffffffffffffffffff021916908379ffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505b806020015185935093505050612bb7565b8560405180604001604052808765ffffffffffff1681526020018679ffffffffffffffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003905f5260205f20015f909190919091505f820151815f015f6101000a81548165ffffffffffff021916908365ffffffffffff1602179055506020820151815f0160066101000a81548179ffffffffffffffffffffffffffffffffffffffffffffffffffff021916908379ffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505f8492509250505b935093915050565b60405180604001604052805f65ffffffffffff1681526020015f79ffffffffffffffffffffffffffffffffffffffffffffffffffff1681525090565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f612c3d82612bfb565b612c478185612c05565b9350612c57818560208601612c15565b612c6081612c23565b840191505092915050565b5f6020820190508181035f830152612c838184612c33565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612cb882612c8f565b9050919050565b612cc881612cae565b8114612cd2575f5ffd5b50565b5f81359050612ce381612cbf565b92915050565b5f819050919050565b612cfb81612ce9565b8114612d05575f5ffd5b50565b5f81359050612d1681612cf2565b92915050565b5f5f60408385031215612d3257612d31612c8b565b5b5f612d3f85828601612cd5565b9250506020612d5085828601612d08565b9150509250929050565b5f8115159050919050565b612d6e81612d5a565b82525050565b5f602082019050612d875f830184612d65565b92915050565b612d9681612ce9565b82525050565b5f602082019050612daf5f830184612d8d565b92915050565b5f5f5f60608486031215612dcc57612dcb612c8b565b5b5f612dd986828701612cd5565b9350506020612dea86828701612cd5565b9250506040612dfb86828701612d08565b9150509250925092565b5f60ff82169050919050565b612e1a81612e05565b82525050565b5f602082019050612e335f830184612e11565b92915050565b5f819050919050565b612e4b81612e39565b82525050565b5f602082019050612e645f830184612e42565b92915050565b5f60208284031215612e7f57612e7e612c8b565b5b5f612e8c84828501612cd5565b91505092915050565b612e9e81612cae565b82525050565b5f602082019050612eb75f830184612e95565b92915050565b5f63ffffffff82169050919050565b612ed581612ebd565b82525050565b5f602082019050612eee5f830184612ecc565b92915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b612f2881612ef4565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b612f6081612ce9565b82525050565b5f612f718383612f57565b60208301905092915050565b5f602082019050919050565b5f612f9382612f2e565b612f9d8185612f38565b9350612fa883612f48565b805f5b83811015612fd8578151612fbf8882612f66565b9750612fca83612f7d565b925050600181019050612fab565b5085935050505092915050565b5f60e082019050612ff85f83018a612f1f565b818103602083015261300a8189612c33565b9050818103604083015261301e8188612c33565b905061302d6060830187612d8d565b61303a6080830186612e95565b61304760a0830185612e42565b81810360c08301526130598184612f89565b905098975050505050505050565b5f6020828403121561307c5761307b612c8b565b5b5f61308984828501612d08565b91505092915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6130c681613092565b82525050565b5f6020820190506130df5f8301846130bd565b92915050565b5f65ffffffffffff82169050919050565b6130ff816130e5565b82525050565b5f6020820190506131185f8301846130f6565b92915050565b61312781612e05565b8114613131575f5ffd5b50565b5f813590506131428161311e565b92915050565b61315181612e39565b811461315b575f5ffd5b50565b5f8135905061316c81613148565b92915050565b5f5f5f5f5f5f60c0878903121561318c5761318b612c8b565b5b5f61319989828a01612cd5565b96505060206131aa89828a01612d08565b95505060406131bb89828a01612d08565b94505060606131cc89828a01613134565b93505060806131dd89828a0161315e565b92505060a06131ee89828a0161315e565b9150509295509295509295565b5f5f5f5f5f5f5f60e0888a03121561321657613215612c8b565b5b5f6132238a828b01612cd5565b97505060206132348a828b01612cd5565b96505060406132458a828b01612d08565b95505060606132568a828b01612d08565b94505060806132678a828b01613134565b93505060a06132788a828b0161315e565b92505060c06132898a828b0161315e565b91505092959891949750929550565b5f5f604083850312156132ae576132ad612c8b565b5b5f6132bb85828601612cd5565b92505060206132cc85828601612cd5565b9150509250929050565b6132df81612ebd565b81146132e9575f5ffd5b50565b5f813590506132fa816132d6565b92915050565b5f5f6040838503121561331657613315612c8b565b5b5f61332385828601612cd5565b9250506020613334858286016132ec565b9150509250929050565b613347816130e5565b82525050565b5f79ffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b61337b8161334d565b82525050565b604082015f8201516133955f85018261333e565b5060208201516133a86020850182613372565b50505050565b5f6040820190506133c15f830184613381565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061340b57607f821691505b60208210810361341e5761341d6133c7565b5b50919050565b5f6040820190506134375f830185612d8d565b61344460208301846130f6565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f60808201905061348b5f830187612e42565b6134986020830186612e95565b6134a56040830185612d8d565b6134b26060830184612d8d565b95945050505050565b5f60c0820190506134ce5f830189612e42565b6134db6020830188612e95565b6134e86040830187612e95565b6134f56060830186612d8d565b6135026080830185612d8d565b61350f60a0830184612d8d565b979650505050505050565b5f60408201905061352d5f830185612e95565b61353a6020830184612e95565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6135788261334d565b91506135838361334d565b9250828201905079ffffffffffffffffffffffffffffffffffffffffffffffffffff8111156135b5576135b4613541565b5b92915050565b5f6135c58261334d565b91506135d08361334d565b9250828203905079ffffffffffffffffffffffffffffffffffffffffffffffffffff81111561360257613601613541565b5b92915050565b5f60608201905061361b5f830186612e95565b6136286020830185612d8d565b6136356040830184612d8d565b949350505050565b5f819050919050565b5f819050919050565b5f61366961366461365f8461363d565b613646565b612e05565b9050919050565b6136798161364f565b82525050565b5f6040820190506136925f830185613670565b61369f6020830184612d8d565b9392505050565b5f6136b082612ce9565b91506136bb83612ce9565b92508282039050818111156136d3576136d2613541565b5b92915050565b5f6136e382612ce9565b91506136ee83612ce9565b925082820190508082111561370657613705613541565b5b92915050565b5f60408201905061371f5f830185612e95565b61372c6020830184612d8d565b9392505050565b5f60a0820190506137465f830188612e42565b6137536020830187612e42565b6137606040830186612e42565b61376d6060830185612d8d565b61377a6080830184612e95565b9695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6040820190506137c45f830185612d8d565b6137d16020830184612d8d565b9392505050565b5f819050919050565b5f6137fb6137f66137f1846137d8565b613646565b612e05565b9050919050565b61380b816137e1565b82525050565b5f6040820190506138245f830185613802565b6138316020830184612d8d565b9392505050565b5f60808201905061384b5f830187612e42565b6138586020830186612e11565b6138656040830185612e42565b6138726060830184612e42565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6138df82612ce9565b91506138ea83612ce9565b9250826138fa576138f9613784565b5b828204905092915050565b5f819050919050565b5f61392861392361391e84613905565b613646565b612e05565b9050919050565b6139388161390e565b82525050565b5f6040820190506139515f83018561392f565b61395e6020830184612d8d565b939250505056fea26469706673582212201aebd5254313266e8230ff04a8ca422e779e482648c9f8ef77c4bf54545aa1a964736f6c634300081c0033000000000000000000000000131a4e3c4bfa32d4261c12cabffd7fdb91a653bd
Deployed Bytecode
0x608060405234801561000f575f5ffd5b506004361061018c575f3560e01c80637ecebe00116100dc5780639ab24eb011610095578063c3cda5201161006f578063c3cda520146104da578063d505accf146104f6578063dd62ed3e14610512578063f1127ed8146105425761018c565b80639ab24eb01461045c578063a9059cbb1461048c578063bf7e214f146104bc5761018c565b80637ecebe001461037e57806384b0196e146103ae5780638e539e8c146103d25780638fb360371461040257806391ddadf41461042057806395d89b411461043e5761018c565b80633a46b1a8116101495780635c19a95c116101235780635c19a95c146102e65780636fcfff451461030257806370a08231146103325780637a9e5e4b146103625761018c565b80633a46b1a8146102685780634bf5d7e914610298578063587cde1e146102b65761018c565b806306fdde0314610190578063095ea7b3146101ae57806318160ddd146101de57806323b872dd146101fc578063313ce5671461022c5780633644e5151461024a575b5f5ffd5b610198610572565b6040516101a59190612c6b565b60405180910390f35b6101c860048036038101906101c39190612d1c565b610602565b6040516101d59190612d74565b60405180910390f35b6101e6610624565b6040516101f39190612d9c565b60405180910390f35b61021660048036038101906102119190612db5565b61062d565b6040516102239190612d74565b60405180910390f35b61023461065b565b6040516102419190612e20565b60405180910390f35b610252610663565b60405161025f9190612e51565b60405180910390f35b610282600480360381019061027d9190612d1c565b610671565b60405161028f9190612d9c565b60405180910390f35b6102a0610747565b6040516102ad9190612c6b565b60405180910390f35b6102d060048036038101906102cb9190612e6a565b6107db565b6040516102dd9190612ea4565b60405180910390f35b61030060048036038101906102fb9190612e6a565b610840565b005b61031c60048036038101906103179190612e6a565b610859565b6040516103299190612edb565b60405180910390f35b61034c60048036038101906103479190612e6a565b61086a565b6040516103599190612d9c565b60405180910390f35b61037c60048036038101906103779190612e6a565b6108af565b005b61039860048036038101906103939190612e6a565b610999565b6040516103a59190612d9c565b60405180910390f35b6103b66109aa565b6040516103c99796959493929190612fe5565b60405180910390f35b6103ec60048036038101906103e79190613067565b610a4f565b6040516103f99190612d9c565b60405180910390f35b61040a610ae9565b60405161041791906130cc565b60405180910390f35b610428610b15565b6040516104359190613105565b60405180910390f35b610446610b23565b6040516104539190612c6b565b60405180910390f35b61047660048036038101906104719190612e6a565b610bb3565b6040516104839190612d9c565b60405180910390f35b6104a660048036038101906104a19190612d1c565b610c1c565b6040516104b39190612d74565b60405180910390f35b6104c4610c3e565b6040516104d19190612ea4565b60405180910390f35b6104f460048036038101906104ef9190613172565b610c66565b005b610510600480360381019061050b91906131fb565b610d2b565b005b61052c60048036038101906105279190613298565b610e70565b6040516105399190612d9c565b60405180910390f35b61055c60048036038101906105579190613300565b610ef2565b60405161056991906133ae565b60405180910390f35b606060038054610581906133f4565b80601f01602080910402602001604051908101604052809291908181526020018280546105ad906133f4565b80156105f85780601f106105cf576101008083540402835291602001916105f8565b820191905f5260205f20905b8154815290600101906020018083116105db57829003601f168201915b5050505050905090565b5f5f61060c610f36565b9050610619818585610f3d565b600191505092915050565b5f600254905090565b5f5f610637610f36565b9050610644858285610f4f565b61064f858585610fe1565b60019150509392505050565b5f6012905090565b5f61066c6110d1565b905090565b5f5f61067b610b15565b90508065ffffffffffff1683106106cb5782816040517fecd3f81e0000000000000000000000000000000000000000000000000000000081526004016106c2929190613424565b60405180910390fd5b6107226106d784611187565b60095f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206111e090919063ffffffff16565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff1691505092915050565b60606107516112d0565b65ffffffffffff16610761610b15565b65ffffffffffff16146107a0576040517f6ff0714000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060400160405280601d81526020017f6d6f64653d626c6f636b6e756d6265722666726f6d3d64656661756c74000000815250905090565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f610849610f36565b905061085581836112df565b5050565b5f610863826113ef565b9050919050565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b5f6108b8610f36565b90506108c2610c3e565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461093157806040517f068ca9d80000000000000000000000000000000000000000000000000000000081526004016109289190612ea4565b60405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff163b0361098c57816040517fc2f31e5e0000000000000000000000000000000000000000000000000000000081526004016109839190612ea4565b60405180910390fd5b61099582611444565b5050565b5f6109a3826114be565b9050919050565b5f6060805f5f5f60606109bb6114cf565b6109c361150a565b46305f5f1b5f67ffffffffffffffff8111156109e2576109e161344b565b5b604051908082528060200260200182016040528015610a105781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b5f5f610a59610b15565b90508065ffffffffffff168310610aa95782816040517fecd3f81e000000000000000000000000000000000000000000000000000000008152600401610aa0929190613424565b60405180910390fd5b610ac5610ab584611187565b600a6111e090919063ffffffff16565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff16915050919050565b5f600b60149054906101000a900460ff16610b07575f60e01b610b10565b638fb3603760e01b5b905090565b5f610b1e6112d0565b905090565b606060048054610b32906133f4565b80601f0160208091040260200160405190810160405280929190818152602001828054610b5e906133f4565b8015610ba95780601f10610b8057610100808354040283529160200191610ba9565b820191905f5260205f20905b815481529060010190602001808311610b8c57829003601f168201915b5050505050905090565b5f610bf960095f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20611545565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff169050919050565b5f5f610c26610f36565b9050610c33818585610fe1565b600191505092915050565b5f600b5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b83421115610cab57836040517f4683af0e000000000000000000000000000000000000000000000000000000008152600401610ca29190612d9c565b60405180910390fd5b5f610d0c610d047fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf898989604051602001610ce99493929190613478565b604051602081830303815290604052805190602001206115a7565b8585856115c0565b9050610d1881876115ee565b610d2281886112df565b50505050505050565b83421115610d7057836040517f62791302000000000000000000000000000000000000000000000000000000008152600401610d679190612d9c565b60405180910390fd5b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610d9e8c611645565b89604051602001610db4969594939291906134bb565b6040516020818303038152906040528051906020012090505f610dd6826115a7565b90505f610de5828787876115c0565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610e5957808a6040517f4b800e46000000000000000000000000000000000000000000000000000000008152600401610e5092919061351a565b60405180910390fd5b610e648a8a8a610f3d565b50505050505050505050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b610efa612bbf565b610f048383611698565b905092915050565b5f8183610f19919061356e565b905092915050565b5f8183610f2e91906135bb565b905092915050565b5f33905090565b610f4a83838360016116f7565b505050565b5f610f5a8484610e70565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610fdb5781811015610fcc578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610fc393929190613608565b60405180910390fd5b610fda84848484035f6116f7565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611051575f6040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016110489190612ea4565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036110c1575f6040517fec442f050000000000000000000000000000000000000000000000000000000081526004016110b89190612ea4565b60405180910390fd5b6110cc8383836118c6565b505050565b5f7f0000000000000000000000007829156a998bf7d5e9c18f7ad0a2205c5920e69173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614801561114c57507f000000000000000000000000000000000000000000000000000000000000000146145b15611179577f9da7190394d59b5d9b281a327d9bd9f141b75441840a9741ffd301b34f0521fd9050611184565b6111816118d6565b90505b90565b5f65ffffffffffff80168211156111d8576030826040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526004016111cf92919061367f565b60405180910390fd5b819050919050565b5f5f835f018054905090505f5f90505f8290506005831115611264575f6112068461196b565b8461121191906136a6565b905061121f875f0182611a61565b5f015f9054906101000a900465ffffffffffff1665ffffffffffff168665ffffffffffff16101561125257809150611262565b60018161125f91906136d9565b92505b505b5f611273875f01878585611a73565b90505f81146112c257611294875f0160018361128f91906136a6565b611a61565b5f0160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff166112c4565b5f5b94505050505092915050565b5f6112da43611187565b905090565b5f6112e9836107db565b90508160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a46113ea81836113e586611ae8565b611af9565b505050565b5f61143d61143860095f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20611d69565b611d78565b9050919050565b80600b5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad816040516114b39190612ea4565b60405180910390a150565b5f6114c882611dcf565b9050919050565b606061150560057f4574686572576f726c6420476f7665726e616e636520546f6b656e000000001b611e1590919063ffffffff16565b905090565b606061154060067f3100000000000000000000000000000000000000000000000000000000000001611e1590919063ffffffff16565b905090565b5f5f825f018054905090505f811461159d5761156f835f0160018361156a91906136a6565b611a61565b5f0160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff1661159f565b5f5b915050919050565b5f6115b96115b36110d1565b83611ec2565b9050919050565b5f5f5f5f6115d088888888611f02565b9250925092506115e08282611fe9565b829350505050949350505050565b5f6115f883611645565b90508082146116405782816040517f752d88c000000000000000000000000000000000000000000000000000000000815260040161163792919061370c565b60405180910390fd5b505050565b5f60075f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050559050919050565b6116a0612bbf565b6116ef8260095f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2061214b90919063ffffffff16565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611767575f6040517fe602df0500000000000000000000000000000000000000000000000000000000815260040161175e9190612ea4565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036117d7575f6040517f94280d620000000000000000000000000000000000000000000000000000000081526004016117ce9190612ea4565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555080156118c0578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516118b79190612d9c565b60405180910390a35b50505050565b6118d183838361221a565b505050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7ff2c7e4753b39f4ca78ebd63feb4aac8f214c3a89b3db1c57f11c922a7caabc527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001611950959493929190613733565b60405160208183030381529060405280519060200120905090565b5f5f820361197b575f9050611a5c565b5f6001611987846122c8565b901c6001901b905060018184816119a1576119a0613784565b5b048201901c905060018184816119ba576119b9613784565b5b048201901c905060018184816119d3576119d2613784565b5b048201901c905060018184816119ec576119eb613784565b5b048201901c90506001818481611a0557611a04613784565b5b048201901c90506001818481611a1e57611a1d613784565b5b048201901c90506001818481611a3757611a36613784565b5b048201901c9050611a5881828581611a5257611a51613784565b5b0461239f565b9150505b919050565b5f825f528160205f2001905092915050565b5f5b81831015611add575f611a8884846123b7565b90508465ffffffffffff16611a9d8783611a61565b5f015f9054906101000a900465ffffffffffff1665ffffffffffff161115611ac757809250611ad7565b600181611ad491906136d9565b93505b50611a75565b819050949350505050565b5f611af28261086a565b9050919050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611b3457505f81115b15611d64575f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611c4e575f5f611bbf60095f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20610f21611bba866123dc565b612449565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff16915079ffffffffffffffffffffffffffffffffffffffffffffffffffff1691508473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611c439291906137b1565b60405180910390a250505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611d63575f5f611cd460095f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20610f0c611ccf866123dc565b612449565b79ffffffffffffffffffffffffffffffffffffffffffffffffffff16915079ffffffffffffffffffffffffffffffffffffffffffffffffffff1691508373ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611d589291906137b1565b60405180910390a250505b5b505050565b5f815f01805490509050919050565b5f63ffffffff8016821115611dc7576020826040517f6dfcc650000000000000000000000000000000000000000000000000000000008152600401611dbe929190613811565b60405180910390fd5b819050919050565b5f60075f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b606060ff5f1b8314611e3157611e2a83612488565b9050611ebc565b818054611e3d906133f4565b80601f0160208091040260200160405190810160405280929190818152602001828054611e69906133f4565b8015611eb45780601f10611e8b57610100808354040283529160200191611eb4565b820191905f5260205f20905b815481529060010190602001808311611e9757829003601f168201915b505050505090505b92915050565b5f6040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b5f5f5f7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0845f1c1115611f3e575f600385925092509250611fdf565b5f6001888888886040515f8152602001604052604051611f619493929190613838565b6020604051602081039080840390855afa158015611f81573d5f5f3e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611fd2575f60015f5f1b93509350935050611fdf565b805f5f5f1b935093509350505b9450945094915050565b5f6003811115611ffc57611ffb61387b565b5b82600381111561200f5761200e61387b565b5b031561214757600160038111156120295761202861387b565b5b82600381111561203c5761203b61387b565b5b03612073576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260038111156120875761208661387b565b5b82600381111561209a5761209961387b565b5b036120de57805f1c6040517ffce698f70000000000000000000000000000000000000000000000000000000081526004016120d59190612d9c565b60405180910390fd5b6003808111156120f1576120f061387b565b5b8260038111156121045761210361387b565b5b0361214657806040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260040161213d9190612e51565b60405180910390fd5b5b5050565b612153612bbf565b825f018263ffffffff168154811061216e5761216d6138a8565b5b905f5260205f20016040518060400160405290815f82015f9054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff1681526020015f820160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff1679ffffffffffffffffffffffffffffffffffffffffffffffffffff1679ffffffffffffffffffffffffffffffffffffffffffffffffffff1681525050905092915050565b6122258383836124fa565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036122b8575f612261610624565b90505f61226c612713565b9050808211156122b55781816040517f1cb15d260000000000000000000000000000000000000000000000000000000081526004016122ac9291906137b1565b60405180910390fd5b50505b6122c3838383612736565b505050565b5f5f5f90505f608084901c11156122e757608083901c92506080810190505b5f604084901c111561230157604083901c92506040810190505b5f602084901c111561231b57602083901c92506020810190505b5f601084901c111561233557601083901c92506010810190505b5f600884901c111561234f57600883901c92506008810190505b5f600484901c111561236957600483901c92506004810190505b5f600284901c111561238357600283901c92506002810190505b5f600184901c1115612396576001810190505b80915050919050565b5f8183106123ad57816123af565b825b905092915050565b5f60028284186123c791906138d5565b8284166123d491906136d9565b905092915050565b5f79ffffffffffffffffffffffffffffffffffffffffffffffffffff80168211156124415760d0826040517f6dfcc65000000000000000000000000000000000000000000000000000000000815260040161243892919061393e565b60405180910390fd5b819050919050565b5f5f61247c612456610b15565b61246c61246288611545565b868863ffffffff16565b876127ee9092919063ffffffff16565b91509150935093915050565b60605f61249483612809565b90505f602067ffffffffffffffff8111156124b2576124b161344b565b5b6040519080825280601f01601f1916602001820160405280156124e45781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361254a578060025f82825461253e91906136d9565b92505081905550612618565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156125d3578381836040517fe450d38c0000000000000000000000000000000000000000000000000000000081526004016125ca93929190613608565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361265f578060025f82825403925050819055506126a9565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516127069190612d9c565b60405180910390a3505050565b5f79ffffffffffffffffffffffffffffffffffffffffffffffffffff8016905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036127825761277f600a610f0c61277a846123dc565b612449565b50505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036127ce576127cb600a610f216127c6846123dc565b612449565b50505b6127e96127da846107db565b6127e3846107db565b83611af9565b505050565b5f5f6127fd855f018585612857565b91509150935093915050565b5f5f60ff835f1c169050601f81111561284e576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b5f5f5f858054905090505f811115612ad7575f6128808760018461287b91906136a6565b611a61565b6040518060400160405290815f82015f9054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff1681526020015f820160069054906101000a900479ffffffffffffffffffffffffffffffffffffffffffffffffffff1679ffffffffffffffffffffffffffffffffffffffffffffffffffff1679ffffffffffffffffffffffffffffffffffffffffffffffffffff168152505090508565ffffffffffff16815f015165ffffffffffff16111561296b576040517f2520601d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8565ffffffffffff16815f015165ffffffffffff16036129ed578461299c8860018561299791906136a6565b611a61565b5f0160066101000a81548179ffffffffffffffffffffffffffffffffffffffffffffffffffff021916908379ffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550612ac6565b8660405180604001604052808865ffffffffffff1681526020018779ffffffffffffffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003905f5260205f20015f909190919091505f820151815f015f6101000a81548165ffffffffffff021916908365ffffffffffff1602179055506020820151815f0160066101000a81548179ffffffffffffffffffffffffffffffffffffffffffffffffffff021916908379ffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505b806020015185935093505050612bb7565b8560405180604001604052808765ffffffffffff1681526020018679ffffffffffffffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003905f5260205f20015f909190919091505f820151815f015f6101000a81548165ffffffffffff021916908365ffffffffffff1602179055506020820151815f0160066101000a81548179ffffffffffffffffffffffffffffffffffffffffffffffffffff021916908379ffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505f8492509250505b935093915050565b60405180604001604052805f65ffffffffffff1681526020015f79ffffffffffffffffffffffffffffffffffffffffffffffffffff1681525090565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f612c3d82612bfb565b612c478185612c05565b9350612c57818560208601612c15565b612c6081612c23565b840191505092915050565b5f6020820190508181035f830152612c838184612c33565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612cb882612c8f565b9050919050565b612cc881612cae565b8114612cd2575f5ffd5b50565b5f81359050612ce381612cbf565b92915050565b5f819050919050565b612cfb81612ce9565b8114612d05575f5ffd5b50565b5f81359050612d1681612cf2565b92915050565b5f5f60408385031215612d3257612d31612c8b565b5b5f612d3f85828601612cd5565b9250506020612d5085828601612d08565b9150509250929050565b5f8115159050919050565b612d6e81612d5a565b82525050565b5f602082019050612d875f830184612d65565b92915050565b612d9681612ce9565b82525050565b5f602082019050612daf5f830184612d8d565b92915050565b5f5f5f60608486031215612dcc57612dcb612c8b565b5b5f612dd986828701612cd5565b9350506020612dea86828701612cd5565b9250506040612dfb86828701612d08565b9150509250925092565b5f60ff82169050919050565b612e1a81612e05565b82525050565b5f602082019050612e335f830184612e11565b92915050565b5f819050919050565b612e4b81612e39565b82525050565b5f602082019050612e645f830184612e42565b92915050565b5f60208284031215612e7f57612e7e612c8b565b5b5f612e8c84828501612cd5565b91505092915050565b612e9e81612cae565b82525050565b5f602082019050612eb75f830184612e95565b92915050565b5f63ffffffff82169050919050565b612ed581612ebd565b82525050565b5f602082019050612eee5f830184612ecc565b92915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b612f2881612ef4565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b612f6081612ce9565b82525050565b5f612f718383612f57565b60208301905092915050565b5f602082019050919050565b5f612f9382612f2e565b612f9d8185612f38565b9350612fa883612f48565b805f5b83811015612fd8578151612fbf8882612f66565b9750612fca83612f7d565b925050600181019050612fab565b5085935050505092915050565b5f60e082019050612ff85f83018a612f1f565b818103602083015261300a8189612c33565b9050818103604083015261301e8188612c33565b905061302d6060830187612d8d565b61303a6080830186612e95565b61304760a0830185612e42565b81810360c08301526130598184612f89565b905098975050505050505050565b5f6020828403121561307c5761307b612c8b565b5b5f61308984828501612d08565b91505092915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6130c681613092565b82525050565b5f6020820190506130df5f8301846130bd565b92915050565b5f65ffffffffffff82169050919050565b6130ff816130e5565b82525050565b5f6020820190506131185f8301846130f6565b92915050565b61312781612e05565b8114613131575f5ffd5b50565b5f813590506131428161311e565b92915050565b61315181612e39565b811461315b575f5ffd5b50565b5f8135905061316c81613148565b92915050565b5f5f5f5f5f5f60c0878903121561318c5761318b612c8b565b5b5f61319989828a01612cd5565b96505060206131aa89828a01612d08565b95505060406131bb89828a01612d08565b94505060606131cc89828a01613134565b93505060806131dd89828a0161315e565b92505060a06131ee89828a0161315e565b9150509295509295509295565b5f5f5f5f5f5f5f60e0888a03121561321657613215612c8b565b5b5f6132238a828b01612cd5565b97505060206132348a828b01612cd5565b96505060406132458a828b01612d08565b95505060606132568a828b01612d08565b94505060806132678a828b01613134565b93505060a06132788a828b0161315e565b92505060c06132898a828b0161315e565b91505092959891949750929550565b5f5f604083850312156132ae576132ad612c8b565b5b5f6132bb85828601612cd5565b92505060206132cc85828601612cd5565b9150509250929050565b6132df81612ebd565b81146132e9575f5ffd5b50565b5f813590506132fa816132d6565b92915050565b5f5f6040838503121561331657613315612c8b565b5b5f61332385828601612cd5565b9250506020613334858286016132ec565b9150509250929050565b613347816130e5565b82525050565b5f79ffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b61337b8161334d565b82525050565b604082015f8201516133955f85018261333e565b5060208201516133a86020850182613372565b50505050565b5f6040820190506133c15f830184613381565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061340b57607f821691505b60208210810361341e5761341d6133c7565b5b50919050565b5f6040820190506134375f830185612d8d565b61344460208301846130f6565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f60808201905061348b5f830187612e42565b6134986020830186612e95565b6134a56040830185612d8d565b6134b26060830184612d8d565b95945050505050565b5f60c0820190506134ce5f830189612e42565b6134db6020830188612e95565b6134e86040830187612e95565b6134f56060830186612d8d565b6135026080830185612d8d565b61350f60a0830184612d8d565b979650505050505050565b5f60408201905061352d5f830185612e95565b61353a6020830184612e95565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6135788261334d565b91506135838361334d565b9250828201905079ffffffffffffffffffffffffffffffffffffffffffffffffffff8111156135b5576135b4613541565b5b92915050565b5f6135c58261334d565b91506135d08361334d565b9250828203905079ffffffffffffffffffffffffffffffffffffffffffffffffffff81111561360257613601613541565b5b92915050565b5f60608201905061361b5f830186612e95565b6136286020830185612d8d565b6136356040830184612d8d565b949350505050565b5f819050919050565b5f819050919050565b5f61366961366461365f8461363d565b613646565b612e05565b9050919050565b6136798161364f565b82525050565b5f6040820190506136925f830185613670565b61369f6020830184612d8d565b9392505050565b5f6136b082612ce9565b91506136bb83612ce9565b92508282039050818111156136d3576136d2613541565b5b92915050565b5f6136e382612ce9565b91506136ee83612ce9565b925082820190508082111561370657613705613541565b5b92915050565b5f60408201905061371f5f830185612e95565b61372c6020830184612d8d565b9392505050565b5f60a0820190506137465f830188612e42565b6137536020830187612e42565b6137606040830186612e42565b61376d6060830185612d8d565b61377a6080830184612e95565b9695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6040820190506137c45f830185612d8d565b6137d16020830184612d8d565b9392505050565b5f819050919050565b5f6137fb6137f66137f1846137d8565b613646565b612e05565b9050919050565b61380b816137e1565b82525050565b5f6040820190506138245f830185613802565b6138316020830184612d8d565b9392505050565b5f60808201905061384b5f830187612e42565b6138586020830186612e11565b6138656040830185612e42565b6138726060830184612e42565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6138df82612ce9565b91506138ea83612ce9565b9250826138fa576138f9613784565b5b828204905092915050565b5f819050919050565b5f61392861392361391e84613905565b613646565b612e05565b9050919050565b6139388161390e565b82525050565b5f6040820190506139515f83018561392f565b61395e6020830184612d8d565b939250505056fea26469706673582212201aebd5254313266e8230ff04a8ca422e779e482648c9f8ef77c4bf54545aa1a964736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000131a4e3c4bfa32d4261c12cabffd7fdb91a653bd
-----Decoded View---------------
Arg [0] : initialAuthority (address): 0x131a4E3c4bFa32D4261c12CAbFFd7fDB91a653bD
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000131a4e3c4bfa32d4261c12cabffd7fdb91a653bd
Deployed Bytecode Sourcemap
409:713:30:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89:11;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4293:186;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3144:97;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5039:244;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3002:82;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2656:112:13;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3922:364:6;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3040:272;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5539:117;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5738:138;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3208:126:14;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3299:116:11;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3056:362:0;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;942:177:30;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5144:557:23;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;4922:341:6;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3459:156:0;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2789:96:6;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2276:93:11;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3402:135:6;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3610:178:11;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2922:93:0;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5954:554:6;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1680:672:13;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3846:140:11;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3411:163:14;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2074:89:11;2119:13;2151:5;2144:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89;:::o;4293:186::-;4366:4;4382:13;4398:12;:10;:12::i;:::-;4382:28;;4420:31;4429:5;4436:7;4445:5;4420:8;:31::i;:::-;4468:4;4461:11;;;4293:186;;;;:::o;3144:97::-;3196:7;3222:12;;3215:19;;3144:97;:::o;5039:244::-;5126:4;5142:15;5160:12;:10;:12::i;:::-;5142:30;;5182:37;5198:4;5204:7;5213:5;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;5272:4;5265:11;;;5039:244;;;;;:::o;3002:82::-;3051:5;3075:2;3068:9;;3002:82;:::o;2656:112:13:-;2715:7;2741:20;:18;:20::i;:::-;2734:27;;2656:112;:::o;3922:364:6:-;4009:7;4028:23;4054:7;:5;:7::i;:::-;4028:33;;4088:16;4075:29;;:9;:29;4071:115;;4147:9;4158:16;4127:48;;;;;;;;;;;;:::i;:::-;;;;;;;;4071:115;4202:77;4250:28;4268:9;4250:17;:28::i;:::-;4202:20;:29;4223:7;4202:29;;;;;;;;;;;;;;;:47;;:77;;;;:::i;:::-;4195:84;;;;;3922:364;;;;:::o;3040:272::-;3091:13;3180:18;:16;:18::i;:::-;3169:29;;:7;:5;:7::i;:::-;:29;;;3165:93;;3221:26;;;;;;;;;;;;;;3165:93;3267:38;;;;;;;;;;;;;;;;;;;3040:272;:::o;5539:117::-;5604:7;5630:10;:19;5641:7;5630:19;;;;;;;;;;;;;;;;;;;;;;;;;5623:26;;5539:117;;;:::o;5738:138::-;5800:15;5818:12;:10;:12::i;:::-;5800:30;;5840:29;5850:7;5859:9;5840;:29::i;:::-;5790:86;5738:138;:::o;3208:126:14:-;3278:6;3303:24;3319:7;3303:15;:24::i;:::-;3296:31;;3208:126;;;:::o;3299:116:11:-;3364:7;3390:9;:18;3400:7;3390:18;;;;;;;;;;;;;;;;3383:25;;3299:116;;;:::o;3056:362:0:-;3125:14;3142:12;:10;:12::i;:::-;3125:29;;3178:11;:9;:11::i;:::-;3168:21;;:6;:21;;;3164:92;;3238:6;3212:33;;;;;;;;;;;:::i;:::-;;;;;;;;3164:92;3297:1;3269:12;:24;;;:29;3265:110;;3351:12;3321:43;;;;;;;;;;;:::i;:::-;;;;;;;;3265:110;3384:27;3398:12;3384:13;:27::i;:::-;3115:303;3056:362;:::o;942:177:30:-;1060:7;1092:19;1105:5;1092:12;:19::i;:::-;1085:26;;942:177;;;:::o;5144:557:23:-;5242:13;5269:18;5301:21;5336:15;5365:25;5404:12;5430:27;5533:13;:11;:13::i;:::-;5560:16;:14;:16::i;:::-;5590:13;5625:4;5652:1;5644:10;;5682:1;5668:16;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5482:212;;;;;;;;;;;;;;;;;;;;;5144:557;;;;;;;:::o;4922:341:6:-;4998:7;5017:23;5043:7;:5;:7::i;:::-;5017:33;;5077:16;5064:29;;:9;:29;5060:115;;5136:9;5147:16;5116:48;;;;;;;;;;;;:::i;:::-;;;;;;;;5060:115;5191:65;5227:28;5245:9;5227:17;:28::i;:::-;5191:17;:35;;:65;;;;:::i;:::-;5184:72;;;;;4922:341;;;:::o;3459:156:0:-;3514:6;3539:18;;;;;;;;;;;:69;;3606:1;3599:9;;3539:69;;;3560:36;;;3539:69;3532:76;;3459:156;:::o;2789:96:6:-;2835:6;2860:18;:16;:18::i;:::-;2853:25;;2789:96;:::o;2276:93:11:-;2323:13;2355:7;2348:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2276:93;:::o;3402:135:6:-;3466:7;3492:38;:20;:29;3513:7;3492:29;;;;;;;;;;;;;;;:36;:38::i;:::-;3485:45;;;;3402:135;;;:::o;3610:178:11:-;3679:4;3695:13;3711:12;:10;:12::i;:::-;3695:28;;3733:27;3743:5;3750:2;3754:5;3733:9;:27::i;:::-;3777:4;3770:11;;;3610:178;;;;:::o;2922:93:0:-;2972:7;2998:10;;;;;;;;;;;2991:17;;2922:93;:::o;5954:554:6:-;6159:6;6141:15;:24;6137:91;;;6210:6;6188:29;;;;;;;;;;;:::i;:::-;;;;;;;;6137:91;6237:14;6254:168;6281:86;2063:71;6340:9;6351:5;6358:6;6308:57;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;6298:68;;;;;;6281:16;:86::i;:::-;6381:1;6396;6411;6254:13;:168::i;:::-;6237:185;;6432:31;6449:6;6457:5;6432:16;:31::i;:::-;6473:28;6483:6;6491:9;6473;:28::i;:::-;6127:381;5954:554;;;;;;:::o;1680:672:13:-;1901:8;1883:15;:26;1879:97;;;1956:8;1932:33;;;;;;;;;;;:::i;:::-;;;;;;;;1879:97;1986:18;1022:95;2045:5;2052:7;2061:5;2068:16;2078:5;2068:9;:16::i;:::-;2086:8;2017:78;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2007:89;;;;;;1986:110;;2107:12;2122:28;2139:10;2122:16;:28::i;:::-;2107:43;;2161:14;2178:28;2192:4;2198:1;2201;2204;2178:13;:28::i;:::-;2161:45;;2230:5;2220:15;;:6;:15;;;2216:88;;2279:6;2287:5;2258:35;;;;;;;;;;;;:::i;:::-;;;;;;;;2216:88;2314:31;2323:5;2330:7;2339:5;2314:8;:31::i;:::-;1869:483;;;1680:672;;;;;;;:::o;3846:140:11:-;3926:7;3952:11;:18;3964:5;3952:18;;;;;;;;;;;;;;;:27;3971:7;3952:27;;;;;;;;;;;;;;;;3945:34;;3846:140;;;;:::o;3411:163:14:-;3490:32;;:::i;:::-;3541:26;3554:7;3563:3;3541:12;:26::i;:::-;3534:33;;3411:163;;;;:::o;9277:96:6:-;9335:7;9365:1;9361;:5;;;;:::i;:::-;9354:12;;9277:96;;;;:::o;9379:101::-;9442:7;9472:1;9468;:5;;;;:::i;:::-;9461:12;;9379:101;;;;:::o;656:96:17:-;709:7;735:10;728:17;;656:96;:::o;8989:128:11:-;9073:37;9082:5;9089:7;9098:5;9105:4;9073:8;:37::i;:::-;8989:128;;;:::o;10663:477::-;10762:24;10789:25;10799:5;10806:7;10789:9;:25::i;:::-;10762:52;;10848:17;10828:16;:37;10824:310;;10904:5;10885:16;:24;10881:130;;;10963:7;10972:16;10990:5;10936:60;;;;;;;;;;;;;:::i;:::-;;;;;;;;10881:130;11052:57;11061:5;11068:7;11096:5;11077:16;:24;11103:5;11052:8;:57::i;:::-;10824:310;10752:388;10663:477;;;:::o;5656:300::-;5755:1;5739:18;;:4;:18;;;5735:86;;5807:1;5780:30;;;;;;;;;;;:::i;:::-;;;;;;;;5735:86;5848:1;5834:16;;:2;:16;;;5830:86;;5902:1;5873:32;;;;;;;;;;;:::i;:::-;;;;;;;;5830:86;5925:24;5933:4;5939:2;5943:5;5925:7;:24::i;:::-;5656:300;;;:::o;3845:262:23:-;3898:7;3938:11;3921:28;;3929:4;3921:28;;;:63;;;;;3970:14;3953:13;:31;3921:63;3917:184;;;4007:22;4000:29;;;;3917:184;4067:23;:21;:23::i;:::-;4060:30;;3845:262;;:::o;14291:213:26:-;14347:6;14377:16;14369:24;;:5;:24;14365:103;;;14447:2;14451:5;14416:41;;;;;;;;;;;;:::i;:::-;;;;;;;;14365:103;14491:5;14477:20;;14291:213;;;:::o;9441:606:28:-;9526:7;9545:11;9559:4;:17;;:24;;;;9545:38;;9594:11;9608:1;9594:15;;9619:12;9634:3;9619:18;;9658:1;9652:3;:7;9648:234;;;9675:11;9695:14;9705:3;9695:9;:14::i;:::-;9689:3;:20;;;;:::i;:::-;9675:34;;9733:37;9747:4;:17;;9766:3;9733:13;:37::i;:::-;:42;;;;;;;;;;;;9727:48;;:3;:48;;;9723:149;;;9802:3;9795:10;;9723:149;;;9856:1;9850:3;:7;;;;:::i;:::-;9844:13;;9723:149;9661:221;9648:234;9892:11;9906:53;9925:4;:17;;9944:3;9949;9954:4;9906:18;:53::i;:::-;9892:67;;9984:1;9977:3;:8;:63;;9992:41;10006:4;:17;;10031:1;10025:3;:7;;;;:::i;:::-;9992:13;:41::i;:::-;:48;;;;;;;;;;;;9977:63;;;9988:1;9977:63;9970:70;;;;;;9441:606;;;;:::o;931:109:29:-;977:6;1002:31;1020:12;1002:17;:31::i;:::-;995:38;;931:109;:::o;6686:312:6:-;6768:19;6790:18;6800:7;6790:9;:18::i;:::-;6768:40;;6840:9;6818:10;:19;6829:7;6818:19;;;;;;;;;;;;;;;;:31;;;;;;;;;;;;;;;;;;6903:9;6865:48;;6890:11;6865:48;;6881:7;6865:48;;;;;;;;;;;;6923:68;6942:11;6955:9;6966:24;6982:7;6966:15;:24::i;:::-;6923:18;:68::i;:::-;6758:240;6686:312;;:::o;8572:162::-;8645:6;8670:57;8688:38;:20;:29;8709:7;8688:29;;;;;;;;;;;;;;;:36;:38::i;:::-;8670:17;:57::i;:::-;8663:64;;8572:162;;;:::o;3803:149:0:-;3888:12;3875:10;;:25;;;;;;;;;;;;;;;;;;3915:30;3932:12;3915:30;;;;;;:::i;:::-;;;;;;;;3803:149;:::o;2406:143:13:-;2497:7;2523:19;2536:5;2523:12;:19::i;:::-;2516:26;;2406:143;;;:::o;6021:126:23:-;6067:13;6099:41;6126:13;6099:5;:26;;:41;;;;:::i;:::-;6092:48;;6021:126;:::o;6473:135::-;6522:13;6554:47;6584:16;6554:8;:29;;:47;;;;:::i;:::-;6547:54;;6473:135;:::o;10167:206:28:-;10229:7;10248:11;10262:4;:17;;:24;;;;10248:38;;10310:1;10303:3;:8;:63;;10318:41;10332:4;:17;;10357:1;10351:3;:7;;;;:::i;:::-;10318:13;:41::i;:::-;:48;;;;;;;;;;;;10303:63;;;10314:1;10303:63;10296:70;;;10167:206;;;:::o;4917:176:23:-;4994:7;5020:66;5053:20;:18;:20::i;:::-;5075:10;5020:32;:66::i;:::-;5013:73;;4917:176;;;:::o;6803:260:22:-;6888:7;6908:17;6927:18;6947:16;6967:25;6978:4;6984:1;6987;6990;6967:10;:25::i;:::-;6907:85;;;;;;7002:28;7014:5;7021:8;7002:11;:28::i;:::-;7047:9;7040:16;;;;;6803:260;;;;;;:::o;1265:222:18:-;1348:15;1366:16;1376:5;1366:9;:16::i;:::-;1348:34;;1405:7;1396:5;:16;1392:89;;1455:5;1462:7;1435:35;;;;;;;;;;;;:::i;:::-;;;;;;;;1392:89;1338:149;1265:222;;:::o;759:395::-;819:7;1121;:14;1129:5;1121:14;;;;;;;;;;;;;;;;:16;;;;;;;;;;;;1114:23;;759:395;;;:::o;8811:199:6:-;8915:32;;:::i;:::-;8966:37;8999:3;8966:20;:29;8987:7;8966:29;;;;;;;;;;;;;;;:32;;:37;;;;:::i;:::-;8959:44;;8811:199;;;;:::o;9949:432:11:-;10078:1;10061:19;;:5;:19;;;10057:89;;10132:1;10103:32;;;;;;;;;;;:::i;:::-;;;;;;;;10057:89;10178:1;10159:21;;:7;:21;;;10155:90;;10231:1;10203:31;;;;;;;;;;;:::i;:::-;;;;;;;;10155:90;10284:5;10254:11;:18;10266:5;10254:18;;;;;;;;;;;;;;;:27;10273:7;10254:27;;;;;;;;;;;;;;;:35;;;;10303:9;10299:76;;;10349:7;10333:31;;10342:5;10333:31;;;10358:5;10333:31;;;;;;:::i;:::-;;;;;;;;10299:76;9949:432;;;;:::o;767:167:30:-;896:30;910:4;916:2;920:5;896:13;:30::i;:::-;767:167;;;:::o;4113:179:23:-;4168:7;2079:95;4226:11;4239:14;4255:13;4278:4;4204:80;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;4194:91;;;;;;4187:98;;4113:179;:::o;8587:1642:25:-;8635:7;8663:1;8658;:6;8654:45;;8687:1;8680:8;;;;8654:45;9378:14;9412:1;9401:7;9406:1;9401:4;:7::i;:::-;:12;;9395:1;:19;;9378:36;;9873:1;9862:6;9858:1;:10;;;;;:::i;:::-;;;9849:6;:19;9848:26;;9839:35;;9922:1;9911:6;9907:1;:10;;;;;:::i;:::-;;;9898:6;:19;9897:26;;9888:35;;9971:1;9960:6;9956:1;:10;;;;;:::i;:::-;;;9947:6;:19;9946:26;;9937:35;;10020:1;10009:6;10005:1;:10;;;;;:::i;:::-;;;9996:6;:19;9995:26;;9986:35;;10069:1;10058:6;10054:1;:10;;;;;:::i;:::-;;;10045:6;:19;10044:26;;10035:35;;10118:1;10107:6;10103:1;:10;;;;;:::i;:::-;;;10094:6;:19;10093:26;;10084:35;;10167:1;10156:6;10152:1;:10;;;;;:::i;:::-;;;10143:6;:19;10142:26;;10133:35;;10189:23;10193:6;10205;10201:1;:10;;;;;:::i;:::-;;;10189:3;:23::i;:::-;10182:30;;;8587:1642;;;;:::o;14099:265:28:-;14209:28;14282:9;14279:1;14272:20;14344:3;14337:4;14334:1;14324:18;14320:28;14305:43;;14099:265;;;;:::o;12736:433::-;12893:7;12912:230;12925:4;12919:3;:10;12912:230;;;12945:11;12959:23;12972:3;12977:4;12959:12;:23::i;:::-;12945:37;;13032:3;13000:35;;:24;13014:4;13020:3;13000:13;:24::i;:::-;:29;;;;;;;;;;;;:35;;;12996:136;;;13062:3;13055:10;;12996:136;;;13116:1;13110:3;:7;;;;:::i;:::-;13104:13;;12996:136;12931:211;12912:230;;;13158:4;13151:11;;12736:433;;;;;;:::o;3000:133:14:-;3082:7;3108:18;3118:7;3108:9;:18::i;:::-;3101:25;;3000:133;;;:::o;7717:780:6:-;7817:2;7809:10;;:4;:10;;;;:24;;;;;7832:1;7823:6;:10;7809:24;7805:686;;;7869:1;7853:18;;:4;:18;;;7849:315;;7892:16;7910;7930:150;7957:20;:26;7978:4;7957:26;;;;;;;;;;;;;;;8005:9;8036:26;8055:6;8036:18;:26::i;:::-;7930:5;:150::i;:::-;7891:189;;;;;;;;8124:4;8103:46;;;8130:8;8140;8103:46;;;;;;;:::i;:::-;;;;;;;;7873:291;;7849:315;8195:1;8181:16;;:2;:16;;;8177:304;;8218:16;8236;8256:143;8283:20;:24;8304:2;8283:24;;;;;;;;;;;;;;;8329:4;8355:26;8374:6;8355:18;:26::i;:::-;8256:5;:143::i;:::-;8217:182;;;;;;;;8443:2;8422:44;;;8447:8;8457;8422:44;;;;;;;:::i;:::-;;;;;;;;8199:282;;8177:304;7805:686;7717:780;;;:::o;11008:119:28:-;11070:7;11096:4;:17;;:24;;;;11089:31;;11008:119;;;:::o;15291:213:26:-;15347:6;15377:16;15369:24;;:5;:24;15365:103;;;15447:2;15451:5;15416:41;;;;;;;;;;;;:::i;:::-;;;;;;;;15365:103;15491:5;15477:20;;15291:213;;;:::o;538:107:18:-;598:7;624;:14;632:5;624:14;;;;;;;;;;;;;;;;617:21;;538:107;;;:::o;3385:267:19:-;3479:13;1390:66;3537:17;;3527:5;3508:46;3504:142;;3577:15;3586:5;3577:8;:15::i;:::-;3570:22;;;;3504:142;3630:5;3623:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3385:267;;;;;:::o;3353:401:24:-;3446:14;3555:4;3549:11;3585:10;3580:3;3573:23;3632:15;3625:4;3620:3;3616:14;3609:39;3684:10;3677:4;3672:3;3668:14;3661:34;3733:4;3728:3;3718:20;3708:30;;3524:224;3353:401;;;;:::o;5140:1530:22:-;5266:7;5275:12;5289:7;6199:66;6194:1;6186:10;;:79;6182:164;;;6297:1;6301:30;6333:1;6281:54;;;;;;;;6182:164;6440:14;6457:24;6467:4;6473:1;6476;6479;6457:24;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6440:41;;6513:1;6495:20;;:6;:20;;;6491:113;;6547:1;6551:29;6590:1;6582:10;;6531:62;;;;;;;;;6491:113;6622:6;6630:20;6660:1;6652:10;;6614:49;;;;;;;5140:1530;;;;;;;;;:::o;7196:532::-;7291:20;7282:29;;;;;;;;:::i;:::-;;:5;:29;;;;;;;;:::i;:::-;;;7278:444;7327:7;7278:444;7387:29;7378:38;;;;;;;;:::i;:::-;;:5;:38;;;;;;;;:::i;:::-;;;7374:348;;7439:23;;;;;;;;;;;;;;7374:348;7492:35;7483:44;;;;;;;;:::i;:::-;;:5;:44;;;;;;;;:::i;:::-;;;7479:243;;7586:8;7578:17;;7550:46;;;;;;;;;;;:::i;:::-;;;;;;;;7479:243;7626:30;7617:39;;;;;;;;:::i;:::-;;:5;:39;;;;;;;;:::i;:::-;;;7613:109;;7702:8;7679:32;;;;;;;;;;;:::i;:::-;;;;;;;;7613:109;7196:532;;;:::o;11199:138:28:-;11269:20;;:::i;:::-;11308:4;:17;;11326:3;11308:22;;;;;;;;;;:::i;:::-;;;;;;;;;11301:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11199:138;;;;:::o;2327:413:14:-;2421:30;2435:4;2441:2;2445:5;2421:13;:30::i;:::-;2481:1;2465:18;;:4;:18;;;2461:226;;2499:14;2516:13;:11;:13::i;:::-;2499:30;;2543:11;2557:12;:10;:12::i;:::-;2543:26;;2596:3;2587:6;:12;2583:94;;;2650:6;2658:3;2626:36;;;;;;;;;;;;:::i;:::-;;;;;;;;2583:94;2485:202;;2461:226;2696:37;2717:4;2723:2;2727:5;2696:20;:37::i;:::-;2327:413;;;:::o;10699:983:25:-;10751:7;10770:14;10787:1;10770:18;;10841:1;10835:3;10826:5;:12;;:16;10822:99;;;10872:3;10862:13;;;;;10903:3;10893:13;;;;10822:99;10952:1;10947:2;10938:5;:11;;:15;10934:96;;;10983:2;10973:12;;;;;11013:2;11003:12;;;;10934:96;11061:1;11056:2;11047:5;:11;;:15;11043:96;;;11092:2;11082:12;;;;;11122:2;11112:12;;;;11043:96;11170:1;11165:2;11156:5;:11;;:15;11152:96;;;11201:2;11191:12;;;;;11231:2;11221:12;;;;11152:96;11278:1;11274;11265:5;:10;;:14;11261:93;;;11309:1;11299:11;;;;;11338:1;11328:11;;;;11261:93;11384:1;11380;11371:5;:10;;:14;11367:93;;;11415:1;11405:11;;;;;11444:1;11434:11;;;;11367:93;11490:1;11486;11477:5;:10;;:14;11473:93;;;11521:1;11511:11;;;;;11550:1;11540:11;;;;11473:93;11596:1;11592;11583:5;:10;;:14;11579:64;;;11627:1;11617:11;;;;11579:64;11669:6;11662:13;;;10699:983;;;:::o;2557:104::-;2615:7;2645:1;2641;:5;:13;;2653:1;2641:13;;;2649:1;2641:13;2634:20;;2557:104;;;;:::o;2774:153::-;2836:7;2919:1;2914;2910;:5;2909:11;;;;:::i;:::-;2904:1;2900;:5;2899:21;;;;:::i;:::-;2892:28;;2774:153;;;;:::o;4169:218:26:-;4226:7;4257:17;4249:25;;:5;:25;4245:105;;;4328:3;4333:5;4297:42;;;;;;;;;;;;:::i;:::-;;;;;;;;4245:105;4374:5;4359:21;;4169:218;;;:::o;9016:255:6:-;9183:7;9192;9218:46;9229:7;:5;:7::i;:::-;9238:25;9241:14;:5;:12;:14::i;:::-;9257:5;9238:2;:25;;:::i;:::-;9218:5;:10;;:46;;;;;:::i;:::-;9211:53;;;;9016:255;;;;;;:::o;2078:405:19:-;2137:13;2162:11;2176:16;2187:4;2176:10;:16::i;:::-;2162:30;;2280:17;2311:2;2300:14;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2280:34;;2402:3;2397;2390:16;2442:4;2435;2430:3;2426:14;2419:28;2473:3;2466:10;;;;2078:405;;;:::o;6271:1107:11:-;6376:1;6360:18;;:4;:18;;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;;;;;6356:540;;;6548:19;6570:9;:15;6580:4;6570:15;;;;;;;;;;;;;;;;6548:37;;6617:5;6603:11;:19;6599:115;;;6674:4;6680:11;6693:5;6649:50;;;;;;;;;;;;;:::i;:::-;;;;;;;;6599:115;6866:5;6852:11;:19;6834:9;:15;6844:4;6834:15;;;;;;;;;;;;;;;:37;;;;6534:362;6356:540;6924:1;6910:16;;:2;:16;;;6906:425;;7089:5;7073:12;;:21;;;;;;;;;;;6906:425;;;7301:5;7284:9;:13;7294:2;7284:13;;;;;;;;;;;;;;;;:22;;;;;;;;;;;6906:425;7361:2;7346:25;;7355:4;7346:25;;;7365:5;7346:25;;;;;;:::i;:::-;;;;;;;;6271:1107;;;:::o;2084:103:14:-;2137:7;2163:17;2156:24;;;;2084:103;:::o;7232:399:6:-;7351:1;7335:18;;:4;:18;;;7331:107;;7369:58;7375:17;7394:4;7400:26;7419:6;7400:18;:26::i;:::-;7369:5;:58::i;:::-;;;7331:107;7465:1;7451:16;;:2;:16;;;7447:110;;7483:63;7489:17;7508:9;7519:26;7538:6;7519:18;:26::i;:::-;7483:5;:63::i;:::-;;;7447:110;7566:58;7585:15;7595:4;7585:9;:15::i;:::-;7602:13;7612:2;7602:9;:13::i;:::-;7617:6;7566:18;:58::i;:::-;7232:399;;;:::o;8050:162:28:-;8132:7;8141;8167:38;8175:4;:17;;8194:3;8199:5;8167:7;:38::i;:::-;8160:45;;;;8050:162;;;;;;:::o;2555:245:19:-;2616:7;2635:14;2688:4;2679;2652:33;;:40;2635:57;;2715:2;2706:6;:11;2702:69;;;2740:20;;;;;;;;;;;;;;2702:69;2787:6;2780:13;;;2555:245;;;:::o;11513:870:28:-;11604:7;11613;11632:11;11646:4;:11;;;;11632:25;;11678:1;11672:3;:7;11668:709;;;11747:25;11775:28;11789:4;11801:1;11795:3;:7;;;;:::i;:::-;11775:13;:28::i;:::-;11747:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11889:3;11877:15;;:4;:9;;;:15;;;11873:91;;;11919:30;;;;;;;;;;;;;;11873:91;12040:3;12027:16;;:4;:9;;;:16;;;12023:189;;12101:5;12063:28;12077:4;12089:1;12083:3;:7;;;;:::i;:::-;12063:13;:28::i;:::-;:35;;;:43;;;;;;;;;;;;;;;;;;12023:189;;;12145:4;12155:41;;;;;;;;12176:3;12155:41;;;;;;12189:5;12155:41;;;;;12145:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12023:189;12233:4;:11;;;12246:5;12225:27;;;;;;;;11668:709;12283:4;12293:41;;;;;;;;12314:3;12293:41;;;;;;12327:5;12293:41;;;;;12283:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12357:1;12360:5;12349:17;;;;;11513:870;;;;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;:::o;7:99:31:-;59:6;93:5;87:12;77:22;;7:99;;;:::o;112:169::-;196:11;230:6;225:3;218:19;270:4;265:3;261:14;246:29;;112:169;;;;:::o;287:139::-;376:6;371:3;366;360:23;417:1;408:6;403:3;399:16;392:27;287:139;;;:::o;432:102::-;473:6;524:2;520:7;515:2;508:5;504:14;500:28;490:38;;432:102;;;:::o;540:377::-;628:3;656:39;689:5;656:39;:::i;:::-;711:71;775:6;770:3;711:71;:::i;:::-;704:78;;791:65;849:6;844:3;837:4;830:5;826:16;791:65;:::i;:::-;881:29;903:6;881:29;:::i;:::-;876:3;872:39;865:46;;632:285;540:377;;;;:::o;923:313::-;1036:4;1074:2;1063:9;1059:18;1051:26;;1123:9;1117:4;1113:20;1109:1;1098:9;1094:17;1087:47;1151:78;1224:4;1215:6;1151:78;:::i;:::-;1143:86;;923:313;;;;:::o;1323:117::-;1432:1;1429;1422:12;1569:126;1606:7;1646:42;1639:5;1635:54;1624:65;;1569:126;;;:::o;1701:96::-;1738:7;1767:24;1785:5;1767:24;:::i;:::-;1756:35;;1701:96;;;:::o;1803:122::-;1876:24;1894:5;1876:24;:::i;:::-;1869:5;1866:35;1856:63;;1915:1;1912;1905:12;1856:63;1803:122;:::o;1931:139::-;1977:5;2015:6;2002:20;1993:29;;2031:33;2058:5;2031:33;:::i;:::-;1931:139;;;;:::o;2076:77::-;2113:7;2142:5;2131:16;;2076:77;;;:::o;2159:122::-;2232:24;2250:5;2232:24;:::i;:::-;2225:5;2222:35;2212:63;;2271:1;2268;2261:12;2212:63;2159:122;:::o;2287:139::-;2333:5;2371:6;2358:20;2349:29;;2387:33;2414:5;2387:33;:::i;:::-;2287:139;;;;:::o;2432:474::-;2500:6;2508;2557:2;2545:9;2536:7;2532:23;2528:32;2525:119;;;2563:79;;:::i;:::-;2525:119;2683:1;2708:53;2753:7;2744:6;2733:9;2729:22;2708:53;:::i;:::-;2698:63;;2654:117;2810:2;2836:53;2881:7;2872:6;2861:9;2857:22;2836:53;:::i;:::-;2826:63;;2781:118;2432:474;;;;;:::o;2912:90::-;2946:7;2989:5;2982:13;2975:21;2964:32;;2912:90;;;:::o;3008:109::-;3089:21;3104:5;3089:21;:::i;:::-;3084:3;3077:34;3008:109;;:::o;3123:210::-;3210:4;3248:2;3237:9;3233:18;3225:26;;3261:65;3323:1;3312:9;3308:17;3299:6;3261:65;:::i;:::-;3123:210;;;;:::o;3339:118::-;3426:24;3444:5;3426:24;:::i;:::-;3421:3;3414:37;3339:118;;:::o;3463:222::-;3556:4;3594:2;3583:9;3579:18;3571:26;;3607:71;3675:1;3664:9;3660:17;3651:6;3607:71;:::i;:::-;3463:222;;;;:::o;3691:619::-;3768:6;3776;3784;3833:2;3821:9;3812:7;3808:23;3804:32;3801:119;;;3839:79;;:::i;:::-;3801:119;3959:1;3984:53;4029:7;4020:6;4009:9;4005:22;3984:53;:::i;:::-;3974:63;;3930:117;4086:2;4112:53;4157:7;4148:6;4137:9;4133:22;4112:53;:::i;:::-;4102:63;;4057:118;4214:2;4240:53;4285:7;4276:6;4265:9;4261:22;4240:53;:::i;:::-;4230:63;;4185:118;3691:619;;;;;:::o;4316:86::-;4351:7;4391:4;4384:5;4380:16;4369:27;;4316:86;;;:::o;4408:112::-;4491:22;4507:5;4491:22;:::i;:::-;4486:3;4479:35;4408:112;;:::o;4526:214::-;4615:4;4653:2;4642:9;4638:18;4630:26;;4666:67;4730:1;4719:9;4715:17;4706:6;4666:67;:::i;:::-;4526:214;;;;:::o;4746:77::-;4783:7;4812:5;4801:16;;4746:77;;;:::o;4829:118::-;4916:24;4934:5;4916:24;:::i;:::-;4911:3;4904:37;4829:118;;:::o;4953:222::-;5046:4;5084:2;5073:9;5069:18;5061:26;;5097:71;5165:1;5154:9;5150:17;5141:6;5097:71;:::i;:::-;4953:222;;;;:::o;5181:329::-;5240:6;5289:2;5277:9;5268:7;5264:23;5260:32;5257:119;;;5295:79;;:::i;:::-;5257:119;5415:1;5440:53;5485:7;5476:6;5465:9;5461:22;5440:53;:::i;:::-;5430:63;;5386:117;5181:329;;;;:::o;5516:118::-;5603:24;5621:5;5603:24;:::i;:::-;5598:3;5591:37;5516:118;;:::o;5640:222::-;5733:4;5771:2;5760:9;5756:18;5748:26;;5784:71;5852:1;5841:9;5837:17;5828:6;5784:71;:::i;:::-;5640:222;;;;:::o;5868:93::-;5904:7;5944:10;5937:5;5933:22;5922:33;;5868:93;;;:::o;5967:115::-;6052:23;6069:5;6052:23;:::i;:::-;6047:3;6040:36;5967:115;;:::o;6088:218::-;6179:4;6217:2;6206:9;6202:18;6194:26;;6230:69;6296:1;6285:9;6281:17;6272:6;6230:69;:::i;:::-;6088:218;;;;:::o;6312:149::-;6348:7;6388:66;6381:5;6377:78;6366:89;;6312:149;;;:::o;6467:115::-;6552:23;6569:5;6552:23;:::i;:::-;6547:3;6540:36;6467:115;;:::o;6588:114::-;6655:6;6689:5;6683:12;6673:22;;6588:114;;;:::o;6708:184::-;6807:11;6841:6;6836:3;6829:19;6881:4;6876:3;6872:14;6857:29;;6708:184;;;;:::o;6898:132::-;6965:4;6988:3;6980:11;;7018:4;7013:3;7009:14;7001:22;;6898:132;;;:::o;7036:108::-;7113:24;7131:5;7113:24;:::i;:::-;7108:3;7101:37;7036:108;;:::o;7150:179::-;7219:10;7240:46;7282:3;7274:6;7240:46;:::i;:::-;7318:4;7313:3;7309:14;7295:28;;7150:179;;;;:::o;7335:113::-;7405:4;7437;7432:3;7428:14;7420:22;;7335:113;;;:::o;7484:732::-;7603:3;7632:54;7680:5;7632:54;:::i;:::-;7702:86;7781:6;7776:3;7702:86;:::i;:::-;7695:93;;7812:56;7862:5;7812:56;:::i;:::-;7891:7;7922:1;7907:284;7932:6;7929:1;7926:13;7907:284;;;8008:6;8002:13;8035:63;8094:3;8079:13;8035:63;:::i;:::-;8028:70;;8121:60;8174:6;8121:60;:::i;:::-;8111:70;;7967:224;7954:1;7951;7947:9;7942:14;;7907:284;;;7911:14;8207:3;8200:10;;7608:608;;;7484:732;;;;:::o;8222:1215::-;8571:4;8609:3;8598:9;8594:19;8586:27;;8623:69;8689:1;8678:9;8674:17;8665:6;8623:69;:::i;:::-;8739:9;8733:4;8729:20;8724:2;8713:9;8709:18;8702:48;8767:78;8840:4;8831:6;8767:78;:::i;:::-;8759:86;;8892:9;8886:4;8882:20;8877:2;8866:9;8862:18;8855:48;8920:78;8993:4;8984:6;8920:78;:::i;:::-;8912:86;;9008:72;9076:2;9065:9;9061:18;9052:6;9008:72;:::i;:::-;9090:73;9158:3;9147:9;9143:19;9134:6;9090:73;:::i;:::-;9173;9241:3;9230:9;9226:19;9217:6;9173:73;:::i;:::-;9294:9;9288:4;9284:20;9278:3;9267:9;9263:19;9256:49;9322:108;9425:4;9416:6;9322:108;:::i;:::-;9314:116;;8222:1215;;;;;;;;;;:::o;9443:329::-;9502:6;9551:2;9539:9;9530:7;9526:23;9522:32;9519:119;;;9557:79;;:::i;:::-;9519:119;9677:1;9702:53;9747:7;9738:6;9727:9;9723:22;9702:53;:::i;:::-;9692:63;;9648:117;9443:329;;;;:::o;9778:149::-;9814:7;9854:66;9847:5;9843:78;9832:89;;9778:149;;;:::o;9933:115::-;10018:23;10035:5;10018:23;:::i;:::-;10013:3;10006:36;9933:115;;:::o;10054:218::-;10145:4;10183:2;10172:9;10168:18;10160:26;;10196:69;10262:1;10251:9;10247:17;10238:6;10196:69;:::i;:::-;10054:218;;;;:::o;10278:97::-;10314:7;10354:14;10347:5;10343:26;10332:37;;10278:97;;;:::o;10381:115::-;10466:23;10483:5;10466:23;:::i;:::-;10461:3;10454:36;10381:115;;:::o;10502:218::-;10593:4;10631:2;10620:9;10616:18;10608:26;;10644:69;10710:1;10699:9;10695:17;10686:6;10644:69;:::i;:::-;10502:218;;;;:::o;10726:118::-;10797:22;10813:5;10797:22;:::i;:::-;10790:5;10787:33;10777:61;;10834:1;10831;10824:12;10777:61;10726:118;:::o;10850:135::-;10894:5;10932:6;10919:20;10910:29;;10948:31;10973:5;10948:31;:::i;:::-;10850:135;;;;:::o;10991:122::-;11064:24;11082:5;11064:24;:::i;:::-;11057:5;11054:35;11044:63;;11103:1;11100;11093:12;11044:63;10991:122;:::o;11119:139::-;11165:5;11203:6;11190:20;11181:29;;11219:33;11246:5;11219:33;:::i;:::-;11119:139;;;;:::o;11264:1053::-;11366:6;11374;11382;11390;11398;11406;11455:3;11443:9;11434:7;11430:23;11426:33;11423:120;;;11462:79;;:::i;:::-;11423:120;11582:1;11607:53;11652:7;11643:6;11632:9;11628:22;11607:53;:::i;:::-;11597:63;;11553:117;11709:2;11735:53;11780:7;11771:6;11760:9;11756:22;11735:53;:::i;:::-;11725:63;;11680:118;11837:2;11863:53;11908:7;11899:6;11888:9;11884:22;11863:53;:::i;:::-;11853:63;;11808:118;11965:2;11991:51;12034:7;12025:6;12014:9;12010:22;11991:51;:::i;:::-;11981:61;;11936:116;12091:3;12118:53;12163:7;12154:6;12143:9;12139:22;12118:53;:::i;:::-;12108:63;;12062:119;12220:3;12247:53;12292:7;12283:6;12272:9;12268:22;12247:53;:::i;:::-;12237:63;;12191:119;11264:1053;;;;;;;;:::o;12323:1199::-;12434:6;12442;12450;12458;12466;12474;12482;12531:3;12519:9;12510:7;12506:23;12502:33;12499:120;;;12538:79;;:::i;:::-;12499:120;12658:1;12683:53;12728:7;12719:6;12708:9;12704:22;12683:53;:::i;:::-;12673:63;;12629:117;12785:2;12811:53;12856:7;12847:6;12836:9;12832:22;12811:53;:::i;:::-;12801:63;;12756:118;12913:2;12939:53;12984:7;12975:6;12964:9;12960:22;12939:53;:::i;:::-;12929:63;;12884:118;13041:2;13067:53;13112:7;13103:6;13092:9;13088:22;13067:53;:::i;:::-;13057:63;;13012:118;13169:3;13196:51;13239:7;13230:6;13219:9;13215:22;13196:51;:::i;:::-;13186:61;;13140:117;13296:3;13323:53;13368:7;13359:6;13348:9;13344:22;13323:53;:::i;:::-;13313:63;;13267:119;13425:3;13452:53;13497:7;13488:6;13477:9;13473:22;13452:53;:::i;:::-;13442:63;;13396:119;12323:1199;;;;;;;;;;:::o;13528:474::-;13596:6;13604;13653:2;13641:9;13632:7;13628:23;13624:32;13621:119;;;13659:79;;:::i;:::-;13621:119;13779:1;13804:53;13849:7;13840:6;13829:9;13825:22;13804:53;:::i;:::-;13794:63;;13750:117;13906:2;13932:53;13977:7;13968:6;13957:9;13953:22;13932:53;:::i;:::-;13922:63;;13877:118;13528:474;;;;;:::o;14008:120::-;14080:23;14097:5;14080:23;:::i;:::-;14073:5;14070:34;14060:62;;14118:1;14115;14108:12;14060:62;14008:120;:::o;14134:137::-;14179:5;14217:6;14204:20;14195:29;;14233:32;14259:5;14233:32;:::i;:::-;14134:137;;;;:::o;14277:472::-;14344:6;14352;14401:2;14389:9;14380:7;14376:23;14372:32;14369:119;;;14407:79;;:::i;:::-;14369:119;14527:1;14552:53;14597:7;14588:6;14577:9;14573:22;14552:53;:::i;:::-;14542:63;;14498:117;14654:2;14680:52;14724:7;14715:6;14704:9;14700:22;14680:52;:::i;:::-;14670:62;;14625:117;14277:472;;;;;:::o;14755:105::-;14830:23;14847:5;14830:23;:::i;:::-;14825:3;14818:36;14755:105;;:::o;14866:138::-;14903:7;14943:54;14936:5;14932:66;14921:77;;14866:138;;;:::o;15010:108::-;15087:24;15105:5;15087:24;:::i;:::-;15082:3;15075:37;15010:108;;:::o;15200:519::-;15359:4;15354:3;15350:14;15446:4;15439:5;15435:16;15429:23;15465:61;15520:4;15515:3;15511:14;15497:12;15465:61;:::i;:::-;15374:162;15620:4;15613:5;15609:16;15603:23;15639:63;15696:4;15691:3;15687:14;15673:12;15639:63;:::i;:::-;15546:166;15328:391;15200:519;;:::o;15725:346::-;15880:4;15918:2;15907:9;15903:18;15895:26;;15931:133;16061:1;16050:9;16046:17;16037:6;15931:133;:::i;:::-;15725:346;;;;:::o;16077:180::-;16125:77;16122:1;16115:88;16222:4;16219:1;16212:15;16246:4;16243:1;16236:15;16263:320;16307:6;16344:1;16338:4;16334:12;16324:22;;16391:1;16385:4;16381:12;16412:18;16402:81;;16468:4;16460:6;16456:17;16446:27;;16402:81;16530:2;16522:6;16519:14;16499:18;16496:38;16493:84;;16549:18;;:::i;:::-;16493:84;16314:269;16263:320;;;:::o;16589:328::-;16708:4;16746:2;16735:9;16731:18;16723:26;;16759:71;16827:1;16816:9;16812:17;16803:6;16759:71;:::i;:::-;16840:70;16906:2;16895:9;16891:18;16882:6;16840:70;:::i;:::-;16589:328;;;;;:::o;16923:180::-;16971:77;16968:1;16961:88;17068:4;17065:1;17058:15;17092:4;17089:1;17082:15;17109:553;17286:4;17324:3;17313:9;17309:19;17301:27;;17338:71;17406:1;17395:9;17391:17;17382:6;17338:71;:::i;:::-;17419:72;17487:2;17476:9;17472:18;17463:6;17419:72;:::i;:::-;17501;17569:2;17558:9;17554:18;17545:6;17501:72;:::i;:::-;17583;17651:2;17640:9;17636:18;17627:6;17583:72;:::i;:::-;17109:553;;;;;;;:::o;17668:775::-;17901:4;17939:3;17928:9;17924:19;17916:27;;17953:71;18021:1;18010:9;18006:17;17997:6;17953:71;:::i;:::-;18034:72;18102:2;18091:9;18087:18;18078:6;18034:72;:::i;:::-;18116;18184:2;18173:9;18169:18;18160:6;18116:72;:::i;:::-;18198;18266:2;18255:9;18251:18;18242:6;18198:72;:::i;:::-;18280:73;18348:3;18337:9;18333:19;18324:6;18280:73;:::i;:::-;18363;18431:3;18420:9;18416:19;18407:6;18363:73;:::i;:::-;17668:775;;;;;;;;;:::o;18449:332::-;18570:4;18608:2;18597:9;18593:18;18585:26;;18621:71;18689:1;18678:9;18674:17;18665:6;18621:71;:::i;:::-;18702:72;18770:2;18759:9;18755:18;18746:6;18702:72;:::i;:::-;18449:332;;;;;:::o;18787:180::-;18835:77;18832:1;18825:88;18932:4;18929:1;18922:15;18956:4;18953:1;18946:15;18973:244;19013:3;19032:20;19050:1;19032:20;:::i;:::-;19027:25;;19066:20;19084:1;19066:20;:::i;:::-;19061:25;;19109:1;19106;19102:9;19095:16;;19132:54;19127:3;19124:63;19121:89;;;19190:18;;:::i;:::-;19121:89;18973:244;;;;:::o;19223:247::-;19263:4;19283:20;19301:1;19283:20;:::i;:::-;19278:25;;19317:20;19335:1;19317:20;:::i;:::-;19312:25;;19361:1;19358;19354:9;19346:17;;19385:54;19379:4;19376:64;19373:90;;;19443:18;;:::i;:::-;19373:90;19223:247;;;;:::o;19476:442::-;19625:4;19663:2;19652:9;19648:18;19640:26;;19676:71;19744:1;19733:9;19729:17;19720:6;19676:71;:::i;:::-;19757:72;19825:2;19814:9;19810:18;19801:6;19757:72;:::i;:::-;19839;19907:2;19896:9;19892:18;19883:6;19839:72;:::i;:::-;19476:442;;;;;;:::o;19924:86::-;19970:7;19999:5;19988:16;;19924:86;;;:::o;20016:60::-;20044:3;20065:5;20058:12;;20016:60;;;:::o;20082:156::-;20139:9;20172:60;20188:43;20197:33;20224:5;20197:33;:::i;:::-;20188:43;:::i;:::-;20172:60;:::i;:::-;20159:73;;20082:156;;;:::o;20244:145::-;20338:44;20376:5;20338:44;:::i;:::-;20333:3;20326:57;20244:145;;:::o;20395:346::-;20523:4;20561:2;20550:9;20546:18;20538:26;;20574:78;20649:1;20638:9;20634:17;20625:6;20574:78;:::i;:::-;20662:72;20730:2;20719:9;20715:18;20706:6;20662:72;:::i;:::-;20395:346;;;;;:::o;20747:194::-;20787:4;20807:20;20825:1;20807:20;:::i;:::-;20802:25;;20841:20;20859:1;20841:20;:::i;:::-;20836:25;;20885:1;20882;20878:9;20870:17;;20909:1;20903:4;20900:11;20897:37;;;20914:18;;:::i;:::-;20897:37;20747:194;;;;:::o;20947:191::-;20987:3;21006:20;21024:1;21006:20;:::i;:::-;21001:25;;21040:20;21058:1;21040:20;:::i;:::-;21035:25;;21083:1;21080;21076:9;21069:16;;21104:3;21101:1;21098:10;21095:36;;;21111:18;;:::i;:::-;21095:36;20947:191;;;;:::o;21144:332::-;21265:4;21303:2;21292:9;21288:18;21280:26;;21316:71;21384:1;21373:9;21369:17;21360:6;21316:71;:::i;:::-;21397:72;21465:2;21454:9;21450:18;21441:6;21397:72;:::i;:::-;21144:332;;;;;:::o;21482:664::-;21687:4;21725:3;21714:9;21710:19;21702:27;;21739:71;21807:1;21796:9;21792:17;21783:6;21739:71;:::i;:::-;21820:72;21888:2;21877:9;21873:18;21864:6;21820:72;:::i;:::-;21902;21970:2;21959:9;21955:18;21946:6;21902:72;:::i;:::-;21984;22052:2;22041:9;22037:18;22028:6;21984:72;:::i;:::-;22066:73;22134:3;22123:9;22119:19;22110:6;22066:73;:::i;:::-;21482:664;;;;;;;;:::o;22152:180::-;22200:77;22197:1;22190:88;22297:4;22294:1;22287:15;22321:4;22318:1;22311:15;22338:332;22459:4;22497:2;22486:9;22482:18;22474:26;;22510:71;22578:1;22567:9;22563:17;22554:6;22510:71;:::i;:::-;22591:72;22659:2;22648:9;22644:18;22635:6;22591:72;:::i;:::-;22338:332;;;;;:::o;22676:86::-;22722:7;22751:5;22740:16;;22676:86;;;:::o;22768:156::-;22825:9;22858:60;22874:43;22883:33;22910:5;22883:33;:::i;:::-;22874:43;:::i;:::-;22858:60;:::i;:::-;22845:73;;22768:156;;;:::o;22930:145::-;23024:44;23062:5;23024:44;:::i;:::-;23019:3;23012:57;22930:145;;:::o;23081:346::-;23209:4;23247:2;23236:9;23232:18;23224:26;;23260:78;23335:1;23324:9;23320:17;23311:6;23260:78;:::i;:::-;23348:72;23416:2;23405:9;23401:18;23392:6;23348:72;:::i;:::-;23081:346;;;;;:::o;23433:545::-;23606:4;23644:3;23633:9;23629:19;23621:27;;23658:71;23726:1;23715:9;23711:17;23702:6;23658:71;:::i;:::-;23739:68;23803:2;23792:9;23788:18;23779:6;23739:68;:::i;:::-;23817:72;23885:2;23874:9;23870:18;23861:6;23817:72;:::i;:::-;23899;23967:2;23956:9;23952:18;23943:6;23899:72;:::i;:::-;23433:545;;;;;;;:::o;23984:180::-;24032:77;24029:1;24022:88;24129:4;24126:1;24119:15;24153:4;24150:1;24143:15;24170:180;24218:77;24215:1;24208:88;24315:4;24312:1;24305:15;24339:4;24336:1;24329:15;24356:185;24396:1;24413:20;24431:1;24413:20;:::i;:::-;24408:25;;24447:20;24465:1;24447:20;:::i;:::-;24442:25;;24486:1;24476:35;;24491:18;;:::i;:::-;24476:35;24533:1;24530;24526:9;24521:14;;24356:185;;;;:::o;24547:87::-;24594:7;24623:5;24612:16;;24547:87;;;:::o;24640:158::-;24698:9;24731:61;24747:44;24756:34;24784:5;24756:34;:::i;:::-;24747:44;:::i;:::-;24731:61;:::i;:::-;24718:74;;24640:158;;;:::o;24804:147::-;24899:45;24938:5;24899:45;:::i;:::-;24894:3;24887:58;24804:147;;:::o;24957:348::-;25086:4;25124:2;25113:9;25109:18;25101:26;;25137:79;25213:1;25202:9;25198:17;25189:6;25137:79;:::i;:::-;25226:72;25294:2;25283:9;25279:18;25270:6;25226:72;:::i;:::-;24957:348;;;;;:::o
Swarm Source
ipfs://1aebd5254313266e8230ff04a8ca422e779e482648c9f8ef77c4bf54545aa1a9
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.