Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers.
Latest 3 internal transactions
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
EELFToken
Compiler Version
v0.8.19+commit.7dd6d404
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2024-03-25
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20Upgradeable {
/**
* @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 amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` 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 amount) 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 `amount` 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 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` 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 amount) external returns (bool);
}
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20MetadataUpgradeable is IERC20Upgradeable {
/**
* @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);
}
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}
/**
* @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 ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
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;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
/**
* @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}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* 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.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => 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.
*/
function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {
__ERC20_init_unchained(name_, symbol_);
}
function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override 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 override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override 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 `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` 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 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
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 `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `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.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` 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.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[45] private __gap;
}
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/ERC20Permit.sol)
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)
/**
* @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 IERC20PermitUpgradeable {
/**
* @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);
}
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library MathUpgradeable {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @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 up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (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; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
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.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 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.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
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 (rounding == Rounding.Up && 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 down.
*
* 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 + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* 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 + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* 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 + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* 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 + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
}
}
}
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMathUpgradeable {
/**
* @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);
}
}
}
/**
* @dev String operations.
*/
library StringsUpgradeable {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = MathUpgradeable.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), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMathUpgradeable.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, MathUpgradeable.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) {
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] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
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 keccak256(bytes(a)) == keccak256(bytes(b));
}
}
/**
* @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 ECDSAUpgradeable {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV // Deprecated in v4.8
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode 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 {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]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
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);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode 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 {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
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]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
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.
*
* _Available since v4.2._
*/
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {
// 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);
}
// 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);
}
return (signer, RecoverError.NoError);
}
/**
* @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) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, "\x19Ethereum Signed Message:\n32")
mstore(0x1c, hash)
message := keccak256(0x00, 0x3c)
}
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", StringsUpgradeable.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {
/// @solidity memory-safe-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, "\x19\x01")
mstore(add(ptr, 0x02), domainSeparator)
mstore(add(ptr, 0x22), structHash)
data := keccak256(ptr, 0x42)
}
}
/**
* @dev Returns an Ethereum Signed Data with intended validator, created from a
* `validator` and `data` according to the version 0 of EIP-191.
*
* See {recover}.
*/
function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x00", validator, data));
}
}
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol)
interface IERC5267Upgradeable {
/**
* @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
);
}
/**
* @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
*
* The encoding specified in the EIP is very generic, and such a generic 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 their contracts 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.
*
* _Available since v3.4._
*
* @custom:storage-size 52
*/
abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable {
bytes32 private constant _TYPE_HASH =
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
/// @custom:oz-renamed-from _HASHED_NAME
bytes32 private _hashedName;
/// @custom:oz-renamed-from _HASHED_VERSION
bytes32 private _hashedVersion;
string private _name;
string private _version;
/**
* @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].
*/
function __EIP712_init(string memory name, string memory version) internal onlyInitializing {
__EIP712_init_unchained(name, version);
}
function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {
_name = name;
_version = version;
// Reset prior values in storage if upgrading
_hashedName = 0;
_hashedVersion = 0;
}
/**
* @dev Returns the domain separator for the current chain.
*/
function _domainSeparatorV4() internal view returns (bytes32) {
return _buildDomainSeparator();
}
function _buildDomainSeparator() private view returns (bytes32) {
return keccak256(abi.encode(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), 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 ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);
}
/**
* @dev See {EIP-5267}.
*
* _Available since v4.9._
*/
function eip712Domain()
public
view
virtual
override
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
)
{
// If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized
// and the EIP712 domain is not reliable, as it will be missing name and version.
require(_hashedName == 0 && _hashedVersion == 0, "EIP712: Uninitialized");
return (
hex"0f", // 01111
_EIP712Name(),
_EIP712Version(),
block.chainid,
address(this),
bytes32(0),
new uint256[](0)
);
}
/**
* @dev The name parameter for the EIP712 domain.
*
* NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs
* are a concern.
*/
function _EIP712Name() internal virtual view returns (string memory) {
return _name;
}
/**
* @dev The version parameter for the EIP712 domain.
*
* NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs
* are a concern.
*/
function _EIP712Version() internal virtual view returns (string memory) {
return _version;
}
/**
* @dev The hash of the name parameter for the EIP712 domain.
*
* NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.
*/
function _EIP712NameHash() internal view returns (bytes32) {
string memory name = _EIP712Name();
if (bytes(name).length > 0) {
return keccak256(bytes(name));
} else {
// If the name is empty, the contract may have been upgraded without initializing the new storage.
// We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.
bytes32 hashedName = _hashedName;
if (hashedName != 0) {
return hashedName;
} else {
return keccak256("");
}
}
}
/**
* @dev The hash of the version parameter for the EIP712 domain.
*
* NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.
*/
function _EIP712VersionHash() internal view returns (bytes32) {
string memory version = _EIP712Version();
if (bytes(version).length > 0) {
return keccak256(bytes(version));
} else {
// If the version is empty, the contract may have been upgraded without initializing the new storage.
// We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.
bytes32 hashedVersion = _hashedVersion;
if (hashedVersion != 0) {
return hashedVersion;
} else {
return keccak256("");
}
}
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[48] private __gap;
}
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library CountersUpgradeable {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
/**
* @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.
*
* _Available since v3.4._
*
* @custom:storage-size 51
*/
abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {
using CountersUpgradeable for CountersUpgradeable.Counter;
mapping(address => CountersUpgradeable.Counter) private _nonces;
// solhint-disable-next-line var-name-mixedcase
bytes32 private constant _PERMIT_TYPEHASH =
keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
/**
* @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.
* However, to ensure consistency with the upgradeable transpiler, we will continue
* to reserve a slot.
* @custom:oz-renamed-from _PERMIT_TYPEHASH
*/
// solhint-disable-next-line var-name-mixedcase
bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;
/**
* @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.
*/
function __ERC20Permit_init(string memory name) internal onlyInitializing {
__EIP712_init_unchained(name, "1");
}
function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}
/**
* @inheritdoc IERC20PermitUpgradeable
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual override {
require(block.timestamp <= deadline, "ERC20Permit: expired deadline");
bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));
bytes32 hash = _hashTypedDataV4(structHash);
address signer = ECDSAUpgradeable.recover(hash, v, r, s);
require(signer == owner, "ERC20Permit: invalid signature");
_approve(owner, spender, value);
}
/**
* @inheritdoc IERC20PermitUpgradeable
*/
function nonces(address owner) public view virtual override returns (uint256) {
return _nonces[owner].current();
}
/**
* @inheritdoc IERC20PermitUpgradeable
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view override returns (bytes32) {
return _domainSeparatorV4();
}
/**
* @dev "Consume a nonce": return the current value and increment.
*
* _Available since v4.1._
*/
function _useNonce(address owner) internal virtual returns (uint256 current) {
CountersUpgradeable.Counter storage nonce = _nonces[owner];
current = nonce.current();
nonce.increment();
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Votes.sol)
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5805.sol)
// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/IVotes.sol)
/**
* @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.
*
* _Available since v4.5._
*/
interface IVotesUpgradeable {
/**
* @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 votes.
*/
event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);
/**
* @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;
}
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC6372.sol)
interface IERC6372Upgradeable {
/**
* @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);
}
interface IERC5805Upgradeable is IERC6372Upgradeable, IVotesUpgradeable {}
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.
/**
* @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.
*
* Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
* all math on `uint256` and `int256` and then downcasting.
*/
library SafeCastUpgradeable {
/**
* @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
*
* _Available since v4.7._
*/
function toUint248(uint256 value) internal pure returns (uint248) {
require(value <= type(uint248).max, "SafeCast: value doesn't fit in 248 bits");
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
*
* _Available since v4.7._
*/
function toUint240(uint256 value) internal pure returns (uint240) {
require(value <= type(uint240).max, "SafeCast: value doesn't fit in 240 bits");
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
*
* _Available since v4.7._
*/
function toUint232(uint256 value) internal pure returns (uint232) {
require(value <= type(uint232).max, "SafeCast: value doesn't fit in 232 bits");
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
*
* _Available since v4.2._
*/
function toUint224(uint256 value) internal pure returns (uint224) {
require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
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
*
* _Available since v4.7._
*/
function toUint216(uint256 value) internal pure returns (uint216) {
require(value <= type(uint216).max, "SafeCast: value doesn't fit in 216 bits");
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
*
* _Available since v4.7._
*/
function toUint208(uint256 value) internal pure returns (uint208) {
require(value <= type(uint208).max, "SafeCast: value doesn't fit in 208 bits");
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
*
* _Available since v4.7._
*/
function toUint200(uint256 value) internal pure returns (uint200) {
require(value <= type(uint200).max, "SafeCast: value doesn't fit in 200 bits");
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
*
* _Available since v4.7._
*/
function toUint192(uint256 value) internal pure returns (uint192) {
require(value <= type(uint192).max, "SafeCast: value doesn't fit in 192 bits");
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
*
* _Available since v4.7._
*/
function toUint184(uint256 value) internal pure returns (uint184) {
require(value <= type(uint184).max, "SafeCast: value doesn't fit in 184 bits");
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
*
* _Available since v4.7._
*/
function toUint176(uint256 value) internal pure returns (uint176) {
require(value <= type(uint176).max, "SafeCast: value doesn't fit in 176 bits");
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
*
* _Available since v4.7._
*/
function toUint168(uint256 value) internal pure returns (uint168) {
require(value <= type(uint168).max, "SafeCast: value doesn't fit in 168 bits");
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
*
* _Available since v4.7._
*/
function toUint160(uint256 value) internal pure returns (uint160) {
require(value <= type(uint160).max, "SafeCast: value doesn't fit in 160 bits");
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
*
* _Available since v4.7._
*/
function toUint152(uint256 value) internal pure returns (uint152) {
require(value <= type(uint152).max, "SafeCast: value doesn't fit in 152 bits");
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
*
* _Available since v4.7._
*/
function toUint144(uint256 value) internal pure returns (uint144) {
require(value <= type(uint144).max, "SafeCast: value doesn't fit in 144 bits");
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
*
* _Available since v4.7._
*/
function toUint136(uint256 value) internal pure returns (uint136) {
require(value <= type(uint136).max, "SafeCast: value doesn't fit in 136 bits");
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
*
* _Available since v2.5._
*/
function toUint128(uint256 value) internal pure returns (uint128) {
require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
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
*
* _Available since v4.7._
*/
function toUint120(uint256 value) internal pure returns (uint120) {
require(value <= type(uint120).max, "SafeCast: value doesn't fit in 120 bits");
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
*
* _Available since v4.7._
*/
function toUint112(uint256 value) internal pure returns (uint112) {
require(value <= type(uint112).max, "SafeCast: value doesn't fit in 112 bits");
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
*
* _Available since v4.7._
*/
function toUint104(uint256 value) internal pure returns (uint104) {
require(value <= type(uint104).max, "SafeCast: value doesn't fit in 104 bits");
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
*
* _Available since v4.2._
*/
function toUint96(uint256 value) internal pure returns (uint96) {
require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
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
*
* _Available since v4.7._
*/
function toUint88(uint256 value) internal pure returns (uint88) {
require(value <= type(uint88).max, "SafeCast: value doesn't fit in 88 bits");
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
*
* _Available since v4.7._
*/
function toUint80(uint256 value) internal pure returns (uint80) {
require(value <= type(uint80).max, "SafeCast: value doesn't fit in 80 bits");
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
*
* _Available since v4.7._
*/
function toUint72(uint256 value) internal pure returns (uint72) {
require(value <= type(uint72).max, "SafeCast: value doesn't fit in 72 bits");
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
*
* _Available since v2.5._
*/
function toUint64(uint256 value) internal pure returns (uint64) {
require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
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
*
* _Available since v4.7._
*/
function toUint56(uint256 value) internal pure returns (uint56) {
require(value <= type(uint56).max, "SafeCast: value doesn't fit in 56 bits");
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
*
* _Available since v4.7._
*/
function toUint48(uint256 value) internal pure returns (uint48) {
require(value <= type(uint48).max, "SafeCast: value doesn't fit in 48 bits");
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
*
* _Available since v4.7._
*/
function toUint40(uint256 value) internal pure returns (uint40) {
require(value <= type(uint40).max, "SafeCast: value doesn't fit in 40 bits");
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
*
* _Available since v2.5._
*/
function toUint32(uint256 value) internal pure returns (uint32) {
require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
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
*
* _Available since v4.7._
*/
function toUint24(uint256 value) internal pure returns (uint24) {
require(value <= type(uint24).max, "SafeCast: value doesn't fit in 24 bits");
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
*
* _Available since v2.5._
*/
function toUint16(uint256 value) internal pure returns (uint16) {
require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
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
*
* _Available since v2.5._
*/
function toUint8(uint256 value) internal pure returns (uint8) {
require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
return uint8(value);
}
/**
* @dev Converts a signed int256 into an unsigned uint256.
*
* Requirements:
*
* - input must be greater than or equal to 0.
*
* _Available since v3.0._
*/
function toUint256(int256 value) internal pure returns (uint256) {
require(value >= 0, "SafeCast: value must be positive");
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
*
* _Available since v4.7._
*/
function toInt248(int256 value) internal pure returns (int248 downcasted) {
downcasted = int248(value);
require(downcasted == value, "SafeCast: value doesn't fit in 248 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt240(int256 value) internal pure returns (int240 downcasted) {
downcasted = int240(value);
require(downcasted == value, "SafeCast: value doesn't fit in 240 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt232(int256 value) internal pure returns (int232 downcasted) {
downcasted = int232(value);
require(downcasted == value, "SafeCast: value doesn't fit in 232 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt224(int256 value) internal pure returns (int224 downcasted) {
downcasted = int224(value);
require(downcasted == value, "SafeCast: value doesn't fit in 224 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt216(int256 value) internal pure returns (int216 downcasted) {
downcasted = int216(value);
require(downcasted == value, "SafeCast: value doesn't fit in 216 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt208(int256 value) internal pure returns (int208 downcasted) {
downcasted = int208(value);
require(downcasted == value, "SafeCast: value doesn't fit in 208 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt200(int256 value) internal pure returns (int200 downcasted) {
downcasted = int200(value);
require(downcasted == value, "SafeCast: value doesn't fit in 200 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt192(int256 value) internal pure returns (int192 downcasted) {
downcasted = int192(value);
require(downcasted == value, "SafeCast: value doesn't fit in 192 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt184(int256 value) internal pure returns (int184 downcasted) {
downcasted = int184(value);
require(downcasted == value, "SafeCast: value doesn't fit in 184 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt176(int256 value) internal pure returns (int176 downcasted) {
downcasted = int176(value);
require(downcasted == value, "SafeCast: value doesn't fit in 176 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt168(int256 value) internal pure returns (int168 downcasted) {
downcasted = int168(value);
require(downcasted == value, "SafeCast: value doesn't fit in 168 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt160(int256 value) internal pure returns (int160 downcasted) {
downcasted = int160(value);
require(downcasted == value, "SafeCast: value doesn't fit in 160 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt152(int256 value) internal pure returns (int152 downcasted) {
downcasted = int152(value);
require(downcasted == value, "SafeCast: value doesn't fit in 152 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt144(int256 value) internal pure returns (int144 downcasted) {
downcasted = int144(value);
require(downcasted == value, "SafeCast: value doesn't fit in 144 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt136(int256 value) internal pure returns (int136 downcasted) {
downcasted = int136(value);
require(downcasted == value, "SafeCast: value doesn't fit in 136 bits");
}
/**
* @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
*
* _Available since v3.1._
*/
function toInt128(int256 value) internal pure returns (int128 downcasted) {
downcasted = int128(value);
require(downcasted == value, "SafeCast: value doesn't fit in 128 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt120(int256 value) internal pure returns (int120 downcasted) {
downcasted = int120(value);
require(downcasted == value, "SafeCast: value doesn't fit in 120 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt112(int256 value) internal pure returns (int112 downcasted) {
downcasted = int112(value);
require(downcasted == value, "SafeCast: value doesn't fit in 112 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt104(int256 value) internal pure returns (int104 downcasted) {
downcasted = int104(value);
require(downcasted == value, "SafeCast: value doesn't fit in 104 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt96(int256 value) internal pure returns (int96 downcasted) {
downcasted = int96(value);
require(downcasted == value, "SafeCast: value doesn't fit in 96 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt88(int256 value) internal pure returns (int88 downcasted) {
downcasted = int88(value);
require(downcasted == value, "SafeCast: value doesn't fit in 88 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt80(int256 value) internal pure returns (int80 downcasted) {
downcasted = int80(value);
require(downcasted == value, "SafeCast: value doesn't fit in 80 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt72(int256 value) internal pure returns (int72 downcasted) {
downcasted = int72(value);
require(downcasted == value, "SafeCast: value doesn't fit in 72 bits");
}
/**
* @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
*
* _Available since v3.1._
*/
function toInt64(int256 value) internal pure returns (int64 downcasted) {
downcasted = int64(value);
require(downcasted == value, "SafeCast: value doesn't fit in 64 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt56(int256 value) internal pure returns (int56 downcasted) {
downcasted = int56(value);
require(downcasted == value, "SafeCast: value doesn't fit in 56 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt48(int256 value) internal pure returns (int48 downcasted) {
downcasted = int48(value);
require(downcasted == value, "SafeCast: value doesn't fit in 48 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt40(int256 value) internal pure returns (int40 downcasted) {
downcasted = int40(value);
require(downcasted == value, "SafeCast: value doesn't fit in 40 bits");
}
/**
* @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
*
* _Available since v3.1._
*/
function toInt32(int256 value) internal pure returns (int32 downcasted) {
downcasted = int32(value);
require(downcasted == value, "SafeCast: value doesn't fit in 32 bits");
}
/**
* @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
*
* _Available since v4.7._
*/
function toInt24(int256 value) internal pure returns (int24 downcasted) {
downcasted = int24(value);
require(downcasted == value, "SafeCast: value doesn't fit in 24 bits");
}
/**
* @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
*
* _Available since v3.1._
*/
function toInt16(int256 value) internal pure returns (int16 downcasted) {
downcasted = int16(value);
require(downcasted == value, "SafeCast: value doesn't fit in 16 bits");
}
/**
* @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
*
* _Available since v3.1._
*/
function toInt8(int256 value) internal pure returns (int8 downcasted) {
downcasted = int8(value);
require(downcasted == value, "SafeCast: value doesn't fit in 8 bits");
}
/**
* @dev Converts an unsigned uint256 into a signed int256.
*
* Requirements:
*
* - input must be less than or equal to maxInt256.
*
* _Available since v3.0._
*/
function toInt256(uint256 value) internal pure returns (int256) {
// Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
return int256(value);
}
}
/**
* @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^224^ - 1, while COMP is limited to 2^96^ - 1.
*
* NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.
*
* 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.
*
* _Available since v4.2._
*/
abstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable, IERC5805Upgradeable {
struct Checkpoint {
uint32 fromBlock;
uint224 votes;
}
bytes32 private constant _DELEGATION_TYPEHASH =
keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");
mapping(address => address) private _delegates;
mapping(address => Checkpoint[]) private _checkpoints;
Checkpoint[] private _totalSupplyCheckpoints;
function __ERC20Votes_init() internal onlyInitializing {
}
function __ERC20Votes_init_unchained() internal onlyInitializing {
}
/**
* @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).
*/
function clock() public view virtual override returns (uint48) {
return SafeCastUpgradeable.toUint48(block.number);
}
/**
* @dev Description of the clock
*/
// solhint-disable-next-line func-name-mixedcase
function CLOCK_MODE() public view virtual override returns (string memory) {
// Check that the clock was not modified
require(clock() == block.number, "ERC20Votes: broken clock mode");
return "mode=blocknumber&from=default";
}
/**
* @dev Get the `pos`-th checkpoint for `account`.
*/
function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) {
return _checkpoints[account][pos];
}
/**
* @dev Get number of checkpoints for `account`.
*/
function numCheckpoints(address account) public view virtual returns (uint32) {
return SafeCastUpgradeable.toUint32(_checkpoints[account].length);
}
/**
* @dev Get the address `account` is currently delegating to.
*/
function delegates(address account) public view virtual override returns (address) {
return _delegates[account];
}
/**
* @dev Gets the current votes balance for `account`
*/
function getVotes(address account) public view virtual override returns (uint256) {
uint256 pos = _checkpoints[account].length;
unchecked {
return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;
}
}
/**
* @dev Retrieve the number of votes for `account` at the end of `timepoint`.
*
* Requirements:
*
* - `timepoint` must be in the past
*/
function getPastVotes(address account, uint256 timepoint) public view virtual override returns (uint256) {
require(timepoint < clock(), "ERC20Votes: future lookup");
return _checkpointsLookup(_checkpoints[account], timepoint);
}
/**
* @dev Retrieve the `totalSupply` at the end of `timepoint`. Note, this value is the sum of all balances.
* It is NOT the sum of all the delegated votes!
*
* Requirements:
*
* - `timepoint` must be in the past
*/
function getPastTotalSupply(uint256 timepoint) public view virtual override returns (uint256) {
require(timepoint < clock(), "ERC20Votes: future lookup");
return _checkpointsLookup(_totalSupplyCheckpoints, timepoint);
}
/**
* @dev Lookup a value in a list of (sorted) checkpoints.
*/
function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 timepoint) private view returns (uint256) {
// We run a binary search to look for the last (most recent) checkpoint taken before (or at) `timepoint`.
//
// Initially we check if the block is recent to narrow the search range.
// During the loop, the index of the wanted checkpoint remains in the range [low-1, high).
// With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant.
// - If the middle checkpoint is after `timepoint`, we look in [low, mid)
// - If the middle checkpoint is before or equal to `timepoint`, we look in [mid+1, high)
// Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not
// out of bounds (in which case we're looking too far in the past and the result is 0).
// Note that if the latest checkpoint available is exactly for `timepoint`, we end up with an index that is
// past the end of the array, so we technically don't find a checkpoint after `timepoint`, but it works out
// the same.
uint256 length = ckpts.length;
uint256 low = 0;
uint256 high = length;
if (length > 5) {
uint256 mid = length - MathUpgradeable.sqrt(length);
if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) {
high = mid;
} else {
low = mid + 1;
}
}
while (low < high) {
uint256 mid = MathUpgradeable.average(low, high);
if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) {
high = mid;
} else {
low = mid + 1;
}
}
unchecked {
return high == 0 ? 0 : _unsafeAccess(ckpts, high - 1).votes;
}
}
/**
* @dev Delegate votes from the sender to `delegatee`.
*/
function delegate(address delegatee) public virtual override {
_delegate(_msgSender(), delegatee);
}
/**
* @dev Delegates votes from signer to `delegatee`
*/
function delegateBySig(
address delegatee,
uint256 nonce,
uint256 expiry,
uint8 v,
bytes32 r,
bytes32 s
) public virtual override {
require(block.timestamp <= expiry, "ERC20Votes: signature expired");
address signer = ECDSAUpgradeable.recover(
_hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),
v,
r,
s
);
require(nonce == _useNonce(signer), "ERC20Votes: invalid nonce");
_delegate(signer, delegatee);
}
/**
* @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1).
*/
function _maxSupply() internal view virtual returns (uint224) {
return type(uint224).max;
}
/**
* @dev Snapshots the totalSupply after it has been increased.
*/
function _mint(address account, uint256 amount) internal virtual override {
super._mint(account, amount);
require(totalSupply() <= _maxSupply(), "ERC20Votes: total supply risks overflowing votes");
_writeCheckpoint(_totalSupplyCheckpoints, _add, amount);
}
/**
* @dev Snapshots the totalSupply after it has been decreased.
*/
function _burn(address account, uint256 amount) internal virtual override {
super._burn(account, amount);
_writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount);
}
/**
* @dev Move voting power when tokens are transferred.
*
* Emits a {IVotes-DelegateVotesChanged} event.
*/
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual override {
super._afterTokenTransfer(from, to, amount);
_moveVotingPower(delegates(from), delegates(to), amount);
}
/**
* @dev Change delegation for `delegator` to `delegatee`.
*
* Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}.
*/
function _delegate(address delegator, address delegatee) internal virtual {
address currentDelegate = delegates(delegator);
uint256 delegatorBalance = balanceOf(delegator);
_delegates[delegator] = delegatee;
emit DelegateChanged(delegator, currentDelegate, delegatee);
_moveVotingPower(currentDelegate, delegatee, delegatorBalance);
}
function _moveVotingPower(address src, address dst, uint256 amount) private {
if (src != dst && amount > 0) {
if (src != address(0)) {
(uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount);
emit DelegateVotesChanged(src, oldWeight, newWeight);
}
if (dst != address(0)) {
(uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount);
emit DelegateVotesChanged(dst, oldWeight, newWeight);
}
}
}
function _writeCheckpoint(
Checkpoint[] storage ckpts,
function(uint256, uint256) view returns (uint256) op,
uint256 delta
) private returns (uint256 oldWeight, uint256 newWeight) {
uint256 pos = ckpts.length;
unchecked {
Checkpoint memory oldCkpt = pos == 0 ? Checkpoint(0, 0) : _unsafeAccess(ckpts, pos - 1);
oldWeight = oldCkpt.votes;
newWeight = op(oldWeight, delta);
if (pos > 0 && oldCkpt.fromBlock == clock()) {
_unsafeAccess(ckpts, pos - 1).votes = SafeCastUpgradeable.toUint224(newWeight);
} else {
ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(clock()), votes: SafeCastUpgradeable.toUint224(newWeight)}));
}
}
}
function _add(uint256 a, uint256 b) private pure returns (uint256) {
return a + b;
}
function _subtract(uint256 a, uint256 b) private pure returns (uint256) {
return a - b;
}
/**
* @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.
*/
function _unsafeAccess(Checkpoint[] storage ckpts, uint256 pos) private pure returns (Checkpoint storage result) {
assembly {
mstore(0, ckpts.slot)
result.slot := add(keccak256(0, 0x20), pos)
}
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[47] private __gap;
}
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
/**
* @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 amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` 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 amount) 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 `amount` 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 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` 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 amount) external returns (bool);
}
contract EELFToken is Initializable, ERC20Upgradeable, ERC165, OwnableUpgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable {
/// @custom:oz-upgrades-unsafe-allow constructor
event SetGoverner(address indexed owner, address indexed governer);
event SetLockProxy(address indexed owner, address indexed lockproxy);
address private _governer;
address private _lockproxy;
constructor() {
_disableInitializers();
}
function initialize(string memory mame, string memory symbol) initializer public {
__ERC20_init(mame, symbol);
__Ownable_init_unchained();
}
modifier onlyLimitedUser() {
require(msg.sender == _governer || msg.sender == _lockproxy, "This action can only be performed by limited user");
_;
}
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC20).interfaceId || super.supportsInterface(interfaceId);
}
function setGoverner(address _address) public onlyOwner {
_governer = _address;
emit SetGoverner(owner(), _address);
}
function setLockProxy(address _address) public onlyOwner {
_lockproxy = _address;
emit SetLockProxy(owner(), _address);
}
function mint(address to, uint256 amount) public onlyLimitedUser{
_mint(to, amount);
}
function burnFrom(address account, uint256 amount) public onlyLimitedUser {
_burn(account, amount);
}
function _afterTokenTransfer(address from, address to, uint256 amount) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) {
super._afterTokenTransfer(from, to, amount);
}
function _mint(address to, uint256 amount) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) {
super._mint(to, amount);
}
function _burn(address account, uint256 amount) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) {
super._burn(account, amount);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":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":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"governer","type":"address"}],"name":"SetGoverner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"lockproxy","type":"address"}],"name":"SetLockProxy","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":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint32","name":"pos","type":"uint32"}],"name":"checkpoints","outputs":[{"components":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint224","name":"votes","type":"uint224"}],"internalType":"struct ERC20VotesUpgradeable.Checkpoint","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":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"mame","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","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":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setGoverner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setLockProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"amount","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":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b506200001c62000022565b620000e3565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000e1576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61297880620000f36000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c8063715018a61161011a5780639ab24eb0116100ad578063c3cda5201161007c578063c3cda52014610488578063d505accf1461049b578063dd62ed3e146104ae578063f1127ed8146104c1578063f2fde38b146104fe57600080fd5b80639ab24eb01461043c578063a457c2d71461044f578063a9059cbb14610462578063adfaa0d11461047557600080fd5b80638da5cb5b116100e95780638da5cb5b146103f15780638e539e8c1461040257806391ddadf41461041557806395d89b411461043457600080fd5b8063715018a6146103a857806379cc6790146103b05780637ecebe00146103c357806384b0196e146103d657600080fd5b80633a46b1a81161019d578063587cde1e1161016c578063587cde1e146102ed5780635c19a95c146103315780636f2b6ee6146103445780636fcfff451461035757806370a082311461037f57600080fd5b80633a46b1a8146102aa57806340c10f19146102bd5780634bf5d7e9146102d25780634cd88b76146102da57600080fd5b806323b872dd116101d957806323b872dd1461026d578063313ce567146102805780633644e5151461028f578063395093511461029757600080fd5b806301ffc9a71461020b57806306fdde0314610233578063095ea7b31461024857806318160ddd1461025b575b600080fd5b61021e6102193660046122a8565b610511565b60405190151581526020015b60405180910390f35b61023b610548565b60405161022a9190612318565b61021e610256366004612347565b6105da565b6035545b60405190815260200161022a565b61021e61027b366004612371565b6105f2565b6040516012815260200161022a565b61025f610616565b61021e6102a5366004612347565b610625565b61025f6102b8366004612347565b610647565b6102d06102cb366004612347565b6106d1565b005b61023b610720565b6102d06102e8366004612450565b6107b8565b6103196102fb3660046124b4565b6001600160a01b03908116600090815260fe60205260409020541690565b6040516001600160a01b03909116815260200161022a565b6102d061033f3660046124b4565b6108d5565b6102d06103523660046124b4565b6108e2565b61036a6103653660046124b4565b610954565b60405163ffffffff909116815260200161022a565b61025f61038d3660046124b4565b6001600160a01b031660009081526033602052604090205490565b6102d0610976565b6102d06103be366004612347565b61098a565b61025f6103d13660046124b4565b6109d5565b6103de6109f3565b60405161022a97969594939291906124cf565b6065546001600160a01b0316610319565b61025f610410366004612565565b610a91565b61041d610af9565b60405165ffffffffffff909116815260200161022a565b61023b610b04565b61025f61044a3660046124b4565b610b13565b61021e61045d366004612347565b610b95565b61021e610470366004612347565b610c10565b6102d06104833660046124b4565b610c1e565b6102d061049636600461258f565b610c90565b6102d06104a93660046125e7565b610dc6565b61025f6104bc366004612651565b610f2a565b6104d46104cf366004612684565b610f55565b60408051825163ffffffff1681526020928301516001600160e01b0316928101929092520161022a565b6102d061050c3660046124b4565b610fd9565b60006001600160e01b031982166336372b0760e01b148061054257506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060368054610557906126c4565b80601f0160208091040260200160405190810160405280929190818152602001828054610583906126c4565b80156105d05780601f106105a5576101008083540402835291602001916105d0565b820191906000526020600020905b8154815290600101906020018083116105b357829003601f168201915b5050505050905090565b6000336105e881858561104f565b5060019392505050565b600033610600858285611173565b61060b8585856111ed565b506001949350505050565b600061062061139e565b905090565b6000336105e88185856106388383610f2a565b610642919061270e565b61104f565b6000610651610af9565b65ffffffffffff1682106106a85760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b60448201526064015b60405180910390fd5b6001600160a01b038316600090815260ff602052604090206106ca90836113a8565b9392505050565b610130546001600160a01b03163314806106f65750610131546001600160a01b031633145b6107125760405162461bcd60e51b815260040161069f90612721565b61071c8282611491565b5050565b60604361072b610af9565b65ffffffffffff16146107805760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a2062726f6b656e20636c6f636b206d6f6465000000604482015260640161069f565b5060408051808201909152601d81527f6d6f64653d626c6f636b6e756d6265722666726f6d3d64656661756c74000000602082015290565b600054610100900460ff16158080156107d85750600054600160ff909116105b806107f25750303b1580156107f2575060005460ff166001145b6108555760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161069f565b6000805460ff191660011790558015610878576000805461ff0019166101001790555b610882838361149b565b61088a6114cc565b80156108d0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6108df33826114fc565b50565b6108ea611576565b61013180546001600160a01b0383166001600160a01b0319909116811790915561091c6065546001600160a01b031690565b6001600160a01b03167f17ca9d249e6c17317c9fc211524c70a7bb7f9631abd971db5d96948e8764737e60405160405180910390a350565b6001600160a01b038116600090815260ff6020526040812054610542906115d0565b61097e611576565b6109886000611639565b565b610130546001600160a01b03163314806109af5750610131546001600160a01b031633145b6109cb5760405162461bcd60e51b815260040161069f90612721565b61071c828261168b565b6001600160a01b038116600090815260cb6020526040812054610542565b6000606080600080600060606097546000801b148015610a135750609854155b610a575760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b604482015260640161069f565b610a5f611695565b610a676116a4565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000610a9b610af9565b65ffffffffffff168210610aed5760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b604482015260640161069f565b610542610100836113a8565b6000610620436116b3565b606060378054610557906126c4565b6001600160a01b038116600090815260ff60205260408120548015610b82576001600160a01b038316600090815260ff6020526040902080546000198301908110610b6057610b60612772565b60009182526020909120015464010000000090046001600160e01b0316610b85565b60005b6001600160e01b03169392505050565b60003381610ba38286610f2a565b905083811015610c035760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161069f565b61060b828686840361104f565b6000336105e88185856111ed565b610c26611576565b61013080546001600160a01b0383166001600160a01b03199091168117909155610c586065546001600160a01b031690565b6001600160a01b03167fedddad404170d7f2d0e7a43623f1c85512ff10874e57c118024fa6d497d823b960405160405180910390a350565b83421115610ce05760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e61747572652065787069726564000000604482015260640161069f565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b038816918101919091526060810186905260808101859052600090610d5a90610d529060a0016040516020818303038152906040528051906020012061171a565b858585611747565b9050610d658161176f565b8614610db35760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e636500000000000000604482015260640161069f565b610dbd81886114fc565b50505050505050565b83421115610e165760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e65000000604482015260640161069f565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610e458c61176f565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610ea08261171a565b90506000610eb082878787611747565b9050896001600160a01b0316816001600160a01b031614610f135760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604482015260640161069f565b610f1e8a8a8a61104f565b50505050505050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b60408051808201909152600080825260208201526001600160a01b038316600090815260ff60205260409020805463ffffffff8416908110610f9957610f99612772565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b610fe1611576565b6001600160a01b0381166110465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161069f565b6108df81611639565b6001600160a01b0383166110b15760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161069f565b6001600160a01b0382166111125760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161069f565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061117f8484610f2a565b905060001981146111e757818110156111da5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161069f565b6111e7848484840361104f565b50505050565b6001600160a01b0383166112515760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161069f565b6001600160a01b0382166112b35760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161069f565b6001600160a01b0383166000908152603360205260409020548181101561132b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161069f565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061138b9086815260200190565b60405180910390a36111e7848484611797565b60006106206117a2565b8154600090818160058111156114025760006113c384611816565b6113cd9085612788565b600088815260209020909150869082015463ffffffff1611156113f257809150611400565b6113fd81600161270e565b92505b505b8082101561144f57600061141683836118fe565b600088815260209020909150869082015463ffffffff16111561143b57809150611449565b61144681600161270e565b92505b50611402565b801561147b576000868152602090208101600019015464010000000090046001600160e01b031661147e565b60005b6001600160e01b03169695505050505050565b61071c8282611919565b600054610100900460ff166114c25760405162461bcd60e51b815260040161069f9061279b565b61071c82826119a4565b600054610100900460ff166114f35760405162461bcd60e51b815260040161069f9061279b565b61098833611639565b6001600160a01b03828116600081815260fe6020818152604080842080546033845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46111e78284836119e4565b6065546001600160a01b031633146109885760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161069f565b600063ffffffff8211156116355760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b606482015260840161069f565b5090565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61071c8282611b21565b606060998054610557906126c4565b6060609a8054610557906126c4565b600065ffffffffffff8211156116355760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203460448201526538206269747360d01b606482015260840161069f565b600061054261172761139e565b8360405161190160f01b8152600281019290925260228201526042902090565b600080600061175887878787611b3a565b9150915061176581611bfe565b5095945050505050565b6001600160a01b038116600090815260cb602052604090208054600181018255905b50919050565b6108d0838383611d48565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6117cd611d7a565b6117d5611dd3565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60008160000361182857506000919050565b6000600161183584611e04565b901c6001901b9050600181848161184e5761184e6127e6565b048201901c90506001818481611866576118666127e6565b048201901c9050600181848161187e5761187e6127e6565b048201901c90506001818481611896576118966127e6565b048201901c905060018184816118ae576118ae6127e6565b048201901c905060018184816118c6576118c66127e6565b048201901c905060018184816118de576118de6127e6565b048201901c90506106ca818285816118f8576118f86127e6565b04611e98565b600061190d60028484186127fc565b6106ca9084841661270e565b6119238282611eae565b6035546001600160e01b0310156119955760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b606482015260840161069f565b6111e7610100611f7783611f83565b600054610100900460ff166119cb5760405162461bcd60e51b815260040161069f9061279b565b60366119d7838261286c565b5060376108d0828261286c565b816001600160a01b0316836001600160a01b031614158015611a065750600081115b156108d0576001600160a01b03831615611a94576001600160a01b038316600090815260ff602052604081208190611a41906120f885611f83565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611a89929190918252602082015260400190565b60405180910390a250505b6001600160a01b038216156108d0576001600160a01b038216600090815260ff602052604081208190611aca90611f7785611f83565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611b12929190918252602082015260400190565b60405180910390a25050505050565b611b2b8282612104565b6111e76101006120f883611f83565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611b715750600090506003611bf5565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611bc5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611bee57600060019250925050611bf5565b9150600090505b94509492505050565b6000816004811115611c1257611c1261292c565b03611c1a5750565b6001816004811115611c2e57611c2e61292c565b03611c7b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161069f565b6002816004811115611c8f57611c8f61292c565b03611cdc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161069f565b6003816004811115611cf057611cf061292c565b036108df5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161069f565b6001600160a01b03838116600090815260fe60205260408082205485841683529120546108d0929182169116836119e4565b600080611d85611695565b805190915015611d9c578051602090910120919050565b6097548015611dab5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b600080611dde6116a4565b805190915015611df5578051602090910120919050565b6098548015611dab5792915050565b600080608083901c15611e1957608092831c92015b604083901c15611e2b57604092831c92015b602083901c15611e3d57602092831c92015b601083901c15611e4f57601092831c92015b600883901c15611e6157600892831c92015b600483901c15611e7357600492831c92015b600283901c15611e8557600292831c92015b600183901c156105425760010192915050565b6000818310611ea757816106ca565b5090919050565b6001600160a01b038216611f045760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161069f565b8060356000828254611f16919061270e565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361071c60008383611797565b60006106ca828461270e565b82546000908190818115611fd05760008781526020902082016000190160408051808201909152905463ffffffff8116825264010000000090046001600160e01b03166020820152611fe5565b60408051808201909152600080825260208201525b905080602001516001600160e01b0316935061200584868863ffffffff16565b925060008211801561202f575061201a610af9565b65ffffffffffff16816000015163ffffffff16145b156120745761203d8361223f565b60008881526020902083016000190180546001600160e01b03929092166401000000000263ffffffff9092169190911790556120ee565b86604051806040016040528061209861208b610af9565b65ffffffffffff166115d0565b63ffffffff1681526020016120ac8661223f565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b60006106ca8284612788565b6001600160a01b0382166121645760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161069f565b6001600160a01b038216600090815260336020526040902054818110156121d85760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161069f565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36108d083600084611797565b60006001600160e01b038211156116355760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b606482015260840161069f565b6000602082840312156122ba57600080fd5b81356001600160e01b0319811681146106ca57600080fd5b6000815180845260005b818110156122f8576020818501810151868301820152016122dc565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006106ca60208301846122d2565b80356001600160a01b038116811461234257600080fd5b919050565b6000806040838503121561235a57600080fd5b6123638361232b565b946020939093013593505050565b60008060006060848603121561238657600080fd5b61238f8461232b565b925061239d6020850161232b565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126123d457600080fd5b813567ffffffffffffffff808211156123ef576123ef6123ad565b604051601f8301601f19908116603f01168101908282118183101715612417576124176123ad565b8160405283815286602085880101111561243057600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561246357600080fd5b823567ffffffffffffffff8082111561247b57600080fd5b612487868387016123c3565b9350602085013591508082111561249d57600080fd5b506124aa858286016123c3565b9150509250929050565b6000602082840312156124c657600080fd5b6106ca8261232b565b60ff60f81b881681526000602060e0818401526124ef60e084018a6122d2565b8381036040850152612501818a6122d2565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b8181101561255357835183529284019291840191600101612537565b50909c9b505050505050505050505050565b60006020828403121561257757600080fd5b5035919050565b803560ff8116811461234257600080fd5b60008060008060008060c087890312156125a857600080fd5b6125b18761232b565b955060208701359450604087013593506125cd6060880161257e565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a03121561260257600080fd5b61260b8861232b565b96506126196020890161232b565b955060408801359450606088013593506126356080890161257e565b925060a0880135915060c0880135905092959891949750929550565b6000806040838503121561266457600080fd5b61266d8361232b565b915061267b6020840161232b565b90509250929050565b6000806040838503121561269757600080fd5b6126a08361232b565b9150602083013563ffffffff811681146126b957600080fd5b809150509250929050565b600181811c908216806126d857607f821691505b60208210810361179157634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610542576105426126f8565b60208082526031908201527f5468697320616374696f6e2063616e206f6e6c7920626520706572666f726d656040820152703210313c903634b6b4ba32b2103ab9b2b960791b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b81810381811115610542576105426126f8565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008261281957634e487b7160e01b600052601260045260246000fd5b500490565b601f8211156108d057600081815260208120601f850160051c810160208610156128455750805b601f850160051c820191505b8181101561286457828155600101612851565b505050505050565b815167ffffffffffffffff811115612886576128866123ad565b61289a8161289484546126c4565b8461281e565b602080601f8311600181146128cf57600084156128b75750858301515b600019600386901b1c1916600185901b178555612864565b600085815260208120601f198616915b828110156128fe578886015182559484019460019091019084016128df565b508582101561291c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b063970849bcc896429b142aed6e84cebb9df68dfde8e3e664b9cd409e5ad62e64736f6c63430008130033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102065760003560e01c8063715018a61161011a5780639ab24eb0116100ad578063c3cda5201161007c578063c3cda52014610488578063d505accf1461049b578063dd62ed3e146104ae578063f1127ed8146104c1578063f2fde38b146104fe57600080fd5b80639ab24eb01461043c578063a457c2d71461044f578063a9059cbb14610462578063adfaa0d11461047557600080fd5b80638da5cb5b116100e95780638da5cb5b146103f15780638e539e8c1461040257806391ddadf41461041557806395d89b411461043457600080fd5b8063715018a6146103a857806379cc6790146103b05780637ecebe00146103c357806384b0196e146103d657600080fd5b80633a46b1a81161019d578063587cde1e1161016c578063587cde1e146102ed5780635c19a95c146103315780636f2b6ee6146103445780636fcfff451461035757806370a082311461037f57600080fd5b80633a46b1a8146102aa57806340c10f19146102bd5780634bf5d7e9146102d25780634cd88b76146102da57600080fd5b806323b872dd116101d957806323b872dd1461026d578063313ce567146102805780633644e5151461028f578063395093511461029757600080fd5b806301ffc9a71461020b57806306fdde0314610233578063095ea7b31461024857806318160ddd1461025b575b600080fd5b61021e6102193660046122a8565b610511565b60405190151581526020015b60405180910390f35b61023b610548565b60405161022a9190612318565b61021e610256366004612347565b6105da565b6035545b60405190815260200161022a565b61021e61027b366004612371565b6105f2565b6040516012815260200161022a565b61025f610616565b61021e6102a5366004612347565b610625565b61025f6102b8366004612347565b610647565b6102d06102cb366004612347565b6106d1565b005b61023b610720565b6102d06102e8366004612450565b6107b8565b6103196102fb3660046124b4565b6001600160a01b03908116600090815260fe60205260409020541690565b6040516001600160a01b03909116815260200161022a565b6102d061033f3660046124b4565b6108d5565b6102d06103523660046124b4565b6108e2565b61036a6103653660046124b4565b610954565b60405163ffffffff909116815260200161022a565b61025f61038d3660046124b4565b6001600160a01b031660009081526033602052604090205490565b6102d0610976565b6102d06103be366004612347565b61098a565b61025f6103d13660046124b4565b6109d5565b6103de6109f3565b60405161022a97969594939291906124cf565b6065546001600160a01b0316610319565b61025f610410366004612565565b610a91565b61041d610af9565b60405165ffffffffffff909116815260200161022a565b61023b610b04565b61025f61044a3660046124b4565b610b13565b61021e61045d366004612347565b610b95565b61021e610470366004612347565b610c10565b6102d06104833660046124b4565b610c1e565b6102d061049636600461258f565b610c90565b6102d06104a93660046125e7565b610dc6565b61025f6104bc366004612651565b610f2a565b6104d46104cf366004612684565b610f55565b60408051825163ffffffff1681526020928301516001600160e01b0316928101929092520161022a565b6102d061050c3660046124b4565b610fd9565b60006001600160e01b031982166336372b0760e01b148061054257506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060368054610557906126c4565b80601f0160208091040260200160405190810160405280929190818152602001828054610583906126c4565b80156105d05780601f106105a5576101008083540402835291602001916105d0565b820191906000526020600020905b8154815290600101906020018083116105b357829003601f168201915b5050505050905090565b6000336105e881858561104f565b5060019392505050565b600033610600858285611173565b61060b8585856111ed565b506001949350505050565b600061062061139e565b905090565b6000336105e88185856106388383610f2a565b610642919061270e565b61104f565b6000610651610af9565b65ffffffffffff1682106106a85760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b60448201526064015b60405180910390fd5b6001600160a01b038316600090815260ff602052604090206106ca90836113a8565b9392505050565b610130546001600160a01b03163314806106f65750610131546001600160a01b031633145b6107125760405162461bcd60e51b815260040161069f90612721565b61071c8282611491565b5050565b60604361072b610af9565b65ffffffffffff16146107805760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a2062726f6b656e20636c6f636b206d6f6465000000604482015260640161069f565b5060408051808201909152601d81527f6d6f64653d626c6f636b6e756d6265722666726f6d3d64656661756c74000000602082015290565b600054610100900460ff16158080156107d85750600054600160ff909116105b806107f25750303b1580156107f2575060005460ff166001145b6108555760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161069f565b6000805460ff191660011790558015610878576000805461ff0019166101001790555b610882838361149b565b61088a6114cc565b80156108d0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6108df33826114fc565b50565b6108ea611576565b61013180546001600160a01b0383166001600160a01b0319909116811790915561091c6065546001600160a01b031690565b6001600160a01b03167f17ca9d249e6c17317c9fc211524c70a7bb7f9631abd971db5d96948e8764737e60405160405180910390a350565b6001600160a01b038116600090815260ff6020526040812054610542906115d0565b61097e611576565b6109886000611639565b565b610130546001600160a01b03163314806109af5750610131546001600160a01b031633145b6109cb5760405162461bcd60e51b815260040161069f90612721565b61071c828261168b565b6001600160a01b038116600090815260cb6020526040812054610542565b6000606080600080600060606097546000801b148015610a135750609854155b610a575760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b604482015260640161069f565b610a5f611695565b610a676116a4565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000610a9b610af9565b65ffffffffffff168210610aed5760405162461bcd60e51b815260206004820152601960248201527804552433230566f7465733a20667574757265206c6f6f6b757603c1b604482015260640161069f565b610542610100836113a8565b6000610620436116b3565b606060378054610557906126c4565b6001600160a01b038116600090815260ff60205260408120548015610b82576001600160a01b038316600090815260ff6020526040902080546000198301908110610b6057610b60612772565b60009182526020909120015464010000000090046001600160e01b0316610b85565b60005b6001600160e01b03169392505050565b60003381610ba38286610f2a565b905083811015610c035760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161069f565b61060b828686840361104f565b6000336105e88185856111ed565b610c26611576565b61013080546001600160a01b0383166001600160a01b03199091168117909155610c586065546001600160a01b031690565b6001600160a01b03167fedddad404170d7f2d0e7a43623f1c85512ff10874e57c118024fa6d497d823b960405160405180910390a350565b83421115610ce05760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e61747572652065787069726564000000604482015260640161069f565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b038816918101919091526060810186905260808101859052600090610d5a90610d529060a0016040516020818303038152906040528051906020012061171a565b858585611747565b9050610d658161176f565b8614610db35760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e636500000000000000604482015260640161069f565b610dbd81886114fc565b50505050505050565b83421115610e165760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e65000000604482015260640161069f565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610e458c61176f565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610ea08261171a565b90506000610eb082878787611747565b9050896001600160a01b0316816001600160a01b031614610f135760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604482015260640161069f565b610f1e8a8a8a61104f565b50505050505050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b60408051808201909152600080825260208201526001600160a01b038316600090815260ff60205260409020805463ffffffff8416908110610f9957610f99612772565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b610fe1611576565b6001600160a01b0381166110465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161069f565b6108df81611639565b6001600160a01b0383166110b15760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161069f565b6001600160a01b0382166111125760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161069f565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061117f8484610f2a565b905060001981146111e757818110156111da5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161069f565b6111e7848484840361104f565b50505050565b6001600160a01b0383166112515760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161069f565b6001600160a01b0382166112b35760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161069f565b6001600160a01b0383166000908152603360205260409020548181101561132b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161069f565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061138b9086815260200190565b60405180910390a36111e7848484611797565b60006106206117a2565b8154600090818160058111156114025760006113c384611816565b6113cd9085612788565b600088815260209020909150869082015463ffffffff1611156113f257809150611400565b6113fd81600161270e565b92505b505b8082101561144f57600061141683836118fe565b600088815260209020909150869082015463ffffffff16111561143b57809150611449565b61144681600161270e565b92505b50611402565b801561147b576000868152602090208101600019015464010000000090046001600160e01b031661147e565b60005b6001600160e01b03169695505050505050565b61071c8282611919565b600054610100900460ff166114c25760405162461bcd60e51b815260040161069f9061279b565b61071c82826119a4565b600054610100900460ff166114f35760405162461bcd60e51b815260040161069f9061279b565b61098833611639565b6001600160a01b03828116600081815260fe6020818152604080842080546033845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46111e78284836119e4565b6065546001600160a01b031633146109885760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161069f565b600063ffffffff8211156116355760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b606482015260840161069f565b5090565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61071c8282611b21565b606060998054610557906126c4565b6060609a8054610557906126c4565b600065ffffffffffff8211156116355760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203460448201526538206269747360d01b606482015260840161069f565b600061054261172761139e565b8360405161190160f01b8152600281019290925260228201526042902090565b600080600061175887878787611b3a565b9150915061176581611bfe565b5095945050505050565b6001600160a01b038116600090815260cb602052604090208054600181018255905b50919050565b6108d0838383611d48565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6117cd611d7a565b6117d5611dd3565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60008160000361182857506000919050565b6000600161183584611e04565b901c6001901b9050600181848161184e5761184e6127e6565b048201901c90506001818481611866576118666127e6565b048201901c9050600181848161187e5761187e6127e6565b048201901c90506001818481611896576118966127e6565b048201901c905060018184816118ae576118ae6127e6565b048201901c905060018184816118c6576118c66127e6565b048201901c905060018184816118de576118de6127e6565b048201901c90506106ca818285816118f8576118f86127e6565b04611e98565b600061190d60028484186127fc565b6106ca9084841661270e565b6119238282611eae565b6035546001600160e01b0310156119955760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b606482015260840161069f565b6111e7610100611f7783611f83565b600054610100900460ff166119cb5760405162461bcd60e51b815260040161069f9061279b565b60366119d7838261286c565b5060376108d0828261286c565b816001600160a01b0316836001600160a01b031614158015611a065750600081115b156108d0576001600160a01b03831615611a94576001600160a01b038316600090815260ff602052604081208190611a41906120f885611f83565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611a89929190918252602082015260400190565b60405180910390a250505b6001600160a01b038216156108d0576001600160a01b038216600090815260ff602052604081208190611aca90611f7785611f83565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611b12929190918252602082015260400190565b60405180910390a25050505050565b611b2b8282612104565b6111e76101006120f883611f83565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611b715750600090506003611bf5565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611bc5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611bee57600060019250925050611bf5565b9150600090505b94509492505050565b6000816004811115611c1257611c1261292c565b03611c1a5750565b6001816004811115611c2e57611c2e61292c565b03611c7b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161069f565b6002816004811115611c8f57611c8f61292c565b03611cdc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161069f565b6003816004811115611cf057611cf061292c565b036108df5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161069f565b6001600160a01b03838116600090815260fe60205260408082205485841683529120546108d0929182169116836119e4565b600080611d85611695565b805190915015611d9c578051602090910120919050565b6097548015611dab5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b600080611dde6116a4565b805190915015611df5578051602090910120919050565b6098548015611dab5792915050565b600080608083901c15611e1957608092831c92015b604083901c15611e2b57604092831c92015b602083901c15611e3d57602092831c92015b601083901c15611e4f57601092831c92015b600883901c15611e6157600892831c92015b600483901c15611e7357600492831c92015b600283901c15611e8557600292831c92015b600183901c156105425760010192915050565b6000818310611ea757816106ca565b5090919050565b6001600160a01b038216611f045760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161069f565b8060356000828254611f16919061270e565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361071c60008383611797565b60006106ca828461270e565b82546000908190818115611fd05760008781526020902082016000190160408051808201909152905463ffffffff8116825264010000000090046001600160e01b03166020820152611fe5565b60408051808201909152600080825260208201525b905080602001516001600160e01b0316935061200584868863ffffffff16565b925060008211801561202f575061201a610af9565b65ffffffffffff16816000015163ffffffff16145b156120745761203d8361223f565b60008881526020902083016000190180546001600160e01b03929092166401000000000263ffffffff9092169190911790556120ee565b86604051806040016040528061209861208b610af9565b65ffffffffffff166115d0565b63ffffffff1681526020016120ac8661223f565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b60006106ca8284612788565b6001600160a01b0382166121645760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161069f565b6001600160a01b038216600090815260336020526040902054818110156121d85760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161069f565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36108d083600084611797565b60006001600160e01b038211156116355760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b606482015260840161069f565b6000602082840312156122ba57600080fd5b81356001600160e01b0319811681146106ca57600080fd5b6000815180845260005b818110156122f8576020818501810151868301820152016122dc565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006106ca60208301846122d2565b80356001600160a01b038116811461234257600080fd5b919050565b6000806040838503121561235a57600080fd5b6123638361232b565b946020939093013593505050565b60008060006060848603121561238657600080fd5b61238f8461232b565b925061239d6020850161232b565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126123d457600080fd5b813567ffffffffffffffff808211156123ef576123ef6123ad565b604051601f8301601f19908116603f01168101908282118183101715612417576124176123ad565b8160405283815286602085880101111561243057600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561246357600080fd5b823567ffffffffffffffff8082111561247b57600080fd5b612487868387016123c3565b9350602085013591508082111561249d57600080fd5b506124aa858286016123c3565b9150509250929050565b6000602082840312156124c657600080fd5b6106ca8261232b565b60ff60f81b881681526000602060e0818401526124ef60e084018a6122d2565b8381036040850152612501818a6122d2565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b8181101561255357835183529284019291840191600101612537565b50909c9b505050505050505050505050565b60006020828403121561257757600080fd5b5035919050565b803560ff8116811461234257600080fd5b60008060008060008060c087890312156125a857600080fd5b6125b18761232b565b955060208701359450604087013593506125cd6060880161257e565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a03121561260257600080fd5b61260b8861232b565b96506126196020890161232b565b955060408801359450606088013593506126356080890161257e565b925060a0880135915060c0880135905092959891949750929550565b6000806040838503121561266457600080fd5b61266d8361232b565b915061267b6020840161232b565b90509250929050565b6000806040838503121561269757600080fd5b6126a08361232b565b9150602083013563ffffffff811681146126b957600080fd5b809150509250929050565b600181811c908216806126d857607f821691505b60208210810361179157634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610542576105426126f8565b60208082526031908201527f5468697320616374696f6e2063616e206f6e6c7920626520706572666f726d656040820152703210313c903634b6b4ba32b2103ab9b2b960791b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b81810381811115610542576105426126f8565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008261281957634e487b7160e01b600052601260045260246000fd5b500490565b601f8211156108d057600081815260208120601f850160051c810160208610156128455750805b601f850160051c820191505b8181101561286457828155600101612851565b505050505050565b815167ffffffffffffffff811115612886576128866123ad565b61289a8161289484546126c4565b8461281e565b602080601f8311600181146128cf57600084156128b75750858301515b600019600386901b1c1916600185901b178555612864565b600085815260208120601f198616915b828110156128fe578886015182559484019460019091019084016128df565b508582101561291c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220b063970849bcc896429b142aed6e84cebb9df68dfde8e3e664b9cd409e5ad62e64736f6c63430008130033
Deployed Bytecode Sourcemap
136991:2071:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;137813:196;;;;;;:::i;:::-;;:::i;:::-;;;470:14:1;;463:22;445:41;;433:2;418:18;137813:196:0;;;;;;;;23458:100;;;:::i;:::-;;;;;;;:::i;25818:201::-;;;;;;:::i;:::-;;:::i;24587:108::-;24675:12;;24587:108;;;1733:25:1;;;1721:2;1706:18;24587:108:0;1587:177:1;26599:261:0;;;;;;:::i;:::-;;:::i;24429:93::-;;;24512:2;2244:36:1;;2232:2;2217:18;24429:93:0;2102:184:1;81255:115:0;;;:::i;27269:238::-;;;;;;:::i;:::-;;:::i;124605:251::-;;;;;;:::i;:::-;;:::i;138322:100::-;;;;;;:::i;:::-;;:::i;:::-;;123131:258;;;:::i;137463:163::-;;;;;;:::i;:::-;;:::i;123956:128::-;;;;;;:::i;:::-;-1:-1:-1;;;;;124057:19:0;;;124030:7;124057:19;;;:10;:19;;;;;;;;123956:128;;;;-1:-1:-1;;;;;4232:32:1;;;4214:51;;4202:2;4187:18;123956:128:0;4068:203:1;127501:114:0;;;;;;:::i;:::-;;:::i;138166:144::-;;;;;;:::i;:::-;;:::i;123701:162::-;;;;;;:::i;:::-;;:::i;:::-;;;4450:10:1;4438:23;;;4420:42;;4408:2;4393:18;123701:162:0;4276:192:1;24758:127:0;;;;;;:::i;:::-;-1:-1:-1;;;;;24859:18:0;24832:7;24859:18;;;:9;:18;;;;;;;24758:127;36729:103;;;:::i;138430:115::-;;;;;;:::i;:::-;;:::i;81003:128::-;;;;;;:::i;:::-;;:::i;73320:889::-;;;:::i;:::-;;;;;;;;;;;;;:::i;36088:87::-;36161:6;;-1:-1:-1;;;;;36161:6:0;36088:87;;125128:242;;;;;;:::i;:::-;;:::i;122882:131::-;;;:::i;:::-;;;6096:14:1;6084:27;;;6066:46;;6054:2;6039:18;122882:131:0;5922:196:1;23677:104:0;;;:::i;124168:248::-;;;;;;:::i;:::-;;:::i;28010:436::-;;;;;;:::i;:::-;;:::i;25091:193::-;;;;;;:::i;:::-;;:::i;138017:141::-;;;;;;:::i;:::-;;:::i;127697:602::-;;;;;;:::i;:::-;;:::i;80277:656::-;;;;;;:::i;:::-;;:::i;25347:151::-;;;;;;:::i;:::-;;:::i;123471:150::-;;;;;;:::i;:::-;;:::i;:::-;;;;8275:13:1;;8290:10;8271:30;8253:49;;8362:4;8350:17;;;8344:24;-1:-1:-1;;;;;8340:50:1;8318:20;;;8311:80;;;;8226:18;123471:150:0;8051:346:1;36987:201:0;;;;;;:::i;:::-;;:::i;137813:196::-;137898:4;-1:-1:-1;;;;;;137922:39:0;;-1:-1:-1;;;137922:39:0;;:79;;-1:-1:-1;;;;;;;;;;134179:40:0;;;137965:36;137915:86;137813:196;-1:-1:-1;;137813:196:0:o;23458:100::-;23512:13;23545:5;23538:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23458:100;:::o;25818:201::-;25901:4;20677:10;25957:32;20677:10;25973:7;25982:6;25957:8;:32::i;:::-;-1:-1:-1;26007:4:0;;25818:201;-1:-1:-1;;;25818:201:0:o;26599:261::-;26696:4;20677:10;26754:38;26770:4;20677:10;26785:6;26754:15;:38::i;:::-;26803:27;26813:4;26819:2;26823:6;26803:9;:27::i;:::-;-1:-1:-1;26848:4:0;;26599:261;-1:-1:-1;;;;26599:261:0:o;81255:115::-;81315:7;81342:20;:18;:20::i;:::-;81335:27;;81255:115;:::o;27269:238::-;27357:4;20677:10;27413:64;20677:10;27429:7;27466:10;27438:25;20677:10;27429:7;27438:9;:25::i;:::-;:38;;;;:::i;:::-;27413:8;:64::i;124605:251::-;124701:7;124741;:5;:7::i;:::-;124729:19;;:9;:19;124721:57;;;;-1:-1:-1;;;124721:57:0;;9251:2:1;124721:57:0;;;9233:21:1;9290:2;9270:18;;;9263:30;-1:-1:-1;;;9309:18:1;;;9302:55;9374:18;;124721:57:0;;;;;;;;;-1:-1:-1;;;;;124815:21:0;;;;;;:12;:21;;;;;124796:52;;124838:9;124796:18;:52::i;:::-;124789:59;124605:251;-1:-1:-1;;;124605:251:0:o;138322:100::-;137694:9;;-1:-1:-1;;;;;137694:9:0;137680:10;:23;;:51;;-1:-1:-1;137721:10:0;;-1:-1:-1;;;;;137721:10:0;137707;:24;137680:51;137672:113;;;;-1:-1:-1;;;137672:113:0;;;;;;;:::i;:::-;138397:17:::1;138403:2;138407:6;138397:5;:17::i;:::-;138322:100:::0;;:::o;123131:258::-;123191:13;123286:12;123275:7;:5;:7::i;:::-;:23;;;123267:65;;;;-1:-1:-1;;;123267:65:0;;10023:2:1;123267:65:0;;;10005:21:1;10062:2;10042:18;;;10035:30;10101:31;10081:18;;;10074:59;10150:18;;123267:65:0;9821:353:1;123267:65:0;-1:-1:-1;123343:38:0;;;;;;;;;;;;;;;;;;123131:258::o;137463:163::-;16439:19;16462:13;;;;;;16461:14;;16509:34;;;;-1:-1:-1;16527:12:0;;16542:1;16527:12;;;;:16;16509:34;16508:108;;;-1:-1:-1;16588:4:0;5403:19;:23;;;16549:66;;-1:-1:-1;16598:12:0;;;;;:17;16549:66;16486:204;;;;-1:-1:-1;;;16486:204:0;;10381:2:1;16486:204:0;;;10363:21:1;10420:2;10400:18;;;10393:30;10459:34;10439:18;;;10432:62;-1:-1:-1;;;10510:18:1;;;10503:44;10564:19;;16486:204:0;10179:410:1;16486:204:0;16701:12;:16;;-1:-1:-1;;16701:16:0;16716:1;16701:16;;;16728:67;;;;16763:13;:20;;-1:-1:-1;;16763:20:0;;;;;16728:67;137555:26:::1;137568:4;137574:6;137555:12;:26::i;:::-;137592;:24;:26::i;:::-;16821:14:::0;16817:102;;;16868:5;16852:21;;-1:-1:-1;;16852:21:0;;;16893:14;;-1:-1:-1;2244:36:1;;16893:14:0;;2232:2:1;2217:18;16893:14:0;;;;;;;16817:102;16428:498;137463:163;;:::o;127501:114::-;127573:34;20677:10;127597:9;127573;:34::i;:::-;127501:114;:::o;138166:144::-;35974:13;:11;:13::i;:::-;138234:10:::1;:21:::0;;-1:-1:-1;;;;;138234:21:0;::::1;-1:-1:-1::0;;;;;;138234:21:0;;::::1;::::0;::::1;::::0;;;138284:7:::1;36161:6:::0;;-1:-1:-1;;;;;36161:6:0;;36088:87;138284:7:::1;-1:-1:-1::0;;;;;138271:31:0::1;;;;;;;;;;;138166:144:::0;:::o;123701:162::-;-1:-1:-1;;;;;123826:21:0;;123771:6;123826:21;;;:12;:21;;;;;:28;123797:58;;:28;:58::i;36729:103::-;35974:13;:11;:13::i;:::-;36794:30:::1;36821:1;36794:18;:30::i;:::-;36729:103::o:0;138430:115::-;137694:9;;-1:-1:-1;;;;;137694:9:0;137680:10;:23;;:51;;-1:-1:-1;137721:10:0;;-1:-1:-1;;;;;137721:10:0;137707;:24;137680:51;137672:113;;;;-1:-1:-1;;;137672:113:0;;;;;;;:::i;:::-;138515:22:::1;138521:7;138530:6;138515:5;:22::i;81003:128::-:0;-1:-1:-1;;;;;81099:14:0;;81072:7;81099:14;;;:7;:14;;;;;77852;81099:24;77760:114;73320:889;73441:13;73469:18;73502:21;73538:15;73568:25;73608:12;73635:27;73903:11;;73918:1;73903:16;;;:39;;;;-1:-1:-1;73923:14:0;;:19;73903:39;73895:73;;;;-1:-1:-1;;;73895:73:0;;10995:2:1;73895:73:0;;;10977:21:1;11034:2;11014:18;;;11007:30;-1:-1:-1;;;11053:18:1;;;11046:51;11114:18;;73895:73:0;10793:345:1;73895:73:0;74034:13;:11;:13::i;:::-;74062:16;:14;:16::i;:::-;74174;;;74157:1;74174:16;;;;;;;;;-1:-1:-1;;;73981:220:0;;;-1:-1:-1;73981:220:0;;-1:-1:-1;74093:13:0;;-1:-1:-1;74129:4:0;;-1:-1:-1;74157:1:0;-1:-1:-1;74174:16:0;-1:-1:-1;73981:220:0;-1:-1:-1;73320:889:0:o;125128:242::-;125213:7;125253;:5;:7::i;:::-;125241:19;;:9;:19;125233:57;;;;-1:-1:-1;;;125233:57:0;;9251:2:1;125233:57:0;;;9233:21:1;9290:2;9270:18;;;9263:30;-1:-1:-1;;;9309:18:1;;;9302:55;9374:18;;125233:57:0;9049:349:1;125233:57:0;125308:54;125327:23;125352:9;125308:18;:54::i;122882:131::-;122937:6;122963:42;122992:12;122963:28;:42::i;23677:104::-;23733:13;23766:7;23759:14;;;;;:::i;124168:248::-;-1:-1:-1;;;;;124275:21:0;;124241:7;124275:21;;;:12;:21;;;;;:28;124346:8;;:51;;-1:-1:-1;;;;;124361:21:0;;;;;;:12;:21;;;;;:30;;-1:-1:-1;;124383:7:0;;;124361:30;;;;;;:::i;:::-;;;;;;;;;;:36;;;;-1:-1:-1;;;;;124361:36:0;124346:51;;;124357:1;124346:51;-1:-1:-1;;;;;124339:58:0;;124168:248;-1:-1:-1;;;124168:248:0:o;28010:436::-;28103:4;20677:10;28103:4;28186:25;20677:10;28203:7;28186:9;:25::i;:::-;28159:52;;28250:15;28230:16;:35;;28222:85;;;;-1:-1:-1;;;28222:85:0;;11477:2:1;28222:85:0;;;11459:21:1;11516:2;11496:18;;;11489:30;11555:34;11535:18;;;11528:62;-1:-1:-1;;;11606:18:1;;;11599:35;11651:19;;28222:85:0;11275:401:1;28222:85:0;28343:60;28352:5;28359:7;28387:15;28368:16;:34;28343:8;:60::i;25091:193::-;25170:4;20677:10;25226:28;20677:10;25243:2;25247:6;25226:9;:28::i;138017:141::-;35974:13;:11;:13::i;:::-;138084:9:::1;:20:::0;;-1:-1:-1;;;;;138084:20:0;::::1;-1:-1:-1::0;;;;;;138084:20:0;;::::1;::::0;::::1;::::0;;;138132:7:::1;36161:6:::0;;-1:-1:-1;;;;;36161:6:0;;36088:87;138132:7:::1;-1:-1:-1::0;;;;;138120:30:0::1;;;;;;;;;;;138017:141:::0;:::o;127697:602::-;127924:6;127905:15;:25;;127897:67;;;;-1:-1:-1;;;127897:67:0;;11883:2:1;127897:67:0;;;11865:21:1;11922:2;11902:18;;;11895:30;11961:31;11941:18;;;11934:59;12010:18;;127897:67:0;11681:353:1;127897:67:0;128058:58;;;122345:71;128058:58;;;12270:25:1;-1:-1:-1;;;;;12331:32:1;;12311:18;;;12304:60;;;;12380:18;;;12373:34;;;12423:18;;;12416:34;;;127975:14:0;;127992:185;;128031:87;;12242:19:1;;128058:58:0;;;;;;;;;;;;128048:69;;;;;;128031:16;:87::i;:::-;128133:1;128149;128165;127992:24;:185::i;:::-;127975:202;;128205:17;128215:6;128205:9;:17::i;:::-;128196:5;:26;128188:64;;;;-1:-1:-1;;;128188:64:0;;12663:2:1;128188:64:0;;;12645:21:1;12702:2;12682:18;;;12675:30;12741:27;12721:18;;;12714:55;12786:18;;128188:64:0;12461:349:1;128188:64:0;128263:28;128273:6;128281:9;128263;:28::i;:::-;127886:413;127697:602;;;;;;:::o;80277:656::-;80521:8;80502:15;:27;;80494:69;;;;-1:-1:-1;;;80494:69:0;;13017:2:1;80494:69:0;;;12999:21:1;13056:2;13036:18;;;13029:30;13095:31;13075:18;;;13068:59;13144:18;;80494:69:0;12815:353:1;80494:69:0;80576:18;79284:95;80636:5;80643:7;80652:5;80659:16;80669:5;80659:9;:16::i;:::-;80607:79;;;;;;13460:25:1;;;;-1:-1:-1;;;;;13559:15:1;;;13539:18;;;13532:43;13611:15;;;;13591:18;;;13584:43;13643:18;;;13636:34;13686:19;;;13679:35;13730:19;;;13723:35;;;13432:19;;80607:79:0;;;;;;;;;;;;80597:90;;;;;;80576:111;;80700:12;80715:28;80732:10;80715:16;:28::i;:::-;80700:43;;80756:14;80773:39;80798:4;80804:1;80807;80810;80773:24;:39::i;:::-;80756:56;;80841:5;-1:-1:-1;;;;;80831:15:0;:6;-1:-1:-1;;;;;80831:15:0;;80823:58;;;;-1:-1:-1;;;80823:58:0;;13971:2:1;80823:58:0;;;13953:21:1;14010:2;13990:18;;;13983:30;14049:32;14029:18;;;14022:60;14099:18;;80823:58:0;13769:354:1;80823:58:0;80894:31;80903:5;80910:7;80919:5;80894:8;:31::i;:::-;80483:450;;;80277:656;;;;;;;:::o;25347:151::-;-1:-1:-1;;;;;25463:18:0;;;25436:7;25463:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;25347:151::o;123471:150::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;123587:21:0;;;;;;:12;:21;;;;;:26;;;;;;;;;;;;:::i;:::-;;;;;;;;;;123580:33;;;;;;;;;123587:26;;123580:33;;;;;;;;;-1:-1:-1;;;;;123580:33:0;;;;;;;;;123471:150;-1:-1:-1;;;123471:150:0:o;36987:201::-;35974:13;:11;:13::i;:::-;-1:-1:-1;;;;;37076:22:0;::::1;37068:73;;;::::0;-1:-1:-1;;;37068:73:0;;14330:2:1;37068:73:0::1;::::0;::::1;14312:21:1::0;14369:2;14349:18;;;14342:30;14408:34;14388:18;;;14381:62;-1:-1:-1;;;14459:18:1;;;14452:36;14505:19;;37068:73:0::1;14128:402:1::0;37068:73:0::1;37152:28;37171:8;37152:18;:28::i;32003:346::-:0;-1:-1:-1;;;;;32105:19:0;;32097:68;;;;-1:-1:-1;;;32097:68:0;;14737:2:1;32097:68:0;;;14719:21:1;14776:2;14756:18;;;14749:30;14815:34;14795:18;;;14788:62;-1:-1:-1;;;14866:18:1;;;14859:34;14910:19;;32097:68:0;14535:400:1;32097:68:0;-1:-1:-1;;;;;32184:21:0;;32176:68;;;;-1:-1:-1;;;32176:68:0;;15142:2:1;32176:68:0;;;15124:21:1;15181:2;15161:18;;;15154:30;15220:34;15200:18;;;15193:62;-1:-1:-1;;;15271:18:1;;;15264:32;15313:19;;32176:68:0;14940:398:1;32176:68:0;-1:-1:-1;;;;;32257:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;32309:32;;1733:25:1;;;32309:32:0;;1706:18:1;32309:32:0;;;;;;;32003:346;;;:::o;32640:419::-;32741:24;32768:25;32778:5;32785:7;32768:9;:25::i;:::-;32741:52;;-1:-1:-1;;32808:16:0;:37;32804:248;;32890:6;32870:16;:26;;32862:68;;;;-1:-1:-1;;;32862:68:0;;15545:2:1;32862:68:0;;;15527:21:1;15584:2;15564:18;;;15557:30;15623:31;15603:18;;;15596:59;15672:18;;32862:68:0;15343:353:1;32862:68:0;32974:51;32983:5;32990:7;33018:6;32999:16;:25;32974:8;:51::i;:::-;32730:329;32640:419;;;:::o;28916:806::-;-1:-1:-1;;;;;29013:18:0;;29005:68;;;;-1:-1:-1;;;29005:68:0;;15903:2:1;29005:68:0;;;15885:21:1;15942:2;15922:18;;;15915:30;15981:34;15961:18;;;15954:62;-1:-1:-1;;;16032:18:1;;;16025:35;16077:19;;29005:68:0;15701:401:1;29005:68:0;-1:-1:-1;;;;;29092:16:0;;29084:64;;;;-1:-1:-1;;;29084:64:0;;16309:2:1;29084:64:0;;;16291:21:1;16348:2;16328:18;;;16321:30;16387:34;16367:18;;;16360:62;-1:-1:-1;;;16438:18:1;;;16431:33;16481:19;;29084:64:0;16107:399:1;29084:64:0;-1:-1:-1;;;;;29234:15:0;;29212:19;29234:15;;;:9;:15;;;;;;29268:21;;;;29260:72;;;;-1:-1:-1;;;29260:72:0;;16713:2:1;29260:72:0;;;16695:21:1;16752:2;16732:18;;;16725:30;16791:34;16771:18;;;16764:62;-1:-1:-1;;;16842:18:1;;;16835:36;16888:19;;29260:72:0;16511:402:1;29260:72:0;-1:-1:-1;;;;;29368:15:0;;;;;;;:9;:15;;;;;;29386:20;;;29368:38;;29586:13;;;;;;;;;;:23;;;;;;29638:26;;;;;;29400:6;1733:25:1;;1721:2;1706:18;;1587:177;29638:26:0;;;;;;;;29677:37;29697:4;29703:2;29707:6;29677:19;:37::i;72092:111::-;72145:7;72172:23;:21;:23::i;125459:1956::-;126683:12;;125556:7;;;126683:12;126781:1;126772:10;;126768:260;;;126799:11;126822:28;126843:6;126822:20;:28::i;:::-;126813:37;;:6;:37;:::i;:::-;132020:25;132082:21;;;132149:4;132136:18;;126799:51;;-1:-1:-1;126907:9:0;;132132:28;;126869:35;;;:47;126865:152;;;126944:3;126937:10;;126865:152;;;126994:7;:3;127000:1;126994:7;:::i;:::-;126988:13;;126865:152;126784:244;126768:260;127053:4;127047:3;:10;127040:260;;;127074:11;127088:34;127112:3;127117:4;127088:23;:34::i;:::-;132020:25;132082:21;;;132149:4;132136:18;;127074:48;;-1:-1:-1;127179:9:0;;132132:28;;127141:35;;;:47;127137:152;;;127216:3;127209:10;;127137:152;;;127266:7;:3;127272:1;127266:7;:::i;:::-;127260:13;;127137:152;127059:241;127040:260;;;127344:9;;:52;;132020:25;132082:21;;;132149:4;132136:18;;132132:28;;-1:-1:-1;;132132:28:0;127360:36;;;;-1:-1:-1;;;;;127360:36:0;127344:52;;;127356:1;127344:52;-1:-1:-1;;;;;127337:59:0;;125459:1956;-1:-1:-1;;;;;;125459:1956:0:o;138753:144::-;138866:23;138878:2;138882:6;138866:11;:23::i;23069:149::-;18582:13;;;;;;;18574:69;;;;-1:-1:-1;;;18574:69:0;;;;;;;:::i;:::-;23172:38:::1;23195:5;23202:7;23172:22;:38::i;35736:113::-:0;18582:13;;;;;;;18574:69;;;;-1:-1:-1;;;18574:69:0;;;;;;;:::i;:::-;35809:32:::1;20677:10:::0;35809:18:::1;:32::i;129736:388::-:0;-1:-1:-1;;;;;124057:19:0;;;129821:23;124057:19;;;:10;:19;;;;;;;;;;24859:9;:18;;;;;;129936:21;;;;:33;;;-1:-1:-1;;;;;;129936:33:0;;;;;;;129987:54;;124057:19;;;;;24859:18;;129936:33;;124057:19;;;129987:54;;129821:23;129987:54;130054:62;130071:15;130088:9;130099:16;130054;:62::i;36253:132::-;36161:6;;-1:-1:-1;;;;;36161:6:0;20677:10;36317:23;36309:68;;;;-1:-1:-1;;;36309:68:0;;17665:2:1;36309:68:0;;;17647:21:1;;;17684:18;;;17677:30;17743:34;17723:18;;;17716:62;17795:18;;36309:68:0;17463:356:1;100722:190:0;100778:6;100814:16;100805:25;;;100797:76;;;;-1:-1:-1;;;100797:76:0;;18026:2:1;100797:76:0;;;18008:21:1;18065:2;18045:18;;;18038:30;18104:34;18084:18;;;18077:62;-1:-1:-1;;;18155:18:1;;;18148:36;18201:19;;100797:76:0;17824:402:1;100797:76:0;-1:-1:-1;100898:5:0;100722:190::o;37348:191::-;37441:6;;;-1:-1:-1;;;;;37458:17:0;;;-1:-1:-1;;;;;;37458:17:0;;;;;;;37491:40;;37441:6;;;37458:17;37441:6;;37491:40;;37422:16;;37491:40;37411:128;37348:191;:::o;138905:154::-;139023:28;139035:7;139044:6;139023:11;:28::i;74441:100::-;74495:13;74528:5;74521:12;;;;;:::i;74776:106::-;74833:13;74866:8;74859:15;;;;;:::i;99664:190::-;99720:6;99756:16;99747:25;;;99739:76;;;;-1:-1:-1;;;99739:76:0;;18433:2:1;99739:76:0;;;18415:21:1;18472:2;18452:18;;;18445:30;18511:34;18491:18;;;18484:62;-1:-1:-1;;;18562:18:1;;;18555:36;18608:19;;99739:76:0;18231:402:1;73047:178:0;73124:7;73151:66;73184:20;:18;:20::i;:::-;73206:10;67575:4;67569:11;-1:-1:-1;;;67594:23:0;;67647:4;67638:14;;67631:39;;;;67700:4;67691:14;;67684:34;67755:4;67740:20;;;67372:406;65577:236;65662:7;65683:17;65702:18;65724:25;65735:4;65741:1;65744;65747;65724:10;:25::i;:::-;65682:67;;;;65760:18;65772:5;65760:11;:18::i;:::-;-1:-1:-1;65796:9:0;65577:236;-1:-1:-1;;;;;65577:236:0:o;81508:218::-;-1:-1:-1;;;;;81640:14:0;;81568:15;81640:14;;;:7;:14;;;;;77852;;77989:1;77971:19;;;;77852:14;81701:17;81585:141;81508:218;;;:::o;138553:192::-;138694:43;138720:4;138726:2;138730:6;138694:25;:43::i;72211:194::-;72266:7;70663:95;72326:17;:15;:17::i;:::-;72345:20;:18;:20::i;:::-;72303:93;;;;;;18897:25:1;;;;18938:18;;18931:34;;;;18981:18;;;18974:34;72367:13:0;19024:18:1;;;19017:34;72390:4:0;19067:19:1;;;19060:61;18869:19;;72303:93:0;;;;;;;;;;;;72293:104;;;;;;72286:111;;72211:194;:::o;48566:1673::-;48614:7;48638:1;48643;48638:6;48634:47;;-1:-1:-1;48668:1:0;;48566:1673;-1:-1:-1;48566:1673:0:o;48634:47::-;49372:14;49406:1;49395:7;49400:1;49395:4;:7::i;:::-;:12;;49389:1;:19;;49372:36;;49874:1;49863:6;49859:1;:10;;;;;:::i;:::-;;49850:6;:19;49849:26;;49840:35;;49924:1;49913:6;49909:1;:10;;;;;:::i;:::-;;49900:6;:19;49899:26;;49890:35;;49974:1;49963:6;49959:1;:10;;;;;:::i;:::-;;49950:6;:19;49949:26;;49940:35;;50024:1;50013:6;50009:1;:10;;;;;:::i;:::-;;50000:6;:19;49999:26;;49990:35;;50074:1;50063:6;50059:1;:10;;;;;:::i;:::-;;50050:6;:19;50049:26;;50040:35;;50124:1;50113:6;50109:1;:10;;;;;:::i;:::-;;50100:6;:19;50099:26;;50090:35;;50174:1;50163:6;50159:1;:10;;;;;:::i;:::-;;50150:6;:19;50149:26;;50140:35;;50197:23;50201:6;50213;50209:1;:10;;;;;:::i;:::-;;50197:3;:23::i;42723:156::-;42785:7;42860:11;42870:1;42861:5;;;42860:11;:::i;:::-;42850:21;;42851:5;;;42850:21;:::i;128605:290::-;128690:28;128702:7;128711:6;128690:11;:28::i;:::-;24675:12;;-1:-1:-1;;;;;;128737:29:0;128729:90;;;;-1:-1:-1;;;128729:90:0;;19688:2:1;128729:90:0;;;19670:21:1;19727:2;19707:18;;;19700:30;19766:34;19746:18;;;19739:62;-1:-1:-1;;;19817:18:1;;;19810:46;19873:19;;128729:90:0;19486:412:1;128729:90:0;128832:55;128849:23;128874:4;128880:6;128832:16;:55::i;23226:162::-;18582:13;;;;;;;18574:69;;;;-1:-1:-1;;;18574:69:0;;;;;;;:::i;:::-;23339:5:::1;:13;23347:5:::0;23339;:13:::1;:::i;:::-;-1:-1:-1::0;23363:7:0::1;:17;23373:7:::0;23363;:17:::1;:::i;130132:609::-:0;130230:3;-1:-1:-1;;;;;130223:10:0;:3;-1:-1:-1;;;;;130223:10:0;;;:24;;;;;130246:1;130237:6;:10;130223:24;130219:515;;;-1:-1:-1;;;;;130268:17:0;;;130264:224;;-1:-1:-1;;;;;130364:17:0;;130307;130364;;;:12;:17;;;;;130307;;130347:54;;130383:9;130394:6;130347:16;:54::i;:::-;130306:95;;;;130446:3;-1:-1:-1;;;;;130425:47:0;;130451:9;130462;130425:47;;;;;;22281:25:1;;;22337:2;22322:18;;22315:34;22269:2;22254:18;;22107:248;130425:47:0;;;;;;;;130287:201;;130264:224;-1:-1:-1;;;;;130508:17:0;;;130504:219;;-1:-1:-1;;;;;130604:17:0;;130547;130604;;;:12;:17;;;;;130547;;130587:49;;130623:4;130629:6;130587:16;:49::i;:::-;130546:90;;;;130681:3;-1:-1:-1;;;;;130660:47:0;;130686:9;130697;130660:47;;;;;;22281:25:1;;;22337:2;22322:18;;22315:34;22269:2;22254:18;;22107:248;130660:47:0;;;;;;;;130527:196;;130132:609;;;:::o;128989:194::-;129074:28;129086:7;129095:6;129074:11;:28::i;:::-;129115:60;129132:23;129157:9;129168:6;129115:16;:60::i;63961:1477::-;64049:7;;64983:66;64970:79;;64966:163;;;-1:-1:-1;65082:1:0;;-1:-1:-1;65086:30:0;65066:51;;64966:163;65243:24;;;65226:14;65243:24;;;;;;;;;22587:25:1;;;22660:4;22648:17;;22628:18;;;22621:45;;;;22682:18;;;22675:34;;;22725:18;;;22718:34;;;65243:24:0;;22559:19:1;;65243:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;65243:24:0;;-1:-1:-1;;65243:24:0;;;-1:-1:-1;;;;;;;65282:20:0;;65278:103;;65335:1;65339:29;65319:50;;;;;;;65278:103;65401:6;-1:-1:-1;65409:20:0;;-1:-1:-1;63961:1477:0;;;;;;;;:::o;59421:521::-;59499:20;59490:5;:29;;;;;;;;:::i;:::-;;59486:449;;59421:521;:::o;59486:449::-;59597:29;59588:5;:38;;;;;;;;:::i;:::-;;59584:351;;59643:34;;-1:-1:-1;;;59643:34:0;;23097:2:1;59643:34:0;;;23079:21:1;23136:2;23116:18;;;23109:30;23175:26;23155:18;;;23148:54;23219:18;;59643:34:0;22895:348:1;59584:351:0;59708:35;59699:5;:44;;;;;;;;:::i;:::-;;59695:240;;59760:41;;-1:-1:-1;;;59760:41:0;;23450:2:1;59760:41:0;;;23432:21:1;23489:2;23469:18;;;23462:30;23528:33;23508:18;;;23501:61;23579:18;;59760:41:0;23248:355:1;59695:240:0;59832:30;59823:5;:39;;;;;;;;:::i;:::-;;59819:116;;59879:44;;-1:-1:-1;;;59879:44:0;;23810:2:1;59879:44:0;;;23792:21:1;23849:2;23829:18;;;23822:30;23888:34;23868:18;;;23861:62;-1:-1:-1;;;23939:18:1;;;23932:32;23981:19;;59879:44:0;23608:398:1;129330:228:0;-1:-1:-1;;;;;124057:19:0;;;124030:7;124057:19;;;:10;:19;;;;;;;;;;;;;;;129494:56;;124057:19;;;;;129543:6;129494:16;:56::i;75104:644::-;75154:7;75174:18;75195:13;:11;:13::i;:::-;75223:18;;75174:34;;-1:-1:-1;75223:22:0;75219:522;;75269:22;;;;;;;;75104:644;-1:-1:-1;75104:644:0:o;75219:522::-;75570:11;;75600:15;;75596:134;;75643:10;75104:644;-1:-1:-1;;75104:644:0:o;75596:134::-;75701:13;75694:20;;;;75104:644;:::o;75976:680::-;76029:7;76049:21;76073:16;:14;:16::i;:::-;76104:21;;76049:40;;-1:-1:-1;76104:25:0;76100:549;;76153:25;;;;;;;;75976:680;-1:-1:-1;75976:680:0:o;76100:549::-;76469:14;;76502:18;;76498:140;;76548:13;75976:680;-1:-1:-1;;75976:680:0:o;50716:1019::-;50768:7;;50855:3;50846:12;;;:16;50842:102;;50893:3;50883:13;;;;50915;50842:102;50971:2;50962:11;;;:15;50958:99;;51008:2;50998:12;;;;51029;50958:99;51084:2;51075:11;;;:15;51071:99;;51121:2;51111:12;;;;51142;51071:99;51197:2;51188:11;;;:15;51184:99;;51234:2;51224:12;;;;51255;51184:99;51310:1;51301:10;;;:14;51297:96;;51346:1;51336:11;;;;51366;51297:96;51420:1;51411:10;;;:14;51407:96;;51456:1;51446:11;;;;51476;51407:96;51530:1;51521:10;;;:14;51517:96;;51566:1;51556:11;;;;51586;51517:96;51640:1;51631:10;;;:14;51627:66;;51676:1;51666:11;51721:6;50716:1019;-1:-1:-1;;50716:1019:0:o;42498:106::-;42556:7;42587:1;42583;:5;:13;;42595:1;42583:13;;;-1:-1:-1;42591:1:0;;42498:106;-1:-1:-1;42498:106:0:o;30009:548::-;-1:-1:-1;;;;;30093:21:0;;30085:65;;;;-1:-1:-1;;;30085:65:0;;24213:2:1;30085:65:0;;;24195:21:1;24252:2;24232:18;;;24225:30;24291:33;24271:18;;;24264:61;24342:18;;30085:65:0;24011:355:1;30085:65:0;30241:6;30225:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;30396:18:0;;;;;;:9;:18;;;;;;;;:28;;;;;;30451:37;1733:25:1;;;30451:37:0;;1706:18:1;30451:37:0;;;;;;;30501:48;30529:1;30533:7;30542:6;30501:19;:48::i;131577:98::-;131635:7;131662:5;131666:1;131662;:5;:::i;130749:820::-;130986:12;;130923:17;;;;;131064:8;;:59;;132020:25;132082:21;;;132149:4;132136:18;;132132:28;;-1:-1:-1;;132132:28:0;131064:59;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;131064:59:0;;;;;;;;131075:16;;;;;;;;;-1:-1:-1;131075:16:0;;;;;;;131064:59;131036:87;;131152:7;:13;;;-1:-1:-1;;;;;131140:25:0;;;131192:20;131195:9;131206:5;131192:2;:20;;:::i;:::-;131180:32;;131239:1;131233:3;:7;:39;;;;;131265:7;:5;:7::i;:::-;131244:28;;:7;:17;;;:28;;;131233:39;131229:322;;;131331:40;131361:9;131331:29;:40::i;:::-;132020:25;132082:21;;;132149:4;132136:18;;132132:28;;-1:-1:-1;;132132:28:0;131293:78;;-1:-1:-1;;;;;131293:78:0;;;;;;;;;;;;;;;;131229:322;;;131412:5;131423:111;;;;;;;;131446:37;131475:7;:5;:7::i;:::-;131446:37;;:28;:37::i;:::-;131423:111;;;;;;131492:40;131522:9;131492:29;:40::i;:::-;-1:-1:-1;;;;;131423:111:0;;;;;;131412:123;;;;;;;-1:-1:-1;131412:123:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;131229:322;131011:551;130961:608;130749:820;;;;;;:::o;131683:103::-;131746:7;131773:5;131777:1;131773;:5;:::i;30890:675::-;-1:-1:-1;;;;;30974:21:0;;30966:67;;;;-1:-1:-1;;;30966:67:0;;24573:2:1;30966:67:0;;;24555:21:1;24612:2;24592:18;;;24585:30;24651:34;24631:18;;;24624:62;-1:-1:-1;;;24702:18:1;;;24695:31;24743:19;;30966:67:0;24371:397:1;30966:67:0;-1:-1:-1;;;;;31133:18:0;;31108:22;31133:18;;;:9;:18;;;;;;31170:24;;;;31162:71;;;;-1:-1:-1;;;31162:71:0;;24975:2:1;31162:71:0;;;24957:21:1;25014:2;24994:18;;;24987:30;25053:34;25033:18;;;25026:62;-1:-1:-1;;;25104:18:1;;;25097:32;25146:19;;31162:71:0;24773:398:1;31162:71:0;-1:-1:-1;;;;;31269:18:0;;;;;;:9;:18;;;;;;;;31290:23;;;31269:44;;31408:12;:22;;;;;;;31459:37;1733:25:1;;;31269:18:0;;;31459:37;;1706:18:1;31459:37:0;;;;;;;31509:48;31529:7;31546:1;31550:6;31509:19;:48::i;87886:195::-;87943:7;-1:-1:-1;;;;;87971:26:0;;;87963:78;;;;-1:-1:-1;;;87963:78:0;;25378:2:1;87963:78:0;;;25360:21:1;25417:2;25397:18;;;25390:30;25456:34;25436:18;;;25429:62;-1:-1:-1;;;25507:18:1;;;25500:37;25554:19;;87963:78:0;25176:403:1;14:286;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;167:23;;-1:-1:-1;;;;;;219:32:1;;209:43;;199:71;;266:1;263;256:12;497:423;539:3;577:5;571:12;604:6;599:3;592:19;629:1;639:162;653:6;650:1;647:13;639:162;;;715:4;771:13;;;767:22;;761:29;743:11;;;739:20;;732:59;668:12;639:162;;;643:3;846:1;839:4;830:6;825:3;821:16;817:27;810:38;909:4;902:2;898:7;893:2;885:6;881:15;877:29;872:3;868:39;864:50;857:57;;;497:423;;;;:::o;925:220::-;1074:2;1063:9;1056:21;1037:4;1094:45;1135:2;1124:9;1120:18;1112:6;1094:45;:::i;1150:173::-;1218:20;;-1:-1:-1;;;;;1267:31:1;;1257:42;;1247:70;;1313:1;1310;1303:12;1247:70;1150:173;;;:::o;1328:254::-;1396:6;1404;1457:2;1445:9;1436:7;1432:23;1428:32;1425:52;;;1473:1;1470;1463:12;1425:52;1496:29;1515:9;1496:29;:::i;:::-;1486:39;1572:2;1557:18;;;;1544:32;;-1:-1:-1;;;1328:254:1:o;1769:328::-;1846:6;1854;1862;1915:2;1903:9;1894:7;1890:23;1886:32;1883:52;;;1931:1;1928;1921:12;1883:52;1954:29;1973:9;1954:29;:::i;:::-;1944:39;;2002:38;2036:2;2025:9;2021:18;2002:38;:::i;:::-;1992:48;;2087:2;2076:9;2072:18;2059:32;2049:42;;1769:328;;;;;:::o;2473:127::-;2534:10;2529:3;2525:20;2522:1;2515:31;2565:4;2562:1;2555:15;2589:4;2586:1;2579:15;2605:719;2648:5;2701:3;2694:4;2686:6;2682:17;2678:27;2668:55;;2719:1;2716;2709:12;2668:55;2755:6;2742:20;2781:18;2818:2;2814;2811:10;2808:36;;;2824:18;;:::i;:::-;2899:2;2893:9;2867:2;2953:13;;-1:-1:-1;;2949:22:1;;;2973:2;2945:31;2941:40;2929:53;;;2997:18;;;3017:22;;;2994:46;2991:72;;;3043:18;;:::i;:::-;3083:10;3079:2;3072:22;3118:2;3110:6;3103:18;3164:3;3157:4;3152:2;3144:6;3140:15;3136:26;3133:35;3130:55;;;3181:1;3178;3171:12;3130:55;3245:2;3238:4;3230:6;3226:17;3219:4;3211:6;3207:17;3194:54;3292:1;3285:4;3280:2;3272:6;3268:15;3264:26;3257:37;3312:6;3303:15;;;;;;2605:719;;;;:::o;3329:543::-;3417:6;3425;3478:2;3466:9;3457:7;3453:23;3449:32;3446:52;;;3494:1;3491;3484:12;3446:52;3534:9;3521:23;3563:18;3604:2;3596:6;3593:14;3590:34;;;3620:1;3617;3610:12;3590:34;3643:50;3685:7;3676:6;3665:9;3661:22;3643:50;:::i;:::-;3633:60;;3746:2;3735:9;3731:18;3718:32;3702:48;;3775:2;3765:8;3762:16;3759:36;;;3791:1;3788;3781:12;3759:36;;3814:52;3858:7;3847:8;3836:9;3832:24;3814:52;:::i;:::-;3804:62;;;3329:543;;;;;:::o;3877:186::-;3936:6;3989:2;3977:9;3968:7;3964:23;3960:32;3957:52;;;4005:1;4002;3995:12;3957:52;4028:29;4047:9;4028:29;:::i;4473:1259::-;4879:3;4874;4870:13;4862:6;4858:26;4847:9;4840:45;4821:4;4904:2;4942:3;4937:2;4926:9;4922:18;4915:31;4969:46;5010:3;4999:9;4995:19;4987:6;4969:46;:::i;:::-;5063:9;5055:6;5051:22;5046:2;5035:9;5031:18;5024:50;5097:33;5123:6;5115;5097:33;:::i;:::-;5161:2;5146:18;;5139:34;;;-1:-1:-1;;;;;5210:32:1;;5204:3;5189:19;;5182:61;5230:3;5259:19;;5252:35;;;5324:22;;;5318:3;5303:19;;5296:51;5396:13;;5418:22;;;5494:15;;;;-1:-1:-1;5456:15:1;;;;-1:-1:-1;5537:169:1;5551:6;5548:1;5545:13;5537:169;;;5612:13;;5600:26;;5681:15;;;;5646:12;;;;5573:1;5566:9;5537:169;;;-1:-1:-1;5723:3:1;;4473:1259;-1:-1:-1;;;;;;;;;;;;4473:1259:1:o;5737:180::-;5796:6;5849:2;5837:9;5828:7;5824:23;5820:32;5817:52;;;5865:1;5862;5855:12;5817:52;-1:-1:-1;5888:23:1;;5737:180;-1:-1:-1;5737:180:1:o;6123:156::-;6189:20;;6249:4;6238:16;;6228:27;;6218:55;;6269:1;6266;6259:12;6284:531;6386:6;6394;6402;6410;6418;6426;6479:3;6467:9;6458:7;6454:23;6450:33;6447:53;;;6496:1;6493;6486:12;6447:53;6519:29;6538:9;6519:29;:::i;:::-;6509:39;;6595:2;6584:9;6580:18;6567:32;6557:42;;6646:2;6635:9;6631:18;6618:32;6608:42;;6669:36;6701:2;6690:9;6686:18;6669:36;:::i;:::-;6659:46;;6752:3;6741:9;6737:19;6724:33;6714:43;;6804:3;6793:9;6789:19;6776:33;6766:43;;6284:531;;;;;;;;:::o;6820:606::-;6931:6;6939;6947;6955;6963;6971;6979;7032:3;7020:9;7011:7;7007:23;7003:33;7000:53;;;7049:1;7046;7039:12;7000:53;7072:29;7091:9;7072:29;:::i;:::-;7062:39;;7120:38;7154:2;7143:9;7139:18;7120:38;:::i;:::-;7110:48;;7205:2;7194:9;7190:18;7177:32;7167:42;;7256:2;7245:9;7241:18;7228:32;7218:42;;7279:37;7311:3;7300:9;7296:19;7279:37;:::i;:::-;7269:47;;7363:3;7352:9;7348:19;7335:33;7325:43;;7415:3;7404:9;7400:19;7387:33;7377:43;;6820:606;;;;;;;;;;:::o;7431:260::-;7499:6;7507;7560:2;7548:9;7539:7;7535:23;7531:32;7528:52;;;7576:1;7573;7566:12;7528:52;7599:29;7618:9;7599:29;:::i;:::-;7589:39;;7647:38;7681:2;7670:9;7666:18;7647:38;:::i;:::-;7637:48;;7431:260;;;;;:::o;7696:350::-;7763:6;7771;7824:2;7812:9;7803:7;7799:23;7795:32;7792:52;;;7840:1;7837;7830:12;7792:52;7863:29;7882:9;7863:29;:::i;:::-;7853:39;;7942:2;7931:9;7927:18;7914:32;7986:10;7979:5;7975:22;7968:5;7965:33;7955:61;;8012:1;8009;8002:12;7955:61;8035:5;8025:15;;;7696:350;;;;;:::o;8402:380::-;8481:1;8477:12;;;;8524;;;8545:61;;8599:4;8591:6;8587:17;8577:27;;8545:61;8652:2;8644:6;8641:14;8621:18;8618:38;8615:161;;8698:10;8693:3;8689:20;8686:1;8679:31;8733:4;8730:1;8723:15;8761:4;8758:1;8751:15;8787:127;8848:10;8843:3;8839:20;8836:1;8829:31;8879:4;8876:1;8869:15;8903:4;8900:1;8893:15;8919:125;8984:9;;;9005:10;;;9002:36;;;9018:18;;:::i;9403:413::-;9605:2;9587:21;;;9644:2;9624:18;;;9617:30;9683:34;9678:2;9663:18;;9656:62;-1:-1:-1;;;9749:2:1;9734:18;;9727:47;9806:3;9791:19;;9403:413::o;11143:127::-;11204:10;11199:3;11195:20;11192:1;11185:31;11235:4;11232:1;11225:15;11259:4;11256:1;11249:15;16918:128;16985:9;;;17006:11;;;17003:37;;;17020:18;;:::i;17051:407::-;17253:2;17235:21;;;17292:2;17272:18;;;17265:30;17331:34;17326:2;17311:18;;17304:62;-1:-1:-1;;;17397:2:1;17382:18;;17375:41;17448:3;17433:19;;17051:407::o;19132:127::-;19193:10;19188:3;19184:20;19181:1;19174:31;19224:4;19221:1;19214:15;19248:4;19245:1;19238:15;19264:217;19304:1;19330;19320:132;;19374:10;19369:3;19365:20;19362:1;19355:31;19409:4;19406:1;19399:15;19437:4;19434:1;19427:15;19320:132;-1:-1:-1;19466:9:1;;19264:217::o;20029:545::-;20131:2;20126:3;20123:11;20120:448;;;20167:1;20192:5;20188:2;20181:17;20237:4;20233:2;20223:19;20307:2;20295:10;20291:19;20288:1;20284:27;20278:4;20274:38;20343:4;20331:10;20328:20;20325:47;;;-1:-1:-1;20366:4:1;20325:47;20421:2;20416:3;20412:12;20409:1;20405:20;20399:4;20395:31;20385:41;;20476:82;20494:2;20487:5;20484:13;20476:82;;;20539:17;;;20520:1;20509:13;20476:82;;;20480:3;;;20029:545;;;:::o;20750:1352::-;20876:3;20870:10;20903:18;20895:6;20892:30;20889:56;;;20925:18;;:::i;:::-;20954:97;21044:6;21004:38;21036:4;21030:11;21004:38;:::i;:::-;20998:4;20954:97;:::i;:::-;21106:4;;21170:2;21159:14;;21187:1;21182:663;;;;21889:1;21906:6;21903:89;;;-1:-1:-1;21958:19:1;;;21952:26;21903:89;-1:-1:-1;;20707:1:1;20703:11;;;20699:24;20695:29;20685:40;20731:1;20727:11;;;20682:57;22005:81;;21152:944;;21182:663;19976:1;19969:14;;;20013:4;20000:18;;-1:-1:-1;;21218:20:1;;;21336:236;21350:7;21347:1;21344:14;21336:236;;;21439:19;;;21433:26;21418:42;;21531:27;;;;21499:1;21487:14;;;;21366:19;;21336:236;;;21340:3;21600:6;21591:7;21588:19;21585:201;;;21661:19;;;21655:26;-1:-1:-1;;21744:1:1;21740:14;;;21756:3;21736:24;21732:37;21728:42;21713:58;21698:74;;21585:201;-1:-1:-1;;;;;21832:1:1;21816:14;;;21812:22;21799:36;;-1:-1:-1;20750:1352:1:o;22763:127::-;22824:10;22819:3;22815:20;22812:1;22805:31;22855:4;22852:1;22845:15;22879:4;22876:1;22869:15
Swarm Source
ipfs://b063970849bcc896429b142aed6e84cebb9df68dfde8e3e664b9cd409e5ad62e
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.