Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
34572091 | 116 days ago | Contract Creation | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
ZkTokenV1
Compiler Version
v0.8.24+commit.e11b9ed9
ZkSolc Version
v1.4.0
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {SafeCastUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol"; import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol"; import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol"; import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; /// @title ZkTokenV1 /// @author [ScopeLift](https://scopelift.co) /// @notice A proxy-upgradeable governance token with minting and burning capability gated by access controls. /// @dev The same incrementing nonce is used in both the `delegateBySig` and `permit` function. If a client is /// calling these functions one after the other then they should use an incremented nonce for the subsequent call. /// @custom:security-contact [email protected] contract ZkTokenV1 is Initializable, ERC20VotesUpgradeable, AccessControlUpgradeable { using SignatureChecker for address; /// @notice The unique identifier constant used to represent the administrator of the minter role. An address that /// has this role may grant or revoke the minter role from other addresses. This role itself may be granted or /// revoked by the DEFAULT_ADMIN_ROLE. bytes32 public constant MINTER_ADMIN_ROLE = keccak256("MINTER_ADMIN_ROLE"); /// @notice The unique identifier constant used to represent the administrator of the burner role. An address that /// has this role may grant or revoke the burner role from other addresses. This role itself may be granted or /// revoked by the DEFAULT_ADMIN_ROLE. bytes32 public constant BURNER_ADMIN_ROLE = keccak256("BURNER_ADMIN_ROLE"); /// @notice The unique identifier constant used to represent the minter role. An address that has this role may call /// the `mint` method, creating new tokens and assigning them to specified address. This role may be granted or /// revoked by the MINTER_ADMIN_ROLE. bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); /// @notice The unique identifier constant used to represent the burner role. An address that has this role may call /// the `burn` method, destroying tokens held by a given address, removing them from the total supply. This role may // be granted or revoked by and address holding the BURNER_ADMIN_ROLE. bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); /// @notice Type hash used when encoding data for `delegateOnBehalf` calls. bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address owner,address delegatee,uint256 nonce,uint256 expiry)"); /// @dev The clock was incorrectly modified. error ERC6372InconsistentClock(); /// @dev Thrown if a signature for selecting a delegate expired. error DelegateSignatureExpired(uint256 expiry); /// @dev Thrown if a signature for selecting a delegate is invalid. error DelegateSignatureIsInvalid(); /// @notice A one-time configuration method meant to be called immediately upon the deployment of ZkTokenV1. It sets /// up the token's name and symbol, configures and assigns role admins, and mints the initial token supply. /// @param _admin The address that will be be assigned all three role admins /// @param _mintReceiver The address that will receive the initial token supply. /// @param _mintAmount The amount of tokens, in raw decimals, that will be minted to the mint receiver's wallet. function initialize(address _admin, address _mintReceiver, uint256 _mintAmount) external initializer { __ERC20_init("zkSync", "ZK"); __ERC20Permit_init("zkSync"); _grantRole(DEFAULT_ADMIN_ROLE, _admin); _grantRole(MINTER_ADMIN_ROLE, _admin); _grantRole(BURNER_ADMIN_ROLE, _admin); _setRoleAdmin(MINTER_ROLE, MINTER_ADMIN_ROLE); _setRoleAdmin(BURNER_ROLE, BURNER_ADMIN_ROLE); _mint(_mintReceiver, _mintAmount); } /// @inheritdoc ERC20VotesUpgradeable /// @dev Overriding the clock to be timestamp based rather than clock based. function clock() public view virtual override returns (uint48) { return SafeCastUpgradeable.toUint48(block.timestamp); } /// @inheritdoc ERC20VotesUpgradeable /// @dev Overriding the clock mode to be timestamp based rather than clock based. function CLOCK_MODE() public view virtual override returns (string memory) { if (clock() != SafeCastUpgradeable.toUint48(block.timestamp)) { revert ERC6372InconsistentClock(); } return "mode=timestamp"; } /// @notice Creates a new quantity of tokens for a given address. /// @param _to The address that will receive the new tokens. /// @param _amount The quantity of tokens, in raw decimals, that will be created. /// @dev This method may only be called by an address that has been assigned the minter role by the minter role /// admin. function mint(address _to, uint256 _amount) external onlyRole(MINTER_ROLE) { _mint(_to, _amount); } /// @notice Destroys tokens held by a given address and removes them from the total supply. /// @param _from The address from which tokens will be removed and destroyed. /// @param _amount The quantity of tokens, in raw decimals, that will be destroyed. /// @dev This method may only be called by an address that has been assigned the burner role by the burner role /// admin. function burn(address _from, uint256 _amount) external onlyRole(BURNER_ROLE) { _burn(_from, _amount); } /// @notice Delegates votes from signer to `_delegatee` by EIP-1271/ECDSA signature. /// @dev This method should be used instead of `delegateBySig` as it supports validations via EIP-1271. /// @param _signer The address of the token holder delegating their voting power. /// @param _delegatee The address to which the voting power is delegated. /// @param _expiry The timestamp at which the signed message expires. /// @param _signature The signature proving the `_signer` has authorized the delegation. function delegateOnBehalf(address _signer, address _delegatee, uint256 _expiry, bytes memory _signature) external { if (block.timestamp > _expiry) { revert DelegateSignatureExpired(_expiry); } bool _isSignatureValid = _signer.isValidSignatureNow( _hashTypedDataV4(keccak256(abi.encode(DELEGATION_TYPEHASH, _signer, _delegatee, _useNonce(_signer), _expiry))), _signature ); if (!_isSignatureValid) { revert DelegateSignatureIsInvalid(); } _delegate(_signer, _delegatee); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol) pragma solidity ^0.8.0; import "../ERC1967/ERC1967Proxy.sol"; /** * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy} * does not implement this interface directly, and some of its functions are implemented by an internal dispatch * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not * include them in the ABI so this interface must be used to interact with it. */ interface ITransparentUpgradeableProxy is IERC1967 { function admin() external view returns (address); function implementation() external view returns (address); function changeAdmin(address) external; function upgradeTo(address) external; function upgradeToAndCall(address, bytes memory) external payable; } /** * @dev This contract implements a proxy that is upgradeable by an admin. * * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector * clashing], which can potentially be used in an attack, this contract uses the * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two * things that go hand in hand: * * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if * that call matches one of the admin functions exposed by the proxy itself. * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the * implementation. If the admin tries to call a function on the implementation it will fail with an error that says * "admin cannot fallback to proxy target". * * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due * to sudden errors when trying to call a function from the proxy implementation. * * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy. * * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the * implementation. * * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised. */ contract TransparentUpgradeableProxy is ERC1967Proxy { /** * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}. */ constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) { _changeAdmin(admin_); } /** * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin. * * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the * implementation provides a function with the same selector. */ modifier ifAdmin() { if (msg.sender == _getAdmin()) { _; } else { _fallback(); } } /** * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior */ function _fallback() internal virtual override { if (msg.sender == _getAdmin()) { bytes memory ret; bytes4 selector = msg.sig; if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) { ret = _dispatchUpgradeTo(); } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) { ret = _dispatchUpgradeToAndCall(); } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) { ret = _dispatchChangeAdmin(); } else if (selector == ITransparentUpgradeableProxy.admin.selector) { ret = _dispatchAdmin(); } else if (selector == ITransparentUpgradeableProxy.implementation.selector) { ret = _dispatchImplementation(); } else { revert("TransparentUpgradeableProxy: admin cannot fallback to proxy target"); } assembly { return(add(ret, 0x20), mload(ret)) } } else { super._fallback(); } } /** * @dev Returns the current admin. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` */ function _dispatchAdmin() private returns (bytes memory) { _requireZeroValue(); address admin = _getAdmin(); return abi.encode(admin); } /** * @dev Returns the current implementation. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` */ function _dispatchImplementation() private returns (bytes memory) { _requireZeroValue(); address implementation = _implementation(); return abi.encode(implementation); } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _dispatchChangeAdmin() private returns (bytes memory) { _requireZeroValue(); address newAdmin = abi.decode(msg.data[4:], (address)); _changeAdmin(newAdmin); return ""; } /** * @dev Upgrade the implementation of the proxy. */ function _dispatchUpgradeTo() private returns (bytes memory) { _requireZeroValue(); address newImplementation = abi.decode(msg.data[4:], (address)); _upgradeToAndCall(newImplementation, bytes(""), false); return ""; } /** * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the * proxied contract. */ function _dispatchUpgradeToAndCall() private returns (bytes memory) { (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes)); _upgradeToAndCall(newImplementation, data, true); return ""; } /** * @dev Returns the current admin. * * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead. */ function _admin() internal view virtual returns (address) { return _getAdmin(); } /** * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to * emulate some proxy functions being non-payable while still allowing value to pass through. */ function _requireZeroValue() private { require(msg.value == 0); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol) pragma solidity ^0.8.0; import "./TransparentUpgradeableProxy.sol"; import "../../access/Ownable.sol"; /** * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}. */ contract ProxyAdmin is Ownable { /** * @dev Returns the current implementation of `proxy`. * * Requirements: * * - This contract must be the admin of `proxy`. */ function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) { // We need to manually run the static call since the getter cannot be flagged as view // bytes4(keccak256("implementation()")) == 0x5c60da1b (bool success, bytes memory returndata) = address(proxy).staticcall(hex"5c60da1b"); require(success); return abi.decode(returndata, (address)); } /** * @dev Returns the current admin of `proxy`. * * Requirements: * * - This contract must be the admin of `proxy`. */ function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) { // We need to manually run the static call since the getter cannot be flagged as view // bytes4(keccak256("admin()")) == 0xf851a440 (bool success, bytes memory returndata) = address(proxy).staticcall(hex"f851a440"); require(success); return abi.decode(returndata, (address)); } /** * @dev Changes the admin of `proxy` to `newAdmin`. * * Requirements: * * - This contract must be the current admin of `proxy`. */ function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner { proxy.changeAdmin(newAdmin); } /** * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. * * Requirements: * * - This contract must be the admin of `proxy`. */ function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner { proxy.upgradeTo(implementation); } /** * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See * {TransparentUpgradeableProxy-upgradeToAndCall}. * * Requirements: * * - This contract must be the admin of `proxy`. */ function upgradeAndCall( ITransparentUpgradeableProxy proxy, address implementation, bytes memory data ) public payable virtual onlyOwner { proxy.upgradeToAndCall{value: msg.value}(implementation, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol) pragma solidity ^0.8.0; import "./IBeacon.sol"; import "../Proxy.sol"; import "../ERC1967/ERC1967Upgrade.sol"; /** * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}. * * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't * conflict with the storage layout of the implementation behind the proxy. * * _Available since v3.4._ */ contract BeaconProxy is Proxy, ERC1967Upgrade { /** * @dev Initializes the proxy with `beacon`. * * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This * will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity * constructor. * * Requirements: * * - `beacon` must be a contract with the interface {IBeacon}. */ constructor(address beacon, bytes memory data) payable { _upgradeBeaconToAndCall(beacon, data, false); } /** * @dev Returns the current beacon address. */ function _beacon() internal view virtual returns (address) { return _getBeacon(); } /** * @dev Returns the current implementation address of the associated beacon. */ function _implementation() internal view virtual override returns (address) { return IBeacon(_getBeacon()).implementation(); } /** * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}. * * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. * * Requirements: * * - `beacon` must be a contract. * - The implementation returned by `beacon` must be a contract. */ function _setBeacon(address beacon, bytes memory data) internal virtual { _upgradeBeaconToAndCall(beacon, data, false); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol) pragma solidity ^0.8.0; import "./IBeacon.sol"; import "../../access/Ownable.sol"; import "../../utils/Address.sol"; /** * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their * implementation contract, which is where they will delegate all function calls. * * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon. */ contract UpgradeableBeacon is IBeacon, Ownable { address private _implementation; /** * @dev Emitted when the implementation returned by the beacon is changed. */ event Upgraded(address indexed implementation); /** * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the * beacon. */ constructor(address implementation_) { _setImplementation(implementation_); } /** * @dev Returns the current implementation address. */ function implementation() public view virtual override returns (address) { return _implementation; } /** * @dev Upgrades the beacon to a new implementation. * * Emits an {Upgraded} event. * * Requirements: * * - msg.sender must be the owner of the contract. * - `newImplementation` must be a contract. */ function upgradeTo(address newImplementation) public virtual onlyOwner { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation contract address for this beacon * * Requirements: * * - `newImplementation` must be a contract. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract"); _implementation = newImplementation; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol) pragma solidity ^0.8.0; import "../Proxy.sol"; import "./ERC1967Upgrade.sol"; /** * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an * implementation address that can be changed. This address is stored in storage in the location specified by * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the * implementation behind the proxy. */ contract ERC1967Proxy is Proxy, ERC1967Upgrade { /** * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`. * * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded * function call, and allows initializing the storage of the proxy like a Solidity constructor. */ constructor(address _logic, bytes memory _data) payable { _upgradeToAndCall(_logic, _data, false); } /** * @dev Returns the current implementation address. */ function _implementation() internal view virtual override returns (address impl) { return ERC1967Upgrade._getImplementation(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.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 Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * 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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", StringsUpgradeable.toHexString(account), " is missing role ", StringsUpgradeable.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20Upgradeable.sol"; import "./extensions/IERC20MetadataUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * 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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol) pragma solidity ^0.8.0; /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a * different contract through the {_delegate} function. * * The success and return data of the delegated call will be returned back to the caller of the proxy. */ abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function * and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _fallback() internal virtual { _beforeFallback(); _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback() external payable virtual { _fallback(); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */ receive() external payable virtual { _fallback(); } /** * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` * call, or as part of the Solidity `fallback` or `receive` functions. * * If overridden should call `super._beforeFallback()`. */ function _beforeFallback() internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.0; /** * @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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; import "../../interfaces/IERC1271.sol"; /** * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like * Argent and Gnosis Safe. * * _Available since v4.1._ */ library SignatureChecker { /** * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) { (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); return (error == ECDSA.RecoverError.NoError && recovered == signer) || isValidERC1271SignatureNow(signer, hash, signature); } /** * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated * against the signer smart contract using ERC1271. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidERC1271SignatureNow( address signer, bytes32 hash, bytes memory signature ) internal view returns (bool) { (bool success, bytes memory result) = signer.staticcall( abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) ); return (success && result.length >= 32 && abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeacon.sol"; import "../../interfaces/IERC1967.sol"; import "../../interfaces/draft-IERC1822.sol"; import "../../utils/Address.sol"; import "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ */ abstract contract ERC1967Upgrade is IERC1967 { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( Address.isContract(IBeacon(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Votes.sol) pragma solidity ^0.8.0; import "./ERC20PermitUpgradeable.sol"; import "../../../interfaces/IERC5805Upgradeable.sol"; import "../../../utils/math/MathUpgradeable.sol"; import "../../../utils/math/SafeCastUpgradeable.sol"; import "../../../utils/cryptography/ECDSAUpgradeable.sol"; import {Initializable} from "../../../proxy/utils/Initializable.sol"; /** * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's, * and supports token supply up to 2^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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/ERC20Permit.sol) pragma solidity ^0.8.0; import "./IERC20PermitUpgradeable.sol"; import "../ERC20Upgradeable.sol"; import "../../../utils/cryptography/ECDSAUpgradeable.sol"; import "../../../utils/cryptography/EIP712Upgradeable.sol"; import "../../../utils/CountersUpgradeable.sol"; import {Initializable} from "../../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * _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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) pragma solidity ^0.8.0; /** * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. * * _Available since v4.8.3._ */ interface IERC1967 { /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5805.sol) pragma solidity ^0.8.0; import "../governance/utils/IVotesUpgradeable.sol"; import "./IERC6372Upgradeable.sol"; interface IERC5805Upgradeable is IERC6372Upgradeable, IVotesUpgradeable {}
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../StringsUpgradeable.sol"; /** * @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)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.8; import "./ECDSAUpgradeable.sol"; import "../../interfaces/IERC5267Upgradeable.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/MathUpgradeable.sol"; import "./math/SignedMathUpgradeable.sol"; /** * @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)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, 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", Strings.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)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.0; 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 ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/IVotes.sol) pragma solidity ^0.8.0; /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC6372.sol) pragma solidity ^0.8.0; 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { 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 = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _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(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { 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)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { 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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
{ "evmVersion": "paris", "optimizer": { "enabled": true, "mode": "3" }, "outputSelection": { "*": { "*": [ "abi" ] } }, "libraries": {}, "isSystem": false, "forceEvmla": false }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"expiry","type":"uint256"}],"name":"DelegateSignatureExpired","type":"error"},{"inputs":[],"name":"DelegateSignatureIsInvalid","type":"error"},{"inputs":[],"name":"ERC6372InconsistentClock","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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":"BURNER_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CLOCK_MODE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","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":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","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":"_signer","type":"address"},{"internalType":"address","name":"_delegatee","type":"address"},{"internalType":"uint256","name":"_expiry","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"delegateOnBehalf","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":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_mintReceiver","type":"address"},{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"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":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","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"}]
Contract Creation Code
3cda33518ceb348f712ba12ccf22e8a2228a74a6f75ea1d2ca4afe04ed7aa430528e4b990100078b051a5a2fe4b8f34ce17395ba0c1fa6afedf9fbf6263eec2dae22aedd00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x0004000000000002000c00000000000200000000030100190000006004300270000006c50340019700030000003103550002000000010355000006c50040019d0000008008000039000000400080043f0000000102200190000000380000c13d000000040230008c000013d00000413d000000000201043b000000e002200270000006c70420009c000000400000a13d000006c80420009c000000900000a13d000006c90420009c000002090000a13d000006ca0420009c0000033f0000213d000006ce0420009c000005a20000613d000006cf0420009c000005690000613d000006d00220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000002402100370000000000202043b000900000002001d000006ff0220009c000013d00000213d0000000401100370000000000101043b000800000001001d00000000001004350000013001000039000000200010043f000000400200003900000000010000191b0e1ad60000040f0000000101100039000000000101041a1b0e166b0000040f000000080100002900000009020000290000064b0000013d0000000001000416000000000101004b000013d00000c13d000000200100003900000100001004430000012000000443000006c60100004100001b0f0001042e000006e40420009c000001310000213d000006f20420009c0000024a0000213d000006f90420009c000003cd0000a13d000006fa0420009c000006750000613d000006fb0420009c000006370000613d000006fc0220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000600220008c000013d00000413d0000000402100370000000000202043b000900000002001d000006ff0220009c000013d00000213d0000002402100370000000000202043b000800000002001d000006ff0220009c000013d00000213d0000004401100370000000000101043b000600000001001d000000000300041a0000ff0006300190000007ab0000c13d000000ff0130019000000000020000190000000102006039000a00000002001d00000000020004150000000a0220008a0000000502200210000000000101004b000007af0000c13d000001000100008a000000000113016f00000001051001bf000007650150019700000100051001bf000000000050041b000000400400043d000007660140009c0000105f0000813d0000004001400039000000400010043f0000000601000039000000000714043600000767020000410000000000270435000000400200043d0000072a0320009c0000105f0000213d000400000006001d0000004003200039000000400030043f00000002030000390000000003320436000007680600004100000000006304350000ff000550019000000aa50000c13d000000400100043d00000064021000390000077b03000041000000000032043500000044021000390000077c03000041000000000032043500000024021000390000002b030000390000062b0000013d000006d70420009c000001710000213d000006de0420009c0000036e0000a13d000006df0420009c000005790000613d000006e00420009c000005130000613d000006e10220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000200220008c000013d00000413d0000000401100370000000000101043b000900000001001d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000013d20000613d000000000101043b0000072c0210009c000006220000213d0000000907000029000000000117004b000007920000813d000000ce01000039000000000201041a000000060320008c00000000040000190000000003020019000001150000413d00000080032002700000073d0420009c00000000030240190000073d0420009c0000008004000039000000000400401900000040054001bf0000073e0630009c000000000405801900000040053002700000073e0630009c000000000305801900000020054001bf0000073f0630009c000000000405801900000020053002700000073f0630009c000000000305801900000010054001bf000007400630009c00000000040580190000001005300270000007400630009c0000000003058019000001000530008c00000008044080390000000803308270000000100530008c00000004044080390000000403308270000000040530008c00000002044080390000000203308270000000010330008c00000001044020390000000103400270000000000432022f000000010330020f0000000003430019000000020430008c0000078e0000413d000000010330027000000000543200d90000000003340019000000020430008c0000078e0000413d000000010330027000000000543200d90000000003340019000000020430008c0000078e0000413d000000010330027000000000543200d90000000003340019000000020430008c0000078e0000413d000000010330027000000000543200d90000000003340019000000020430008c0000078e0000413d000000010330027000000000543200d90000000003340019000000020430008c0000078e0000413d000000010330027000000000543200d90000000003340019000000020430008c0000078e0000413d000000010330027000000000543200d9000000000543004b0000000003048019000000000432004b0000016d0000413d000000000010043500000000033200490000072d04300041000000000404041a000006c504400197000000000474004b0000000004000019000001150000213d000000010400008a000000000443004b0000016d0000613d00000001043000390000000003020019000000000234004b000008790000813d000000010200008a00000000050300190000011f0000013d00000001043000390000000003050019000000000534004b0000000005030019000008790000813d000000000354016f000000000654013f00000001066002700000000003360019000000000663004b0000000006000019000000010600403900000001066001900000016d0000c13d00000000001004350000072d06300041000000000606041a000006c506600197000000000676004b0000011c0000213d000000000423004b0000011a0000c13d0000016d0000013d000006e50420009c000003290000213d000006ec0420009c000003f10000a13d000006ed0420009c000006850000613d000006ee0420009c0000063c0000613d000006ef0220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000000401100370000000000101043b000900000001001d000006ff0110009c000013d00000213d0000000001000411000800000001001d00000000001004350000003401000039000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b00000009020000290000000000200435000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000101041a00000024020000390000000202200367000000000202043b0000000003120019000000000123004b000000000100001900000001010040390000000101100190000008690000613d0000074e0100004100000000001004350000001101000039000010620000013d000006d80420009c0000037f0000a13d000006d90420009c0000058a0000613d000006da0420009c0000053b0000613d000006db0220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000000402100370000000000202043b000900000002001d000006ff0220009c000013d00000213d0000002401100370000000000101043b000800000001001d0000000001000411000700000001001d000006ff0110019700000000001004350000072601000041000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000101041a000000ff01100190000007230000c13d000000400200043d000007320120009c0000105f0000213d0000006001200039000000400010043f0000002a01000039000000000112043600000000030000310000000203300367000000000400001900000000050100190000000506400210000000000663034f000000000606043b00000000056504360000000104400039000000020640008c000001a60000413d0000000004020433000000000404004b000004e10000613d0000000004010433000007330440019700000734044001c700000000004104350000000004020433000000020440008c000004e10000413d00000021042000390000000005040433000007330550019700000735055001c700000000005404350000002904000039000000070800002900000000060800190000000007020433000000000747004b000004e10000a13d0000000307600210000000780770018f000007360770021f0000000008140019000000000908043300000733099001970000073707700197000000000779019f00000000007804350000000408600270000000010440008a000000010740008c000001be0000213d0000000f0460008c00000ae70000213d000000400400043d000900000004001d000007380440009c0000105f0000213d00000009050000290000008004500039000000400040043f00000042040000390000000004450436000000000500001900000000060400190000000507500210000000000773034f000000000707043b00000000067604360000000105500039000000030750008c000001dc0000413d000000090a00002900000000030a0433000000000303004b000004e10000613d0000000003040433000007330330019700000734033001c7000000000034043500000000030a0433000000020330008c000004e10000413d0000002103a000390000000005030433000007330550019700000735055001c7000000000053043500000739070000410000004103000039000000000607001900000000070a0433000000000737004b000004e10000a13d0000000307600210000000780770018f000007360770021f0000000008430019000000000908043300000733099001970000073707700197000000000779019f00000000007804350000000407600270000000010330008a000000010830008c000001f50000213d0000000f0360008c00000ae70000213d00000a700000013d000006d10420009c000003900000a13d000006d20420009c000006660000613d000006d30420009c0000059d0000613d000006d40220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000c00220008c000013d00000413d0000000402100370000000000202043b000900000002001d000006ff0220009c000013d00000213d0000004402100370000000000202043b000800000002001d0000002402100370000000000202043b000700000002001d0000006401100370000000000101043b000600000001001d000000ff0110008c000013d00000213d000500000008001d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000013d20000613d000000400200043d000000000101043b0000000803000029000000000131004b0000081f0000a13d00000044012000390000072203000041000000000031043500000024012000390000001d03000039000000000031043500000718010000410000000000120435000000040120003900000020030000390000000000310435000006c501000041000006c50320009c0000000002018019000000400120021000000719011001c700001b1000010430000006f30420009c000004630000a13d000006f40420009c000006910000613d000006f50420009c0000064e0000613d000006f60220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000000402100370000000000202043b000900000002001d0000002401100370000000000101043b000800000001001d000006ff0110009c000013d00000213d000000090100002900000000001004350000013001000039000700000001001d000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b0000000101100039000000000101041a000500000001001d00000000001004350000000701000029000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000003000411000600000003001d0000000102200190000013d00000613d000000000101043b0000000602000029000006ff022001970000000000200435000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000101041a000000ff01100190000008f50000c13d000000400200043d000007320120009c0000105f0000213d0000006001200039000000400010043f0000002a0100003900000000080200190000000003120436000000000100003100000002011003670000000002000019000000000a0300190000000504200210000000000441034f000000000404043b00000000034304360000000102200039000000020420008c000002a00000413d00000000090800190000000002090433000000000202004b000000000b0a0019000004e10000613d00000000020b0433000007330220019700000734022001c700000000002b04350000000002090433000000020220008c000004e10000413d00000021029000390000000003020433000007330330019700000735033001c700000000003204350000002902000039000000060600002900000000040600190000000005090433000000000525004b000004e10000a13d0000000305400210000000780550018f000007360550021f0000000006b20019000000000706043300000733077001970000073705500197000000000557019f00000000005604350000000406400270000000010220008a000000010520008c000002ba0000213d000000400900043d000000100240008c00000c730000813d000007380290009c0000105f0000213d00000000030900190000008002300039000000400020043f00000042020000390000000002230436000000000300001900000000040200190000000505300210000000000551034f000000000505043b00000000045404360000000103300039000000030530008c000002d70000413d0000000001090433000000000101004b000004e10000613d0000000001020433000007330110019700000734011001c700000000001204350000000001090433000000020110008c000004e10000413d00000021019000390000000003010433000007330330019700000735033001c700000000003104350000004101000039000000050600002900000000040600190000000005090433000000000515004b000004e10000a13d0000000305400210000000780550018f000007360550021f0000000006210019000000000706043300000733077001970000073705500197000000000557019f00000000005604350000000406400270000000010110008a000000010510008c000002ef0000213d000000100140008c00000000010000190000000101004039000600000008001d00070000000a001d000800000009001d1b0e1ac10000040f000000400400043d000900000004001d00000020014000390000073a02000041000000000021043500000006010000290000000003010433000600000003001d000000370240003900000007010000291b0e13d30000040f000000060200002900000009012000290000073b0200004100000037031000390000000000230435000000480210003900000008010000291b0e181b0000040f00000009030000290000000002310049000000200120008a000000000013043500000000010300191b0e14140000040f0000071801000041000000400200043d000800000002001d0000000000120435000000040120003900000009020000291b0e13f30000040f000000080400002900000a8f0000013d000006e60420009c000004a20000a13d000006e70420009c000006a40000613d000006e80420009c000006530000613d000006e90220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000200220008c000013d00000413d0000000401100370000000000201043b000006ff0120009c000013d00000213d00000000010004111b0e17490000040f000000000100001900001b0f0001042e000006cb0420009c000005d00000613d000006cc0420009c0000056e0000613d000006cd0220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000000402100370000000000202043b000006ff0320009c000013d00000213d0000002401100370000000000101043b000900000001001d000006c50110009c000013d00000213d000000c001000039000000400010043f000000800000043f000000a00000043f0000000000200435000000cd01000039000000200010043f000000400200003900000000010000191b0e1ad60000040f00000009020000291b0e14380000040f1b0e14530000040f0000000021010434000006c501100197000000400300043d0000000001130436000000000202043300000700022001970000000000210435000006c501000041000006c50230009c0000000003018019000000400130021000000701011001c700001b0f0001042e000006e20420009c000004e50000613d000006e30220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000200220008c000013d00000413d0000000401100370000000000101043b000006ff0210009c000013d00000213d00000000001004350000003301000039000005850000013d000006dc0420009c000004f90000613d000006dd0120009c000013d00000c13d0000000001000416000000000101004b000013d00000c13d0000800b01000039000000040300003900000000040004150000000c0440008a000000050440021000000706020000411b0e1aec0000040f1b0e17eb0000040f0000072c01100197000006890000013d000006d50420009c000005730000613d000006d60220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000000402100370000000000202043b000900000002001d000006ff0220009c000013d00000213d0000002401100370000000000101043b000800000001001d0000000001000411000700000001001d00000000001004350000003401000039000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b00000009020000290000000000200435000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000101041a0000000803000029000000000231004b0000081c0000813d000000400100043d000000640210003900000724030000410000000000320435000000440210003900000725030000410000000000320435000000240210003900000025030000390000062b0000013d000006fd0420009c000005e90000613d000006fe0120009c000013d00000c13d0000000001000416000000000101004b000013d00000c13d0000003603000039000000000203041a000000010420019000000001052002700000007f0150018f000000000105c0190000001f0510008c00000000050000190000000105002039000000010550018f000000000554004b000005990000c13d000000800010043f000000000404004b000006f90000613d0000000000300435000000000201004b0000000002000019000006ff0000613d00000769030000410000000002000019000000000403041a000000a005200039000000000045043500000001033000390000002002200039000000000412004b000003e90000413d000006ff0000013d000006f00420009c000005fb0000613d000006f10220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000800220008c000013d00000413d0000000402100370000000000202043b000900000002001d000006ff0220009c000013d00000213d0000002402100370000000000202043b000800000002001d000006ff0220009c000013d00000213d0000006402100370000000000402043b0000070d0240009c000013d00000213d00000023024000390000075305000041000000000632004b000000000600001900000000060580190000075302200197000000000702004b0000000005008019000007530220009c000000000506c019000000000205004b000013d00000c13d0000000405400039000000000251034f000000000202043b0000070d0620009c0000105f0000213d000000bf062000390007002000000092000000070660017f0000070d0760009c0000105f0000213d000000400060043f000000800020043f00000000042400190000002404400039000000000334004b000013d00000213d000500000008001d0000002003500039000000000331034f0000001f0420018f0000000505200272000004340000613d00000000060000190000000507600210000000000873034f000000000808043b000000a00770003900000000008704350000000106600039000000000756004b0000042c0000413d000000000604004b000004430000613d0000000505500210000000000353034f0000000304400210000000a005500039000000000605043300000000064601cf000000000646022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000363019f0000000000350435000000a00220003900000000000204350000004401100370000000000101043b000600000001001d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000013d20000613d000000000101043b000000060110006c00000b4b0000a13d000000400100043d00000759020000410000000000210435000000040210003900000006030000290000000000320435000006c502000041000006c50310009c000000000102801900000040011002100000074f011001c700001b1000010430000006f70420009c000006000000613d000006f80220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000600220008c000013d00000413d0000000402100370000000000202043b000900000002001d000006ff0220009c000013d00000213d0000002402100370000000000202043b000800000002001d000006ff0220009c000013d00000213d0000004401100370000000000101043b000700000001001d000000090100002900000000001004350000003401000039000600000001001d000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b0000000002000411000006ff02200197000500000002001d0000000000200435000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000201041a000000010100008a000400000002001d000000000112004b000008eb0000c13d000000090100002900000008020000290000000703000029000006730000013d000006ea0420009c000006050000613d000006eb0220009c000013d00000c13d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000000401100370000000000101043b000900000001001d000006ff0110009c000013d00000213d0000000001000411000800000001001d000006ff0110019700000000001004350000074b01000041000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000101041a000000ff01100190000007a40000c13d000000400200043d000007320120009c0000105f0000213d0000006001200039000000400010043f0000002a01000039000000000112043600000000030000310000000203300367000000000400001900000000050100190000000506400210000000000663034f000000000606043b00000000056504360000000104400039000000020640008c000004d00000413d0000000004020433000000000404004b000004e10000613d0000000004010433000007330440019700000734044001c700000000004104350000000004020433000000020440008c00000a1f0000813d0000074e0100004100000000001004350000003201000039000010620000013d0000000002000416000000000202004b000013d00000c13d000000040230008a000000200220008c000013d00000413d0000000401100370000000000101043b000006ff0210009c000013d00000213d0000000000100435000000cd01000039000000200010043f000000400200003900000000010000191b0e1ad60000040f000000000101041a1b0e18030000040f000006c501100197000006890000013d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000002402100370000000000202043b000900000002001d000006ff0220009c000013d00000213d0000000401100370000000000101043b00000000001004350000013001000039000000200010043f000000400200003900000000010000191b0e1ad60000040f00000009020000291b0e14270000040f000000000101041a000000ff011001900000000001000019000000010100c039000006890000013d0000000001000416000000000101004b000013d00000c13d0000006501000039000000000101041a000000000101004b000006cb0000c13d0000006601000039000000000101041a000000000101004b000006cb0000c13d0000006703000039000000000203041a000000010420019000000001052002700000007f0150018f000000000105c0190000001f0510008c00000000050000190000000105002039000000000552013f0000000105500190000005990000c13d000000800010043f000000000404004b000007d40000613d0000000000300435000000a006000039000000000201004b000007e00000613d0000070c030000410000000002000019000000000403041a000000a005200039000000000045043500000001033000390000002002200039000000000412004b000005330000413d000007da0000013d0000000002000416000000000202004b000013d00000c13d000000040230008a000000200220008c000013d00000413d0000000401100370000000000101043b000006ff0210009c000013d00000213d0000000000100435000000cd01000039000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000201043b000000000302041a000000000103004b0000000001000019000005680000613d000900000003001d0000000000200435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000727011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b0000000901100029000000010110008a000000000101041a0000002001100270000006890000013d0000000001000416000000000101004b000013d00000c13d0000070501000041000006a10000013d0000000001000416000000000101004b000013d00000c13d0000070201000041000006a10000013d0000000001000416000000000101004b000013d00000c13d000000800000043f000007030100004100001b0f0001042e0000000002000416000000000202004b000013d00000c13d000000040230008a000000200220008c000013d00000413d0000000401100370000000000101043b000006ff0210009c000013d00000213d00000000001004350000009901000039000000200010043f000000400200003900000000010000191b0e1ad60000040f000006a00000013d0000000001000416000000000101004b000013d00000c13d0000003703000039000000000203041a000000010420019000000001052002700000007f0150018f000000000105c0190000001f0510008c00000000050000190000000105002039000000000552013f0000000105500190000006d50000613d0000074e0100004100000000001004350000002201000039000010620000013d0000000001000416000000000101004b000013d00000c13d0000072301000041000006a10000013d0000000002000416000000000202004b000013d00000c13d000000040230008a000000e00220008c000013d00000413d0000000402100370000000000202043b000900000002001d000006ff0220009c000013d00000213d0000002402100370000000000202043b000800000002001d000006ff0220009c000013d00000213d0000006402100370000000000202043b000700000002001d0000004402100370000000000202043b000600000002001d0000008401100370000000000101043b000500000001001d000000ff0110008c000013d00000213d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000013d20000613d000000000101043b000000070110006c000008880000a13d000000400100043d00000044021000390000071d03000041000008f10000013d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000000402100370000000000202043b000006ff0320009c000013d00000213d0000002401100370000000000101043b000900000001001d000006ff0110009c000013d00000213d00000000002004350000003401000039000000200010043f000000400200003900000000010000191b0e1ad60000040f00000009020000291b0e14270000040f000000000101041a000006890000013d0000000002000416000000000202004b000013d00000c13d000000040230008a000000200220008c000013d00000413d0000000401100370000000000101043b0000077d02100197000000000221004b000013d00000c13d0000077e0210009c000000000200001900000001020060390000077f0110009c00000001022061bf000000010120018f000006a10000013d0000000001000416000000000101004b000013d00000c13d0000001201000039000006a10000013d0000000001000416000000000101004b000013d00000c13d0000003501000039000006a00000013d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000000402100370000000000202043b000900000002001d000006ff0220009c000013d00000213d0000002401100370000000000101043b000600000001001d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000013d20000613d000000000101043b0000072c0210009c000007300000a13d000000400100043d00000064021000390000074903000041000000000032043500000044021000390000074a03000041000000000032043500000024021000390000002603000039000000000032043500000718020000410000000000210435000000040210003900000020030000390000000000320435000006c502000041000006c50310009c000000000102801900000040011002100000071c011001c700001b10000104300000000001000416000000000101004b000013d00000c13d0000076d01000041000006a10000013d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000002402100370000000000202043b000006ff0320009c000013d00000213d0000000003000411000000000332004b000006ed0000c13d0000000401100370000000000101043b1b0e17950000040f000000000100001900001b0f0001042e0000000001000416000000000101004b000013d00000c13d0000073901000041000006a10000013d0000000002000416000000000202004b000013d00000c13d000000040230008a000000200220008c000013d00000413d0000000401100370000000000101043b000006ff0210009c000013d00000213d0000000000100435000000cc01000039000000200010043f000000400200003900000000010000191b0e1ad60000040f000000000101041a000006ff01100197000006a10000013d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000000402100370000000000202043b000006ff0320009c000013d00000213d0000002401100370000000000301043b00000000010004111b0e15ca0000040f000006830000013d0000000002000416000000000202004b000013d00000c13d000000040230008a000000400220008c000013d00000413d0000000402100370000000000202043b000006ff0320009c000013d00000213d0000002401100370000000000301043b00000000010004111b0e14660000040f0000000101000039000006890000013d0000000001000416000000000101004b000013d00000c13d1b0e19de0000040f000000400200043d0000000000120435000006c501000041000006c50320009c0000000002018019000000400120021000000704011001c700001b0f0001042e0000000002000416000000000202004b000013d00000c13d000000040230008a000000200220008c000013d00000413d0000000401100370000000000101043b00000000001004350000013001000039000000200010043f000000400200003900000000010000191b0e1ad60000040f0000000101100039000000000101041a000000800010043f000007030100004100001b0f0001042e0000000001000416000000000101004b000013d00000c13d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000013d20000613d000000400300043d000000000101043b000007470110009c000007120000413d00000064013000390000074902000041000000000021043500000044013000390000074a02000041000000000021043500000024013000390000002602000039000000000021043500000718010000410000000000130435000000040130003900000020020000390000000000210435000006c501000041000006c50230009c000000000301801900000040013002100000071c011001c700001b10000104300000071801000041000000800010043f0000002001000039000000840010043f0000001501000039000000a40010043f0000074101000041000000c40010043f000007420100004100001b1000010430000000800010043f000000000404004b000006e60000613d0000000000300435000000000201004b0000000002000019000006ec0000613d0000073c030000410000000002000019000000000403041a000000a005200039000000000045043500000001033000390000002002200039000000000412004b000006de0000413d000006ec0000013d000001000300008a000000000232016f000000a00020043f000000000101004b00000020020000390000000002006019000006ff0000013d0000071801000041000000800010043f0000002001000039000000840010043f0000002f01000039000000a40010043f0000075001000041000000c40010043f0000075101000041000000e40010043f000007520100004100001b1000010430000001000300008a000000000232016f000000a00020043f000000000101004b0000002002000039000000000200601900000020022000390000008001000039000900000001001d1b0e14140000040f000000400100043d000800000001001d00000009020000291b0e13f30000040f00000008040000290000000001410049000006c502000041000006c50310009c0000000001028019000006c50340009c000000000402801900000040024002100000006001100210000000000121019f00001b0f0001042e0000000001030019000800000003001d1b0e14090000040f00000008030000290000002001300039000007480200004100000000002104350000000e01000039000000000013043500000000010300190000002002000039000000400300043d000900000003001d00000000022304361b0e13e00000040f0000000904000029000007080000013d0000000902000029000000000102004b000007ff0000c13d000000400100043d000000640210003900000730030000410000000000320435000000440210003900000731030000410000000000320435000000240210003900000021030000390000062b0000013d000000060110006b000007920000813d00000009010000290000000000100435000000cd01000039000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000500000001001d000000000501041a000000060150008c0000000002000019000000000305001900000dee0000413d00000080015002700000073d0250009c00000000010540190000073d0250009c0000008002000039000000000200401900000040032001bf0000073e0410009c000000000203801900000040031002700000073e0410009c000000000103801900000020032001bf0000073f0410009c000000000203801900000020031002700000073f0410009c000000000103801900000010032001bf000007400410009c00000000020380190000001003100270000007400410009c0000000001038019000001000310008c00000008022080390000000801108270000000100310008c00000004022080390000000401108270000000040310008c00000002022080390000000201108270000000010110008c00000001022020390000000101200270000000000215022f000000010110020f0000000001210019000000010210008c0000078e0000a13d000000010110027000000000321500d90000000001120019000000020210008c0000078e0000413d000000010110027000000000321500d90000000001120019000000020210008c0000078e0000413d000000010110027000000000321500d90000000001120019000000020210008c0000078e0000413d000000010110027000000000321500d90000000001120019000000020210008c0000078e0000413d000000010110027000000000321500d90000000001120019000000020210008c0000078e0000413d000000010110027000000000321500d90000000001120019000000020210008c00000dcc0000813d0000074e0100004100000000001004350000001201000039000010620000013d000000400100043d00000044021000390000074d03000041000000000032043500000024021000390000001903000039000000000032043500000718020000410000000000210435000000040210003900000020030000390000000000320435000006c502000041000006c50310009c0000000001028019000000400110021000000719011001c700001b100001043000000024010000390000000201100367000000000201043b00000009010000291b0e14c00000040f000000000100001900001b0f0001042e00000000020004150000000b0220008a0000000502200210000b00000000001d000700000002001d000500000003001d000400000006001d0000076101000041000000000010043900000000010004100000000400100443000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000762011001c700008002020000391b0e1b090000040f0000000102200190000013d20000613d000000000101043b000000000101004b0000086c0000c13d0000000501000029000000ff0110018f000000010110008c0000000001000019000000010100603900000007020000290000000502200270000000000201001f0000086f0000c13d000001000100008a000000000200041a000000000112016f00000001051001bf0000000406000029000000000106004b000000700000c13d0000006e0000013d000001000300008a000000000232016f000000a00020043f000000000101004b00000020020000390000000002006019000000bf01200039000000200200008a000000000621016f0000074301600041000007440110009c0000105f0000413d000000400060043f0000006804000039000000000304041a000000010530019000000001023002700000007f0120018f000000000102c0190000001f0210008c00000000020000190000000102002039000000000223013f0000000102200190000005990000c13d000900000006001d0000000002160436000000000505004b000009460000613d0000000000400435000000000301004b00000000030000190000094c0000613d0000070f0400004100000000030000190000000005320019000000000604041a000000000065043500000001044000390000002003300039000000000513004b000007f70000413d0000094c0000013d00000000002004350000003301000039000700000001001d000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000201041a000600000002001d000000080120006c000009b60000813d000000400100043d00000064021000390000072e03000041000000000032043500000044021000390000072f030000410000000000320435000000240210003900000022030000390000062b0000013d000000000331004900000007010000290000086a0000013d00000080012000390000000000310435000000600120003900000007030000290000000000310435000000400120003900000009030000290000000000310435000000050100002900000000011204360000071e0300004100000000003104350000071f0320009c0000105f0000213d000000a003200039000000400030043f000006c503000041000006c50410009c000000000103801900000040011002100000000002020433000006c50420009c00000000020380190000006002200210000000000112019f00000002020003670000008404200370000000000404043b000500000004001d000000a402200370000000000202043b000800000002001d0000000002000414000006c50420009c0000000002038019000000c002200210000000000112019f0000070b011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d0000006705000039000000000405041a000000010640019000000001034002700000007f0230018f000000000203c019000000400300043d0000001f0720008c00000000070000190000000107002039000000000774013f000000000101043b000400000001001d0000000101700190000005990000c13d0000000001230436000000000606004b00000afb0000613d0000000000500435000000000402004b000000000400001900000b010000613d0000070c0500004100000000040000190000000006410019000000000705041a000000000076043500000001055000390000002004400039000000000624004b000008610000413d00000b010000013d00000008010000290000000902000029000006820000013d00000007010000290000000501100270000000000100001f000000400100043d00000064021000390000076303000041000000000032043500000044021000390000076403000041000000000032043500000024021000390000002e030000390000062b0000013d000000000203004b0000000002000019000008800000613d00000000001004350000072b01300041000000000101041a0000002002100270000000400100043d0000000000210435000006c502000041000006c50310009c0000000001028019000000400110021000000704011001c700001b0f0001042e000000090100002900000000001004350000009901000039000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000201041a0000000103200039000000000031041b000000400100043d000000c00310003900000007040000290000000000430435000000a0031000390000000000230435000000800210003900000006030000290000000000320435000000600210003900000008030000290000000000320435000000400210003900000009030000290000000000320435000000c0020000390000000002210436000007090300004100000000003204350000070a0310009c0000105f0000213d000000e003100039000000400030043f000006c503000041000006c50420009c000000000203801900000040022002100000000001010433000006c50410009c00000000010380190000006001100210000000000121019f0000000202000367000000a404200370000000000404043b000400000004001d000000c402200370000000000202043b000700000002001d0000000002000414000006c50420009c0000000002038019000000c002200210000000000112019f0000070b011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d0000006705000039000000000405041a000000010640019000000001034002700000007f0230018f000000000203c019000000400300043d0000001f0720008c00000000070000190000000107002039000000000774013f000000000101043b000300000001001d0000000101700190000005990000c13d0000000001230436000000000606004b00000c570000613d0000000000500435000000000402004b000000000400001900000c5d0000613d0000070c0500004100000000040000190000000006410019000000000705041a000000000076043500000001055000390000002004400039000000000624004b000008e30000413d00000c5d0000013d0000000402000029000000070120006c00000a990000813d000000400100043d00000044021000390000076003000041000000000032043500000024021000390000001d03000039000007980000013d000000090100002900000000001004350000000701000029000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b00000008020000290000000000200435000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000101041a000000ff01100190000009440000c13d000000090100002900000000001004350000000701000029000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b00000008020000290000000000200435000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000201041a000001000300008a000000000232016f00000001022001bf000000000021041b000006c5010000410000000002000414000006c50320009c0000000002018019000000c0012002100000070b011001c70000800d0200003900000004030000390000075a040000410000000905000029000000080600002900000006070000291b0e1b040000040f0000000101200190000013d00000613d000000000100001900001b0f0001042e000001000400008a000000000343016f0000000000320435000000000101004b000000200300003900000000030060190000003f013000390008002000000092000000080110017f0000000903100029000000000113004b000000000100001900000001010040390000070d0230009c0000105f0000213d00000001011001900000105f0000c13d000000400030043f000007450130009c0000105f0000213d0000002001300039000000400010043f000600000003001d0000000000030435000000400100043d000700000001001d00000711010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f00000000030004100000000102200190000013d20000613d000000000101043b00000007050000290000002002500039000000e004000039000000000042043500000746020000410000000000250435000000e004500039000000800200043d00000000002404350000010004500039000000000502004b000009820000613d00000000050000190000000006450019000000a007500039000000000707043300000000007604350000002005500039000000000625004b0000097b0000413d000000000542001900000000000504350000001f02200039000000080220017f00000000024200190000000705000029000000000452004900000040055000390000000000450435000000090800002900000000040804330000000002420436000000000504004b000009980000613d000000000500001900000000062500190000002005500039000000000785001900000000070704330000000000760435000000000645004b000009910000413d00000000052400190000000000050435000006ff03300197000000070600002900000080056000390000000000350435000000600360003900000000001304350000001f01400039000000080110017f00000000012100190000000002610049000000c0036000390000000000230435000000a0026000390000000000020435000000060500002900000000020504330000000001210436000000000302004b000009b40000613d00000000030000190000002005500039000000000405043300000000014104360000000103300039000000000423004b000009ae0000413d0000000704000029000007080000013d000000090100002900000000001004350000000701000029000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d00000008030000290000000602300069000000000101043b000000000021041b0000003501000039000000000201041a0000000002320049000000000021041b000000400100043d00000000003104350000000002000414000006c50320009c000006c5040000410000000002048019000006c50310009c00000000010480190000004001100210000000c002200210000000000112019f00000727011001c70000800d0200003900000003030000390000072804000041000000090500002900000000060000191b0e1b040000040f0000000101200190000013d00000613d00000009010000290000000000100435000000cc01000039000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000101041a00000000000004350000072902000041000000000202041a000006ff01100197000006ff0220019700000008030000291b0e18290000040f000000400100043d000000ce02000039000900000002001d000000000202041a000000000302004b00000c250000c13d0000072a0210009c0000105f0000213d0000004002100039000000400020043f000000200210003900000000000204350000000000010435000000080100006b000800000000001d0000016d0000c13d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000013d20000613d000000000101043b0000072c0210009c000006220000213d000006c50210009c00000ee70000a13d000000400100043d00000064021000390000077603000041000000000032043500000044021000390000077703000041000006280000013d00000021042000390000000005040433000007330550019700000735055001c700000000005404350000002904000039000000080800002900000000060800190000000007020433000000000747004b000004e10000a13d0000000307600210000000780770018f000007360770021f0000000008140019000000000908043300000733099001970000073707700197000000000779019f00000000007804350000000408600270000000010440008a000000010740008c00000a260000213d000000100460008c00000ae70000813d000000400400043d000900000004001d000007380440009c0000105f0000213d00000009050000290000008004500039000000400040043f00000042040000390000000004450436000000000500001900000000060400190000000507500210000000000773034f000000000707043b00000000067604360000000105500039000000030750008c00000a440000413d000000090a00002900000000030a0433000000000303004b000004e10000613d0000000003040433000007330330019700000734033001c7000000000034043500000000030a0433000000020330008c000004e10000413d0000002103a000390000000005030433000007330550019700000735055001c7000000000053043500000705070000410000004103000039000000000607001900000000070a0433000000000737004b000004e10000a13d0000000307600210000000780770018f000007360770021f0000000008430019000000000908043300000733099001970000073707700197000000000779019f00000000007804350000000407600270000000010330008a000000010830008c00000a5d0000213d0000000f0360008c00000ae70000213d000000400500043d000800000005001d00000020035000390000073a0400004100000000004304350000000003020433000700000003001d00000037025000391b0e13d30000040f0000000702000029000000080120002900000037021000390000073b030000410000000000320435000000480210003900000009010000291b0e181b0000040f00000008030000290000000002310049000000200120008a000000000013043500000000010300191b0e14140000040f0000071801000041000000400200043d000900000002001d0000000000120435000000040120003900000008020000291b0e13f30000040f00000009040000290000000001410049000006c502000041000006c50310009c0000000001028019000006c50340009c000000000402801900000040024002100000006001100210000000000121019f00001b1000010430000000090100006b00000af20000c13d000000400100043d00000064021000390000075e03000041000000000032043500000044021000390000075f030000410000000000320435000000240210003900000024030000390000062b0000013d00000000060404330000070d0560009c0000105f0000213d0000003605000039000000000905041a0000000108900190000000010a9002700000007f08a0018f00000000080ac0190000001f0a80008c000000000a000019000000010a0020390000000009a9013f0000000109900190000005990000c13d000000200980008c00000ac60000413d0000001f096000390000000509900270000007690a9000410000076909000041000000200b60008c00000000090a801900000000005004350000001f0880003900000005088002700000076908800041000000000a89004b00000ac60000813d000000000009041b0000000109900039000000000a89004b00000ac20000413d0000001f0860008c00000bd70000a13d0000000000500435000000200700008a00000000097601700000002008000039000007690700004100000ad90000613d00000769070000410000002008000039000000000a000019000000000b480019000000000b0b04330000000000b7041b00000020088000390000000107700039000000200aa00039000000000b9a004b00000ad10000413d000000000969004b00000ae40000813d0000000309600210000000f80990018f000000010a00008a00000000099a022f0000000009a9013f00000000044800190000000004040433000000000494016f000000000047041b000000010460021000000001044001bf00000be20000013d000000400100043d00000044021000390000074c0300004100000000003204350000071802000041000000000021043500000024021000390000002003000039000000000032043500000004021000390000079d0000013d000000050100006b00000b170000c13d000000400100043d00000064021000390000075c03000041000000000032043500000044021000390000075d03000041000008180000013d000001000500008a000000000454016f0000000000410435000000000202004b000000200400003900000000040060190000003f024000390003002000000092000000030420017f0000000002340019000000000442004b000000000400001900000001040040390000070d0520009c0000105f0000213d00000001044001900000105f0000c13d000000400020043f0000000003030433000000000403004b00000ba50000c13d0000006501000039000000000101041a0000070e04000041000000000301004b000000000401c019000200000004001d00000bba0000013d000000090100002900000000001004350000000601000029000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b00000005020000290000000000200435000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d0000000403000029000000070230006a000000000101043b000000000021041b000000400100043d0000000000210435000006c5020000410000000003000414000006c50430009c0000000003028019000006c50410009c00000000010280190000004001100210000000c002300210000000000112019f00000727011001c70000800d0200003900000003030000390000075b04000041000000090500002900000005060000291b0e1b040000040f0000000101200190000013d00000613d0000049e0000013d000000090100002900000000001004350000009901000039000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000201041a0000000103200039000000000031041b000000400100043d000000a0031000390000000604000029000000000043043500000080031000390000000000230435000000600210003900000008030000290000000000320435000000400210003900000009030000290000000000320435000000a002000039000600000002001d000000000221043600000702030000410000000000320435000007120310009c0000105f0000213d000000c003100039000000400030043f000006c503000041000006c50420009c000000000203801900000040022002100000000001010433000006c50410009c00000000010380190000006001100210000000000121019f0000000002000414000006c50420009c0000000002038019000000c002200210000000000112019f0000070b011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d0000006705000039000000000405041a000000010640019000000001034002700000007f0230018f000000000203c019000000400300043d0000001f0720008c00000000070000190000000107002039000000000774013f000000000101043b000400000001001d0000000101700190000005990000c13d0000000001230436000000000606004b00000e310000613d0000000000500435000000000402004b000000000400001900000e370000613d0000070c0500004100000000040000190000000006410019000000000705041a000000000076043500000001055000390000002004400039000000000624004b00000b9d0000413d00000e370000013d000006c502000041000006c50430009c00000000030280190000006003300210000006c50410009c00000000010280190000004001100210000000000113019f0000000003000414000006c50430009c0000000003028019000000c002300210000000000112019f0000070b011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000400200043d000000000101043b000200000001001d0000006805000039000000000405041a000000010640019000000001014002700000007f0310018f000000000301c0190000001f0130008c00000000010000190000000101002039000000000114013f0000000101100190000005990000c13d0000000001320436000000000606004b00000c830000613d0000000000500435000000000403004b000000000400001900000c890000613d0000070f0500004100000000040000190000000006410019000000000705041a000000000076043500000001055000390000002004400039000000000634004b00000bcf0000413d00000c890000013d000000000406004b000000000400001900000be20000613d0000000304600210000000010800008a000000000448022f000000000484013f0000000007070433000000000447016f0000000106600210000000000464019f000000000045041b00000000050204330000070d0450009c0000105f0000213d0000003704000039000000000704041a000000010670019000000001087002700000007f0680018f000000000608c0190000001f0860008c00000000080000190000000108002039000000000787013f0000000107700190000005990000c13d000000200760008c00000c040000413d0000001f0750003900000005077002700000073c087000410000073c07000041000000200950008c000000000708801900000000004004350000001f0660003900000005066002700000073c06600041000000000867004b00000c040000813d000000000007041b0000000107700039000000000867004b00000c000000413d000000200650008c00000d4d0000413d0000000000400435000000200300008a000000000735017000000020060000390000073c0300004100000c170000613d0000073c030000410000002006000039000000000800001900000000092600190000000009090433000000000093041b000000200660003900000001033000390000002008800039000000000978004b00000c0f0000413d000000000757004b00000c220000813d0000000307500210000000f80770018f000000010800008a000000000778022f000000000787013f00000000022600190000000002020433000000000272016f000000000023041b000000010250021000000001022001bf00000d580000013d000000090300002900000000003004350000072a0310009c0000105f0000213d0000004003100039000000400030043f0000072b02200041000600000002001d000000000202041a000006c503200197000000000331043600000020042002700000000000430435000700000004001d000000080240006c0000016d0000413d0000000001010433000500000001001d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000503000029000006c5033001970000000102200190000013d20000613d000000000101043b0000072c0210009c000006220000213d00000007040000290008000800400072000000000113004b00000a070000c13d0000000801000029000007000110009c00000eea0000213d00000009010000290000000000100435000000080100002900000020011002100000000602000029000000000202041a000006c50320019700000f6c0000013d000001000500008a000000000454016f0000000000410435000000000202004b000000200400003900000000040060190000003f024000390002002000000092000000020420017f0000000002340019000000000442004b000000000400001900000001040040390000070d0520009c0000105f0000213d00000001044001900000105f0000c13d000000400020043f0000000003030433000000000403004b00000c9f0000c13d0000006501000039000000000101041a0000070e04000041000000000301004b000000000401c019000100000004001d00000cb40000013d00000044019000390000074c0200004100000000002104350000071801000041000000000019043500000024019000390000002002000039000000000021043500000004019000390000000000210435000006c501000041000006c50290009c0000000009018019000000400190021000000719011001c700001b1000010430000001000500008a000000000454016f0000000000410435000000000303004b000000200400003900000000040060190000003f03400039000000030330017f0000000004230019000000000334004b00000000030000190000000103004039000300000004001d0000070d0440009c0000105f0000213d00000001033001900000105f0000c13d0000000303000029000000400030043f0000000002020433000000000302004b00000cd10000c13d0000006601000039000000000201041a0000070e01000041000000000302004b000000000102c01900000ce60000013d000006c502000041000006c50430009c00000000030280190000006003300210000006c50410009c00000000010280190000004001100210000000000113019f0000000003000414000006c50430009c0000000003028019000000c002300210000000000112019f0000070b011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000400200043d000000000101043b000100000001001d0000006805000039000000000405041a000000010640019000000001014002700000007f0310018f000000000301c0190000001f0130008c00000000010000190000000101002039000000000114013f0000000101100190000005990000c13d0000000001320436000000000606004b00000db00000613d0000000000500435000000000403004b000000000400001900000db60000613d0000070f0500004100000000040000190000000006410019000000000705041a000000000076043500000001055000390000002004400039000000000634004b00000cc90000413d00000db60000013d000006c503000041000006c50420009c00000000020380190000006002200210000006c50410009c00000000010380190000004001100210000000000112019f0000000002000414000006c50420009c0000000002038019000000c002200210000000000112019f0000070b011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000400200043d000300000002001d000000000101043b00000003030000290000006002300039000000000012043500000040013000390000000202000029000000000021043500000020023000390000071001000041000200000002001d000000000012043500000711010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000013d20000613d000000000101043b0000000304000029000000a0024000390000000003000410000000000032043500000080024000390000000000120435000000a0010000390000000000140435000007120140009c0000105f0000213d0000000302000029000000c001200039000000400010043f000006c5040000410000000203000029000006c50130009c000000000304801900000040013002100000000002020433000006c50320009c00000000020480190000006002200210000000000112019f0000000002000414000006c50320009c0000000002048019000000c002200210000000000112019f0000070b011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000400200043d00000022032000390000000404000029000000000043043500000713030000410000000000320435000000020320003900000000001304350000000001000414000006c50310009c000006c5040000410000000001048019000006c50320009c00000000020480190000004002200210000000c001100210000000000112019f00000714011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000400200043d0000000803000029000007150330009c00000f100000a13d00000064012000390000071a03000041000000000031043500000044012000390000071b03000041000000000031043500000024012000390000002203000039000000000031043500000718010000410000000000120435000000040120003900000020030000390000000000310435000006c501000041000006c50320009c000000000201801900000040012002100000071c011001c700001b1000010430000000000205004b000000000200001900000d580000613d0000000302500210000000010600008a000000000226022f000000000262013f0000000003030433000000000223016f0000000103500210000000000232019f000000000024041b000000400300043d0000072a0230009c0000105f0000213d0000004002300039000000400020043f000000000613043600000767010000410000000000160435000000400100043d000000000200041a0000ff0002200190000000870000613d0000072a0210009c0000105f0000213d0000004002100039000000400020043f0000000102000039000700000002001d00000000022104360000076a04000041000000000042043500000000050304330000070d0450009c0000105f0000213d0000006704000039000000000804041a000000010780019000000001098002700000007f0790018f000000000709c0190000001f0970008c00000000090000190000000109002039000000000898013f0000000108800190000005990000c13d000000200870008c00000d8f0000413d0000001f0850003900000005088002700000070c098000410000070c08000041000000200a50008c000000000809801900000000004004350000001f0770003900000005077002700000070c07700041000000000978004b00000d8f0000813d000000000008041b0000000108800039000000000978004b00000d8b0000413d0000001f0750008c000010500000a13d0000000000400435000000200600008a000000000865017000000020070000390000070c0600004100000da20000613d0000070c0600004100000020070000390000000009000019000000000a370019000000000a0a04330000000000a6041b000000200770003900000001066000390000002009900039000000000a89004b00000d9a0000413d000000000858004b00000dad0000813d0000000308500210000000f80880018f000000010900008a000000000889022f000000000898013f00000000033700190000000003030433000000000383016f000000000036041b000000010350021000000001033001bf0000105b0000013d000001000500008a000000000454016f0000000000410435000000000303004b000000200400003900000000040060190000003f03400039000000020330017f0000000004230019000000000334004b00000000030000190000000103004039000200000004001d0000070d0440009c0000105f0000213d00000001033001900000105f0000c13d0000000203000029000000400030043f0000000002020433000000000302004b00000e4c0000c13d0000006601000039000000000201041a0000070e01000041000000000302004b000000000102c01900000e610000013d000000010310027000000000213500d9000000000213004b0000000003018019000900000005001d000800000003001d000000000135004b0000016d0000413d00000005010000290000000000100435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000727011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d00000008030000290000000903300069000000000101043b0000000001310019000000000101041a000006c501100197000000060110006c000000000200001900000dee0000213d000000010100008a000000000113004b0000016d0000613d00000001023000390000000903000029000000000132004b00000e1b0000813d000480100000003d000000000403001900000df80000013d00000001023000390000000703000029000000000132004b000000000403001900000e1b0000813d000000000142016f000800000002001d000700000004001d000000000242013f00000001022002700000000003120019000000000123004b0000000001000019000000010100403900000001011001900000016d0000c13d000900000003001d000000050100002900000000001004350000000001000414000006c50210009c000006c501008041000000c00110021000000727011001c700000004020000291b0e1b090000040f0000000102200190000013d00000613d000000000101043b00000009030000290000000001310019000000000101041a000006c501100197000000060110006c000000080200002900000df50000213d000000010100008a000000000113004b00000df30000c13d0000016d0000013d000900000003001d000000000103004b0000000001000019000006890000613d00000005010000290000000000100435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000727011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b0000000901100029000000010110008a000000000101041a0000002001100270000006890000013d000001000500008a000000000454016f0000000000410435000000000202004b000000200400003900000000040060190000003f02400039000000070420017f0000000002340019000000000442004b000000000400001900000001040040390000070d0520009c0000105f0000213d00000001044001900000105f0000c13d000000400020043f0000000003030433000000000403004b00000eb50000c13d0000006501000039000000000101041a0000070e04000041000000000301004b000000000401c019000300000004001d00000eca0000013d000006c503000041000006c50420009c00000000020380190000006002200210000006c50410009c00000000010380190000004001100210000000000112019f0000000002000414000006c50420009c0000000002038019000000c002200210000000000112019f0000070b011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000400200043d000200000002001d000000000101043b00000002030000290000006002300039000000000012043500000040013000390000000102000029000000000021043500000020023000390000071001000041000100000002001d000000000012043500000711010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000013d20000613d000000000101043b0000000204000029000000a0024000390000000003000410000000000032043500000080024000390000000000120435000000a0010000390000000000140435000007120140009c0000105f0000213d0000000202000029000000c001200039000000400010043f000006c5040000410000000103000029000006c50130009c000000000304801900000040013002100000000002020433000006c50320009c00000000020480190000006002200210000000000112019f0000000002000414000006c50320009c0000000002048019000000c002200210000000000112019f0000070b011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000400200043d00000022032000390000000304000029000000000043043500000713030000410000000000320435000000020320003900000000001304350000000001000414000006c50310009c000006c5040000410000000001048019000006c50320009c00000000020480190000004002200210000000c001100210000000000112019f00000714011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000400200043d0000000703000029000007150330009c000010c70000a13d00000d390000013d000006c502000041000006c50430009c00000000030280190000006003300210000006c50410009c00000000010280190000004001100210000000000113019f0000000003000414000006c50430009c0000000003028019000000c002300210000000000112019f0000070b011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000400200043d000000000101043b000300000001001d0000006805000039000000000405041a000000010640019000000001014002700000007f0310018f000000000301c0190000001f0130008c00000000010000190000000101002039000000000114013f0000000101100190000005990000c13d0000000001320436000000000606004b00000ef40000613d0000000000500435000000000403004b000000000400001900000efa0000613d0000070f0500004100000000040000190000000006410019000000000705041a000000000076043500000001055000390000002004400039000000000634004b00000edf0000413d00000efa0000013d0000000802000029000007000220009c00000f570000a13d000000400100043d000000640210003900000774030000410000000000320435000000440210003900000775030000410000000000320435000000240210003900000027030000390000062b0000013d000001000500008a000000000454016f0000000000410435000000000303004b000000200400003900000000040060190000003f03400039000000070330017f0000000004230019000000000334004b00000000030000190000000103004039000200000004001d0000070d0440009c0000105f0000213d00000001033001900000105f0000c13d0000000203000029000000400030043f0000000002020433000000000302004b00000f710000c13d0000006601000039000000000201041a0000070e01000041000000000302004b000000000102c01900000f860000013d000000000101043b0000006003200039000000080400002900000000004304350000004003200039000000050400002900000000004304350000000603000029000000ff0330018f0000002004200039000000000034043500000000001204350000000000000435000006c5010000410000000003000414000006c50430009c0000000003018019000006c50420009c00000000020180190000004001200210000000c002300210000000000112019f00000716011001c700000001020000391b0e1b090000040f00000000030100190000006003300270000006c503300197000000200430008c000000000403001900000020040080390000001f0540018f000000050440027200000f3a0000613d00000000060000190000000507600210000000000871034f000000000808043b00000000008704350000000106600039000000000746004b00000f330000413d000000000605004b00000f480000613d00000003055002100000000504400210000000000604043300000000065601cf000000000656022f000000000741034f000000000707043b0000010005500089000000000757022f00000000055701cf000000000565019f0000000000540435000100000003001f00030000000103550000000102200190000010a40000613d0000000001000433000800000001001d000006ff011001980000110f0000c13d000000400100043d00000044021000390000072103000041000000000032043500000024021000390000001803000039000007980000013d000000400200043d0000072a0320009c0000105f0000213d0000004003200039000000400030043f0000000001120436000000080300002900000000003104350000000903000029000000000303041a0000070d0430009c0000105f0000213d00000001043000390000000905000029000000000045041b00000000005004350006072d00300045000000000101043300000020031002100000000001020433000006c501100197000000000113019f0000000602000029000000000012041b000000000100001900001b0f0001042e000006c503000041000006c50420009c00000000020380190000006002200210000006c50410009c00000000010380190000004001100210000000000112019f0000000002000414000006c50420009c0000000002038019000000c002200210000000000112019f0000070b011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000400200043d000200000002001d000000000101043b00000002030000290000006002300039000000000012043500000040013000390000000302000029000000000021043500000020023000390000071001000041000300000002001d000000000012043500000711010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000013d20000613d000000000101043b0000000204000029000000a002400039000000000300041000000000003204350000008002400039000000000012043500000006010000290000000000140435000007120140009c0000105f0000213d0000000202000029000000c001200039000000400010043f000006c5040000410000000303000029000006c50130009c000000000304801900000040013002100000000002020433000006c50320009c00000000020480190000006002200210000000000112019f0000000002000414000006c50320009c0000000002048019000000c002200210000000000112019f0000070b011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000400200043d00000022032000390000000404000029000000000043043500000713030000410000000000320435000000020320003900000000001304350000000001000414000006c50310009c000006c5040000410000000001048019000006c50320009c00000000020480190000004002200210000000c001100210000000000112019f00000714011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000600000001001d000000800100043d000000410110008c0000101f0000c13d000000c00100043d000007150210009c0000101f0000213d000000400200043d0000006003200039000000e00400043d000000a00500043d000000000013043500000040012000390000000000510435000000f80140027000000020032000390000000000130435000000060100002900000000001204350000000000000435000006c5010000410000000003000414000006c50430009c0000000003018019000006c50420009c00000000020180190000004001200210000000c002300210000000000112019f00000716011001c700000001020000391b0e1b090000040f00000000030100190000006003300270000006c503300197000000200430008c000000000403001900000020040080390000001f0540018f0000000504400272000010070000613d00000000060000190000000507600210000000000871034f000000000808043b00000000008704350000000106600039000000000746004b000010000000413d000000000605004b000010150000613d00000003055002100000000504400210000000000604043300000000065601cf000000000656022f000000000741034f000000000707043b0000010005500089000000000757022f00000000055701cf000000000565019f0000000000540435000100000003001f00030000000103550000000102200190000012d80000613d0000000001000433000006ff021001980000101f0000613d000000090110014f000006ff011001980000125b0000613d000000400200043d0000004401200039000000400300003900000000003104350000002001200039000007540300004100000000003104350000002403200039000000060400002900000000004304350000006404200039000000800300043d00000000003404350000008404200039000000000503004b000010370000613d00000000050000190000000006450019000000a007500039000000000707043300000000007604350000002005500039000000000635004b000010300000413d000000000443001900000000000404350000001f03300039000000070330017f00000064043000390000000000420435000000a303300039000000070430017f0000000003240019000000000443004b000000000400001900000001040040390000070d0530009c0000105f0000213d00000001044001900000105f0000c13d000000400030043f000000000302043300000000020004140000000904000029000000040440008c000012310000c13d00000001020000390000000103000031000012440000013d000000000305004b00000000030000190000105b0000613d0000000303500210000000010700008a000000000337022f000000000373013f0000000006060433000000000336016f0000000105500210000000000353019f000000000034041b00000000040104330000070d0340009c000010650000a13d0000074e0100004100000000001004350000004101000039000000040010043f0000074f0100004100001b10000104300000006803000039000000000603041a000000010560019000000001076002700000007f0570018f000000000507c0190000001f0750008c00000000070000190000000107002039000000000676013f0000000106600190000005990000c13d000000200650008c000010830000413d0000001f0640003900000005066002700000070f076000410000070f06000041000000200840008c000000000607801900000000003004350000001f0550003900000005055002700000070f05500041000000000756004b000010830000813d000000000006041b0000000106600039000000000756004b0000107f0000413d000000200540008c000011250000413d0000000000300435000000200200008a000000000624017000000020050000390000070f02000041000010960000613d0000070f020000410000002005000039000000000700001900000000081500190000000008080433000000000082041b000000200550003900000001022000390000002007700039000000000867004b0000108e0000413d000000000646004b000010a10000813d0000000306400210000000f80660018f000000010700008a000000000667022f000000000676013f00000000011500190000000001010433000000000161016f000000000012041b000000010140021000000001011001bf000011300000013d000000400200043d0000001f0430018f0000000505300272000010b10000613d000000000600001900000005076002100000000008720019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b000010a90000413d000000000604004b000010c00000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000006c501000041000006c50420009c000000000201801900000040012002100000006002300210000000000121019f00001b1000010430000000000101043b0000006003200039000000070400002900000000004304350000004003200039000000040400002900000000004304350000000503000029000000ff0330018f0000002004200039000000000034043500000000001204350000000000000435000006c5010000410000000003000414000006c50430009c0000000003018019000006c50420009c00000000020180190000004001200210000000c002300210000000000112019f00000716011001c700000001020000391b0e1b090000040f00000000030100190000006003300270000006c503300197000000200430008c000000000403001900000020040080390000001f0540018f0000000504400272000010f10000613d00000000060000190000000507600210000000000871034f000000000808043b00000000008704350000000106600039000000000746004b000010ea0000413d000000000605004b000010ff0000613d00000003055002100000000504400210000000000604043300000000065601cf000000000656022f000000000741034f000000000707043b0000010005500089000000000757022f00000000055701cf000000000565019f0000000000540435000100000003001f00030000000103550000000102200190000012090000613d0000000001000433000006ff0210019800000f500000613d000000090110014f000006ff011001980000122a0000c13d0000000901000029000000080200002900000006030000291b0e14660000040f000000000100001900001b0f0001042e00000000001004350000009901000039000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000201041a0000000103200039000000000031041b000000070120006b000012260000c13d000000080100002900000009020000290000033c0000013d000000000104004b0000000001000019000011300000613d0000000301400210000000010500008a000000000115022f000000000151013f0000000002020433000000000112016f0000000102400210000000000121019f000000000013041b0000006501000039000000000001041b0000006601000039000000000001041b0000000901000029000006ff01100197000900000001001d00000000001004350000076b01000041000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000101041a000000ff011001900000116b0000c13d000000090100002900000000001004350000076b01000041000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000201041a000001000300008a000000000232016f00000001022001bf000000000021041b0000000001000414000006c50210009c000006c501008041000000c0011002100000070b011001c70000800d02000039000000040300003900000000070004110000075a04000041000000000500001900000009060000291b0e1b040000040f0000000101200190000013d00000613d000000090100002900000000001004350000076c01000041000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000101041a000000ff011001900000119f0000c13d000000090100002900000000001004350000076c01000041000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000201041a000001000300008a000000000232016f00000001022001bf000000000021041b0000000001000414000006c50210009c000006c501008041000000c0011002100000070b011001c70000800d02000039000000040300003900000000070004110000075a040000410000076d0500004100000009060000291b0e1b040000040f0000000101200190000013d00000613d000000090100002900000000001004350000076e01000041000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000101041a000000ff01100190000011d30000c13d000000090100002900000000001004350000076e01000041000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000201041a000001000300008a000000000232016f00000001022001bf000000000021041b0000000001000414000006c50210009c000006c501008041000000c0011002100000070b011001c70000800d02000039000000040300003900000000070004110000075a04000041000007230500004100000009060000291b0e1b040000040f0000000101200190000013d00000613d000007050100004100000000001004350000013001000039000900000001001d000000200010043f0000076f01000041000000000601041a0000076d02000041000000000021041b000006c5030000410000000001000414000006c50210009c0000000001038019000000c0011002100000070b011001c70000800d020000390000000403000039000007700400004100000705050000410000076d070000411b0e1b040000040f0000000101200190000013d00000613d000007390100004100000000001004350000000901000029000000200010043f0000077101000041000000000601041a0000072302000041000000000021041b0000000001000414000006c50210009c000006c501008041000000c0011002100000070b011001c70000800d0200003900000004030000390000077004000041000007390500004100000723070000411b0e1b040000040f0000000101200190000013d00000613d0000000801000029000906ff0010019c000012f50000c13d000000400100043d00000044021000390000077a03000041000000000032043500000024021000390000001f03000039000007980000013d000000400200043d0000001f0430018f0000000505300272000012160000613d000000000600001900000005076002100000000008720019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b0000120e0000413d000000000604004b000012250000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000010c00000013d000000400100043d00000044021000390000072003000041000007950000013d000000400100043d00000044021000390000071703000041000000000032043500000024021000390000001e03000039000007980000013d000006c504000041000006c50510009c00000000010480190000004001100210000006c50530009c00000000030480190000006003300210000000000113019f000006c50320009c0000000002048019000000c002200210000000000121019f00000009020000291b0e1b090000040f000000010220018f00030000000103550000006001100270000106c50010019d000006c5031001970000006001000039000000000403004b000012ab0000c13d000000000202004b000012a20000613d0000000001010433000000200210008c000012a20000413d0000075302000041000000200310008c000000000300001900000000030240190000075301100197000000000401004b000000000200a019000007530110009c000000000203c019000000000102004b0000000501000029000013d00000c13d0000000001010433000007540110009c000012a20000c13d00000009010000290000000000100435000000cc01000039000700000001001d000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000101041a000600000001001d0000003301000039000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000603000029000606ff0030019b0000000102200190000013d00000613d000000000101043b000000000101041a000500000001001d0000000701000029000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000201041a00000755022001970000000807000029000000000272019f000000000021041b0000000001000414000006c50210009c000006c501008041000000c0011002100000070b011001c70000800d0200003900000004030000390000075604000041000000090500002900000006060000291b0e1b040000040f0000000101200190000013d00000613d0000000601000029000000080200002900000005030000291b0e18290000040f000000000100001900001b0f0001042e000000400100043d00000757020000410000000000210435000006c502000041000006c50310009c0000000001028019000000400110021000000758011001c700001b10000104300000070d0130009c0000105f0000213d0000003f01300039000000070410017f000000400100043d0000000004410019000000000514004b000000000500001900000001050040390000070d0640009c0000105f0000213d00000001055001900000105f0000c13d000000400040043f0000001f0430018f000000000931043600000003050003670000000503300272000012c70000613d000000000600001900000005076002100000000008790019000000000775034f000000000707043b00000000007804350000000106600039000000000736004b000012bf0000413d000500000009001d000000000604004b000012470000613d0000000503300210000000000535034f00000005033000290000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000012470000013d000000400200043d0000001f0430018f0000000505300272000012e50000613d000000000600001900000005076002100000000008720019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b000012dd0000413d000000000604004b000010c00000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000010c00000013d0000003501000039000800000001001d000000000201041a0000000601200029000000000221004b0000000002000019000000010200403900000001022001900000016d0000c13d0000000802000029000000000012041b000000090100002900000000001004350000003301000039000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000201041a00000006030000290000000002320019000000000021041b000000400100043d00000000003104350000000002000414000006c50320009c000006c5040000410000000002048019000006c50310009c00000000010480190000004001100210000000c002200210000000000112019f00000727011001c70000800d0200003900000003030000390000072804000041000000000500001900000009060000291b0e1b040000040f0000000101200190000013d00000613d000000cc01000039000000200010043f0000072901000041000000000101041a000500000001001d00000009010000290000000000100435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000013d00000613d000000000101043b000000000201041a0000000501000029000006ff01100197000006ff0220019700000006030000291b0e18290000040f000000400100043d0000000802000029000000000202041a000007720220009c0000134d0000413d000000640210003900000778030000410000000000320435000000440210003900000779030000410000000000320435000000240210003900000030030000390000062b0000013d000000ce02000039000900000002001d000000000202041a000000000302004b000013850000c13d0000072a0210009c0000105f0000213d0000004002100039000000400020043f00000020021000390000000000020435000000000001043500000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000013d20000613d000000000101043b0000072c0210009c000006220000213d0000073f0210009c00000a180000813d0000000602000029000007720220009c00000eea0000813d000000400200043d0000072a0320009c0000105f0000213d0000004003200039000000400030043f0000000003120436000000060100002900000000001304350000000901000029000000000101041a0000070d0410009c0000105f0000213d00000001041000390000000905000029000000000045041b00000000005004350000000002020433000006c50220019700000000030304330000002003300210000000000223019f0000072d01100041000000000021041b000013b90000013d000000090300002900000000003004350000072a0310009c0000105f0000213d0000004003100039000000400030043f0000072b02200041000800000002001d000000000202041a000006c503200197000000000331043600000020022002700000000000230435000600060020002d000000060220006b0000000002000019000000010200403900000001022001900000016d0000c13d0000000001010433000500000001001d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000503000029000006c5033001970000000102200190000013d20000613d000000000101043b000007470210009c000006220000813d000000000113004b000013590000c13d0000000601000029000007000110009c00000eea0000213d00000009010000290000000000100435000000060100002900000020011002100000000803000029000000000203041a000006c502200197000000000112019f000000000013041b000000040100006b000009440000c13d000000000200041a0000076501200197000000000010041b000000400100043d00000007030000290000000000310435000006c5020000410000000005000414000006c50450009c0000000005028019000006c50410009c00000000010280190000004001100210000000c002500210000000000112019f00000727011001c70000800d0200003900000773040000411b0e1b040000040f0000000101200190000009440000c13d000000000100001900001b1000010430000000000001042f000000000403004b000013dd0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000013d60000413d00000000012300190000000000010435000000000001042d00000000030104330000000002320436000000000403004b000013ec0000613d000000000400001900000000052400190000002004400039000000000614001900000000060604330000000000650435000000000534004b000013e50000413d000000000123001900000000000104350000001f01300039000000200300008a000000000131016f0000000001120019000000000001042d00000020030000390000000004310436000000000302043300000000003404350000004001100039000000000403004b000014020000613d000000000400001900000000051400190000002004400039000000000624001900000000060604330000000000650435000000000534004b000013fb0000413d000000000213001900000000000204350000001f02300039000000200300008a000000000232016f0000000001120019000000000001042d000007660210009c0000140e0000813d0000004001100039000000400010043f000000000001042d0000074e0100004100000000001004350000004101000039000000040010043f0000074f0100004100001b10000104300000001f02200039000000200300008a000000000232016f0000000001120019000000000221004b000000000200001900000001020040390000070d0310009c000014210000213d0000000102200190000014210000c13d000000400010043f000000000001042d0000074e0100004100000000001004350000004101000039000000040010043f0000074f0100004100001b1000010430000006ff022001970000000000200435000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000014360000613d000000000101043b000000000001042d000000000100001900001b10000104300001000000000002000000000301041a000100000002001d000000000223004b0000144b0000a13d0000000000100435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000727011001c700008010020000391b0e1b090000040f0000000102200190000014510000613d000000000101043b0000000101100029000000000001042d0000074e0100004100000000001004350000003201000039000000040010043f0000074f0100004100001b1000010430000000000100001900001b10000104300000000002010019000000400100043d000007660310009c000014600000813d0000004003100039000000400030043f000000000202041a000000200310003900000020042002700000000000430435000006c5022001970000000000210435000000000001042d0000074e0100004100000000001004350000004101000039000000040010043f0000074f0100004100001b10000104300003000000000002000006ff01100198000014a10000613d000200000003001d000306ff0020019c000014ab0000613d000100000001001d00000000001004350000003401000039000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f000000010220019000000003030000290000149f0000613d000000000101043b0000000000300435000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f000000030600002900000001022001900000149f0000613d000000000101043b0000000202000029000000000021041b000000400100043d0000000000210435000006c5020000410000000003000414000006c50430009c0000000003028019000006c50410009c00000000010280190000004001100210000000c002300210000000000112019f00000727011001c70000800d0200003900000003030000390000075b0400004100000001050000291b0e1b040000040f00000001012001900000149f0000613d000000000001042d000000000100001900001b1000010430000000400100043d00000064021000390000075e03000041000000000032043500000044021000390000075f03000041000000000032043500000024021000390000002403000039000014b40000013d000000400100043d00000064021000390000075c03000041000000000032043500000044021000390000075d03000041000000000032043500000024021000390000002203000039000000000032043500000718020000410000000000210435000000040210003900000020030000390000000000320435000006c502000041000006c50310009c000000000102801900000040011002100000071c011001c700001b10000104300004000000000002000006ff05100198000015900000613d0000003504000039000000000304041a000400000002001d0000000001230019000000000231004b000000000200001900000001020040390000000102200190000015820000c13d000200000004001d000000000014041b00000000005004350000003301000039000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c70000801002000039000300000005001d1b0e1b090000040f00000001022001900000157c0000613d000000000101043b000000000201041a00000004030000290000000002320019000000000021041b000000400100043d00000000003104350000000002000414000006c50320009c000006c5040000410000000002048019000006c50310009c00000000010480190000004001100210000000c002200210000000000112019f00000727011001c70000800d0200003900000003030000390000072804000041000000000500001900000003060000291b0e1b040000040f00000001012001900000157c0000613d000000cc01000039000000200010043f0000072901000041000000000101041a000100000001001d00000003010000290000000000100435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f00000001022001900000157c0000613d000000000101043b000000000201041a0000000101000029000006ff01100197000006ff0220019700000004030000291b0e18290000040f000000400100043d0000000202000029000000000202041a000007720220009c000015a20000813d000000ce05000039000000000205041a000000000302004b000300000005001d0000154b0000613d0000000000500435000007660310009c00000004040000290000157e0000813d0000004003100039000000400030043f0000072b02200041000100000002001d000000000202041a000006c503200197000000000331043600000020022002700000000000230435000400000042001d000000040220006b000000000200001900000001020040390000000102200190000015820000c13d0000000001010433000200000001001d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000203000029000006c5033001970000000102200190000015880000613d000000000101043b000007470210009c000015890000813d000000000113004b000015520000c13d0000000402000029000007000120009c0000000301000029000015ab0000213d000000000010043500000020012002100000000103000029000000000203041a000006c502200197000000000112019f000000000013041b0000157b0000013d0000072a0210009c0000157e0000213d0000004002100039000000400020043f00000020021000390000000000020435000000000001043500000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000015880000613d000000000101043b0000072c0210009c000015890000213d0000073f0210009c00000004040000290000000305000029000015b50000813d000007720240009c000015ab0000813d000000400200043d0000072a0320009c0000157e0000213d0000004003200039000000400030043f00000000031204360000000000430435000000000105041a0000070d0410009c0000157e0000213d0000000104100039000000000045041b00000000005004350000000002020433000006c50220019700000000030304330000002003300210000000000223019f0000072d01100041000000000021041b000000000001042d000000000100001900001b10000104300000074e0100004100000000001004350000004101000039000015850000013d0000074e0100004100000000001004350000001101000039000000040010043f0000074f0100004100001b1000010430000000000001042f000000400100043d00000064021000390000074903000041000000000032043500000044021000390000074a03000041000015bb0000013d000000400100043d00000044021000390000077a03000041000000000032043500000024021000390000001f03000039000000000032043500000718020000410000000000210435000000040210003900000020030000390000000000320435000006c502000041000006c50310009c0000000001028019000000400110021000000719011001c700001b100001043000000064021000390000077803000041000000000032043500000044021000390000077903000041000000000032043500000024021000390000003003000039000015be0000013d000000400100043d00000064021000390000077403000041000000000032043500000044021000390000077503000041000000000032043500000024021000390000002703000039000015be0000013d000000400100043d00000064021000390000077603000041000000000032043500000044021000390000077703000041000000000032043500000024021000390000002603000039000000000032043500000718020000410000000000210435000000040210003900000020030000390000000000320435000006c502000041000006c50310009c000000000102801900000040011002100000071c011001c700001b10000104300005000000000002000400000003001d000506ff0010019c000016420000613d000306ff0020019c0000164c0000613d000000050100002900000000001004350000003301000039000200000001001d000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000016400000613d0000000202000029000000000101043b000000000301041a000100000003001d000000040130006c000016560000413d00000005010000290000000000100435000000200020043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000016400000613d0000000103000029000000040230006a000000000101043b000000000021041b000000030100002900000000001004350000000201000029000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000016400000613d000000000101043b000000000201041a00000004030000290000000002320019000000000021041b000000400100043d0000000000310435000006c5040000410000000002000414000006c50320009c0000000002048019000006c50310009c00000000010480190000004001100210000000c002200210000000000112019f00000727011001c70000800d0200003900000003030000390000072804000041000000050500002900000003060000291b0e1b040000040f0000000101200190000016400000613d00000005010000290000000000100435000000cc01000039000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000016400000613d000000000101043b000000000101041a000500000001001d00000003010000290000000000100435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000016400000613d000000000101043b000000000201041a0000000501000029000006ff01100197000006ff0220019700000004030000291b0e18290000040f000000000001042d000000000100001900001b1000010430000000400100043d000000640210003900000784030000410000000000320435000000440210003900000785030000410000000000320435000000240210003900000025030000390000165f0000013d000000400100043d000000640210003900000782030000410000000000320435000000440210003900000783030000410000000000320435000000240210003900000023030000390000165f0000013d000000400100043d00000064021000390000078003000041000000000032043500000044021000390000078103000041000000000032043500000024021000390000002603000039000000000032043500000718020000410000000000210435000000040210003900000020030000390000000000320435000006c502000041000006c50310009c000000000102801900000040011002100000071c011001c700001b10000104300004000000000002000400000001001d00000000001004350000013001000039000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f000000000300041100000001022001900000168e0000613d000000000101043b000006ff023001970000000000200435000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c70000801002000039000300000003001d1b0e1b090000040f00000001022001900000168e0000613d000000000101043b000000000101041a000000ff01100190000016900000613d000000000001042d000000000100001900001b1000010430000000400100043d0000000008010019000007860110009c000016980000413d0000074e0100004100000000001004350000004101000039000016b70000013d00000000020800190000006001200039000000400010043f0000002a010000390000000003120436000000000100003100000002011003670000000002000019000000000a0300190000000504200210000000000441034f000000000404043b00000000034304360000000102200039000000020420008c000016a10000413d00000000090800190000000002090433000000000202004b000000000b0a0019000016b40000613d00000000020b0433000007330220019700000734022001c700000000002b04350000000002090433000000020220008c000016ba0000813d0000074e0100004100000000001004350000003201000039000000040010043f0000074f0100004100001b100001043000000021029000390000000003020433000007330330019700000735033001c700000000003204350000002902000039000000030600002900000000040600190000000005090433000000000525004b000016b40000a13d0000000305400210000000780550018f000007360550021f0000000006b20019000000000706043300000733077001970000073705500197000000000557019f00000000005604350000000406400270000000010220008a000000010520008c000016c10000213d000000400900043d000000100240008c000017390000813d000007380290009c000016940000213d00000000030900190000008002300039000000400020043f00000042020000390000000002230436000000000300001900000000040200190000000505300210000000000551034f000000000505043b00000000045404360000000103300039000000030530008c000016de0000413d0000000001090433000000000101004b000016b40000613d0000000001020433000007330110019700000734011001c700000000001204350000000001090433000000020110008c000016b40000413d00000021019000390000000003010433000007330330019700000735033001c700000000003104350000004101000039000000040600002900000000040600190000000005090433000000000515004b000016b40000a13d0000000305400210000000780550018f000007360550021f0000000006210019000000000706043300000733077001970000073705500197000000000575019f00000000005604350000000406400270000000010110008a000000010510008c000016f60000213d000000100140008c00000000010000190000000101004039000100000008001d00020000000a001d000300000009001d1b0e1ac10000040f000000400400043d000400000004001d00000020014000390000073a02000041000000000021043500000001010000290000000003010433000100000003001d000000370240003900000002010000291b0e13d30000040f000000010200002900000004012000290000073b0200004100000037031000390000000000230435000000480210003900000003010000291b0e181b0000040f00000004030000290000000002310049000000200120008a000000000013043500000000010300191b0e14140000040f0000071801000041000000400200043d000300000002001d0000000000120435000000040120003900000004020000291b0e13f30000040f00000003040000290000000001410049000006c502000041000006c50310009c0000000001028019000006c50340009c000000000402801900000040024002100000006001100210000000000121019f00001b100001043000000044019000390000074c0200004100000000002104350000071801000041000000000019043500000024019000390000002002000039000000000021043500000004019000390000000000210435000006c501000041000006c50290009c0000000009018019000000400190021000000719011001c700001b10000104300005000000000002000500000002001d000006ff01100197000200000001001d0000000000100435000000cc01000039000300000001001d000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000017930000613d000000000101043b000000000101041a000400000001001d0000003301000039000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000403000029000406ff0030019b0000000102200190000017930000613d000000000101043b000000000101041a000100000001001d0000000301000029000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000017930000613d0000000502000029000006ff07200197000000000101043b000000000201041a0000075502200197000000000272019f000000000021041b0000000001000414000006c50210009c000006c501008041000000c0011002100000070b011001c70000800d0200003900000004030000390000075604000041000000020500002900000004060000291b0e1b040000040f0000000101200190000017930000613d0000000401000029000000050200002900000001030000291b0e18290000040f000000000001042d000000000100001900001b10000104300003000000000002000200000002001d000300000001001d00000000001004350000013001000039000100000001001d000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000017e90000613d000000000101043b0000000202000029000006ff02200197000200000002001d0000000000200435000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000017e90000613d000000000101043b000000000101041a000000ff01100190000017e80000613d000000030100002900000000001004350000000101000029000000200010043f000006c5030000410000000001000414000006c50210009c0000000001038019000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000017e90000613d000000000101043b00000002020000290000000000200435000000200010043f0000000001000414000006c50210009c000006c501008041000000c00110021000000708011001c700008010020000391b0e1b090000040f0000000102200190000017e90000613d000000000101043b000000000201041a000001000300008a000000000232016f000000000021041b000006c5010000410000000002000414000006c50320009c0000000002018019000000c0012002100000070b011001c70000800d02000039000000040300003900000000070004110000078704000041000000030500002900000002060000291b0e1b040000040f0000000101200190000017e90000613d000000000001042d000000000100001900001b1000010430000007470210009c000017ee0000813d000000000001042d000000400100043d00000064021000390000074903000041000000000032043500000044021000390000074a03000041000000000032043500000024021000390000002603000039000000000032043500000718020000410000000000210435000000040210003900000020030000390000000000320435000006c502000041000006c50310009c000000000102801900000040011002100000071c011001c700001b10000104300000073f0210009c000018060000813d000000000001042d000000400100043d00000064021000390000077603000041000000000032043500000044021000390000077703000041000000000032043500000024021000390000002603000039000000000032043500000718020000410000000000210435000000040210003900000020030000390000000000320435000006c502000041000006c50310009c000000000102801900000040011002100000071c011001c700001b10000104300000000003010433000000000403004b000018260000613d000000000400001900000000052400190000002004400039000000000614001900000000060604330000000000650435000000000534004b0000181f0000413d00000000012300190000000000010435000000000001042d0009000000000002000900000003001d000006ff03100197000006ff01200197000700000001001d000800000003001d000000000113004b000019a20000613d000000090100006b000019a20000613d000000080100006b000018e50000613d00000008010000290000000000100435000000cd01000039000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000019a30000613d000000000201043b000000000102041a000600000001001d000000000101004b000019cc0000613d000500000002001d0000000000200435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000727011001c700008010020000391b0e1b090000040f0000000102200190000019a30000613d000000400200043d000007660320009c000019cf0000813d000000000101043b0000004003200039000000400030043f000000060300002900030001003000920000000301100029000000000101041a000006c503100197000000000332043600000020041002700000000000430435000600000004001d000000090140006c000019d80000413d0000000001020433000400000001001d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000403000029000006c5033001970000000102200190000019a50000613d000000000101043b000007470210009c000019a60000813d0000000604000029000000090240006a000000000113004b000400000002001d000018940000c13d000007000120009c000019ad0000213d00000005010000290000000000100435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000727011001c700008010020000391b0e1b090000040f0000000102200190000019a30000613d000000000101043b0000000301100029000000000201041a000006c50220019700000004040000290000002003400210000000000232019f000000000021041b000018cf0000013d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000019a50000613d000000000101043b0000072c0210009c000019a60000213d0000073f0210009c0000000403000029000019b70000813d000007720230009c000019ad0000813d000000400400043d0000072a0240009c000019cf0000213d0000004002400039000000400020043f0000000001140436000300000001001d00000000003104350000000501000029000000000201041a0000070d0120009c000019cf0000213d000200000004001d000100000002001d00000001012000390000000502000029000000000012041b0000000000200435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000727011001c700008010020000391b0e1b090000040f0000000102200190000019a30000613d000000000101043b000000010110002900000002020000290000000002020433000006c502200197000000030300002900000000030304330000002003300210000000000223019f000000000021041b0000000404000029000000400100043d0000002002100039000000000042043500000006020000290000000000210435000006c5020000410000000003000414000006c50430009c0000000003028019000006c50410009c00000000010280190000004001100210000000c002300210000000000112019f00000708011001c70000800d020000390000000203000039000007880400004100000008050000291b0e1b040000040f0000000101200190000019a30000613d000000070100006b000019a20000613d00000007010000290000000000100435000000cd01000039000000200010043f000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000708011001c700008010020000391b0e1b090000040f0000000102200190000019a30000613d000000000301043b000000000203041a000000000102004b000800000003001d000019480000613d000600000002001d0000000000300435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000727011001c700008010020000391b0e1b090000040f0000000102200190000019a30000613d000000400200043d0000072a0320009c000019cf0000213d000000000101043b0000004003200039000000400030043f000000060300002900040001003000920000000401100029000000000101041a000006c5031001970000000003320436000000200410027000000000004304350000000901400029000900000001001d000600000004001d000000000141004b000000000100001900000001010040390000000101100190000019d80000c13d0000000001020433000500000001001d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000503000029000006c5033001970000000102200190000019a50000613d000000000101043b0000072c0210009c000019a60000213d000000000113004b000019510000c13d0000000901000029000007000110009c0000000801000029000019ad0000213d0000000000100435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000727011001c700008010020000391b0e1b090000040f0000000102200190000019a30000613d000000000101043b0000000401100029000000000201041a000006c50220019700000009030000290000002003300210000000000232019f0000198a0000013d000000400100043d0000072a0210009c000019cf0000213d0000004002100039000000400020043f000000200210003900000000000204350000000000010435000600000000001d00000706010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f0000000102200190000019a50000613d000000000101043b0000072c0210009c000019a60000213d000006c50210009c0000000803000029000019b70000213d0000000902000029000007000220009c000019ad0000213d000000400400043d0000072a0240009c000019cf0000213d0000004002400039000000400020043f00000000021404360000000901000029000500000002001d0000000000120435000000000203041a0000070d0120009c000019cf0000213d000400000004001d000300000002001d0000000101200039000000000013041b0000000000300435000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000727011001c700008010020000391b0e1b090000040f0000000102200190000019a30000613d000000000101043b000000030110002900000004020000290000000002020433000006c502200197000000050300002900000000030304330000002003300210000000000223019f000000000021041b0000000604000029000000400100043d0000002002100039000000090300002900000000003204350000000000410435000006c5020000410000000003000414000006c50430009c0000000003028019000006c50410009c00000000010280190000004001100210000000c002300210000000000112019f00000708011001c70000800d020000390000000203000039000007880400004100000007050000291b0e1b040000040f0000000101200190000019a30000613d000000000001042d000000000100001900001b1000010430000000000001042f000000400100043d00000064021000390000074903000041000000000032043500000044021000390000074a03000041000019bd0000013d000000400100043d00000064021000390000077403000041000000000032043500000044021000390000077503000041000000000032043500000024021000390000002703000039000019c00000013d000000400100043d00000064021000390000077603000041000000000032043500000044021000390000077703000041000000000032043500000024021000390000002603000039000000000032043500000718020000410000000000210435000000040210003900000020030000390000000000320435000006c502000041000006c50310009c000000000102801900000040011002100000071c011001c700001b1000010430000000400100043d0000072a0210009c000019d30000a13d0000074e0100004100000000001004350000004101000039000019db0000013d0000004002100039000000400020043f0000002002100039000000000002043500000000000104350000074e0100004100000000001004350000001101000039000000040010043f0000074f0100004100001b100001043000020000000000020000006705000039000000000405041a000000010640019000000001014002700000007f0210018f000000000201c0190000001f0120008c00000000010000190000000101002039000000010110018f000000000116004b00001aba0000c13d000000400300043d0000000001230436000000000606004b000019fd0000613d0000000000500435000000000402004b000000000400001900001a030000613d0000070c0500004100000000040000190000000006410019000000000705041a000000000076043500000001055000390000002004400039000000000624004b000019f50000413d00001a030000013d000001000500008a000000000454016f0000000000410435000000000202004b000000200400003900000000040060190000003f02400039000000200900008a000000000492016f0000000002340019000000000442004b000000000400001900000001040040390000070d0520009c00001ab40000213d000000010440019000001ab40000c13d000000400020043f0000000003030433000000000403004b00001a290000613d000200000009001d000006c502000041000006c50430009c00000000030280190000006003300210000006c50410009c00000000010280190000004001100210000000000113019f0000000003000414000006c50430009c0000000003028019000000c002300210000000000112019f0000070b011001c700008010020000391b0e1b090000040f000000010220019000001ab80000613d000000400200043d000000000801043b000000020900002900001a2e0000013d0000006501000039000000000101041a0000070e08000041000000000301004b000000000801c0190000006805000039000000000405041a000000010640019000000001014002700000007f0310018f000000000301c0190000001f0130008c00000000010000190000000101002039000000000114013f000000010110019000001aba0000c13d0000000001320436000000000606004b00001a4b0000613d0000000000500435000000000403004b000000000400001900001a510000613d0000070f0500004100000000040000190000000006410019000000000705041a000000000076043500000001055000390000002004400039000000000634004b00001a430000413d00001a510000013d000001000500008a000000000454016f0000000000410435000000000303004b000000200400003900000000040060190000003f03400039000000000393016f0000000005230019000000000335004b000000000300001900000001030040390000070d0450009c00001ab40000213d000000010330019000001ab40000c13d000000400050043f0000000002020433000000000302004b00001a760000613d000200000008001d000006c503000041000006c50420009c00000000020380190000006002200210000006c50410009c00000000010380190000004001100210000000000112019f0000000002000414000006c50420009c0000000002038019000000c002200210000000000112019f0000070b011001c700008010020000391b0e1b090000040f000000010220019000001ab80000613d000000400500043d000000000101043b000000020800002900001a7b0000013d0000006601000039000000000201041a0000070e01000041000000000302004b000000000102c019000200000005001d000000600250003900000000001204350000004001500039000000000081043500000020025000390000071001000041000100000002001d000000000012043500000711010000410000000000100439000006c5010000410000000002000414000006c50320009c0000000002018019000000c00120021000000707011001c70000800b020000391b0e1b090000040f000000010220019000001ac00000613d000000000101043b0000000204000029000000a0024000390000000003000410000000000032043500000080024000390000000000120435000000a0010000390000000000140435000007120140009c000000000304001900001ab40000213d000000c001300039000000400010043f000006c5010000410000000104000029000006c50240009c000000000401801900000040024002100000000003030433000006c50430009c00000000030180190000006003300210000000000223019f0000000003000414000006c50430009c0000000003018019000000c001300210000000000121019f0000070b011001c700008010020000391b0e1b090000040f000000010220019000001ab80000613d000000000101043b000000000001042d0000074e010000410000000000100435000000410100003900001abd0000013d000000000100001900001b10000104300000074e0100004100000000001004350000002201000039000000040010043f0000074f0100004100001b1000010430000000000001042f000000000101004b00001ac40000613d000000000001042d000000400100043d00000044021000390000074c0300004100000000003204350000071802000041000000000021043500000024021000390000002003000039000000000032043500000004021000390000000000320435000006c502000041000006c50310009c0000000001028019000000400110021000000719011001c700001b1000010430000000000001042f000006c503000041000006c50410009c00000000010380190000004001100210000006c50420009c00000000020380190000006002200210000000000112019f0000000002000414000006c50420009c0000000002038019000000c002200210000000000112019f0000070b011001c700008010020000391b0e1b090000040f000000010220019000001aea0000613d000000000101043b000000000001042d000000000100001900001b100001043000000000050100190000000000200439000000040130008c00001af30000a13d000000050140027000000000010100310000000400100443000006c5010000410000000002000414000006c50420009c0000000002018019000006c50430009c00000000030180190000006001300210000000c002200210000000000112019f00000789011001c700000000020500191b0e1b090000040f000000010220019000001b030000613d000000000101043b000000000001042d000000000001042f00001b07002104210000000102000039000000000001042d0000000002000019000000000001042d00001b0c002104230000000102000039000000000001042d0000000002000019000000000001042d00001b0e0000043200001b0f0001042e00001b100001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff0000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000006fcfff4400000000000000000000000000000000000000000000000000000000a217fdde00000000000000000000000000000000000000000000000000000000d505acce00000000000000000000000000000000000000000000000000000000dd62ed3d00000000000000000000000000000000000000000000000000000000dd62ed3e00000000000000000000000000000000000000000000000000000000e7a324dc00000000000000000000000000000000000000000000000000000000f1127ed800000000000000000000000000000000000000000000000000000000d505accf00000000000000000000000000000000000000000000000000000000d539139300000000000000000000000000000000000000000000000000000000d547741f00000000000000000000000000000000000000000000000000000000a9059cba00000000000000000000000000000000000000000000000000000000a9059cbb00000000000000000000000000000000000000000000000000000000b0805aa700000000000000000000000000000000000000000000000000000000c3cda52000000000000000000000000000000000000000000000000000000000a217fddf00000000000000000000000000000000000000000000000000000000a457c2d70000000000000000000000000000000000000000000000000000000091d148530000000000000000000000000000000000000000000000000000000095d89b400000000000000000000000000000000000000000000000000000000095d89b41000000000000000000000000000000000000000000000000000000009ab24eb0000000000000000000000000000000000000000000000000000000009dc29fac0000000000000000000000000000000000000000000000000000000091d148540000000000000000000000000000000000000000000000000000000091ddadf4000000000000000000000000000000000000000000000000000000007ecebdff000000000000000000000000000000000000000000000000000000007ecebe000000000000000000000000000000000000000000000000000000000084b0196e000000000000000000000000000000000000000000000000000000008e539e8c000000000000000000000000000000000000000000000000000000006fcfff450000000000000000000000000000000000000000000000000000000070a0823100000000000000000000000000000000000000000000000000000000313ce566000000000000000000000000000000000000000000000000000000003a46b1a7000000000000000000000000000000000000000000000000000000004bf5d7e8000000000000000000000000000000000000000000000000000000004bf5d7e900000000000000000000000000000000000000000000000000000000587cde1e000000000000000000000000000000000000000000000000000000005c19a95c000000000000000000000000000000000000000000000000000000003a46b1a80000000000000000000000000000000000000000000000000000000040c10f19000000000000000000000000000000000000000000000000000000003644e514000000000000000000000000000000000000000000000000000000003644e5150000000000000000000000000000000000000000000000000000000036568abe000000000000000000000000000000000000000000000000000000003950935100000000000000000000000000000000000000000000000000000000313ce567000000000000000000000000000000000000000000000000000000003499bfcb0000000000000000000000000000000000000000000000000000000018160ddc00000000000000000000000000000000000000000000000000000000248a9ca200000000000000000000000000000000000000000000000000000000248a9ca300000000000000000000000000000000000000000000000000000000282c51f3000000000000000000000000000000000000000000000000000000002f2ff15d0000000000000000000000000000000000000000000000000000000018160ddd0000000000000000000000000000000000000000000000000000000023b872dd00000000000000000000000000000000000000000000000000000000095ea7b200000000000000000000000000000000000000000000000000000000095ea7b3000000000000000000000000000000000000000000000000000000001339324b000000000000000000000000000000000000000000000000000000001794bb3c0000000000000000000000000000000000000000000000000000000001ffc9a70000000000000000000000000000000000000000000000000000000006fdde03000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000400000000000000000000000001c1f5657b6ac36a65c3e5b65a5634cd09b7ef90b4242a880c395b82e476db0ac000000000000000000000000000000000000002000000080000000000000000000000000000000000000000000000000000000200000000000000000000000009f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d95539132020000020000000000000000000000000000000400000000000000000000000002000000000000000000000000000000000000400000000000000000000000006e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9000000000000000000000000000000000000000000000000ffffffffffffff1f02000000000000000000000000000000000000000000000000000000000000009787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae000000000000000000000000000000000000000000000000ffffffffffffffffc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470a2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c220977538b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9a8a0592ac89c5ad3bc6df8224c17b485976f597df104ee20d0df415241f670b000000000000000000000000000000000000000000000000ffffffffffffff3f190100000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000420000000000000000000000007fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0000000000000000000000000000000000000008000000000000000000000000045524332305065726d69743a20696e76616c6964207369676e6174757265000008c379a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000756500000000000000000000000000000000000000000000000000000000000045434453413a20696e76616c6964207369676e6174757265202773272076616c000000000000000000000000000000000000008400000000000000000000000045524332305065726d69743a206578706972656420646561646c696e65000000e48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf000000000000000000000000000000000000000000000000ffffffffffffff5f4552433230566f7465733a20696e76616c6964206e6f6e63650000000000000045434453413a20696e76616c6964207369676e617475726500000000000000004552433230566f7465733a207369676e61747572652065787069726564000000c8d1ad9d415224b751d781cc8214ccfe7c47716e13229475443f04f1ebddadc6207a65726f00000000000000000000000000000000000000000000000000000045524332303a2064656372656173656420616c6c6f77616e63652062656c6f77ac6ea2a815df106dad60201d8eae2b2e35d2185272a1b3d6b651b30cf14b5fc80200000000000000000000000000000000000020000000000000000000000000ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef435daec636ce435a90bde0aeec309a303a359a854c5a51b7d6a5a941d6db6094000000000000000000000000000000000000000000000000ffffffffffffffbfd36cd1c74ef8d7326d8021b776c18fb5a5724b7f7bc93c2f42e43e10ef27d1290000000000000000000000000000000000000000000000000000ffffffffffffd36cd1c74ef8d7326d8021b776c18fb5a5724b7f7bc93c2f42e43e10ef27d12a636500000000000000000000000000000000000000000000000000000000000045524332303a206275726e20616d6f756e7420657863656564732062616c616e730000000000000000000000000000000000000000000000000000000000000045524332303a206275726e2066726f6d20746865207a65726f20616464726573000000000000000000000000000000000000000000000000ffffffffffffff9f00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3000000000000000000000000000000000000000000000000000000000000000780000000000000000000000000000000000000000000000000000000000000030313233343536373839616263646566000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848416363657373436f6e74726f6c3a206163636f756e7420000000000000000000206973206d697373696e6720726f6c652000000000000000000000000000000042a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31ae00000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000100004549503731323a20556e696e697469616c697a656400000000000000000000000000000000000000000000000000000000000064000000800000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000080000000000000000000000000000000000000000000000000ffffffffffffffdf0f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000006d6f64653d74696d657374616d70000000000000000000000000000000000000382062697473000000000000000000000000000000000000000000000000000053616665436173743a2076616c756520646f65736e27742066697420696e20342bcf8b2def1b062dcd457d08200464a1cd44083577685153cb692cf266104d3a537472696e67733a20686578206c656e67746820696e73756666696369656e744552433230566f7465733a20667574757265206c6f6f6b7570000000000000004e487b71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c660000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000080000000000000000000000000000000000000000000000000000000000000001626ba7e00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000003134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f998dfa33000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000f373518a000000000000000000000000000000000000000000000000000000002f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925737300000000000000000000000000000000000000000000000000000000000045524332303a20617070726f766520746f20746865207a65726f206164647265726573730000000000000000000000000000000000000000000000000000000045524332303a20617070726f76652066726f6d20746865207a65726f2061646445524332303a20696e73756666696369656e7420616c6c6f77616e63650000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000647920696e697469616c697a6564000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320616c726561ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff000000000000000000000000000000000000000000000000ffffffffffffffc07a6b53796e6300000000000000000000000000000000000000000000000000005a4b0000000000000000000000000000000000000000000000000000000000004a11f94e20a93c79f6ec743a1954ec4fc2c08429ae2122118bf234b2185c81b83100000000000000000000000000000000000000000000000000000000000000363eca0a79dc8ec297995f86b12cc61391ff0de52f1ba01ca23e9716f742e413cdce436af447db49474373ffa053918b0f7ce868299cb20bf112d9a85c01198c70480ee89cb38eff00b7d23da25713d52ce19c6ed428691d22c58b2f615e3d67b59d571f58640405de3e32275ec92b76b454b079d0064536a00ee8558e088d232bcf8b2def1b062dcd457d08200464a1cd44083577685153cb692cf266104d3bbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ffac6ea2a815df106dad60201d8eae2b2e35d2185272a1b3d6b651b30cf14b5fc900000001000000000000000000000000000000000000000000000000000000007f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498323420626974730000000000000000000000000000000000000000000000000053616665436173743a2076616c756520646f65736e27742066697420696e2032322062697473000000000000000000000000000000000000000000000000000053616665436173743a2076616c756520646f65736e27742066697420696e2033766572666c6f77696e6720766f746573000000000000000000000000000000004552433230566f7465733a20746f74616c20737570706c79207269736b73206f45524332303a206d696e7420746f20746865207a65726f2061646472657373006e697469616c697a696e67000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069ffffffff0000000000000000000000000000000000000000000000000000000001ffc9a7000000000000000000000000000000000000000000000000000000007965db0b00000000000000000000000000000000000000000000000000000000616c616e6365000000000000000000000000000000000000000000000000000045524332303a207472616e7366657220616d6f756e7420657863656564732062657373000000000000000000000000000000000000000000000000000000000045524332303a207472616e7366657220746f20746865207a65726f2061646472647265737300000000000000000000000000000000000000000000000000000045524332303a207472616e736665722066726f6d20746865207a65726f206164000000000000000000000000000000000000000000000000ffffffffffffffa0f6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171bdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7240200000200000000000000000000000000000000000000000000000000000000378b0b8951ed35244ac3e49c4a81c95d91c51999296a9d63660445ee0a223213
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.