Source Code
Overview
XDAI Balance
XDAI Value
$0.00View more zero value Internal Transactions in Advanced View mode
Cross-Chain Transactions
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 Name:
CUBE
Compiler Version
v0.8.20+commit.a1b79de6
Contract Source Code (Solidity)
/**
*Submitted for verification at gnosisscan.io on 2024-05-17
*/
/*
.____ ________
| | _____ ___.__. __________\_____ \
| | \__ \< | |/ __ \_ __ \_(__ <
| |___ / __ \\___ \ ___/| | \/ \
|_______ (____ / ____|\___ >__| /______ /
\/ \/\/ \/ \/
*/
// SPDX-License-Identifier: Apache-2.0
pragma solidity =0.8.20 ^0.8.20;
// lib/openzeppelin-contracts/contracts/access/IAccessControl.sol
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev The `account` is missing a role.
*/
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);
/**
* @dev The caller of a function is not the expected one.
*
* NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
*/
error AccessControlBadConfirmation();
/**
* @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.
*/
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 `callerConfirmation`.
*/
function renounceRole(bytes32 role, address callerConfirmation) external;
}
// lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)
interface IERC5267 {
/**
* @dev MAY be emitted to signal that the domain could have changed.
*/
event EIP712DomainChanged();
/**
* @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
* signature.
*/
function eip712Domain()
external
view
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
);
}
// lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol)
/**
* @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);
}
// lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
/**
* @dev Standard ERC20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(
address sender, uint256 balance, uint256 needed, uint256 tokenId
);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
// lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)
/**
* @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.
*
* {UpgradeableBeacon} will check that this address is a contract.
*/
function implementation() external view returns (address);
}
// lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be
* reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data)
external
returns (bytes4);
}
// lib/openzeppelin-contracts/contracts/utils/Address.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success,) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @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 or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* 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.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @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`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value)
internal
returns (bytes memory)
{
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data)
internal
view
returns (bytes memory)
{
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data)
internal
returns (bytes memory)
{
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(address target, bool success, bytes memory returndata)
internal
view
returns (bytes memory)
{
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata)
internal
pure
returns (bytes memory)
{
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) 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 FailedInnerCall();
}
}
}
// lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}
// lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.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
}
/**
* @dev The signature derives the `address(0)`.
*/
error ECDSAInvalidSignature();
/**
* @dev The signature has an invalid length.
*/
error ECDSAInvalidSignatureLength(uint256 length);
/**
* @dev The signature has an S value that is in the upper half order.
*/
error ECDSAInvalidSignatureS(bytes32 s);
/**
* @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
* return address(0) without also returning an error description. Errors are documented using an enum (error type)
* and a bytes32 providing additional information about the error.
*
* If no error is returned, then the address can be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*/
function tryRecover(bytes32 hash, bytes memory signature)
internal
pure
returns (address, RecoverError, bytes32)
{
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*/
function tryRecover(bytes32 hash, bytes32 r, bytes32 vs)
internal
pure
returns (address, RecoverError, bytes32)
{
unchecked {
bytes32 s =
vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
// We do not check for an overflow here since the shift operation results in 0 or 1.
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*/
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)
internal
pure
returns (address, RecoverError, bytes32)
{
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS, s);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature, bytes32(0));
}
return (signer, RecoverError.NoError, bytes32(0));
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
*/
function _throwError(RecoverError error, bytes32 errorArg) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert ECDSAInvalidSignature();
} else if (error == RecoverError.InvalidSignatureLength) {
revert ECDSAInvalidSignatureLength(uint256(errorArg));
} else if (error == RecoverError.InvalidSignatureS) {
revert ECDSAInvalidSignatureS(errorArg);
}
}
}
// lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
// lib/openzeppelin-contracts/contracts/utils/math/Math.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Muldiv operation overflow.
*/
error MathOverflowedMulDiv();
enum Rounding {
Floor, // Toward negative infinity
Ceil, // Toward positive infinity
Trunc, // Toward zero
Expand // Away from zero
}
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds towards infinity instead
* of rounding towards zero.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
// Guarantee the same behavior as in a regular Solidity division.
return a / b;
}
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
* Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator)
internal
pure
returns (uint256 result)
{
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0 = x * y; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
if (denominator <= prod1) {
revert MathOverflowedMulDiv();
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator.
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363.
uint256 twos = denominator & (0 - denominator);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
// works in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding)
internal
pure
returns (uint256)
{
uint256 result = mulDiv(x, y, denominator);
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}
// lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)
/**
* @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);
}
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.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 Storage of the initializable contract.
*
* It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
* when using with upgradeable contracts.
*
* @custom:storage-location erc7201:openzeppelin.storage.Initializable
*/
struct InitializableStorage {
/**
* @dev Indicates that the contract has been initialized.
*/
uint64 _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant INITIALIZABLE_STORAGE =
0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;
/**
* @dev The contract is already initialized.
*/
error InvalidInitialization();
/**
* @dev The contract is not initializing.
*/
error NotInitializing();
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint64 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 in the context of a constructor an `initializer` may be invoked any
* number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
* production.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
// Cache values to avoid duplicated sloads
bool isTopLevelCall = !$._initializing;
uint64 initialized = $._initialized;
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reininitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;
if (!initialSetup && !construction) {
revert InvalidInitialization();
}
$._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 2**64 - 1 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint64 version) {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing || $._initialized >= version) {
revert InvalidInitialization();
}
$._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() {
_checkInitializing();
_;
}
/**
* @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
*/
function _checkInitializing() internal view virtual {
if (!_isInitializing()) {
revert NotInitializing();
}
}
/**
* @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 {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing) {
revert InvalidInitialization();
}
if ($._initialized != type(uint64).max) {
$._initialized = type(uint64).max;
emit Initialized(type(uint64).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint64) {
return _getInitializableStorage()._initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _getInitializableStorage()._initializing;
}
/**
* @dev Returns a pointer to the storage namespace.
*/
// solhint-disable-next-line var-name-mixedcase
function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
assembly {
$.slot := INITIALIZABLE_STORAGE
}
}
}
// src/escrow/interfaces/ITokenType.sol
interface ITokenType {
enum TokenType {
ERC20,
ERC721,
ERC1155,
NATIVE
}
}
// lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
* a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data)
external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
* {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
* a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the address zero.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}
// lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.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;
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/utils/ReentrancyGuardUpgradeable.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuardUpgradeable is Initializable {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant NOT_ENTERED = 1;
uint256 private constant ENTERED = 2;
/// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard
struct ReentrancyGuardStorage {
uint256 _status;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant ReentrancyGuardStorageLocation =
0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;
function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {
assembly {
$.slot := ReentrancyGuardStorageLocation
}
}
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
function __ReentrancyGuard_init() internal onlyInitializing {
__ReentrancyGuard_init_unchained();
}
function __ReentrancyGuard_init_unchained() internal onlyInitializing {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
$._status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
// On the first call to nonReentrant, _status will be NOT_ENTERED
if ($._status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
$._status = ENTERED;
}
function _nonReentrantAfter() private {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
$._status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
return $._status == ENTERED;
}
}
// lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol)
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
// lib/openzeppelin-contracts/contracts/utils/Strings.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant HEX_DIGITS = "0123456789abcdef";
uint8 private constant ADDRESS_LENGTH = 20;
/**
* @dev The `value` string doesn't fit in the specified `length`.
*/
error StringsInsufficientHexLength(uint256 value, uint256 length);
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toStringSigned(int256 value) internal pure returns (string memory) {
return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
uint256 localValue = value;
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = HEX_DIGITS[localValue & 0xf];
localValue >>= 4;
}
if (localValue != 0) {
revert StringsInsufficientHexLength(value, length);
}
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
* representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.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);
* }
* ```
*/
abstract contract ERC165Upgradeable is Initializable, IERC165 {
function __ERC165_init() internal onlyInitializing {}
function __ERC165_init_unchained() internal onlyInitializing {}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
// lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol)
/**
* @dev This abstract contract provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
*/
library ERC1967Utils {
// We re-declare ERC-1967 events here because they can't be used directly from IERC1967.
// This will be fixed in Solidity 0.8.21. At that point we should remove these events.
/**
* @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);
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev The `implementation` of the proxy is invalid.
*/
error ERC1967InvalidImplementation(address implementation);
/**
* @dev The `admin` of the proxy is invalid.
*/
error ERC1967InvalidAdmin(address admin);
/**
* @dev The `beacon` of the proxy is invalid.
*/
error ERC1967InvalidBeacon(address beacon);
/**
* @dev An upgrade function sees `msg.value > 0` that may be lost.
*/
error ERC1967NonPayable();
/**
* @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 {
if (newImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(newImplementation);
}
StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Performs implementation upgrade with additional setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-Upgraded} event.
*/
function upgradeToAndCall(address newImplementation, bytes memory data) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
if (data.length > 0) {
Address.functionDelegateCall(newImplementation, data);
} else {
_checkNonPayable();
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant ADMIN_SLOT =
0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @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 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 {
if (newAdmin == address(0)) {
revert ERC1967InvalidAdmin(address(0));
}
StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {IERC1967-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 the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
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 {
if (newBeacon.code.length == 0) {
revert ERC1967InvalidBeacon(newBeacon);
}
StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;
address beaconImplementation = IBeacon(newBeacon).implementation();
if (beaconImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(beaconImplementation);
}
}
/**
* @dev Change the beacon and trigger a setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-BeaconUpgraded} event.
*
* CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since
* it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for
* efficiency.
*/
function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {
_setBeacon(newBeacon);
emit BeaconUpgraded(newBeacon);
if (data.length > 0) {
Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
} else {
_checkNonPayable();
}
}
/**
* @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract
* if an upgrade doesn't perform an initialization call.
*/
function _checkNonPayable() private {
if (msg.value > 0) {
revert ERC1967NonPayable();
}
}
}
// lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)
/**
* @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
*
* The library provides methods for generating a hash of a message that conforms to the
* https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
* specifications.
*/
library MessageHashUtils {
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x45` (`personal_sign` messages).
*
* The digest is calculated by prefixing a bytes32 `messageHash` with
* `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
* hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
*
* NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
* keccak256, although any bytes32 value can be safely used because the final digest will
* be re-hashed.
*
* See {ECDSA-recover}.
*/
function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash
mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix
digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)
}
}
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x45` (`personal_sign` messages).
*
* The digest is calculated by prefixing an arbitrary `message` with
* `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
* hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
*
* See {ECDSA-recover}.
*/
function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {
return keccak256(
bytes.concat(
"\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message
)
);
}
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x00` (data with intended validator).
*
* The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
* `validator` address. Then hashing the result.
*
* See {ECDSA-recover}.
*/
function toDataWithIntendedValidatorHash(address validator, bytes memory data)
internal
pure
returns (bytes32)
{
return keccak256(abi.encodePacked(hex"1900", validator, data));
}
/**
* @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).
*
* The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
* `\x19\x01` and hashing the result. It corresponds to the hash signed by the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
*
* See {ECDSA-recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash)
internal
pure
returns (bytes32 digest)
{
/// @solidity memory-safe-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, hex"1901")
mstore(add(ptr, 0x02), domainSeparator)
mstore(add(ptr, 0x22), structHash)
digest := keccak256(ptr, 0x42)
}
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.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,
IAccessControl,
ERC165Upgradeable
{
struct RoleData {
mapping(address account => bool) hasRole;
bytes32 adminRole;
}
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/// @custom:storage-location erc7201:openzeppelin.storage.AccessControl
struct AccessControlStorage {
mapping(bytes32 role => RoleData) _roles;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant AccessControlStorageLocation =
0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;
function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {
assembly {
$.slot := AccessControlStorageLocation
}
}
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with an {AccessControlUnauthorizedAccount} error including the required role.
*/
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(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual returns (bool) {
AccessControlStorage storage $ = _getAccessControlStorage();
return $._roles[role].hasRole[account];
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
* is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
* is missing `role`.
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert AccessControlUnauthorizedAccount(account, role);
}
}
/**
* @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 returns (bytes32) {
AccessControlStorage storage $ = _getAccessControlStorage();
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 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
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 `callerConfirmation`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address callerConfirmation) public virtual {
if (callerConfirmation != _msgSender()) {
revert AccessControlBadConfirmation();
}
_revokeRole(role, callerConfirmation);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
AccessControlStorage storage $ = _getAccessControlStorage();
bytes32 previousAdminRole = getRoleAdmin(role);
$._roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
AccessControlStorage storage $ = _getAccessControlStorage();
if (!hasRole(role, account)) {
$._roles[role].hasRole[account] = true;
emit RoleGranted(role, account, _msgSender());
return true;
} else {
return false;
}
}
/**
* @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
AccessControlStorage storage $ = _getAccessControlStorage();
if (hasRole(role, account)) {
$._roles[role].hasRole[account] = false;
emit RoleRevoked(role, account, _msgSender());
return true;
} else {
return false;
}
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol)
/**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*/
abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
address private immutable __self = address(this);
/**
* @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`
* and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
* while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.
* If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must
* be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
* during an upgrade.
*/
string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";
/**
* @dev The call is from an unauthorized context.
*/
error UUPSUnauthorizedCallContext();
/**
* @dev The storage `slot` is unsupported as a UUID.
*/
error UUPSUnsupportedProxiableUUID(bytes32 slot);
/**
* @dev Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
* for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
* function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
* fail.
*/
modifier onlyProxy() {
_checkProxy();
_;
}
/**
* @dev Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
_checkNotDelegated();
_;
}
function __UUPSUpgradeable_init() internal onlyInitializing {}
function __UUPSUpgradeable_init_unchained() internal onlyInitializing {}
/**
* @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*
* 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. This is guaranteed by the `notDelegated` modifier.
*/
function proxiableUUID() external view virtual notDelegated returns (bytes32) {
return ERC1967Utils.IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeToAndCall(address newImplementation, bytes memory data)
public
payable
virtual
onlyProxy
{
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data);
}
/**
* @dev Reverts if the execution is not performed via delegatecall or the execution
* context is not of a proxy with an ERC1967-compliant implementation pointing to self.
* See {_onlyProxy}.
*/
function _checkProxy() internal view virtual {
if (
address(this) == __self // Must be called through delegatecall
|| ERC1967Utils.getImplementation() != __self // Must be called through an active proxy
) {
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Reverts if the execution is performed via delegatecall.
* See {notDelegated}.
*/
function _checkNotDelegated() internal view virtual {
if (address(this) != __self) {
// Must not be called through delegatecall
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.
*
* As a security check, {proxiableUUID} is invoked in the new implementation, and the return value
* is expected to be the implementation slot in ERC1967.
*
* Emits an {IERC1967-Upgraded} event.
*/
function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {
try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {
revert UUPSUnsupportedProxiableUUID(slot);
}
ERC1967Utils.upgradeToAndCall(newImplementation, data);
} catch {
// The implementation is not UUPS
revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);
}
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/EIP712Upgradeable.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol)
/**
* @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
*
* The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
* encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract
* does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to
* produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.
*
* This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
* scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
* ({_hashTypedDataV4}).
*
* The implementation of the domain separator was designed to be as efficient as possible while still properly updating
* the chain id to protect against replay attacks on an eventual fork of the chain.
*
* NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
* https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
*
* NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
* separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the
* separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
*/
abstract contract EIP712Upgradeable is Initializable, IERC5267 {
bytes32 private constant TYPE_HASH = keccak256(
"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
);
/// @custom:storage-location erc7201:openzeppelin.storage.EIP712
struct EIP712Storage {
/// @custom:oz-renamed-from _HASHED_NAME
bytes32 _hashedName;
/// @custom:oz-renamed-from _HASHED_VERSION
bytes32 _hashedVersion;
string _name;
string _version;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.EIP712")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant EIP712StorageLocation =
0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;
function _getEIP712Storage() private pure returns (EIP712Storage storage $) {
assembly {
$.slot := EIP712StorageLocation
}
}
/**
* @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
{
EIP712Storage storage $ = _getEIP712Storage();
$._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 MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);
}
/**
* @dev See {IERC-5267}.
*/
function eip712Domain()
public
view
virtual
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
)
{
EIP712Storage storage $ = _getEIP712Storage();
// 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 view virtual returns (string memory) {
EIP712Storage storage $ = _getEIP712Storage();
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 view virtual returns (string memory) {
EIP712Storage storage $ = _getEIP712Storage();
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) {
EIP712Storage storage $ = _getEIP712Storage();
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) {
EIP712Storage storage $ = _getEIP712Storage();
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("");
}
}
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/ERC721Upgradeable.sol
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol)
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
abstract contract ERC721Upgradeable is
Initializable,
ContextUpgradeable,
ERC165Upgradeable,
IERC721,
IERC721Metadata,
IERC721Errors
{
using Strings for uint256;
/// @custom:storage-location erc7201:openzeppelin.storage.ERC721
struct ERC721Storage {
// Token name
string _name;
// Token symbol
string _symbol;
mapping(uint256 tokenId => address) _owners;
mapping(address owner => uint256) _balances;
mapping(uint256 tokenId => address) _tokenApprovals;
mapping(address owner => mapping(address operator => bool)) _operatorApprovals;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC721")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant ERC721StorageLocation =
0x80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300;
function _getERC721Storage() private pure returns (ERC721Storage storage $) {
assembly {
$.slot := ERC721StorageLocation
}
}
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {
__ERC721_init_unchained(name_, symbol_);
}
function __ERC721_init_unchained(string memory name_, string memory symbol_)
internal
onlyInitializing
{
ERC721Storage storage $ = _getERC721Storage();
$._name = name_;
$._symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC165Upgradeable, IERC165)
returns (bool)
{
return interfaceId == type(IERC721).interfaceId
|| interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual returns (uint256) {
ERC721Storage storage $ = _getERC721Storage();
if (owner == address(0)) {
revert ERC721InvalidOwner(address(0));
}
return $._balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual returns (address) {
return _requireOwned(tokenId);
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual returns (string memory) {
ERC721Storage storage $ = _getERC721Storage();
return $._name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual returns (string memory) {
ERC721Storage storage $ = _getERC721Storage();
return $._symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual returns (string memory) {
_requireOwned(tokenId);
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual {
_approve(to, tokenId, _msgSender());
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual returns (address) {
_requireOwned(tokenId);
return _getApproved(tokenId);
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual returns (bool) {
ERC721Storage storage $ = _getERC721Storage();
return $._operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(address from, address to, uint256 tokenId) public virtual {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
// Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists
// (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
address previousOwner = _update(to, tokenId, _msgSender());
if (previousOwner != from) {
revert ERC721IncorrectOwner(from, tokenId, previousOwner);
}
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
virtual
{
transferFrom(from, to, tokenId);
_checkOnERC721Received(from, to, tokenId, data);
}
/**
* @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
*
* IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the
* core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances
* consistent with ownership. The invariant to preserve is that for any address `a` the value returned by
* `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`.
*/
function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
ERC721Storage storage $ = _getERC721Storage();
return $._owners[tokenId];
}
/**
* @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted.
*/
function _getApproved(uint256 tokenId) internal view virtual returns (address) {
ERC721Storage storage $ = _getERC721Storage();
return $._tokenApprovals[tokenId];
}
/**
* @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in
* particular (ignoring whether it is owned by `owner`).
*
* WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
* assumption.
*/
function _isAuthorized(address owner, address spender, uint256 tokenId)
internal
view
virtual
returns (bool)
{
return spender != address(0)
&& (
owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender
);
}
/**
* @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.
* Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets
* the `spender` for the specific `tokenId`.
*
* WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
* assumption.
*/
function _checkAuthorized(address owner, address spender, uint256 tokenId)
internal
view
virtual
{
if (!_isAuthorized(owner, spender, tokenId)) {
if (owner == address(0)) {
revert ERC721NonexistentToken(tokenId);
} else {
revert ERC721InsufficientApproval(spender, tokenId);
}
}
}
/**
* @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
*
* NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that
* a uint256 would ever overflow from increments when these increments are bounded to uint128 values.
*
* WARNING: Increasing an account's balance using this function tends to be paired with an override of the
* {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership
* remain consistent with one another.
*/
function _increaseBalance(address account, uint128 value) internal virtual {
ERC721Storage storage $ = _getERC721Storage();
unchecked {
$._balances[account] += value;
}
}
/**
* @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner
* (or `to`) is the zero address. Returns the owner of the `tokenId` before the update.
*
* The `auth` argument is optional. If the value passed is non 0, then this function will check that
* `auth` is either the owner of the token, or approved to operate on the token (by the owner).
*
* Emits a {Transfer} event.
*
* NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}.
*/
function _update(address to, uint256 tokenId, address auth)
internal
virtual
returns (address)
{
ERC721Storage storage $ = _getERC721Storage();
address from = _ownerOf(tokenId);
// Perform (optional) operator check
if (auth != address(0)) {
_checkAuthorized(from, auth, tokenId);
}
// Execute the update
if (from != address(0)) {
// Clear approval. No need to re-authorize or emit the Approval event
_approve(address(0), tokenId, address(0), false);
unchecked {
$._balances[from] -= 1;
}
}
if (to != address(0)) {
unchecked {
$._balances[to] += 1;
}
}
$._owners[tokenId] = to;
emit Transfer(from, to, tokenId);
return from;
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
address previousOwner = _update(to, tokenId, address(0));
if (previousOwner != address(0)) {
revert ERC721InvalidSender(address(0));
}
}
/**
* @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {
_mint(to, tokenId);
_checkOnERC721Received(address(0), to, tokenId, data);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
* This is an internal function that does not check if the sender is authorized to operate on the token.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal {
address previousOwner = _update(address(0), tokenId, address(0));
if (previousOwner == address(0)) {
revert ERC721NonexistentToken(tokenId);
}
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(address from, address to, uint256 tokenId) internal {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
address previousOwner = _update(to, tokenId, address(0));
if (previousOwner == address(0)) {
revert ERC721NonexistentToken(tokenId);
} else if (previousOwner != from) {
revert ERC721IncorrectOwner(from, tokenId, previousOwner);
}
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients
* are aware of the ERC721 standard to prevent tokens from being forever locked.
*
* `data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is like {safeTransferFrom} in the sense that it invokes
* {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `tokenId` token must exist and be owned by `from`.
* - `to` cannot be the zero address.
* - `from` cannot be the zero address.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(address from, address to, uint256 tokenId) internal {
_safeTransfer(from, to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data)
internal
virtual
{
_transfer(from, to, tokenId);
_checkOnERC721Received(from, to, tokenId, data);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is
* either the owner of the token, or approved to operate on all tokens held by this owner.
*
* Emits an {Approval} event.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address to, uint256 tokenId, address auth) internal {
_approve(to, tokenId, auth, true);
}
/**
* @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not
* emitted in the context of transfers.
*/
function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual {
ERC721Storage storage $ = _getERC721Storage();
// Avoid reading the owner unless necessary
if (emitEvent || auth != address(0)) {
address owner = _requireOwned(tokenId);
// We do not use _isAuthorized because single-token approvals should not be able to call approve
if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) {
revert ERC721InvalidApprover(auth);
}
if (emitEvent) {
emit Approval(owner, to, tokenId);
}
}
$._tokenApprovals[tokenId] = to;
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Requirements:
* - operator can't be the address zero.
*
* Emits an {ApprovalForAll} event.
*/
function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
ERC721Storage storage $ = _getERC721Storage();
if (operator == address(0)) {
revert ERC721InvalidOperator(operator);
}
$._operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).
* Returns the owner.
*
* Overrides to ownership logic should be done to {_ownerOf}.
*/
function _requireOwned(uint256 tokenId) internal view returns (address) {
address owner = _ownerOf(tokenId);
if (owner == address(0)) {
revert ERC721NonexistentToken(tokenId);
}
return owner;
}
/**
* @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the
* recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param data bytes optional data to send along with the call
*/
function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data)
private
{
if (to.code.length > 0) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (
bytes4 retval
) {
if (retval != IERC721Receiver.onERC721Received.selector) {
revert ERC721InvalidReceiver(to);
}
} catch (bytes memory reason) {
if (reason.length == 0) {
revert ERC721InvalidReceiver(to);
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
}
}
// src/escrow/interfaces/IFactory.sol
interface IFactory is ITokenType {
function distributeRewards(
uint256 questId,
address token,
address to,
uint256 amount,
uint256 rewardTokenId,
TokenType tokenType,
uint256 rakeBps
) external;
function withdrawFunds(
uint256 questId,
address to,
address token,
uint256 tokenId,
TokenType tokenType
) external;
function createEscrow(
uint256 questId,
address admin,
address[] memory whitelistedTokens,
address treasury
) external;
function updateEscrowAdmin(uint256 questId, address newAdmin) external;
function addTokenToWhitelist(uint256 questId, address token) external;
function removeTokenFromWhitelist(uint256 questId, address token) external;
function initialize(address admin) external;
}
// src/CUBE.sol
/*
.____ ________
| | _____ ___.__. __________\_____ \
| | \__ \< | |/ __ \_ __ \_(__ <
| |___ / __ \\___ \ ___/| | \/ \
|_______ (____ / ____|\___ >__| /______ /
\/ \/\/ \/ \/
*/
/// @title CUBE
/// @dev Implementation of an NFT smart contract with EIP712 signatures.
/// The contract is upgradeable using OpenZeppelin's UUPSUpgradeable pattern.
/// @custom:oz-upgrades-from CUBE
contract CUBE is
Initializable,
ERC721Upgradeable,
AccessControlUpgradeable,
UUPSUpgradeable,
EIP712Upgradeable,
ReentrancyGuardUpgradeable,
ITokenType
{
using ECDSA for bytes32;
error CUBE__IsNotSigner();
error CUBE__MintingIsNotActive();
error CUBE__FeeNotEnough();
error CUBE__SignatureAndCubesInputMismatch();
error CUBE__WithdrawFailed();
error CUBE__NonceAlreadyUsed();
error CUBE__TransferFailed();
error CUBE__BPSTooHigh();
error CUBE__ExcessiveFeePayout();
error CUBE__ExceedsContractBalance();
error CUBE__QuestNotActive();
uint256 internal s_nextTokenId;
bool public s_isMintingActive;
bytes32 public constant SIGNER_ROLE = keccak256("SIGNER");
bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER");
bytes32 internal constant TX_DATA_HASH =
keccak256("TransactionData(string txHash,string networkChainId)");
bytes32 internal constant RECIPIENT_DATA_HASH =
keccak256("FeeRecipient(address recipient,uint16 BPS)");
bytes32 internal constant REWARD_DATA_HASH = keccak256(
"RewardData(address tokenAddress,uint256 chainId,uint256 amount,uint256 tokenId,uint8 tokenType,uint256 rakeBps,address factoryAddress)"
);
bytes32 internal constant CUBE_DATA_HASH = keccak256(
"CubeData(uint256 questId,uint256 nonce,uint256 price,address toAddress,string walletProvider,string tokenURI,string embedOrigin,TransactionData[] transactions,FeeRecipient[] recipients,RewardData reward)FeeRecipient(address recipient,uint16 BPS)RewardData(address tokenAddress,uint256 chainId,uint256 amount,uint256 tokenId,uint8 tokenType,uint256 rakeBps,address factoryAddress)TransactionData(string txHash,string networkChainId)"
);
mapping(uint256 => uint256) internal s_questIssueNumbers;
mapping(uint256 => string) internal s_tokenURIs;
mapping(uint256 nonce => bool isConsumed) internal s_nonces;
mapping(uint256 => bool) internal s_quests;
enum QuestType {
QUEST,
STREAK
}
enum Difficulty {
BEGINNER,
INTERMEDIATE,
ADVANCED
}
/// @notice Emitted when a new quest is initialized
/// @param questId The unique identifier of the quest
/// @param questType The type of the quest (QUEST, STREAK)
/// @param difficulty The difficulty level of the quest (BEGINNER, INTERMEDIATE, ADVANCED)
/// @param title The title of the quest
/// @param tags An array of tags associated with the quest
/// @param communities An array of communities associated with the quest
event QuestMetadata(
uint256 indexed questId,
QuestType questType,
Difficulty difficulty,
string title,
string[] tags,
string[] communities
);
/// @notice Emitted when a CUBE is claimed
/// @param questId The quest ID associated with the CUBE
/// @param tokenId The token ID of the minted CUBE
/// @param claimer Address of the CUBE claimer
/// @param issueNumber The issue number of the CUBE
/// @param walletProvider The name of the wallet provider used for claiming
/// @param embedOrigin The origin of the embed associated with the CUBE
event CubeClaim(
uint256 indexed questId,
uint256 indexed tokenId,
address indexed claimer,
uint256 issueNumber,
string walletProvider,
string embedOrigin
);
/// @notice Emitted for each transaction associated with a CUBE claim
/// This event is designed to support both EVM and non-EVM blockchains
/// @param cubeTokenId The token ID of the Cube
/// @param txHash The hash of the transaction
/// @param networkChainId The network and chain ID of the transaction in the format <network>:<chain-id>
event CubeTransaction(uint256 indexed cubeTokenId, string txHash, string networkChainId);
/// @notice Emitted when there is a reward associated with a CUBE
/// @param cubeTokenId The token ID of the CUBE giving the reward
/// @param tokenAddress The token address of the reward
/// @param chainId The blockchain chain ID where the transaction occurred
/// @param amount The amount of the reward
/// @param tokenId Token ID of the reward (only applicable for ERC721 and ERC1155)
/// @param tokenType The type of reward token
event TokenReward(
uint256 indexed cubeTokenId,
address indexed tokenAddress,
uint256 indexed chainId,
uint256 amount,
uint256 tokenId,
TokenType tokenType
);
/// @notice Emitted when a fee payout is made
/// @param recipient The address of the payout recipient
/// @param amount The amount of the payout
event FeePayout(address indexed recipient, uint256 amount);
/// @notice Emitted when the minting switch is turned on/off
/// @param isActive The boolean showing if the minting is active or not
event MintingSwitch(bool isActive);
/// @notice Emitted when the contract balance is withdrawn by an admin
/// @param amount The contract's balance that was withdrawn
event ContractWithdrawal(uint256 amount);
event QuestDisabled(uint256 indexed questId);
/// @dev Represents the data needed for minting a CUBE.
/// @param questId The ID of the quest associated with the CUBE
/// @param nonce A unique number to prevent replay attacks
/// @param price The price paid for minting the CUBE
/// @param toAddress The address where the CUBE will be minted
/// @param walletProvider The wallet provider used for the transaction
/// @param tokenURI The URI pointing to the CUBE's metadata
/// @param embedOrigin The origin source of the CUBE's embed content
/// @param transactions An array of transactions related to the CUBE
/// @param recipients An array of recipients for fee payouts
/// @param reward Data about the reward associated with the CUBE
struct CubeData {
uint256 questId;
uint256 nonce;
uint256 price;
address toAddress;
string walletProvider;
string tokenURI;
string embedOrigin;
TransactionData[] transactions;
FeeRecipient[] recipients;
RewardData reward;
}
/// @dev Represents a recipient for fee distribution.
/// @param recipient The address of the fee recipient
/// @param BPS The basis points representing the fee percentage for the recipient
struct FeeRecipient {
address recipient;
uint16 BPS;
}
/// @dev Contains data about the token rewards associated with a CUBE.
/// @param tokenAddress The token address of the reward
/// @param chainId The blockchain chain ID where the transaction occurred
/// @param amount The amount of the reward
/// @param tokenId The token ID
/// @param tokenType The token type
/// @param rakeBps The rake basis points
/// @param factoryAddress The escrow factory address
struct RewardData {
address tokenAddress;
uint256 chainId;
uint256 amount;
uint256 tokenId;
TokenType tokenType;
uint256 rakeBps;
address factoryAddress;
}
/// @dev Contains data about a specific transaction related to a CUBE
/// and is designed to support both EVM and non-EVM data.
/// @param txHash The hash of the transaction
/// @param networkChainId The network and chain ID of the transaction in the format <network>:<chain-id>
struct TransactionData {
string txHash;
string networkChainId;
}
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
/// @notice Returns the version of the CUBE smart contract
function cubeVersion() external pure returns (string memory) {
return "2";
}
/// @notice Initializes the CUBE contract with necessary parameters
/// @dev Sets up the ERC721 token with given name and symbol, and grants initial roles.
/// @param _tokenName Name of the NFT collection
/// @param _tokenSymbol Symbol of the NFT collection
/// @param _signingDomain Domain used for EIP712 signing
/// @param _signatureVersion Version of the EIP712 signature
/// @param _admin Address to be granted the admin roles
function initialize(
string memory _tokenName,
string memory _tokenSymbol,
string memory _signingDomain,
string memory _signatureVersion,
address _admin
) external initializer {
__ERC721_init(_tokenName, _tokenSymbol);
__EIP712_init(_signingDomain, _signatureVersion);
__AccessControl_init();
__UUPSUpgradeable_init();
__ReentrancyGuard_init();
s_isMintingActive = true;
_grantRole(DEFAULT_ADMIN_ROLE, _admin);
}
/// @notice Authorizes an upgrade to a new contract implementation
/// @dev Overrides the UUPSUpgradeable internal function with access control.
/// @param newImplementation Address of the new contract implementation
function _authorizeUpgrade(address newImplementation)
internal
override
onlyRole(UPGRADER_ROLE)
{}
/// @notice Checks whether a quest is active or not
/// @param questId Unique identifier for the quest
function isQuestActive(uint256 questId) public view returns (bool) {
return s_quests[questId];
}
/// @notice Retrieves the URI for a given token
/// @dev Overrides the ERC721Upgradeable's tokenURI method.
/// @param _tokenId The ID of the token
/// @return _tokenURI The URI of the specified token
function tokenURI(uint256 _tokenId) public view override returns (string memory _tokenURI) {
return s_tokenURIs[_tokenId];
}
/// @notice Mints a CUBE based on the provided data
/// @param cubeData CubeData struct containing minting information
/// @param signature Signature of the CubeData struct
function mintCube(CubeData calldata cubeData, bytes calldata signature)
external
payable
nonReentrant
{
// Check if the minting function is currently active. If not, revert the transaction
if (!s_isMintingActive) {
revert CUBE__MintingIsNotActive();
}
// Check if the sent value is at least equal to the calculated total fee
if (msg.value < cubeData.price) {
revert CUBE__FeeNotEnough();
}
_mintCube(cubeData, signature);
}
/// @notice Mints multiple cubes based on provided data and signatures
/// @dev Checks if minting is active, matches cube data with signatures, and processes each mint.
/// @param cubeData Array of CubeData structures containing minting information
/// @param signatures Array of signatures corresponding to each CubeData
function mintCubes(CubeData[] calldata cubeData, bytes[] calldata signatures)
external
payable
nonReentrant
{
// Check if the minting function is currently active. If not, revert the transaction
if (!s_isMintingActive) {
revert CUBE__MintingIsNotActive();
}
// Ensure that each CubeData entry has a corresponding signature
if (cubeData.length != signatures.length) {
revert CUBE__SignatureAndCubesInputMismatch();
}
// Calculate the total fee required for all the minting requests
uint256 totalFee;
for (uint256 i = 0; i < cubeData.length;) {
totalFee = totalFee + cubeData[i].price;
unchecked {
++i;
}
}
// Check if the sent value is at least equal to the calculated total fee
if (msg.value < totalFee) {
revert CUBE__FeeNotEnough();
}
// Loop through each CubeData entry and mint a CUBE
for (uint256 i = 0; i < cubeData.length;) {
_mintCube(cubeData[i], signatures[i]);
unchecked {
++i;
}
}
}
/// @notice Internal function to handle the logic of minting a single cube
/// @dev Verifies the signer, handles nonce, transactions, referral payments, and minting.
/// @param data The CubeData containing details of the minting
/// @param signature The signature for verification
function _mintCube(CubeData calldata data, bytes calldata signature) internal {
// Cache the tokenId
uint256 tokenId = s_nextTokenId;
// Validate the signature to ensure the mint request is authorized
_validateSignature(data, signature);
// Iterate over all the transactions in the mint request and emit events
for (uint256 i = 0; i < data.transactions.length;) {
emit CubeTransaction(
tokenId, data.transactions[i].txHash, data.transactions[i].networkChainId
);
unchecked {
++i;
}
}
// Set the token URI for the CUBE
s_tokenURIs[tokenId] = data.tokenURI;
// Increment the counters for quest completion, issue numbers, and token IDs
unchecked {
++s_questIssueNumbers[data.questId];
++s_nextTokenId;
}
// Process any payouts to fee recipients if applicable
if (data.recipients.length > 0) {
_processPayouts(data);
}
// Perform the actual minting of the CUBE
_safeMint(data.toAddress, tokenId);
// Emit an event indicating a CUBE has been claimed
emit CubeClaim(
data.questId,
tokenId,
data.toAddress,
s_questIssueNumbers[data.questId],
data.walletProvider,
data.embedOrigin
);
if (data.reward.chainId != 0) {
if (data.reward.factoryAddress != address(0)) {
IFactory(data.reward.factoryAddress).distributeRewards(
data.questId,
data.reward.tokenAddress,
data.toAddress,
data.reward.amount,
data.reward.tokenId,
data.reward.tokenType,
data.reward.rakeBps
);
}
emit TokenReward(
tokenId,
data.reward.tokenAddress,
data.reward.chainId,
data.reward.amount,
data.reward.tokenId,
data.reward.tokenType
);
}
}
/// @notice Validates the signature for a Cube minting request
/// @dev Ensures that the signature is from a valid signer and the nonce hasn't been used before
/// @param data The CubeData struct containing minting details
/// @param signature The signature to be validated
function _validateSignature(CubeData calldata data, bytes calldata signature) internal {
address signer = _getSigner(data, signature);
if (!hasRole(SIGNER_ROLE, signer)) {
revert CUBE__IsNotSigner();
}
if (s_nonces[data.nonce]) {
revert CUBE__NonceAlreadyUsed();
}
s_nonces[data.nonce] = true;
}
/// @notice Processes fee payouts to specified recipients
/// @dev Distributes a portion of the minting fee to designated addresses based on their Basis Points (BPS)
/// @param data The CubeData struct containing payout details
function _processPayouts(CubeData calldata data) internal {
uint256 totalAmount;
// max basis points is 10k (100%)
uint16 maxBps = 10_000;
uint256 contractBalance = address(this).balance;
for (uint256 i = 0; i < data.recipients.length;) {
if (data.recipients[i].BPS > maxBps) {
revert CUBE__BPSTooHigh();
}
// Calculate the referral amount for each recipient
uint256 referralAmount = (data.price * data.recipients[i].BPS) / maxBps;
totalAmount = totalAmount + referralAmount;
// Ensure the total payout does not exceed the cube price or contract balance
if (totalAmount > data.price) {
revert CUBE__ExcessiveFeePayout();
}
if (totalAmount > contractBalance) {
revert CUBE__ExceedsContractBalance();
}
// Transfer the referral amount to the recipient
address recipient = data.recipients[i].recipient;
if (recipient != address(0)) {
(bool success,) = recipient.call{value: referralAmount}("");
if (!success) {
revert CUBE__TransferFailed();
}
emit FeePayout(recipient, referralAmount);
}
unchecked {
++i;
}
}
}
/// @notice Recovers the signer's address from the CubeData and its associated signature
/// @dev Utilizes EIP-712 typed data hashing and ECDSA signature recovery
/// @param data The CubeData struct containing the details of the minting request
/// @param sig The signature associated with the CubeData
/// @return The address of the signer who signed the CubeData
function _getSigner(CubeData calldata data, bytes calldata sig)
internal
view
returns (address)
{
bytes32 digest = _computeDigest(data);
return digest.recover(sig);
}
/// @notice Internal function to compute the EIP712 digest for CubeData
/// @dev Generates the digest that must be signed by the signer.
/// @param data The CubeData to generate a digest for
/// @return The computed EIP712 digest
function _computeDigest(CubeData calldata data) internal view returns (bytes32) {
return _hashTypedDataV4(keccak256(_getStructHash(data)));
}
/// @notice Internal function to generate the struct hash for CubeData
/// @dev Encodes the CubeData struct into a hash as per EIP712 standard.
/// @param data The CubeData struct to hash
/// @return A hash representing the encoded CubeData
function _getStructHash(CubeData calldata data) internal pure returns (bytes memory) {
return abi.encode(
CUBE_DATA_HASH,
data.questId,
data.nonce,
data.price,
data.toAddress,
_encodeString(data.walletProvider),
_encodeString(data.tokenURI),
_encodeString(data.embedOrigin),
_encodeCompletedTxs(data.transactions),
_encodeRecipients(data.recipients),
_encodeReward(data.reward)
);
}
/// @notice Encodes a string into a bytes32 hash
/// @dev Used for converting strings into a consistent format for EIP712 encoding
/// @param _string The string to be encoded
/// @return The keccak256 hash of the encoded string
function _encodeString(string calldata _string) internal pure returns (bytes32) {
return keccak256(bytes(_string));
}
/// @notice Encodes a transaction data into a byte array
/// @dev Used for converting transaction data into a consistent format for EIP712 encoding
/// @param transaction The TransactionData struct to be encoded
/// @return A byte array representing the encoded transaction data
function _encodeTx(TransactionData calldata transaction) internal pure returns (bytes memory) {
return abi.encode(
TX_DATA_HASH,
_encodeString(transaction.txHash),
_encodeString(transaction.networkChainId)
);
}
/// @notice Encodes an array of transaction data into a single bytes32 hash
/// @dev Used to aggregate multiple transactions into a single hash for EIP712 encoding
/// @param txData An array of TransactionData structs to be encoded
/// @return A bytes32 hash representing the aggregated and encoded transaction data
function _encodeCompletedTxs(TransactionData[] calldata txData)
internal
pure
returns (bytes32)
{
bytes32[] memory encodedTxs = new bytes32[](txData.length);
for (uint256 i = 0; i < txData.length;) {
encodedTxs[i] = keccak256(_encodeTx(txData[i]));
unchecked {
++i;
}
}
return keccak256(abi.encodePacked(encodedTxs));
}
/// @notice Encodes a fee recipient data into a byte array
/// @dev Used for converting fee recipient information into a consistent format for EIP712 encoding
/// @param data The FeeRecipient struct to be encoded
/// @return A byte array representing the encoded fee recipient data
function _encodeRecipient(FeeRecipient calldata data) internal pure returns (bytes memory) {
return abi.encode(RECIPIENT_DATA_HASH, data.recipient, data.BPS);
}
/// @notice Encodes an array of fee recipient data into a single bytes32 hash
/// @dev Used to aggregate multiple fee recipient entries into a single hash for EIP712 encoding
/// @param data An array of FeeRecipient structs to be encoded
/// @return A bytes32 hash representing the aggregated and encoded fee recipient data
function _encodeRecipients(FeeRecipient[] calldata data) internal pure returns (bytes32) {
bytes32[] memory encodedRecipients = new bytes32[](data.length);
for (uint256 i = 0; i < data.length;) {
encodedRecipients[i] = keccak256(_encodeRecipient(data[i]));
unchecked {
++i;
}
}
return keccak256(abi.encodePacked(encodedRecipients));
}
/// @notice Encodes the reward data for a CUBE mint
/// @param data An array of FeeRecipient structs to be encoded
/// @return A bytes32 hash representing the encoded reward data
function _encodeReward(RewardData calldata data) internal pure returns (bytes32) {
return keccak256(
abi.encode(
REWARD_DATA_HASH,
data.tokenAddress,
data.chainId,
data.amount,
data.tokenId,
data.tokenType,
data.rakeBps,
data.factoryAddress
)
);
}
/// @notice Enables or disables the minting process
/// @dev Can only be called by an account with the default admin role.
/// @param _isMintingActive Boolean indicating whether minting should be active
function setIsMintingActive(bool _isMintingActive) external onlyRole(DEFAULT_ADMIN_ROLE) {
s_isMintingActive = _isMintingActive;
emit MintingSwitch(_isMintingActive);
}
/// @notice Withdraws the contract's balance to the message sender
/// @dev Can only be called by an account with the default admin role.
function withdraw() external onlyRole(DEFAULT_ADMIN_ROLE) {
(bool success,) = msg.sender.call{value: address(this).balance}("");
if (!success) {
revert CUBE__WithdrawFailed();
}
emit ContractWithdrawal(address(this).balance);
}
/// @notice Initializes a new quest with given parameters
/// @dev Can only be called by an account with the signer role.
/// @param questId Unique identifier for the quest
/// @param communities Array of community names associated with the quest
/// @param title Title of the quest
/// @param difficulty Difficulty level of the quest
/// @param questType Type of the quest
function initializeQuest(
uint256 questId,
string[] memory communities,
string memory title,
Difficulty difficulty,
QuestType questType,
string[] memory tags
) external onlyRole(SIGNER_ROLE) {
s_quests[questId] = true;
emit QuestMetadata(questId, questType, difficulty, title, tags, communities);
}
/// @notice Unpublishes and disables a quest
/// @dev Can only be called by an account with the signer role
/// @param questId Unique identifier for the quest
function unpublishQuest(uint256 questId) external onlyRole(SIGNER_ROLE) {
s_quests[questId] = false;
emit QuestDisabled(questId);
}
/// @notice Checks if the contract implements an interface
/// @dev Overrides the supportsInterface function of ERC721Upgradeable and AccessControlUpgradeable.
/// @param interfaceId The interface identifier, as specified in ERC-165
/// @return True if the contract implements the interface, false otherwise
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721Upgradeable, AccessControlUpgradeable)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"CUBE__BPSTooHigh","type":"error"},{"inputs":[],"name":"CUBE__ExceedsContractBalance","type":"error"},{"inputs":[],"name":"CUBE__ExcessiveFeePayout","type":"error"},{"inputs":[],"name":"CUBE__FeeNotEnough","type":"error"},{"inputs":[],"name":"CUBE__IsNotSigner","type":"error"},{"inputs":[],"name":"CUBE__MintingIsNotActive","type":"error"},{"inputs":[],"name":"CUBE__NonceAlreadyUsed","type":"error"},{"inputs":[],"name":"CUBE__QuestNotActive","type":"error"},{"inputs":[],"name":"CUBE__SignatureAndCubesInputMismatch","type":"error"},{"inputs":[],"name":"CUBE__TransferFailed","type":"error"},{"inputs":[],"name":"CUBE__WithdrawFailed","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ContractWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"questId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"uint256","name":"issueNumber","type":"uint256"},{"indexed":false,"internalType":"string","name":"walletProvider","type":"string"},{"indexed":false,"internalType":"string","name":"embedOrigin","type":"string"}],"name":"CubeClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"cubeTokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"txHash","type":"string"},{"indexed":false,"internalType":"string","name":"networkChainId","type":"string"}],"name":"CubeTransaction","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeePayout","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"MintingSwitch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"questId","type":"uint256"}],"name":"QuestDisabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"questId","type":"uint256"},{"indexed":false,"internalType":"enum CUBE.QuestType","name":"questType","type":"uint8"},{"indexed":false,"internalType":"enum CUBE.Difficulty","name":"difficulty","type":"uint8"},{"indexed":false,"internalType":"string","name":"title","type":"string"},{"indexed":false,"internalType":"string[]","name":"tags","type":"string[]"},{"indexed":false,"internalType":"string[]","name":"communities","type":"string[]"}],"name":"QuestMetadata","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":"uint256","name":"cubeTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"enum ITokenType.TokenType","name":"tokenType","type":"uint8"}],"name":"TokenReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cubeVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","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":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"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":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"string","name":"_signingDomain","type":"string"},{"internalType":"string","name":"_signatureVersion","type":"string"},{"internalType":"address","name":"_admin","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"questId","type":"uint256"},{"internalType":"string[]","name":"communities","type":"string[]"},{"internalType":"string","name":"title","type":"string"},{"internalType":"enum CUBE.Difficulty","name":"difficulty","type":"uint8"},{"internalType":"enum CUBE.QuestType","name":"questType","type":"uint8"},{"internalType":"string[]","name":"tags","type":"string[]"}],"name":"initializeQuest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"questId","type":"uint256"}],"name":"isQuestActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"questId","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"string","name":"walletProvider","type":"string"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"string","name":"embedOrigin","type":"string"},{"components":[{"internalType":"string","name":"txHash","type":"string"},{"internalType":"string","name":"networkChainId","type":"string"}],"internalType":"struct CUBE.TransactionData[]","name":"transactions","type":"tuple[]"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"BPS","type":"uint16"}],"internalType":"struct CUBE.FeeRecipient[]","name":"recipients","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ITokenType.TokenType","name":"tokenType","type":"uint8"},{"internalType":"uint256","name":"rakeBps","type":"uint256"},{"internalType":"address","name":"factoryAddress","type":"address"}],"internalType":"struct CUBE.RewardData","name":"reward","type":"tuple"}],"internalType":"struct CUBE.CubeData","name":"cubeData","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintCube","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"questId","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"string","name":"walletProvider","type":"string"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"string","name":"embedOrigin","type":"string"},{"components":[{"internalType":"string","name":"txHash","type":"string"},{"internalType":"string","name":"networkChainId","type":"string"}],"internalType":"struct CUBE.TransactionData[]","name":"transactions","type":"tuple[]"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"BPS","type":"uint16"}],"internalType":"struct CUBE.FeeRecipient[]","name":"recipients","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ITokenType.TokenType","name":"tokenType","type":"uint8"},{"internalType":"uint256","name":"rakeBps","type":"uint256"},{"internalType":"address","name":"factoryAddress","type":"address"}],"internalType":"struct CUBE.RewardData","name":"reward","type":"tuple"}],"internalType":"struct CUBE.CubeData[]","name":"cubeData","type":"tuple[]"},{"internalType":"bytes[]","name":"signatures","type":"bytes[]"}],"name":"mintCubes","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","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":[],"name":"s_isMintingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isMintingActive","type":"bool"}],"name":"setIsMintingActive","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":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"questId","type":"uint256"}],"name":"unpublishQuest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a0604052306080523480156200001557600080fd5b506200002062000026565b620000da565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000775760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000d75780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161463162000104600039600081816117ac015281816117d501526119a701526146316000f3fe6080604052600436106102345760003560e01c806386954d5b11610138578063ad170ff7116100b0578063d123b4d81161007f578063e985e9c511610064578063e985e9c51461070a578063f72c0d8b14610772578063f907497c146107a657600080fd5b8063d123b4d8146106d7578063d547741f146106ea57600080fd5b8063ad170ff71461062e578063ad3cb1cc1461064e578063b88d4fde14610697578063c87b56dd146106b757600080fd5b8063a1ebf35d11610107578063a22cb465116100ec578063a22cb465146105d4578063a35d3d86146105f4578063aab416011461061457600080fd5b8063a1ebf35d1461058b578063a217fddf146105bf57600080fd5b806386954d5b146104ce57806389e7217e146104fe57806391d148541461051157806395d89b411461057657600080fd5b80632f2ff15d116101cb5780634f1ef2861161019a5780636352211e1161017f5780636352211e1461046657806370a082311461048657806384b0196e146104a657600080fd5b80634f1ef2861461043e57806352d1902d1461045157600080fd5b80632f2ff15d146103c957806336568abe146103e95780633ccfd60b1461040957806342842e0e1461041e57600080fd5b8063095ea7b311610207578063095ea7b31461030a57806323b872dd1461032c578063248a9ca31461034c5780632e640024146103a957600080fd5b806301ffc9a71461023957806302e4da091461026e57806306fdde03146102bd578063081812fc146102d2575b600080fd5b34801561024557600080fd5b5061025961025436600461360d565b6107c6565b60405190151581526020015b60405180910390f35b34801561027a57600080fd5b5060408051808201909152600181527f320000000000000000000000000000000000000000000000000000000000000060208201525b604051610265919061367a565b3480156102c957600080fd5b506102b06107d7565b3480156102de57600080fd5b506102f26102ed36600461368d565b61088d565b6040516001600160a01b039091168152602001610265565b34801561031657600080fd5b5061032a6103253660046136c2565b6108d5565b005b34801561033857600080fd5b5061032a6103473660046136ec565b6108e4565b34801561035857600080fd5b5061039b61036736600461368d565b60009081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b604051908152602001610265565b3480156103b557600080fd5b5061032a6103c43660046137f8565b6109a6565b3480156103d557600080fd5b5061032a6103e43660046138b6565b610b65565b3480156103f557600080fd5b5061032a6104043660046138b6565b610ba9565b34801561041557600080fd5b5061032a610bfa565b34801561042a57600080fd5b5061032a6104393660046136ec565b610cbf565b61032a61044c3660046138e2565b610cda565b34801561045d57600080fd5b5061039b610cf5565b34801561047257600080fd5b506102f261048136600461368d565b610d24565b34801561049257600080fd5b5061039b6104a1366004613930565b610d2f565b3480156104b257600080fd5b506104bb610db6565b604051610265979695949392919061394b565b3480156104da57600080fd5b506102596104e936600461368d565b60009081526005602052604090205460ff1690565b61032a61050c366004613a49565b610eb2565b34801561051d57600080fd5b5061025961052c3660046138b6565b60009182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561058257600080fd5b506102b0611040565b34801561059757600080fd5b5061039b7f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca4081565b3480156105cb57600080fd5b5061039b600081565b3480156105e057600080fd5b5061032a6105ef366004613ac5565b611091565b34801561060057600080fd5b5061032a61060f366004613aef565b61109c565b34801561062057600080fd5b506001546102599060ff1681565b34801561063a57600080fd5b5061032a61064936600461368d565b6110e8565b34801561065a57600080fd5b506102b06040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b3480156106a357600080fd5b5061032a6106b2366004613b0a565b611153565b3480156106c357600080fd5b506102b06106d236600461368d565b61116a565b61032a6106e5366004613b72565b61120c565b3480156106f657600080fd5b5061032a6107053660046138b6565b6112c2565b34801561071657600080fd5b50610259610725366004613c12565b6001600160a01b0391821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b34801561077e57600080fd5b5061039b7fa615a8afb6fffcb8c6809ac0997b5c9c12b8cc97651150f14c8f6203168cff4c81565b3480156107b257600080fd5b5061032a6107c1366004613cea565b611306565b60006107d182611394565b92915050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300805460609190819061080990613da5565b80601f016020809104026020016040519081016040528092919081815260200182805461083590613da5565b80156108825780601f1061085757610100808354040283529160200191610882565b820191906000526020600020905b81548152906001019060200180831161086557829003601f168201915b505050505091505090565b6000610898826113ea565b5060008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b03166107d1565b6108e082823361145b565b5050565b6001600160a01b03821661092c576040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b6000610939838333611468565b9050836001600160a01b0316816001600160a01b0316146109a0576040517f64283d7b0000000000000000000000000000000000000000000000000000000081526001600160a01b0380861660048301526024820184905282166044820152606401610923565b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156109f15750825b905060008267ffffffffffffffff166001148015610a0e5750303b155b905081158015610a1c575080155b15610a53576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315610ab45784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b610abe8a8a6115e1565b610ac888886115f3565b610ad0611605565b610ad8611605565b610ae061160f565b6001805460ff191681179055610af760008761161f565b508315610b595784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526040902060010154610b9f816116ee565b6109a0838361161f565b6001600160a01b0381163314610beb576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bf582826116fb565b505050565b6000610c05816116ee565b604051600090339047908381818185875af1925050503d8060008114610c47576040519150601f19603f3d011682016040523d82523d6000602084013e610c4c565b606091505b5050905080610c87576040517f2baafbf900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040514781527f6c9cf7ce96a10a51ae8b3fc5aca25e4754a77b3e821c133c5cebb1d30abe7e8e906020015b60405180910390a15050565b610bf583838360405180602001604052806000815250611153565b610ce26117a1565b610ceb82611871565b6108e0828261189b565b6000610cff61199c565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b60006107d1826113ea565b60007f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793006001600160a01b038316610d95576040517f89c62b6400000000000000000000000000000000000000000000000000000000815260006004820152602401610923565b6001600160a01b039092166000908152600390920160205250604090205490565b600060608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1008054909150158015610df557506001810154155b610e5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a656400000000000000000000006044820152606401610923565b610e636119fe565b610e6b611a4f565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b610eba611aa0565b60015460ff16610ef6576040517f9d2c8e7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828114610f2f576040517fc70ea82800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b84811015610f7757858582818110610f4d57610f4d613df8565b9050602002810190610f5f9190613e27565b610f6d906040013583613e94565b9150600101610f33565b5080341015610fb2576040517fea259f9100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b848110156110155761100d868683818110610fd257610fd2613df8565b9050602002810190610fe49190613e27565b858584818110610ff657610ff6613df8565b90506020028101906110089190613ea7565b611b21565b600101610fb5565b50506109a060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930180546060917f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793009161080990613da5565b6108e0338383611eaf565b60006110a7816116ee565b6001805460ff19168315159081179091556040519081527f7d16763644b2f7d5a11e2b05fe3a9cc4edb4568049295f4e62024269ae2f6eab90602001610cb3565b7f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca40611112816116ee565b600082815260056020526040808220805460ff191690555183917f5de3fc4fb6d1f5f0d44014df7fcc3824b081ef3fc3946a361a7cc926a499035191a25050565b61115e8484846108e4565b6109a084848484611f8b565b600081815260036020526040902080546060919061118790613da5565b80601f01602080910402602001604051908101604052809291908181526020018280546111b390613da5565b80156112005780601f106111d557610100808354040283529160200191611200565b820191906000526020600020905b8154815290600101906020018083116111e357829003601f168201915b50505050509050919050565b611214611aa0565b60015460ff16611250576040517f9d2c8e7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826040013534101561128e576040517fea259f9100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611299838383611b21565b610bf560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260409020600101546112fc816116ee565b6109a083836116fb565b7f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca40611330816116ee565b60008781526005602052604090819020805460ff191660011790555187907f8a2c815542d43af541960cd9124f5ec6a55c4b8c69f0dda02ed413b401e309cd9061138390869088908a9088908d90613f90565b60405180910390a250505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806107d157506107d182612130565b60008181527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260408120546001600160a01b0316806107d1576040517f7e27328900000000000000000000000000000000000000000000000000000000815260048101849052602401610923565b610bf58383836001612213565b60008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260408120547f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300906001600160a01b03908116908416156114d6576114d68185876123aa565b6001600160a01b03811615611534576114f3600086600080612213565b6001600160a01b0381166000908152600383016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190555b6001600160a01b03861615611565576001600160a01b03861660009081526003830160205260409020805460010190555b600085815260028301602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a49150505b9392505050565b6115e9612440565b6108e082826124a7565b6115fb612440565b6108e082826124ea565b61160d612440565b565b611617612440565b61160d61255d565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff166116e4576000848152602082815260408083206001600160a01b03871684529091529020805460ff1916600117905561169a3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506107d1565b60009150506107d1565b6116f88133612565565b50565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16156116e4576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506107d1565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061183a57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661182e7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b1561160d576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa615a8afb6fffcb8c6809ac0997b5c9c12b8cc97651150f14c8f6203168cff4c6108e0816116ee565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156118f5575060408051601f3d908101601f191682019092526118f291810190613ff5565b60015b611936576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610923565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114611992576040517faa1d49a400000000000000000000000000000000000000000000000000000000815260048101829052602401610923565b610bf583836125f2565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461160d576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1009161080990613da5565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1009161080990613da5565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01611b1b576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b600054611b2f848484612648565b60005b611b3f60e086018661400e565b9050811015611c0057817fabd48d213cb20ec6f191e95c191131c8fc3832f194f53febcb53d4834baae507611b7760e088018861400e565b84818110611b8757611b87613df8565b9050602002810190611b999190614076565b611ba39080613ea7565b611bb060e08a018a61400e565b86818110611bc057611bc0613df8565b9050602002810190611bd29190614076565b611be0906020810190613ea7565b604051611bf094939291906140d5565b60405180910390a2600101611b32565b50611c0e60a0850185613ea7565b600083815260036020526040902091611c28919083614155565b5083356000908152600260205260408120805460019081019091558154018155611c56610100860186614251565b90501115611c6757611c678461273c565b611c80611c7a6080860160608701613930565b826129d4565b611c906080850160608601613930565b84356000818152600260205260409020546001600160a01b0392909216918391907ffe94555d033bd3fc0f75671674d030640f03095d8345426fcab3a9a0bffdc4fb90611ce060808a018a613ea7565b611ced60c08c018c613ea7565b604051611cfe9594939291906142b9565b60405180910390a4610140840135156109a0576000611d2561020086016101e08701613930565b6001600160a01b031614611e0d57611d4561020085016101e08601613930565b6001600160a01b031663e836239c8535611d6761014088016101208901613930565b611d776080890160608a01613930565b6101608901356101808a0135611d956101c08c016101a08d016142e6565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b168152611dda969594939291906101c08e01359060040161431b565b600060405180830381600087803b158015611df457600080fd5b505af1158015611e08573d6000803e3d6000fd5b505050505b6101408401803590611e23906101208701613930565b6001600160a01b0316827f6d6039156ec873b5c217b996d727775a9eea208e1329e87aaa4b617c76d2bb94610160880135610180890135611e6c6101c08b016101a08c016142e6565b604051611e7b93929190614366565b60405180910390a450505050565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793006001600160a01b038316611f1b576040517f5b08ba180000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610923565b6001600160a01b038481166000818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b6001600160a01b0383163b156109a0576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0384169063150b7a0290611fe6903390889087908790600401614381565b6020604051808303816000875af1925050508015612021575060408051601f3d908101601f1916820190925261201e918101906143bd565b60015b6120a3573d80801561204f576040519150601f19603f3d011682016040523d82523d6000602084013e612054565b606091505b50805160000361209b576040517f64a0ae920000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610923565b805181602001fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081167f150b7a020000000000000000000000000000000000000000000000000000000014612129576040517f64a0ae920000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610923565b5050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806121c357507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806107d157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146107d1565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300818061224857506001600160a01b03831615155b15612361576000612258856113ea565b90506001600160a01b038416158015906122845750836001600160a01b0316816001600160a01b031614155b80156122d557506001600160a01b0380821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602090815260408083209388168352929052205460ff16155b15612317576040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610923565b821561235f5784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b600093845260040160205250506040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6123b58383836129ee565b610bf5576001600160a01b0383166123fc576040517f7e27328900000000000000000000000000000000000000000000000000000000815260048101829052602401610923565b6040517f177e802f0000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015260248101829052604401610923565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1661160d576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6124af612440565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300806124db84826143da565b50600181016109a083826143da565b6124f2612440565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10261253e84826143da565b506003810161254d83826143da565b5060008082556001909101555050565b611e89612440565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408083206001600160a01b038516845290915290205460ff166108e0576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b038216600482015260248101839052604401610923565b6125fb82612ab2565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561264057610bf58282612b5a565b6108e0612bd0565b6000612655848484612c08565b6001600160a01b03811660009081527fbc6704768de17ac743a4c41122099f7a3464fc20363467b8527e22c7572f5d3a602052604090205490915060ff166126c9576040517f0f3c13fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208085013560009081526004909152604090205460ff1615612718576040517f76abf21400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050506020908101356000908152600490915260409020805460ff19166001179055565b600061271047825b612752610100860186614251565b90508110156121295761ffff831661276e610100870187614251565b8381811061277e5761277e613df8565b905060400201602001602081019061279691906144d6565b61ffff1611156127d2576040517f635015ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061ffff84166127e7610100880188614251565b848181106127f7576127f7613df8565b905060400201602001602081019061280f91906144d6565b6128219061ffff1660408901356144fa565b61282b9190614511565b90506128378186613e94565b94508560400135851115612877576040517fcc3b3ebc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828511156128b1576040517f2c2cae9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006128c1610100880188614251565b848181106128d1576128d1613df8565b6128e79260206040909202019081019150613930565b90506001600160a01b038116156129ca576000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114612945576040519150601f19603f3d011682016040523d82523d6000602084013e61294a565b606091505b5050905080612985576040517f7327470c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816001600160a01b03167fc9a9861643a061bfa3739f3b26e5d64578cd78bb863dbd5dac0aca396728d9a7846040516129c091815260200190565b60405180910390a2505b5050600101612744565b6108e0828260405180602001604052806000815250612c58565b60006001600160a01b03831615801590612aaa5750826001600160a01b0316846001600160a01b03161480612a6757506001600160a01b0380851660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602090815260408083209387168352929052205460ff165b80612aaa575060008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b038481169116145b949350505050565b806001600160a01b03163b600003612b01576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602401610923565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051612b77919061454c565b600060405180830381855af49150503d8060008114612bb2576040519150601f19603f3d011682016040523d82523d6000602084013e612bb7565b606091505b5091509150612bc7858383612c6f565b95945050505050565b341561160d576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c1485612ce4565b9050612bc784848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508593925050612cfe9050565b612c628383612d28565b610bf56000848484611f8b565b606082612c8457612c7f82612dbf565b6115da565b8151158015612c9b57506001600160a01b0384163b155b15612cdd576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610923565b50806115da565b60006107d1612cf283612e01565b80519060200120612f1e565b600080600080612d0e8686612f66565b925092509250612d1e8282612fb3565b5090949350505050565b6001600160a01b038216612d6b576040517f64a0ae9200000000000000000000000000000000000000000000000000000000815260006004820152602401610923565b6000612d7983836000611468565b90506001600160a01b03811615610bf5576040517f73c6ac6e00000000000000000000000000000000000000000000000000000000815260006004820152602401610923565b805115612dcf5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60607fe078867cdfa0acd2e4d8e43793b771c2d3670af784116b0765aa2425c5bbb021823560208401356040850135612e3f60808701878701613930565b612e54612e4f6080890189613ea7565b6130b7565b612e64612e4f60a08a018a613ea7565b612e74612e4f60c08b018b613ea7565b612e89612e8460e08c018c61400e565b6130d9565b612e9f612e9a6101008d018d614251565b6131b5565b612eac8c61012001613254565b60408051602081019c909c528b019990995260608a019790975260808901959095526001600160a01b0390931660a088015260c087019190915260e0860152610100850152610120840152610140830152610160820152610180015b6040516020818303038152906040529050919050565b60006107d1612f2b6132ec565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b60008060008351604103612fa05760208401516040850151606086015160001a612f92888285856132fb565b955095509550505050612fac565b50508151600091506002905b9250925092565b6000826003811115612fc757612fc7613f0c565b03612fd0575050565b6001826003811115612fe457612fe4613f0c565b0361301b576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282600381111561302f5761302f613f0c565b03613069576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610923565b600382600381111561307d5761307d613f0c565b036108e0576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610923565b600082826040516130c992919061455e565b6040518091039020905092915050565b6000808267ffffffffffffffff8111156130f5576130f5613728565b60405190808252806020026020018201604052801561311e578160200160208202803683370190505b50905060005b838110156131845761315885858381811061314157613141613df8565b90506020028101906131539190614076565b6133ca565b8051906020012082828151811061317157613171613df8565b6020908102919091010152600101613124565b5080604051602001613196919061456e565b6040516020818303038152906040528051906020012091505092915050565b6000808267ffffffffffffffff8111156131d1576131d1613728565b6040519080825280602002602001820160405280156131fa578160200160208202803683370190505b50905060005b838110156131845761322885858381811061321d5761321d613df8565b905060400201613429565b8051906020012082828151811061324157613241613df8565b6020908102919091010152600101613200565b60007f07dcd7fc8540e6630daaa95c4bf6d1951796f3e22e2e1c1bcbdbd5055c7ab37c6132846020840184613930565b6020840135604085013560608601356132a360a08801608089016142e6565b60a08801356132b860e08a0160c08b01613930565b6040516020016132cf9897969594939291906145a4565b604051602081830303815290604052805190602001209050919050565b60006132f6613499565b905090565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561333657506000915060039050826133c0565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561338a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166133b6575060009250600191508290506133c0565b9250600091508190505b9450945094915050565b60607f93dc1bac6b117acdbb889b9a825b9bc731449f703cc02b69049722fcba5dbe346133fa612e4f8480613ea7565b61340a612e4f6020860186613ea7565b6040805160208101949094528301919091526060820152608001612f08565b60607fdf3d1189f68f42c28f9fad9d69ff7a974d0a800a2e4420ed400e45a46d2fac2f6134596020840184613930565b61346960408501602086016144d6565b604051602001612f08939291909283526001600160a01b0391909116602083015261ffff16604082015260600190565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6134c461350d565b6134cc613589565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816135396119fe565b80519091501561355157805160209091012092915050565b81548015613560579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816135b5611a4f565b8051909150156135cd57805160209091012092915050565b60018201548015613560579392505050565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146116f857600080fd5b60006020828403121561361f57600080fd5b81356115da816135df565b60005b8381101561364557818101518382015260200161362d565b50506000910152565b6000815180845261366681602086016020860161362a565b601f01601f19169290920160200192915050565b6020815260006115da602083018461364e565b60006020828403121561369f57600080fd5b5035919050565b80356001600160a01b03811681146136bd57600080fd5b919050565b600080604083850312156136d557600080fd5b6136de836136a6565b946020939093013593505050565b60008060006060848603121561370157600080fd5b61370a846136a6565b9250613718602085016136a6565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561378057613780613728565b604052919050565b600082601f83011261379957600080fd5b813567ffffffffffffffff8111156137b3576137b3613728565b6137c66020601f19601f84011601613757565b8181528460208386010111156137db57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561381057600080fd5b853567ffffffffffffffff8082111561382857600080fd5b61383489838a01613788565b9650602088013591508082111561384a57600080fd5b61385689838a01613788565b9550604088013591508082111561386c57600080fd5b61387889838a01613788565b9450606088013591508082111561388e57600080fd5b5061389b88828901613788565b9250506138aa608087016136a6565b90509295509295909350565b600080604083850312156138c957600080fd5b823591506138d9602084016136a6565b90509250929050565b600080604083850312156138f557600080fd5b6138fe836136a6565b9150602083013567ffffffffffffffff81111561391a57600080fd5b61392685828601613788565b9150509250929050565b60006020828403121561394257600080fd5b6115da826136a6565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e08184015261398760e084018a61364e565b8381036040850152613999818a61364e565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b818110156139eb578351835292840192918401916001016139cf565b50909c9b505050505050505050505050565b60008083601f840112613a0f57600080fd5b50813567ffffffffffffffff811115613a2757600080fd5b6020830191508360208260051b8501011115613a4257600080fd5b9250929050565b60008060008060408587031215613a5f57600080fd5b843567ffffffffffffffff80821115613a7757600080fd5b613a83888389016139fd565b90965094506020870135915080821115613a9c57600080fd5b50613aa9878288016139fd565b95989497509550505050565b803580151581146136bd57600080fd5b60008060408385031215613ad857600080fd5b613ae1836136a6565b91506138d960208401613ab5565b600060208284031215613b0157600080fd5b6115da82613ab5565b60008060008060808587031215613b2057600080fd5b613b29856136a6565b9350613b37602086016136a6565b925060408501359150606085013567ffffffffffffffff811115613b5a57600080fd5b613b6687828801613788565b91505092959194509250565b600080600060408486031215613b8757600080fd5b833567ffffffffffffffff80821115613b9f57600080fd5b908501906102008288031215613bb457600080fd5b90935060208501359080821115613bca57600080fd5b818601915086601f830112613bde57600080fd5b813581811115613bed57600080fd5b876020828501011115613bff57600080fd5b6020830194508093505050509250925092565b60008060408385031215613c2557600080fd5b613c2e836136a6565b91506138d9602084016136a6565b600082601f830112613c4d57600080fd5b8135602067ffffffffffffffff80831115613c6a57613c6a613728565b8260051b613c79838201613757565b9384528581018301938381019088861115613c9357600080fd5b84880192505b85831015613ccf57823584811115613cb15760008081fd5b613cbf8a87838c0101613788565b8352509184019190840190613c99565b98975050505050505050565b8035600281106136bd57600080fd5b60008060008060008060c08789031215613d0357600080fd5b86359550602087013567ffffffffffffffff80821115613d2257600080fd5b613d2e8a838b01613c3c565b96506040890135915080821115613d4457600080fd5b613d508a838b01613788565b95506060890135915060038210613d6657600080fd5b819450613d7560808a01613cdb565b935060a0890135915080821115613d8b57600080fd5b50613d9889828a01613c3c565b9150509295509295509295565b600181811c90821680613db957607f821691505b602082108103613df2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01833603018112613e5b57600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156107d1576107d1613e65565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613edc57600080fd5b83018035915067ffffffffffffffff821115613ef757600080fd5b602001915036819003821315613a4257600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600081518084526020808501808196508360051b8101915082860160005b85811015613f83578284038952613f7184835161364e565b98850198935090840190600101613f59565b5091979650505050505050565b600060028710613fa257613fa2613f0c565b86825260038610613fb557613fb5613f0c565b85602083015260a06040830152613fcf60a083018661364e565b8281036060840152613fe18186613f3b565b90508281036080840152613ccf8185613f3b565b60006020828403121561400757600080fd5b5051919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261404357600080fd5b83018035915067ffffffffffffffff82111561405e57600080fd5b6020019150600581901b3603821315613a4257600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112613e5b57600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b6040815260006140e96040830186886140aa565b82810360208401526140fc8185876140aa565b979650505050505050565b601f821115610bf557600081815260208120601f850160051c8101602086101561412e5750805b601f850160051c820191505b8181101561414d5782815560010161413a565b505050505050565b67ffffffffffffffff83111561416d5761416d613728565b6141818361417b8354613da5565b83614107565b6000601f8411600181146141d3576000851561419d5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355612129565b600083815260209020601f19861690835b8281101561420457868501358255602094850194600190920191016141e4565b508682101561423f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261428657600080fd5b83018035915067ffffffffffffffff8211156142a157600080fd5b6020019150600681901b3603821315613a4257600080fd5b8581526060602082015260006142d36060830186886140aa565b8281036040840152613ccf8185876140aa565b6000602082840312156142f857600080fd5b8135600481106115da57600080fd5b6004811061431757614317613f0c565b9052565b8781526001600160a01b03878116602083015286166040820152606081018590526080810184905260e0810161435460a0830185614307565b8260c083015298975050505050505050565b8381526020810183905260608101612aaa6040830184614307565b60006001600160a01b038087168352808616602084015250836040830152608060608301526143b3608083018461364e565b9695505050505050565b6000602082840312156143cf57600080fd5b81516115da816135df565b815167ffffffffffffffff8111156143f4576143f4613728565b614408816144028454613da5565b84614107565b602080601f83116001811461445b57600084156144255750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561414d565b600085815260208120601f198616915b8281101561448a5788860151825594840194600190910190840161446b565b50858210156144c657878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156144e857600080fd5b813561ffff811681146115da57600080fd5b80820281158282048414176107d1576107d1613e65565b600082614547577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008251613e5b81846020870161362a565b8183823760009101908152919050565b815160009082906020808601845b838110156145985781518552938201939082019060010161457c565b50929695505050505050565b6000610100820190508982526001600160a01b03808a1660208401528860408401528760608401528660808401526145df60a0840187614307565b8460c084015280841660e084015250999850505050505050505056fea2646970667358221220cce68c050e730a1dd7997428d1c036ada487ef84a100a2cfd78c4c8dd0e8a8c864736f6c63430008140033
Deployed Bytecode
0x6080604052600436106102345760003560e01c806386954d5b11610138578063ad170ff7116100b0578063d123b4d81161007f578063e985e9c511610064578063e985e9c51461070a578063f72c0d8b14610772578063f907497c146107a657600080fd5b8063d123b4d8146106d7578063d547741f146106ea57600080fd5b8063ad170ff71461062e578063ad3cb1cc1461064e578063b88d4fde14610697578063c87b56dd146106b757600080fd5b8063a1ebf35d11610107578063a22cb465116100ec578063a22cb465146105d4578063a35d3d86146105f4578063aab416011461061457600080fd5b8063a1ebf35d1461058b578063a217fddf146105bf57600080fd5b806386954d5b146104ce57806389e7217e146104fe57806391d148541461051157806395d89b411461057657600080fd5b80632f2ff15d116101cb5780634f1ef2861161019a5780636352211e1161017f5780636352211e1461046657806370a082311461048657806384b0196e146104a657600080fd5b80634f1ef2861461043e57806352d1902d1461045157600080fd5b80632f2ff15d146103c957806336568abe146103e95780633ccfd60b1461040957806342842e0e1461041e57600080fd5b8063095ea7b311610207578063095ea7b31461030a57806323b872dd1461032c578063248a9ca31461034c5780632e640024146103a957600080fd5b806301ffc9a71461023957806302e4da091461026e57806306fdde03146102bd578063081812fc146102d2575b600080fd5b34801561024557600080fd5b5061025961025436600461360d565b6107c6565b60405190151581526020015b60405180910390f35b34801561027a57600080fd5b5060408051808201909152600181527f320000000000000000000000000000000000000000000000000000000000000060208201525b604051610265919061367a565b3480156102c957600080fd5b506102b06107d7565b3480156102de57600080fd5b506102f26102ed36600461368d565b61088d565b6040516001600160a01b039091168152602001610265565b34801561031657600080fd5b5061032a6103253660046136c2565b6108d5565b005b34801561033857600080fd5b5061032a6103473660046136ec565b6108e4565b34801561035857600080fd5b5061039b61036736600461368d565b60009081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b604051908152602001610265565b3480156103b557600080fd5b5061032a6103c43660046137f8565b6109a6565b3480156103d557600080fd5b5061032a6103e43660046138b6565b610b65565b3480156103f557600080fd5b5061032a6104043660046138b6565b610ba9565b34801561041557600080fd5b5061032a610bfa565b34801561042a57600080fd5b5061032a6104393660046136ec565b610cbf565b61032a61044c3660046138e2565b610cda565b34801561045d57600080fd5b5061039b610cf5565b34801561047257600080fd5b506102f261048136600461368d565b610d24565b34801561049257600080fd5b5061039b6104a1366004613930565b610d2f565b3480156104b257600080fd5b506104bb610db6565b604051610265979695949392919061394b565b3480156104da57600080fd5b506102596104e936600461368d565b60009081526005602052604090205460ff1690565b61032a61050c366004613a49565b610eb2565b34801561051d57600080fd5b5061025961052c3660046138b6565b60009182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561058257600080fd5b506102b0611040565b34801561059757600080fd5b5061039b7f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca4081565b3480156105cb57600080fd5b5061039b600081565b3480156105e057600080fd5b5061032a6105ef366004613ac5565b611091565b34801561060057600080fd5b5061032a61060f366004613aef565b61109c565b34801561062057600080fd5b506001546102599060ff1681565b34801561063a57600080fd5b5061032a61064936600461368d565b6110e8565b34801561065a57600080fd5b506102b06040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b3480156106a357600080fd5b5061032a6106b2366004613b0a565b611153565b3480156106c357600080fd5b506102b06106d236600461368d565b61116a565b61032a6106e5366004613b72565b61120c565b3480156106f657600080fd5b5061032a6107053660046138b6565b6112c2565b34801561071657600080fd5b50610259610725366004613c12565b6001600160a01b0391821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b34801561077e57600080fd5b5061039b7fa615a8afb6fffcb8c6809ac0997b5c9c12b8cc97651150f14c8f6203168cff4c81565b3480156107b257600080fd5b5061032a6107c1366004613cea565b611306565b60006107d182611394565b92915050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300805460609190819061080990613da5565b80601f016020809104026020016040519081016040528092919081815260200182805461083590613da5565b80156108825780601f1061085757610100808354040283529160200191610882565b820191906000526020600020905b81548152906001019060200180831161086557829003601f168201915b505050505091505090565b6000610898826113ea565b5060008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b03166107d1565b6108e082823361145b565b5050565b6001600160a01b03821661092c576040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b6000610939838333611468565b9050836001600160a01b0316816001600160a01b0316146109a0576040517f64283d7b0000000000000000000000000000000000000000000000000000000081526001600160a01b0380861660048301526024820184905282166044820152606401610923565b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156109f15750825b905060008267ffffffffffffffff166001148015610a0e5750303b155b905081158015610a1c575080155b15610a53576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315610ab45784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b610abe8a8a6115e1565b610ac888886115f3565b610ad0611605565b610ad8611605565b610ae061160f565b6001805460ff191681179055610af760008761161f565b508315610b595784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526040902060010154610b9f816116ee565b6109a0838361161f565b6001600160a01b0381163314610beb576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bf582826116fb565b505050565b6000610c05816116ee565b604051600090339047908381818185875af1925050503d8060008114610c47576040519150601f19603f3d011682016040523d82523d6000602084013e610c4c565b606091505b5050905080610c87576040517f2baafbf900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040514781527f6c9cf7ce96a10a51ae8b3fc5aca25e4754a77b3e821c133c5cebb1d30abe7e8e906020015b60405180910390a15050565b610bf583838360405180602001604052806000815250611153565b610ce26117a1565b610ceb82611871565b6108e0828261189b565b6000610cff61199c565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b60006107d1826113ea565b60007f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793006001600160a01b038316610d95576040517f89c62b6400000000000000000000000000000000000000000000000000000000815260006004820152602401610923565b6001600160a01b039092166000908152600390920160205250604090205490565b600060608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1008054909150158015610df557506001810154155b610e5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a656400000000000000000000006044820152606401610923565b610e636119fe565b610e6b611a4f565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b610eba611aa0565b60015460ff16610ef6576040517f9d2c8e7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828114610f2f576040517fc70ea82800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b84811015610f7757858582818110610f4d57610f4d613df8565b9050602002810190610f5f9190613e27565b610f6d906040013583613e94565b9150600101610f33565b5080341015610fb2576040517fea259f9100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b848110156110155761100d868683818110610fd257610fd2613df8565b9050602002810190610fe49190613e27565b858584818110610ff657610ff6613df8565b90506020028101906110089190613ea7565b611b21565b600101610fb5565b50506109a060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930180546060917f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793009161080990613da5565b6108e0338383611eaf565b60006110a7816116ee565b6001805460ff19168315159081179091556040519081527f7d16763644b2f7d5a11e2b05fe3a9cc4edb4568049295f4e62024269ae2f6eab90602001610cb3565b7f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca40611112816116ee565b600082815260056020526040808220805460ff191690555183917f5de3fc4fb6d1f5f0d44014df7fcc3824b081ef3fc3946a361a7cc926a499035191a25050565b61115e8484846108e4565b6109a084848484611f8b565b600081815260036020526040902080546060919061118790613da5565b80601f01602080910402602001604051908101604052809291908181526020018280546111b390613da5565b80156112005780601f106111d557610100808354040283529160200191611200565b820191906000526020600020905b8154815290600101906020018083116111e357829003601f168201915b50505050509050919050565b611214611aa0565b60015460ff16611250576040517f9d2c8e7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826040013534101561128e576040517fea259f9100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611299838383611b21565b610bf560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260409020600101546112fc816116ee565b6109a083836116fb565b7f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca40611330816116ee565b60008781526005602052604090819020805460ff191660011790555187907f8a2c815542d43af541960cd9124f5ec6a55c4b8c69f0dda02ed413b401e309cd9061138390869088908a9088908d90613f90565b60405180910390a250505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806107d157506107d182612130565b60008181527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260408120546001600160a01b0316806107d1576040517f7e27328900000000000000000000000000000000000000000000000000000000815260048101849052602401610923565b610bf58383836001612213565b60008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260408120547f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300906001600160a01b03908116908416156114d6576114d68185876123aa565b6001600160a01b03811615611534576114f3600086600080612213565b6001600160a01b0381166000908152600383016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190555b6001600160a01b03861615611565576001600160a01b03861660009081526003830160205260409020805460010190555b600085815260028301602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a49150505b9392505050565b6115e9612440565b6108e082826124a7565b6115fb612440565b6108e082826124ea565b61160d612440565b565b611617612440565b61160d61255d565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff166116e4576000848152602082815260408083206001600160a01b03871684529091529020805460ff1916600117905561169a3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506107d1565b60009150506107d1565b6116f88133612565565b50565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16156116e4576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506107d1565b306001600160a01b037f000000000000000000000000d0ab2d3621dc8a862389f89f52f08c097e3fe8b516148061183a57507f000000000000000000000000d0ab2d3621dc8a862389f89f52f08c097e3fe8b56001600160a01b031661182e7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b1561160d576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa615a8afb6fffcb8c6809ac0997b5c9c12b8cc97651150f14c8f6203168cff4c6108e0816116ee565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156118f5575060408051601f3d908101601f191682019092526118f291810190613ff5565b60015b611936576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610923565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114611992576040517faa1d49a400000000000000000000000000000000000000000000000000000000815260048101829052602401610923565b610bf583836125f2565b306001600160a01b037f000000000000000000000000d0ab2d3621dc8a862389f89f52f08c097e3fe8b5161461160d576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1009161080990613da5565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1009161080990613da5565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01611b1b576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b600054611b2f848484612648565b60005b611b3f60e086018661400e565b9050811015611c0057817fabd48d213cb20ec6f191e95c191131c8fc3832f194f53febcb53d4834baae507611b7760e088018861400e565b84818110611b8757611b87613df8565b9050602002810190611b999190614076565b611ba39080613ea7565b611bb060e08a018a61400e565b86818110611bc057611bc0613df8565b9050602002810190611bd29190614076565b611be0906020810190613ea7565b604051611bf094939291906140d5565b60405180910390a2600101611b32565b50611c0e60a0850185613ea7565b600083815260036020526040902091611c28919083614155565b5083356000908152600260205260408120805460019081019091558154018155611c56610100860186614251565b90501115611c6757611c678461273c565b611c80611c7a6080860160608701613930565b826129d4565b611c906080850160608601613930565b84356000818152600260205260409020546001600160a01b0392909216918391907ffe94555d033bd3fc0f75671674d030640f03095d8345426fcab3a9a0bffdc4fb90611ce060808a018a613ea7565b611ced60c08c018c613ea7565b604051611cfe9594939291906142b9565b60405180910390a4610140840135156109a0576000611d2561020086016101e08701613930565b6001600160a01b031614611e0d57611d4561020085016101e08601613930565b6001600160a01b031663e836239c8535611d6761014088016101208901613930565b611d776080890160608a01613930565b6101608901356101808a0135611d956101c08c016101a08d016142e6565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b168152611dda969594939291906101c08e01359060040161431b565b600060405180830381600087803b158015611df457600080fd5b505af1158015611e08573d6000803e3d6000fd5b505050505b6101408401803590611e23906101208701613930565b6001600160a01b0316827f6d6039156ec873b5c217b996d727775a9eea208e1329e87aaa4b617c76d2bb94610160880135610180890135611e6c6101c08b016101a08c016142e6565b604051611e7b93929190614366565b60405180910390a450505050565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793006001600160a01b038316611f1b576040517f5b08ba180000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610923565b6001600160a01b038481166000818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b6001600160a01b0383163b156109a0576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0384169063150b7a0290611fe6903390889087908790600401614381565b6020604051808303816000875af1925050508015612021575060408051601f3d908101601f1916820190925261201e918101906143bd565b60015b6120a3573d80801561204f576040519150601f19603f3d011682016040523d82523d6000602084013e612054565b606091505b50805160000361209b576040517f64a0ae920000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610923565b805181602001fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081167f150b7a020000000000000000000000000000000000000000000000000000000014612129576040517f64a0ae920000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610923565b5050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806121c357507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806107d157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146107d1565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300818061224857506001600160a01b03831615155b15612361576000612258856113ea565b90506001600160a01b038416158015906122845750836001600160a01b0316816001600160a01b031614155b80156122d557506001600160a01b0380821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602090815260408083209388168352929052205460ff16155b15612317576040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610923565b821561235f5784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b600093845260040160205250506040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6123b58383836129ee565b610bf5576001600160a01b0383166123fc576040517f7e27328900000000000000000000000000000000000000000000000000000000815260048101829052602401610923565b6040517f177e802f0000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015260248101829052604401610923565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1661160d576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6124af612440565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300806124db84826143da565b50600181016109a083826143da565b6124f2612440565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10261253e84826143da565b506003810161254d83826143da565b5060008082556001909101555050565b611e89612440565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408083206001600160a01b038516845290915290205460ff166108e0576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b038216600482015260248101839052604401610923565b6125fb82612ab2565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561264057610bf58282612b5a565b6108e0612bd0565b6000612655848484612c08565b6001600160a01b03811660009081527fbc6704768de17ac743a4c41122099f7a3464fc20363467b8527e22c7572f5d3a602052604090205490915060ff166126c9576040517f0f3c13fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208085013560009081526004909152604090205460ff1615612718576040517f76abf21400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050506020908101356000908152600490915260409020805460ff19166001179055565b600061271047825b612752610100860186614251565b90508110156121295761ffff831661276e610100870187614251565b8381811061277e5761277e613df8565b905060400201602001602081019061279691906144d6565b61ffff1611156127d2576040517f635015ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061ffff84166127e7610100880188614251565b848181106127f7576127f7613df8565b905060400201602001602081019061280f91906144d6565b6128219061ffff1660408901356144fa565b61282b9190614511565b90506128378186613e94565b94508560400135851115612877576040517fcc3b3ebc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828511156128b1576040517f2c2cae9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006128c1610100880188614251565b848181106128d1576128d1613df8565b6128e79260206040909202019081019150613930565b90506001600160a01b038116156129ca576000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114612945576040519150601f19603f3d011682016040523d82523d6000602084013e61294a565b606091505b5050905080612985576040517f7327470c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816001600160a01b03167fc9a9861643a061bfa3739f3b26e5d64578cd78bb863dbd5dac0aca396728d9a7846040516129c091815260200190565b60405180910390a2505b5050600101612744565b6108e0828260405180602001604052806000815250612c58565b60006001600160a01b03831615801590612aaa5750826001600160a01b0316846001600160a01b03161480612a6757506001600160a01b0380851660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602090815260408083209387168352929052205460ff165b80612aaa575060008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b038481169116145b949350505050565b806001600160a01b03163b600003612b01576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602401610923565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051612b77919061454c565b600060405180830381855af49150503d8060008114612bb2576040519150601f19603f3d011682016040523d82523d6000602084013e612bb7565b606091505b5091509150612bc7858383612c6f565b95945050505050565b341561160d576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612c1485612ce4565b9050612bc784848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508593925050612cfe9050565b612c628383612d28565b610bf56000848484611f8b565b606082612c8457612c7f82612dbf565b6115da565b8151158015612c9b57506001600160a01b0384163b155b15612cdd576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610923565b50806115da565b60006107d1612cf283612e01565b80519060200120612f1e565b600080600080612d0e8686612f66565b925092509250612d1e8282612fb3565b5090949350505050565b6001600160a01b038216612d6b576040517f64a0ae9200000000000000000000000000000000000000000000000000000000815260006004820152602401610923565b6000612d7983836000611468565b90506001600160a01b03811615610bf5576040517f73c6ac6e00000000000000000000000000000000000000000000000000000000815260006004820152602401610923565b805115612dcf5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60607fe078867cdfa0acd2e4d8e43793b771c2d3670af784116b0765aa2425c5bbb021823560208401356040850135612e3f60808701878701613930565b612e54612e4f6080890189613ea7565b6130b7565b612e64612e4f60a08a018a613ea7565b612e74612e4f60c08b018b613ea7565b612e89612e8460e08c018c61400e565b6130d9565b612e9f612e9a6101008d018d614251565b6131b5565b612eac8c61012001613254565b60408051602081019c909c528b019990995260608a019790975260808901959095526001600160a01b0390931660a088015260c087019190915260e0860152610100850152610120840152610140830152610160820152610180015b6040516020818303038152906040529050919050565b60006107d1612f2b6132ec565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b60008060008351604103612fa05760208401516040850151606086015160001a612f92888285856132fb565b955095509550505050612fac565b50508151600091506002905b9250925092565b6000826003811115612fc757612fc7613f0c565b03612fd0575050565b6001826003811115612fe457612fe4613f0c565b0361301b576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282600381111561302f5761302f613f0c565b03613069576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610923565b600382600381111561307d5761307d613f0c565b036108e0576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610923565b600082826040516130c992919061455e565b6040518091039020905092915050565b6000808267ffffffffffffffff8111156130f5576130f5613728565b60405190808252806020026020018201604052801561311e578160200160208202803683370190505b50905060005b838110156131845761315885858381811061314157613141613df8565b90506020028101906131539190614076565b6133ca565b8051906020012082828151811061317157613171613df8565b6020908102919091010152600101613124565b5080604051602001613196919061456e565b6040516020818303038152906040528051906020012091505092915050565b6000808267ffffffffffffffff8111156131d1576131d1613728565b6040519080825280602002602001820160405280156131fa578160200160208202803683370190505b50905060005b838110156131845761322885858381811061321d5761321d613df8565b905060400201613429565b8051906020012082828151811061324157613241613df8565b6020908102919091010152600101613200565b60007f07dcd7fc8540e6630daaa95c4bf6d1951796f3e22e2e1c1bcbdbd5055c7ab37c6132846020840184613930565b6020840135604085013560608601356132a360a08801608089016142e6565b60a08801356132b860e08a0160c08b01613930565b6040516020016132cf9897969594939291906145a4565b604051602081830303815290604052805190602001209050919050565b60006132f6613499565b905090565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561333657506000915060039050826133c0565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561338a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166133b6575060009250600191508290506133c0565b9250600091508190505b9450945094915050565b60607f93dc1bac6b117acdbb889b9a825b9bc731449f703cc02b69049722fcba5dbe346133fa612e4f8480613ea7565b61340a612e4f6020860186613ea7565b6040805160208101949094528301919091526060820152608001612f08565b60607fdf3d1189f68f42c28f9fad9d69ff7a974d0a800a2e4420ed400e45a46d2fac2f6134596020840184613930565b61346960408501602086016144d6565b604051602001612f08939291909283526001600160a01b0391909116602083015261ffff16604082015260600190565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6134c461350d565b6134cc613589565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816135396119fe565b80519091501561355157805160209091012092915050565b81548015613560579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816135b5611a4f565b8051909150156135cd57805160209091012092915050565b60018201548015613560579392505050565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146116f857600080fd5b60006020828403121561361f57600080fd5b81356115da816135df565b60005b8381101561364557818101518382015260200161362d565b50506000910152565b6000815180845261366681602086016020860161362a565b601f01601f19169290920160200192915050565b6020815260006115da602083018461364e565b60006020828403121561369f57600080fd5b5035919050565b80356001600160a01b03811681146136bd57600080fd5b919050565b600080604083850312156136d557600080fd5b6136de836136a6565b946020939093013593505050565b60008060006060848603121561370157600080fd5b61370a846136a6565b9250613718602085016136a6565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561378057613780613728565b604052919050565b600082601f83011261379957600080fd5b813567ffffffffffffffff8111156137b3576137b3613728565b6137c66020601f19601f84011601613757565b8181528460208386010111156137db57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561381057600080fd5b853567ffffffffffffffff8082111561382857600080fd5b61383489838a01613788565b9650602088013591508082111561384a57600080fd5b61385689838a01613788565b9550604088013591508082111561386c57600080fd5b61387889838a01613788565b9450606088013591508082111561388e57600080fd5b5061389b88828901613788565b9250506138aa608087016136a6565b90509295509295909350565b600080604083850312156138c957600080fd5b823591506138d9602084016136a6565b90509250929050565b600080604083850312156138f557600080fd5b6138fe836136a6565b9150602083013567ffffffffffffffff81111561391a57600080fd5b61392685828601613788565b9150509250929050565b60006020828403121561394257600080fd5b6115da826136a6565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e08184015261398760e084018a61364e565b8381036040850152613999818a61364e565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b818110156139eb578351835292840192918401916001016139cf565b50909c9b505050505050505050505050565b60008083601f840112613a0f57600080fd5b50813567ffffffffffffffff811115613a2757600080fd5b6020830191508360208260051b8501011115613a4257600080fd5b9250929050565b60008060008060408587031215613a5f57600080fd5b843567ffffffffffffffff80821115613a7757600080fd5b613a83888389016139fd565b90965094506020870135915080821115613a9c57600080fd5b50613aa9878288016139fd565b95989497509550505050565b803580151581146136bd57600080fd5b60008060408385031215613ad857600080fd5b613ae1836136a6565b91506138d960208401613ab5565b600060208284031215613b0157600080fd5b6115da82613ab5565b60008060008060808587031215613b2057600080fd5b613b29856136a6565b9350613b37602086016136a6565b925060408501359150606085013567ffffffffffffffff811115613b5a57600080fd5b613b6687828801613788565b91505092959194509250565b600080600060408486031215613b8757600080fd5b833567ffffffffffffffff80821115613b9f57600080fd5b908501906102008288031215613bb457600080fd5b90935060208501359080821115613bca57600080fd5b818601915086601f830112613bde57600080fd5b813581811115613bed57600080fd5b876020828501011115613bff57600080fd5b6020830194508093505050509250925092565b60008060408385031215613c2557600080fd5b613c2e836136a6565b91506138d9602084016136a6565b600082601f830112613c4d57600080fd5b8135602067ffffffffffffffff80831115613c6a57613c6a613728565b8260051b613c79838201613757565b9384528581018301938381019088861115613c9357600080fd5b84880192505b85831015613ccf57823584811115613cb15760008081fd5b613cbf8a87838c0101613788565b8352509184019190840190613c99565b98975050505050505050565b8035600281106136bd57600080fd5b60008060008060008060c08789031215613d0357600080fd5b86359550602087013567ffffffffffffffff80821115613d2257600080fd5b613d2e8a838b01613c3c565b96506040890135915080821115613d4457600080fd5b613d508a838b01613788565b95506060890135915060038210613d6657600080fd5b819450613d7560808a01613cdb565b935060a0890135915080821115613d8b57600080fd5b50613d9889828a01613c3c565b9150509295509295509295565b600181811c90821680613db957607f821691505b602082108103613df2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01833603018112613e5b57600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156107d1576107d1613e65565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613edc57600080fd5b83018035915067ffffffffffffffff821115613ef757600080fd5b602001915036819003821315613a4257600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600081518084526020808501808196508360051b8101915082860160005b85811015613f83578284038952613f7184835161364e565b98850198935090840190600101613f59565b5091979650505050505050565b600060028710613fa257613fa2613f0c565b86825260038610613fb557613fb5613f0c565b85602083015260a06040830152613fcf60a083018661364e565b8281036060840152613fe18186613f3b565b90508281036080840152613ccf8185613f3b565b60006020828403121561400757600080fd5b5051919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261404357600080fd5b83018035915067ffffffffffffffff82111561405e57600080fd5b6020019150600581901b3603821315613a4257600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112613e5b57600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b6040815260006140e96040830186886140aa565b82810360208401526140fc8185876140aa565b979650505050505050565b601f821115610bf557600081815260208120601f850160051c8101602086101561412e5750805b601f850160051c820191505b8181101561414d5782815560010161413a565b505050505050565b67ffffffffffffffff83111561416d5761416d613728565b6141818361417b8354613da5565b83614107565b6000601f8411600181146141d3576000851561419d5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355612129565b600083815260209020601f19861690835b8281101561420457868501358255602094850194600190920191016141e4565b508682101561423f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261428657600080fd5b83018035915067ffffffffffffffff8211156142a157600080fd5b6020019150600681901b3603821315613a4257600080fd5b8581526060602082015260006142d36060830186886140aa565b8281036040840152613ccf8185876140aa565b6000602082840312156142f857600080fd5b8135600481106115da57600080fd5b6004811061431757614317613f0c565b9052565b8781526001600160a01b03878116602083015286166040820152606081018590526080810184905260e0810161435460a0830185614307565b8260c083015298975050505050505050565b8381526020810183905260608101612aaa6040830184614307565b60006001600160a01b038087168352808616602084015250836040830152608060608301526143b3608083018461364e565b9695505050505050565b6000602082840312156143cf57600080fd5b81516115da816135df565b815167ffffffffffffffff8111156143f4576143f4613728565b614408816144028454613da5565b84614107565b602080601f83116001811461445b57600084156144255750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561414d565b600085815260208120601f198616915b8281101561448a5788860151825594840194600190910190840161446b565b50858210156144c657878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156144e857600080fd5b813561ffff811681146115da57600080fd5b80820281158282048414176107d1576107d1613e65565b600082614547577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008251613e5b81846020870161362a565b8183823760009101908152919050565b815160009082906020808601845b838110156145985781518552938201939082019060010161457c565b50929695505050505050565b6000610100820190508982526001600160a01b03808a1660208401528860408401528760608401528660808401526145df60a0840187614307565b8460c084015280841660e084015250999850505050505050505056fea2646970667358221220cce68c050e730a1dd7997428d1c036ada487ef84a100a2cfd78c4c8dd0e8a8c864736f6c63430008140033
Deployed Bytecode Sourcemap
130320:25364:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;155450:231;;;;;;;;;;-1:-1:-1;155450:231:0;;;;;:::i;:::-;;:::i;:::-;;;611:14:1;;604:22;586:41;;574:2;559:18;155450:231:0;;;;;;;;138280:90;;;;;;;;;;-1:-1:-1;138352:10:0;;;;;;;;;;;;;;;;;138280:90;;;;;;;:::i;112376:149::-;;;;;;;;;;;;;:::i;113664:158::-;;;;;;;;;;-1:-1:-1;113664:158:0;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1802:55:1;;;1784:74;;1772:2;1757:18;113664:158:0;1638:226:1;113483:115:0;;;;;;;;;;-1:-1:-1;113483:115:0;;;;;:::i;:::-;;:::i;:::-;;114391:588;;;;;;;;;;-1:-1:-1;114391:588:0;;;;;:::i;:::-;;:::i;90328:194::-;;;;;;;;;;-1:-1:-1;90328:194:0;;;;;:::i;:::-;90393:7;90490:14;;;88429:28;90490:14;;;;;:24;;;;90328:194;;;;2993:25:1;;;2981:2;2966:18;90328:194:0;2847:177:1;138845:532:0;;;;;;;;;;-1:-1:-1;138845:532:0;;;;;:::i;:::-;;:::i;90832:138::-;;;;;;;;;;-1:-1:-1;90832:138:0;;;;;:::i;:::-;;:::i;92001:251::-;;;;;;;;;;-1:-1:-1;92001:251:0;;;;;:::i;:::-;;:::i;153700:281::-;;;;;;;;;;;;;:::i;115050:134::-;;;;;;;;;;-1:-1:-1;115050:134:0;;;;;:::i;:::-;;:::i;98029:258::-;;;;;;:::i;:::-;;:::i;97562:136::-;;;;;;;;;;;;;:::i;112189:120::-;;;;;;;;;;-1:-1:-1;112189:120:0;;;;;:::i;:::-;;:::i;111856:271::-;;;;;;;;;;-1:-1:-1;111856:271:0;;;;;:::i;:::-;;:::i;105744:931::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;139868:110::-;;;;;;;;;;-1:-1:-1;139868:110:0;;;;;:::i;:::-;139929:4;139953:17;;;:8;:17;;;;;;;;;139868:110;141444:1232;;;;;;:::i;:::-;;:::i;89272:210::-;;;;;;;;;;-1:-1:-1;89272:210:0;;;;;:::i;:::-;89349:4;89443:14;;;88429:28;89443:14;;;;;;;;-1:-1:-1;;;;;89443:31:0;;;;;;;;;;;;;;;89272:210;112594:153;;;;;;;;;;;;;:::i;131034:57::-;;;;;;;;;;;;131072:19;131034:57;;87806:49;;;;;;;;;;-1:-1:-1;87806:49:0;87851:4;87806:49;;113894:146;;;;;;;;;;-1:-1:-1;113894:146:0;;;;;:::i;:::-;;:::i;153353:191::-;;;;;;;;;;-1:-1:-1;153353:191:0;;;;;:::i;:::-;;:::i;130996:29::-;;;;;;;;;;-1:-1:-1;130996:29:0;;;;;;;;154960:154;;;;;;;;;;-1:-1:-1;154960:154:0;;;;;:::i;:::-;;:::i;95640:58::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;115255:234;;;;;;;;;;-1:-1:-1;115255:234:0;;;;;:::i;:::-;;:::i;140207:138::-;;;;;;;;;;-1:-1:-1;140207:138:0;;;;;:::i;:::-;;:::i;140541:553::-;;;;;;:::i;:::-;;:::i;91263:172::-;;;;;;;;;;-1:-1:-1;91263:172:0;;;;;:::i;:::-;;:::i;114111:213::-;;;;;;;;;;-1:-1:-1;114111:213:0;;;;;:::i;:::-;-1:-1:-1;;;;;114279:27:0;;;114199:4;114279:27;;;:20;:27;;;;;;;;:37;;;;;;;;;;;;;;;114111:213;131098:61;;;;;;;;;;;;131138:21;131098:61;;154398:380;;;;;;;;;;-1:-1:-1;154398:380:0;;;;;:::i;:::-;;:::i;155450:231::-;155608:4;155637:36;155661:11;155637:23;:36::i;:::-;155630:43;155450:231;-1:-1:-1;;155450:231:0:o;112376:149::-;110812:21;112503:14;;112421:13;;110812:21;;;112503:14;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;112376:149;:::o;113664:158::-;113731:7;113751:22;113765:7;113751:13;:22::i;:::-;-1:-1:-1;116379:7:0;116462:26;;;:17;:26;;;;;;-1:-1:-1;;;;;116462:26:0;113793:21;116309:187;113483:115;113555:35;113564:2;113568:7;65377:10;113555:8;:35::i;:::-;113483:115;;:::o;114391:588::-;-1:-1:-1;;;;;114486:16:0;;114482:89;;114526:33;;;;;114556:1;114526:33;;;1784:74:1;1757:18;;114526:33:0;;;;;;;;114482:89;114792:21;114816:34;114824:2;114828:7;65377:10;114816:7;:34::i;:::-;114792:58;;114882:4;-1:-1:-1;;;;;114865:21:0;:13;-1:-1:-1;;;;;114865:21:0;;114861:111;;114910:50;;;;;-1:-1:-1;;;;;14036:15:1;;;114910:50:0;;;14018:34:1;14068:18;;;14061:34;;;14131:15;;14111:18;;;14104:43;13930:18;;114910:50:0;13755:398:1;114861:111:0;114471:508;114391:588;;;:::o;138845:532::-;59213:21;54529:15;;;;;;;54528:16;;54576:14;;54382:30;54961:16;;:34;;;;;54981:14;54961:34;54941:54;;55006:17;55026:11;:16;;55041:1;55026:16;:50;;;;-1:-1:-1;55054:4:0;55046:25;:30;55026:50;55006:70;;55094:12;55093:13;:30;;;;;55111:12;55110:13;55093:30;55089:93;;;55147:23;;;;;;;;;;;;;;55089:93;55192:18;;;;55209:1;55192:18;;;55221:69;;;;55256:22;;;;;;;;55221:69;139082:39:::1;139096:10;139108:12;139082:13;:39::i;:::-;139132:48;139146:14;139162:17;139132:13;:48::i;:::-;139191:22;:20;:22::i;:::-;139224:24;:22;:24::i;:::-;139259;:22;:24::i;:::-;139314:4;139294:24:::0;;-1:-1:-1;;139294:24:0::1;::::0;::::1;::::0;;139331:38:::1;139294:17;139362:6:::0;139331:10:::1;:38::i;:::-;;55316:14:::0;55312:104;;;55347:23;;;;;;55390:14;;-1:-1:-1;14311:50:1;;55390:14:0;;14299:2:1;14284:18;55390:14:0;;;;;;;55312:104;54314:1109;;;;;138845:532;;;;;:::o;90832:138::-;90393:7;90490:14;;;88429:28;90490:14;;;;;:24;;;88709:16;88720:4;88709:10;:16::i;:::-;90937:25:::1;90948:4;90954:7;90937:10;:25::i;92001:251::-:0;-1:-1:-1;;;;;92095:34:0;;65377:10;92095:34;92091:104;;92153:30;;;;;;;;;;;;;;92091:104;92207:37;92219:4;92225:18;92207:11;:37::i;:::-;;92001:251;;:::o;153700:281::-;87851:4;88709:16;87851:4;88709:10;:16::i;:::-;153787:49:::1;::::0;153770:12:::1;::::0;153787:10:::1;::::0;153810:21:::1;::::0;153770:12;153787:49;153770:12;153787:49;153810:21;153787:10;:49:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;153769:67;;;153852:7;153847:70;;153883:22;;;;;;;;;;;;;;153847:70;153932:41;::::0;153951:21:::1;2993:25:1::0;;153932:41:0::1;::::0;2981:2:1;2966:18;153932:41:0::1;;;;;;;;153758:223;153700:281:::0;:::o;115050:134::-;115137:39;115154:4;115160:2;115164:7;115137:39;;;;;;;;;;;;:16;:39::i;98029:258::-;96494:13;:11;:13::i;:::-;98186:36:::1;98204:17;98186;:36::i;:::-;98233:46;98255:17;98274:4;98233:21;:46::i;97562:136::-:0;97631:7;96774:20;:18;:20::i;:::-;-1:-1:-1;76181:66:0::1;97562:136:::0;:::o;112189:120::-;112252:7;112279:22;112293:7;112279:13;:22::i;111856:271::-;111919:7;110812:21;-1:-1:-1;;;;;111999:19:0;;111995:89;;112042:30;;;;;112069:1;112042:30;;;1784:74:1;1757:18;;112042:30:0;1638:226:1;111995:89:0;-1:-1:-1;;;;;112101:18:0;;;;;;;:11;;;;:18;;-1:-1:-1;112101:18:0;;;;;111856:271::o;105744:931::-;105847:13;105875:18;;105847:13;;;105875:18;105847:13;103268:21;106365:13;;106096:45;;-1:-1:-1;106365:18:0;:43;;;;-1:-1:-1;106387:16:0;;;;:21;106365:43;106357:77;;;;;;;14784:2:1;106357:77:0;;;14766:21:1;14823:2;14803:18;;;14796:30;14862:23;14842:18;;;14835:51;14903:18;;106357:77:0;14582:345:1;106357:77:0;106500:13;:11;:13::i;:::-;106528:16;:14;:16::i;:::-;106640;;;106623:1;106640:16;;;;;;;;;106447:220;;;;-1:-1:-1;106447:220:0;;-1:-1:-1;106559:13:0;;-1:-1:-1;106595:4:0;;-1:-1:-1;106623:1:0;-1:-1:-1;106640:16:0;-1:-1:-1;106447:220:0;-1:-1:-1;;105744:931:0:o;141444:1232::-;68810:21;:19;:21::i;:::-;141694:17:::1;::::0;::::1;;141689:84;;141735:26;;;;;;;;;;;;;;141689:84;141861:36:::0;;::::1;141857:114;;141921:38;;;;;;;;;;;;;;141857:114;142057:16;::::0;142084:170:::1;142104:19:::0;;::::1;142084:170;;;142163:8;;142172:1;142163:11;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;142152:28;::::0;142163:17:::1;;;142152:8:::0;:28:::1;:::i;:::-;142141:39:::0;-1:-1:-1;142224:3:0::1;;142084:170;;;;142364:8;142352:9;:20;142348:80;;;142396:20;;;;;;;;;;;;;;142348:80;142506:9;142501:168;142521:19:::0;;::::1;142501:168;;;142558:37;142568:8;;142577:1;142568:11;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;142581:10;;142592:1;142581:13;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;142558:9;:37::i;:::-;142639:3;;142501:168;;;;141584:1092;68854:20:::0;67316:1;67921:30;69548:23;69291:288;112594:153;112730:9;112723:16;;112641:13;;110812:21;;112723:16;;;:::i;113894:146::-;113980:52;65377:10;114013:8;114023;113980:18;:52::i;153353:191::-;87851:4;88709:16;87851:4;88709:10;:16::i;:::-;153453:17:::1;:36:::0;;-1:-1:-1;;153453:36:0::1;::::0;::::1;;::::0;;::::1;::::0;;;153505:31:::1;::::0;586:41:1;;;153505:31:0::1;::::0;574:2:1;559:18;153505:31:0::1;446:187:1::0;154960:154:0;131072:19;88709:16;88720:4;88709:10;:16::i;:::-;155063:5:::1;155043:17:::0;;;:8:::1;:17;::::0;;;;;:25;;-1:-1:-1;;155043:25:0::1;::::0;;155084:22;155052:7;;155084:22:::1;::::0;::::1;154960:154:::0;;:::o;115255:234::-;115392:31;115405:4;115411:2;115415:7;115392:12;:31::i;:::-;115434:47;115457:4;115463:2;115467:7;115476:4;115434:22;:47::i;140207:138::-;140316:21;;;;:11;:21;;;;;140309:28;;140273:23;;140316:21;140309:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;140207:138;;;:::o;140541:553::-;68810:21;:19;:21::i;:::-;140785:17:::1;::::0;::::1;;140780:84;;140826:26;;;;;;;;;;;;;;140780:84;140974:8;:14;;;140962:9;:26;140958:86;;;141012:20;;;;;;;;;;;;;;140958:86;141056:30;141066:8;141076:9;;141056;:30::i;:::-;68854:20:::0;67316:1;67921:30;69548:23;69291:288;91263:172;90393:7;90490:14;;;88429:28;90490:14;;;;;:24;;;88709:16;88720:4;88709:10;:16::i;:::-;91401:26:::1;91413:4;91419:7;91401:11;:26::i;154398:380::-:0;131072:19;88709:16;88720:4;88709:10;:16::i;:::-;154659:17:::1;::::0;;;:8:::1;:17;::::0;;;;;;:24;;-1:-1:-1;;154659:24:0::1;154679:4;154659:24;::::0;;154699:71;154668:7;;154699:71:::1;::::0;::::1;::::0;154722:9;;154733:10;;154745:5;;154752:4;;154758:11;;154699:71:::1;:::i;:::-;;;;;;;;154398:380:::0;;;;;;;:::o;88963:217::-;89048:4;89085:47;;;89100:32;89085:47;;:87;;;89136:36;89160:11;89136:23;:36::i;127219:247::-;127282:7;116162:18;;;:9;:18;;;;;;-1:-1:-1;;;;;116162:18:0;;127346:90;;127393:31;;;;;;;;2993:25:1;;;2966:18;;127393:31:0;2847:177:1;125335:122:0;125416:33;125425:2;125429:7;125438:4;125444;125416:8;:33::i;119479:918::-;119592:7;116162:18;;;:9;:18;;;;;;110812:21;;-1:-1:-1;;;;;116162:18:0;;;;119768;;;119764:88;;119803:37;119820:4;119826;119832:7;119803:16;:37::i;:::-;-1:-1:-1;;;;;119899:18:0;;;119895:265;;120017:48;120034:1;120038:7;120055:1;120059:5;120017:8;:48::i;:::-;-1:-1:-1;;;;;120111:17:0;;;;;;:11;;;:17;;;;;:22;;;;;;119895:265;-1:-1:-1;;;;;120176:16:0;;;120172:113;;-1:-1:-1;;;;;120238:15:0;;;;;;:11;;;:15;;;;;:20;;120257:1;120238:20;;;120172:113;120297:18;;;;:9;;;:18;;;;;;:23;;;;-1:-1:-1;;;;;120297:23:0;;;;;;;;;120338:27;;120297:18;;120338:27;;;;;;;120385:4;-1:-1:-1;;119479:918:0;;;;;;:::o;110975:151::-;57220:20;:18;:20::i;:::-;111079:39:::1;111103:5;111110:7;111079:23;:39::i;103891:149::-:0;57220:20;:18;:20::i;:::-;103994:38:::1;104018:4;104024:7;103994:23;:38::i;88753:60::-:0;57220:20;:18;:20::i;:::-;88753:60::o;68082:113::-;57220:20;:18;:20::i;:::-;68153:34:::1;:32;:34::i;92950:396::-:0;93027:4;89443:14;;;88429:28;89443:14;;;;;;;;-1:-1:-1;;;;;89443:31:0;;;;;;;;;;;;93114:225;;93158:8;:14;;;;;;;;;;;-1:-1:-1;;;;;93158:31:0;;;;;;;;;:38;;-1:-1:-1;;93158:38:0;93192:4;93158:38;;;93243:12;65377:10;;65297:98;93243:12;-1:-1:-1;;;;;93216:40:0;93234:7;-1:-1:-1;;;;;93216:40:0;93228:4;93216:40;;;;;;;;;;93278:4;93271:11;;;;;93114:225;93322:5;93315:12;;;;;89697:105;89764:30;89775:4;65377:10;89764;:30::i;:::-;89697:105;:::o;93590:397::-;93668:4;89443:14;;;88429:28;89443:14;;;;;;;;-1:-1:-1;;;;;89443:31:0;;;;;;;;;;;;93755:225;;;93832:5;93798:14;;;;;;;;;;;-1:-1:-1;;;;;93798:31:0;;;;;;;;;;:39;;-1:-1:-1;;93798:39:0;;;93857:40;65377:10;;93798:14;;93857:40;;93832:5;93857:40;93919:4;93912:11;;;;;98521:323;98603:4;-1:-1:-1;;;;;98612:6:0;98595:23;;;:125;;;98714:6;-1:-1:-1;;;;;98678:42:0;:32;76181:66;76915:53;-1:-1:-1;;;;;76915:53:0;;76836:140;98678:32;-1:-1:-1;;;;;98678:42:0;;;98595:125;98577:260;;;98796:29;;;;;;;;;;;;;;139617:130;131138:21;88709:16;88720:4;88709:10;:16::i;100018:548::-;100136:17;-1:-1:-1;;;;;100118:50:0;;:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;100118:52:0;;;;;;;;-1:-1:-1;;100118:52:0;;;;;;;;;;;;:::i;:::-;;;100114:445;;100487:60;;;;;-1:-1:-1;;;;;1802:55:1;;100487:60:0;;;1784:74:1;1757:18;;100487:60:0;1638:226:1;100114:445:0;76181:66;100213:40;;100209:122;;100281:34;;;;;;;;2993:25:1;;;2966:18;;100281:34:0;2847:177:1;100209:122:0;100345:54;100375:17;100394:4;100345:29;:54::i;98967:218::-;99042:4;-1:-1:-1;;;;;99051:6:0;99034:23;;99030:148;;99137:29;;;;;;;;;;;;;;106907:158;107050:7;107043:14;;106961:13;;103268:21;;107043:14;;;:::i;107300:164::-;107446:10;107439:17;;107357:13;;103268:21;;107439:17;;;:::i;68890:393::-;67921:30;69093:9;;:20;;69089:90;;69137:30;;;;;;;;;;;;;;69089:90;67359:1;69256:19;;68890:393::o;142985:2257::-;143104:15;143122:13;143224:35;143243:4;143249:9;;143224:18;:35::i;:::-;143359:9;143354:267;143378:17;;;;:4;:17;:::i;:::-;:24;;143374:1;:28;143354:267;;;143459:7;143425:122;143468:17;;;;:4;:17;:::i;:::-;143486:1;143468:20;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;:27;;;;:::i;:::-;143497:17;;;;:4;:17;:::i;:::-;143515:1;143497:20;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;:35;;;;;;;:::i;:::-;143425:122;;;;;;;;;:::i;:::-;;;;;;;;143591:3;;143354:267;;;-1:-1:-1;143699:13:0;;;;:4;:13;:::i;:::-;143676:20;;;;:11;:20;;;;;;:36;;;:20;:36;:::i;:::-;-1:-1:-1;143858:12:0;;143838:33;;;;:19;:33;;;;;143836:35;;;;;;;;;143886:15;;;;;143993;;;;143858:4;143993:15;:::i;:::-;:22;;:26;143989:80;;;144036:21;144052:4;144036:15;:21::i;:::-;144130:34;144140:14;;;;;;;;:::i;:::-;144156:7;144130:9;:34::i;:::-;144316:14;;;;;;;;:::i;:::-;144267:12;;;144345:33;;;:19;:33;;;;;;-1:-1:-1;;;;;144243:211:0;;;;;144294:7;;144267:12;144243:211;;144393:19;;;;144267:4;144393:19;:::i;:::-;144427:16;;;;:4;:16;:::i;:::-;144243:211;;;;;;;;;;:::i;:::-;;;;;;;;144471:19;;;;:24;144467:768;;144554:1;144516:26;;;;;;;;:::i;:::-;-1:-1:-1;;;;;144516:40:0;;144512:442;;144586:26;;;;;;;;:::i;:::-;-1:-1:-1;;;;;144577:54:0;;144654:12;;144689:24;;;;:11;;;:24;:::i;:::-;144736:14;;;;;;;;:::i;:::-;144773:18;;;;144814:19;;;;144856:21;;;;;;;;:::i;:::-;144577:361;;;;;;;;;;;;;;;;;;144900:19;;;;;144577:361;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;144512:442;145074:19;;;;;;145031:24;;145074:11;;;145031:24;:::i;:::-;-1:-1:-1;;;;;144975:248:0;145005:7;144975:248;145112:18;;;;145149:19;;;;145187:21;;;;;;;;:::i;:::-;144975:248;;;;;;;;:::i;:::-;;;;;;;;143063:2179;142985:2257;;;:::o;69291:288::-;67316:1;67921:30;69548:23;69291:288::o;126600:376::-;110812:21;-1:-1:-1;;;;;126764:22:0;;126760:93;;126810:31;;;;;-1:-1:-1;;;;;1802:55:1;;126810:31:0;;;1784:74:1;1757:18;;126810:31:0;1638:226:1;126760:93:0;-1:-1:-1;;;;;126863:27:0;;;;;;;:20;;;:27;;;;;;;;:37;;;;;;;;;;;;;:48;;-1:-1:-1;;126863:48:0;;;;;;;;;;126927:41;;586::1;;;126927::0;;559:18:1;126927:41:0;;;;;;;126693:283;126600:376;;;:::o;128016:845::-;-1:-1:-1;;;;;128147:14:0;;;:18;128143:711;;128186:71;;;;;-1:-1:-1;;;;;128186:36:0;;;;;:71;;65377:10;;128237:4;;128243:7;;128252:4;;128186:71;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;128186:71:0;;;;;;;;-1:-1:-1;;128186:71:0;;;;;;;;;;;;:::i;:::-;;;128182:661;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;128532:6;:13;128549:1;128532:18;128528:300;;128582:25;;;;;-1:-1:-1;;;;;1802:55:1;;128582:25:0;;;1784:74:1;1757:18;;128582:25:0;1638:226:1;128528:300:0;128778:6;128772:13;128763:6;128759:2;128755:15;128748:38;128182:661;128337:51;;;128347:41;128337:51;128333:132;;128420:25;;;;;-1:-1:-1;;;;;1802:55:1;;128420:25:0;;;1784:74:1;1757:18;;128420:25:0;1638:226:1;128333:132:0;128258:222;128016:845;;;;:::o;111452:340::-;111610:4;111639:40;;;111654:25;111639:40;;:105;;-1:-1:-1;111696:48:0;;;111711:33;111696:48;111639:105;:145;;;-1:-1:-1;74914:25:0;74899:40;;;;111748:36;74799:148;125645:736;110812:21;125863:9;;:31;;-1:-1:-1;;;;;;125876:18:0;;;;125863:31;125859:471;;;125911:13;125927:22;125941:7;125927:13;:22::i;:::-;125911:38;-1:-1:-1;;;;;;126080:18:0;;;;;;:35;;;126111:4;-1:-1:-1;;;;;126102:13:0;:5;-1:-1:-1;;;;;126102:13:0;;;126080:35;:69;;;;-1:-1:-1;;;;;;114279:27:0;;;114199:4;114279:27;;;:20;:27;;;;;;;;:37;;;;;;;;;;;;126119:30;126080:69;126076:144;;;126177:27;;;;;-1:-1:-1;;;;;1802:55:1;;126177:27:0;;;1784:74:1;1757:18;;126177:27:0;1638:226:1;126076:144:0;126240:9;126236:83;;;126295:7;126291:2;-1:-1:-1;;;;;126275:28:0;126284:5;-1:-1:-1;;;;;126275:28:0;;;;;;;;;;;126236:83;125896:434;125859:471;126342:26;;;;:17;;:26;;-1:-1:-1;;126342:26:0;;;:31;;;;-1:-1:-1;;;;;126342:31:0;;;;;;;;;;125645:736::o;117596:408::-;117741:38;117755:5;117762:7;117771;117741:13;:38::i;:::-;117736:261;;-1:-1:-1;;;;;117800:19:0;;117796:190;;117847:31;;;;;;;;2993:25:1;;;2966:18;;117847:31:0;2847:177:1;117796:190:0;117926:44;;;;;-1:-1:-1;;;;;26616:55:1;;117926:44:0;;;26598:74:1;26688:18;;;26681:34;;;26571:18;;117926:44:0;26424:297:1;57380:145:0;59213:21;58894:40;;;;;;57443:75;;57489:17;;;;;;;;;;;;;;111134:246;57220:20;:18;:20::i;:::-;110812:21;;111327:15:::1;111337:5:::0;110812:21;111327:15:::1;:::i;:::-;-1:-1:-1::0;111353:9:0::1;::::0;::::1;:19;111365:7:::0;111353:9;:19:::1;:::i;104048:361::-:0;57220:20;:18;:20::i;:::-;103268:21;104240:7;:14:::1;104250:4:::0;104240:7;:14:::1;:::i;:::-;-1:-1:-1::0;104265:10:0::1;::::0;::::1;:20;104278:7:::0;104265:10;:20:::1;:::i;:::-;-1:-1:-1::0;104369:1:0::1;104353:17:::0;;;104381:16:::1;::::0;;::::1;:20:::0;-1:-1:-1;;104048:361:0:o;68203:186::-;57220:20;:18;:20::i;89938:201::-;89349:4;89443:14;;;88429:28;89443:14;;;;;;;;-1:-1:-1;;;;;89443:31:0;;;;;;;;;;;;90022:110;;90073:47;;;;;-1:-1:-1;;;;;26616:55:1;;90073:47:0;;;26598:74:1;26688:18;;;26681:34;;;26571:18;;90073:47:0;26424:297:1;77679:344:0;77771:37;77790:17;77771:18;:37::i;:::-;77824:27;;-1:-1:-1;;;;;77824:27:0;;;;;;;;77868:11;;:15;77864:152;;77900:53;77929:17;77948:4;77900:28;:53::i;77864:152::-;77986:18;:16;:18::i;145544:380::-;145642:14;145659:27;145670:4;145676:9;;145659:10;:27::i;:::-;-1:-1:-1;;;;;89443:31:0;;89349:4;89443:31;;;:14;;:31;:14;:31;;;145642:44;;-1:-1:-1;89443:31:0;;145697:88;;145754:19;;;;;;;;;;;;;;145697:88;145808:10;;;;;145799:20;;;;:8;:20;;;;;;;;;145795:84;;;145843:24;;;;;;;;;;;;;;145795:84;-1:-1:-1;;;145898:10:0;;;;;145889:20;;;;:8;:20;;;;;;:27;;-1:-1:-1;;145889:27:0;145912:4;145889:27;;;145544:380::o;146175:1440::-;146244:19;146335:6;146378:21;146244:19;146410:1198;146434:15;;;;:4;:15;:::i;:::-;:22;;146430:1;:26;146410:1198;;;146478:31;;;:15;;;;:4;:15;:::i;:::-;146494:1;146478:18;;;;;;;:::i;:::-;;;;;;:22;;;;;;;;;;:::i;:::-;:31;;;146474:97;;;146537:18;;;;;;;;;;;;;;146474:97;146652:22;146677:46;;;146691:15;;;;:4;:15;:::i;:::-;146707:1;146691:18;;;;;;;:::i;:::-;;;;;;:22;;;;;;;;;;:::i;:::-;146678:35;;;;:10;;;;:35;:::i;:::-;146677:46;;;;:::i;:::-;146652:71;-1:-1:-1;146752:28:0;146652:71;146752:11;:28;:::i;:::-;146738:42;;146906:4;:10;;;146892:11;:24;146888:98;;;146944:26;;;;;;;;;;;;;;146888:98;147018:15;147004:11;:29;147000:107;;;147061:30;;;;;;;;;;;;;;147000:107;147185:17;147205:15;;;;:4;:15;:::i;:::-;147221:1;147205:18;;;;;;;:::i;:::-;:28;;;:18;;;;;:28;;;;-1:-1:-1;147205:28:0;:::i;:::-;147185:48;-1:-1:-1;;;;;;147252:23:0;;;147248:287;;147297:12;147314:9;-1:-1:-1;;;;;147314:14:0;147336;147314:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;147296:59;;;147379:7;147374:86;;147418:22;;;;;;;;;;;;;;147374:86;147493:9;-1:-1:-1;;;;;147483:36:0;;147504:14;147483:36;;;;2993:25:1;;2981:2;2966:18;;2847:177;147483:36:0;;;;;;;;147277:258;147248:287;-1:-1:-1;;147578:3:0;;146410:1198;;121431:102;121499:26;121509:2;121513:7;121499:26;;;;;;;;;;;;:9;:26::i;116816:336::-;116955:4;-1:-1:-1;;;;;116984:21:0;;;;;;:160;;;117050:7;-1:-1:-1;;;;;117041:16:0;:5;-1:-1:-1;;;;;117041:16:0;;:52;;;-1:-1:-1;;;;;;114279:27:0;;;114199:4;114279:27;;;:20;:27;;;;;;;;:37;;;;;;;;;;;;117061:32;117041:88;;;-1:-1:-1;116379:7:0;116462:26;;;:17;:26;;;;;;-1:-1:-1;;;;;117097:32:0;;;116462:26;;117097:32;117041:88;116977:167;116816:336;-1:-1:-1;;;;116816:336:0:o;77072:286::-;77150:17;-1:-1:-1;;;;;77150:29:0;;77183:1;77150:34;77146:121;;77208:47;;;;;-1:-1:-1;;;;;1802:55:1;;77208:47:0;;;1784:74:1;1757:18;;77208:47:0;1638:226:1;77146:121:0;76181:66;77277:73;;;;-1:-1:-1;;;;;77277:73:0;;;;;;;;;;77072:286::o;17929:279::-;18030:12;18061;18075:23;18102:6;-1:-1:-1;;;;;18102:19:0;18122:4;18102:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18060:67;;;;18145:55;18172:6;18180:7;18189:10;18145:26;:55::i;:::-;18138:62;17929:279;-1:-1:-1;;;;;17929:279:0:o;81621:126::-;81672:9;:13;81668:72;;81709:19;;;;;;;;;;;;;;148013:221;148127:7;148152:14;148169:20;148184:4;148169:14;:20::i;:::-;148152:37;;148207:19;148222:3;;148207:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;148207:6:0;;:19;-1:-1:-1;;148207:14:0;:19;-1:-1:-1;148207:19:0:i;121760:185::-;121855:18;121861:2;121865:7;121855:5;:18::i;:::-;121884:53;121915:1;121919:2;121923:7;121932:4;121884:22;:53::i;18481:595::-;18622:12;18657:7;18652:417;;18681:19;18689:10;18681:7;:19::i;:::-;18652:417;;;18909:17;;:22;:49;;;;-1:-1:-1;;;;;;18935:18:0;;;:23;18909:49;18905:121;;;18986:24;;;;;-1:-1:-1;;;;;1802:55:1;;18986:24:0;;;1784:74:1;1757:18;;18986:24:0;1638:226:1;18905:121:0;-1:-1:-1;19047:10:0;19040:17;;148492:155;148563:7;148590:49;148617:20;148632:4;148617:14;:20::i;:::-;148607:31;;;;;;148590:16;:49::i;28101:259::-;28179:7;28200:17;28219:18;28239:16;28259:27;28270:4;28276:9;28259:10;:27::i;:::-;28199:87;;;;;;28297:28;28309:5;28316:8;28297:11;:28::i;:::-;-1:-1:-1;28343:9:0;;28101:259;-1:-1:-1;;;;28101:259:0:o;120733:335::-;-1:-1:-1;;;;;120801:16:0;;120797:89;;120841:33;;;;;120871:1;120841:33;;;1784:74:1;1757:18;;120841:33:0;1638:226:1;120797:89:0;120896:21;120920:32;120928:2;120932:7;120949:1;120920:7;:32::i;:::-;120896:56;-1:-1:-1;;;;;;120967:27:0;;;120963:98;;121018:31;;;;;121046:1;121018:31;;;1784:74:1;1757:18;;121018:31:0;1638:226:1;19661:528:0;19794:17;;:21;19790:392;;20026:10;20020:17;20083:15;20070:10;20066:2;20062:19;20055:44;19790:392;20153:17;;;;;;;;;;;;;;148916:548;148987:12;131667:460;149073:12;;149100:10;;;;149125;;;;149150:14;;;;;;;;:::i;:::-;149179:34;149193:19;;;;:4;:19;:::i;:::-;149179:13;:34::i;:::-;149228:28;149242:13;;;;:4;:13;:::i;149228:28::-;149271:31;149285:16;;;;:4;:16;:::i;149271:31::-;149317:38;149337:17;;;;:4;:17;:::i;:::-;149317:19;:38::i;:::-;149370:34;149388:15;;;;:4;:15;:::i;:::-;149370:17;:34::i;:::-;149419:26;149433:4;:11;;149419:13;:26::i;:::-;149019:437;;;;;;29953:25:1;;;;29994:18;;29987:34;;;;30037:18;;;30030:34;;;;30080:18;;;30073:34;;;;-1:-1:-1;;;;;30144:55:1;;;30123:19;;;30116:84;30216:19;;;30209:35;;;;30260:19;;;30253:35;30304:19;;;30297:35;30348:19;;;30341:35;30392:19;;;30385:35;30436:19;;;30429:36;29925:19;;149019:437:0;;;;;;;;;;;;;149012:444;;148916:548;;;:::o;105510:178::-;105587:7;105614:66;105647:20;:18;:20::i;:::-;105669:10;85472:4;85466:11;85503:9;85491:22;;85543:4;85534:14;;85527:39;;;;85596:4;85587:14;;85580:34;85653:4;85638:20;;;85235:441;26463:815;26571:7;26580:12;26594:7;26623:9;:16;26643:2;26623:22;26619:652;;26967:4;26952:20;;26946:27;27017:4;27002:20;;26996:27;27075:4;27060:20;;27054:27;26662:9;27046:36;27118:25;27129:4;27046:36;26946:27;26996;27118:10;:25::i;:::-;27111:32;;;;;;;;;;;26619:652;-1:-1:-1;;27241:16:0;;27192:1;;-1:-1:-1;27196:35:0;;26619:652;26463:815;;;;;:::o;31707:542::-;31803:20;31794:5;:29;;;;;;;;:::i;:::-;;31790:452;;31707:542;;:::o;31790:452::-;31901:29;31892:5;:38;;;;;;;;:::i;:::-;;31888:354;;31954:23;;;;;;;;;;;;;;31888:354;32008:35;31999:5;:44;;;;;;;;:::i;:::-;;31995:247;;32067:46;;;;;;;;2993:25:1;;;2966:18;;32067:46:0;2847:177:1;31995:247:0;32144:30;32135:5;:39;;;;;;;;:::i;:::-;;32131:111;;32198:32;;;;;;;;2993:25:1;;;2966:18;;32198:32:0;2847:177:1;149720:131:0;149791:7;149834;;149818:25;;;;;;;:::i;:::-;;;;;;;;149811:32;;149720:131;;;;:::o;150774:450::-;150888:7;;150957:6;150943:28;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;150943:28:0;;150913:58;;150987:9;150982:176;151002:17;;;150982:176;;;151063:20;151073:6;;151080:1;151073:9;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;151063;:20::i;:::-;151053:31;;;;;;151037:10;151048:1;151037:13;;;;;;;;:::i;:::-;;;;;;;;;;:47;151128:3;;150982:176;;;;151204:10;151187:28;;;;;;;;:::i;:::-;;;;;;;;;;;;;151177:39;;;;;;151170:46;;;150774:450;;;;:::o;152060:433::-;152140:7;;152211:4;152197:26;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;152197:26:0;;152160:63;;152239:9;152234:186;152254:15;;;152234:186;;;152320:25;152337:4;;152342:1;152337:7;;;;;;;:::i;:::-;;;;;;152320:16;:25::i;:::-;152310:36;;;;;;152287:17;152305:1;152287:20;;;;;;;;:::i;:::-;;;;;;;;;;:59;152390:3;;152234:186;;152695:432;152767:7;131454:163;152882:17;;;;:4;:17;:::i;:::-;152918:12;;;;152949:11;;;;152979:12;;;;153010:14;;;;;;;;:::i;:::-;153043:12;;;;153074:19;;;;;;;;:::i;:::-;152818:290;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;152794:325;;;;;;152787:332;;152695:432;;;:::o;104500:111::-;104553:7;104580:23;:21;:23::i;:::-;104573:30;;104500:111;:::o;29621:1545::-;29736:7;;;30684:66;30671:79;;30667:166;;;-1:-1:-1;30783:1:0;;-1:-1:-1;30787:30:0;;-1:-1:-1;30819:1:0;30767:54;;30667:166;30947:24;;;30930:14;30947:24;;;;;;;;;32321:25:1;;;32394:4;32382:17;;32362:18;;;32355:45;;;;32416:18;;;32409:34;;;32459:18;;;32452:34;;;30947:24:0;;32293:19:1;;30947:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;30947:24:0;;-1:-1:-1;;30947:24:0;;;-1:-1:-1;;;;;;;30986:20:0;;30982:115;;-1:-1:-1;31039:1:0;;-1:-1:-1;31043:29:0;;-1:-1:-1;31039:1:0;;-1:-1:-1;31023:62:0;;30982:115;31117:6;-1:-1:-1;31125:20:0;;-1:-1:-1;31125:20:0;;-1:-1:-1;29621:1545:0;;;;;;;;;:::o;150158:272::-;150238:12;131218:65;150322:33;150336:18;:11;;:18;:::i;150322:33::-;150370:41;150384:26;;;;:11;:26;:::i;150370:41::-;150270:152;;;;;;32699:25:1;;;;32740:18;;32733:34;;;;32783:18;;;32776:34;32672:18;;150270:152:0;32497:319:1;151534:174:0;151611:12;131347:55;151675:14;;;;:4;:14;:::i;:::-;151691:8;;;;;;;;:::i;:::-;151643:57;;;;;;;;;33021:25:1;;;-1:-1:-1;;;;;33082:55:1;;;;33077:2;33062:18;;33055:83;33186:6;33174:19;33169:2;33154:18;;33147:47;33009:2;32994:18;;32821:379;104619:249:0;104674:7;102461:111;104765:17;:15;:17::i;:::-;104784:20;:18;:20::i;:::-;104725:124;;;;;;33464:25:1;;;;33505:18;;33498:34;;;;33548:18;;;33541:34;104806:13:0;33591:18:1;;;33584:34;104829:4:0;33634:19:1;;;33627:84;33436:19;;104725:124:0;;;;;;;;;;;;104701:159;;;;;;104694:166;;104619:249;:::o;107686:702::-;107736:7;103268:21;107736:7;107833:13;:11;:13::i;:::-;107861:18;;107812:34;;-1:-1:-1;107861:22:0;107857:524;;107907:22;;;;;;;;107686:702;-1:-1:-1;;107686:702:0:o;107857:524::-;108208:13;;108240:15;;108236:134;;108283:10;107686:702;-1:-1:-1;;;107686:702:0:o;108236:134::-;108341:13;108334:20;;;;;107686:702;:::o;108616:738::-;108669:7;103268:21;108669:7;108769:16;:14;:16::i;:::-;108800:21;;108745:40;;-1:-1:-1;108800:25:0;108796:551;;108849:25;;;;;;;;108616:738;-1:-1:-1;;108616:738:0:o;108796:551::-;109165:16;;;;109200:18;;109196:140;;109246:13;108616:738;-1:-1:-1;;;108616:738:0:o;14:177:1:-;99:66;92:5;88:78;81:5;78:89;68:117;;181:1;178;171:12;196:245;254:6;307:2;295:9;286:7;282:23;278:32;275:52;;;323:1;320;313:12;275:52;362:9;349:23;381:30;405:5;381:30;:::i;638:250::-;723:1;733:113;747:6;744:1;741:13;733:113;;;823:11;;;817:18;804:11;;;797:39;769:2;762:10;733:113;;;-1:-1:-1;;880:1:1;862:16;;855:27;638:250::o;893:330::-;935:3;973:5;967:12;1000:6;995:3;988:19;1016:76;1085:6;1078:4;1073:3;1069:14;1062:4;1055:5;1051:16;1016:76;:::i;:::-;1137:2;1125:15;-1:-1:-1;;1121:88:1;1112:98;;;;1212:4;1108:109;;893:330;-1:-1:-1;;893:330:1:o;1228:220::-;1377:2;1366:9;1359:21;1340:4;1397:45;1438:2;1427:9;1423:18;1415:6;1397:45;:::i;1453:180::-;1512:6;1565:2;1553:9;1544:7;1540:23;1536:32;1533:52;;;1581:1;1578;1571:12;1533:52;-1:-1:-1;1604:23:1;;1453:180;-1:-1:-1;1453:180:1:o;1869:196::-;1937:20;;-1:-1:-1;;;;;1986:54:1;;1976:65;;1966:93;;2055:1;2052;2045:12;1966:93;1869:196;;;:::o;2070:254::-;2138:6;2146;2199:2;2187:9;2178:7;2174:23;2170:32;2167:52;;;2215:1;2212;2205:12;2167:52;2238:29;2257:9;2238:29;:::i;:::-;2228:39;2314:2;2299:18;;;;2286:32;;-1:-1:-1;;;2070:254:1:o;2329:328::-;2406:6;2414;2422;2475:2;2463:9;2454:7;2450:23;2446:32;2443:52;;;2491:1;2488;2481:12;2443:52;2514:29;2533:9;2514:29;:::i;:::-;2504:39;;2562:38;2596:2;2585:9;2581:18;2562:38;:::i;:::-;2552:48;;2647:2;2636:9;2632:18;2619:32;2609:42;;2329:328;;;;;:::o;3029:184::-;3081:77;3078:1;3071:88;3178:4;3175:1;3168:15;3202:4;3199:1;3192:15;3218:334;3289:2;3283:9;3345:2;3335:13;;-1:-1:-1;;3331:86:1;3319:99;;3448:18;3433:34;;3469:22;;;3430:62;3427:88;;;3495:18;;:::i;:::-;3531:2;3524:22;3218:334;;-1:-1:-1;3218:334:1:o;3557:590::-;3600:5;3653:3;3646:4;3638:6;3634:17;3630:27;3620:55;;3671:1;3668;3661:12;3620:55;3707:6;3694:20;3733:18;3729:2;3726:26;3723:52;;;3755:18;;:::i;:::-;3799:114;3907:4;-1:-1:-1;;3831:4:1;3827:2;3823:13;3819:86;3815:97;3799:114;:::i;:::-;3938:2;3929:7;3922:19;3984:3;3977:4;3972:2;3964:6;3960:15;3956:26;3953:35;3950:55;;;4001:1;3998;3991:12;3950:55;4066:2;4059:4;4051:6;4047:17;4040:4;4031:7;4027:18;4014:55;4114:1;4089:16;;;4107:4;4085:27;4078:38;;;;4093:7;3557:590;-1:-1:-1;;;3557:590:1:o;4152:1019::-;4287:6;4295;4303;4311;4319;4372:3;4360:9;4351:7;4347:23;4343:33;4340:53;;;4389:1;4386;4379:12;4340:53;4429:9;4416:23;4458:18;4499:2;4491:6;4488:14;4485:34;;;4515:1;4512;4505:12;4485:34;4538:50;4580:7;4571:6;4560:9;4556:22;4538:50;:::i;:::-;4528:60;;4641:2;4630:9;4626:18;4613:32;4597:48;;4670:2;4660:8;4657:16;4654:36;;;4686:1;4683;4676:12;4654:36;4709:52;4753:7;4742:8;4731:9;4727:24;4709:52;:::i;:::-;4699:62;;4814:2;4803:9;4799:18;4786:32;4770:48;;4843:2;4833:8;4830:16;4827:36;;;4859:1;4856;4849:12;4827:36;4882:52;4926:7;4915:8;4904:9;4900:24;4882:52;:::i;:::-;4872:62;;4987:2;4976:9;4972:18;4959:32;4943:48;;5016:2;5006:8;5003:16;5000:36;;;5032:1;5029;5022:12;5000:36;;5055:52;5099:7;5088:8;5077:9;5073:24;5055:52;:::i;:::-;5045:62;;;5126:39;5160:3;5149:9;5145:19;5126:39;:::i;:::-;5116:49;;4152:1019;;;;;;;;:::o;5176:254::-;5244:6;5252;5305:2;5293:9;5284:7;5280:23;5276:32;5273:52;;;5321:1;5318;5311:12;5273:52;5357:9;5344:23;5334:33;;5386:38;5420:2;5409:9;5405:18;5386:38;:::i;:::-;5376:48;;5176:254;;;;;:::o;5435:395::-;5512:6;5520;5573:2;5561:9;5552:7;5548:23;5544:32;5541:52;;;5589:1;5586;5579:12;5541:52;5612:29;5631:9;5612:29;:::i;:::-;5602:39;;5692:2;5681:9;5677:18;5664:32;5719:18;5711:6;5708:30;5705:50;;;5751:1;5748;5741:12;5705:50;5774;5816:7;5807:6;5796:9;5792:22;5774:50;:::i;:::-;5764:60;;;5435:395;;;;;:::o;5835:186::-;5894:6;5947:2;5935:9;5926:7;5922:23;5918:32;5915:52;;;5963:1;5960;5953:12;5915:52;5986:29;6005:9;5986:29;:::i;6208:1335::-;6605:66;6597:6;6593:79;6582:9;6575:98;6556:4;6692:2;6730:3;6725:2;6714:9;6710:18;6703:31;6757:46;6798:3;6787:9;6783:19;6775:6;6757:46;:::i;:::-;6851:9;6843:6;6839:22;6834:2;6823:9;6819:18;6812:50;6885:33;6911:6;6903;6885:33;:::i;:::-;6949:2;6934:18;;6927:34;;;-1:-1:-1;;;;;6998:55:1;;6992:3;6977:19;;6970:84;7085:3;7070:19;;7063:35;;;7135:22;;;7129:3;7114:19;;7107:51;7207:13;;7229:22;;;7305:15;;;;-1:-1:-1;7267:15:1;;;;-1:-1:-1;7348:169:1;7362:6;7359:1;7356:13;7348:169;;;7423:13;;7411:26;;7492:15;;;;7457:12;;;;7384:1;7377:9;7348:169;;;-1:-1:-1;7534:3:1;;6208:1335;-1:-1:-1;;;;;;;;;;;;6208:1335:1:o;7548:384::-;7628:8;7638:6;7692:3;7685:4;7677:6;7673:17;7669:27;7659:55;;7710:1;7707;7700:12;7659:55;-1:-1:-1;7733:20:1;;7776:18;7765:30;;7762:50;;;7808:1;7805;7798:12;7762:50;7845:4;7837:6;7833:17;7821:29;;7905:3;7898:4;7888:6;7885:1;7881:14;7873:6;7869:27;7865:38;7862:47;7859:67;;;7922:1;7919;7912:12;7859:67;7548:384;;;;;:::o;7937:846::-;8098:6;8106;8114;8122;8175:2;8163:9;8154:7;8150:23;8146:32;8143:52;;;8191:1;8188;8181:12;8143:52;8231:9;8218:23;8260:18;8301:2;8293:6;8290:14;8287:34;;;8317:1;8314;8307:12;8287:34;8356:87;8435:7;8426:6;8415:9;8411:22;8356:87;:::i;:::-;8462:8;;-1:-1:-1;8330:113:1;-1:-1:-1;8550:2:1;8535:18;;8522:32;;-1:-1:-1;8566:16:1;;;8563:36;;;8595:1;8592;8585:12;8563:36;;8634:89;8715:7;8704:8;8693:9;8689:24;8634:89;:::i;:::-;7937:846;;;;-1:-1:-1;8742:8:1;-1:-1:-1;;;;7937:846:1:o;8788:160::-;8853:20;;8909:13;;8902:21;8892:32;;8882:60;;8938:1;8935;8928:12;8953:254;9018:6;9026;9079:2;9067:9;9058:7;9054:23;9050:32;9047:52;;;9095:1;9092;9085:12;9047:52;9118:29;9137:9;9118:29;:::i;:::-;9108:39;;9166:35;9197:2;9186:9;9182:18;9166:35;:::i;9212:180::-;9268:6;9321:2;9309:9;9300:7;9296:23;9292:32;9289:52;;;9337:1;9334;9327:12;9289:52;9360:26;9376:9;9360:26;:::i;9397:538::-;9492:6;9500;9508;9516;9569:3;9557:9;9548:7;9544:23;9540:33;9537:53;;;9586:1;9583;9576:12;9537:53;9609:29;9628:9;9609:29;:::i;:::-;9599:39;;9657:38;9691:2;9680:9;9676:18;9657:38;:::i;:::-;9647:48;;9742:2;9731:9;9727:18;9714:32;9704:42;;9797:2;9786:9;9782:18;9769:32;9824:18;9816:6;9813:30;9810:50;;;9856:1;9853;9846:12;9810:50;9879;9921:7;9912:6;9901:9;9897:22;9879:50;:::i;:::-;9869:60;;;9397:538;;;;;;;:::o;9940:857::-;10047:6;10055;10063;10116:2;10104:9;10095:7;10091:23;10087:32;10084:52;;;10132:1;10129;10122:12;10084:52;10172:9;10159:23;10201:18;10242:2;10234:6;10231:14;10228:34;;;10258:1;10255;10248:12;10228:34;10281:22;;;;10337:3;10319:16;;;10315:26;10312:46;;;10354:1;10351;10344:12;10312:46;10377:2;;-1:-1:-1;10432:2:1;10417:18;;10404:32;;10448:16;;;10445:36;;;10477:1;10474;10467:12;10445:36;10515:8;10504:9;10500:24;10490:34;;10562:7;10555:4;10551:2;10547:13;10543:27;10533:55;;10584:1;10581;10574:12;10533:55;10624:2;10611:16;10650:2;10642:6;10639:14;10636:34;;;10666:1;10663;10656:12;10636:34;10711:7;10706:2;10697:6;10693:2;10689:15;10685:24;10682:37;10679:57;;;10732:1;10729;10722:12;10679:57;10763:2;10759;10755:11;10745:21;;10785:6;10775:16;;;;;9940:857;;;;;:::o;10802:260::-;10870:6;10878;10931:2;10919:9;10910:7;10906:23;10902:32;10899:52;;;10947:1;10944;10937:12;10899:52;10970:29;10989:9;10970:29;:::i;:::-;10960:39;;11018:38;11052:2;11041:9;11037:18;11018:38;:::i;11067:943::-;11120:5;11173:3;11166:4;11158:6;11154:17;11150:27;11140:55;;11191:1;11188;11181:12;11140:55;11227:6;11214:20;11253:4;11276:18;11313:2;11309;11306:10;11303:36;;;11319:18;;:::i;:::-;11365:2;11362:1;11358:10;11388:28;11412:2;11408;11404:11;11388:28;:::i;:::-;11450:15;;;11520;;;11516:24;;;11481:12;;;;11552:15;;;11549:35;;;11580:1;11577;11570:12;11549:35;11616:2;11608:6;11604:15;11593:26;;11628:353;11644:6;11639:3;11636:15;11628:353;;;11730:3;11717:17;11766:2;11753:11;11750:19;11747:109;;;11810:1;11839:2;11835;11828:14;11747:109;11881:57;11934:3;11929:2;11915:11;11907:6;11903:24;11899:33;11881:57;:::i;:::-;11869:70;;-1:-1:-1;11661:12:1;;;;11959;;;;11628:353;;;11999:5;11067:943;-1:-1:-1;;;;;;;;11067:943:1:o;12015:150::-;12090:20;;12139:1;12129:12;;12119:40;;12155:1;12152;12145:12;12170:1138;12383:6;12391;12399;12407;12415;12423;12476:3;12464:9;12455:7;12451:23;12447:33;12444:53;;;12493:1;12490;12483:12;12444:53;12529:9;12516:23;12506:33;;12590:2;12579:9;12575:18;12562:32;12613:18;12654:2;12646:6;12643:14;12640:34;;;12670:1;12667;12660:12;12640:34;12693:60;12745:7;12736:6;12725:9;12721:22;12693:60;:::i;:::-;12683:70;;12806:2;12795:9;12791:18;12778:32;12762:48;;12835:2;12825:8;12822:16;12819:36;;;12851:1;12848;12841:12;12819:36;12874:52;12918:7;12907:8;12896:9;12892:24;12874:52;:::i;:::-;12864:62;;12976:2;12965:9;12961:18;12948:32;12935:45;;13009:1;13002:5;12999:12;12989:40;;13025:1;13022;13015:12;12989:40;13048:5;13038:15;;13072:46;13113:3;13102:9;13098:19;13072:46;:::i;:::-;13062:56;;13171:3;13160:9;13156:19;13143:33;13127:49;;13201:2;13191:8;13188:16;13185:36;;;13217:1;13214;13207:12;13185:36;;13240:62;13294:7;13283:8;13272:9;13268:24;13240:62;:::i;:::-;13230:72;;;12170:1138;;;;;;;;:::o;13313:437::-;13392:1;13388:12;;;;13435;;;13456:61;;13510:4;13502:6;13498:17;13488:27;;13456:61;13563:2;13555:6;13552:14;13532:18;13529:38;13526:218;;13600:77;13597:1;13590:88;13701:4;13698:1;13691:15;13729:4;13726:1;13719:15;13526:218;;13313:437;;;:::o;14932:184::-;14984:77;14981:1;14974:88;15081:4;15078:1;15071:15;15105:4;15102:1;15095:15;15121:384;15215:4;15273:11;15260:25;15363:66;15352:8;15336:14;15332:29;15328:102;15308:18;15304:127;15294:155;;15445:1;15442;15435:12;15294:155;15466:33;;;;;15121:384;-1:-1:-1;;15121:384:1:o;15510:184::-;15562:77;15559:1;15552:88;15659:4;15656:1;15649:15;15683:4;15680:1;15673:15;15699:125;15764:9;;;15785:10;;;15782:36;;;15798:18;;:::i;15829:580::-;15906:4;15912:6;15972:11;15959:25;16062:66;16051:8;16035:14;16031:29;16027:102;16007:18;16003:127;15993:155;;16144:1;16141;16134:12;15993:155;16171:33;;16223:20;;;-1:-1:-1;16266:18:1;16255:30;;16252:50;;;16298:1;16295;16288:12;16252:50;16331:4;16319:17;;-1:-1:-1;16362:14:1;16358:27;;;16348:38;;16345:58;;;16399:1;16396;16389:12;16414:184;16466:77;16463:1;16456:88;16563:4;16560:1;16553:15;16587:4;16584:1;16577:15;16603:616;16655:3;16693:5;16687:12;16720:6;16715:3;16708:19;16746:4;16787:2;16782:3;16778:12;16812:11;16839;16832:18;;16889:6;16886:1;16882:14;16875:5;16871:26;16859:38;;16931:2;16924:5;16920:14;16952:1;16962:231;16976:6;16973:1;16970:13;16962:231;;;17047:5;17041:4;17037:16;17032:3;17025:29;17075:38;17108:4;17099:6;17093:13;17075:38;:::i;:::-;17171:12;;;;17067:46;-1:-1:-1;17136:15:1;;;;16998:1;16991:9;16962:231;;;-1:-1:-1;17209:4:1;;16603:616;-1:-1:-1;;;;;;;16603:616:1:o;17224:948::-;17613:4;17653:1;17645:6;17642:13;17632:47;;17659:18;;:::i;:::-;17706:6;17695:9;17688:25;17743:1;17735:6;17732:13;17722:47;;17749:18;;:::i;:::-;17805:6;17800:2;17789:9;17785:18;17778:34;17848:3;17843:2;17832:9;17828:18;17821:31;17875:46;17916:3;17905:9;17901:19;17893:6;17875:46;:::i;:::-;17969:9;17961:6;17957:22;17952:2;17941:9;17937:18;17930:50;18003:43;18039:6;18031;18003:43;:::i;:::-;17989:57;;18095:9;18087:6;18083:22;18077:3;18066:9;18062:19;18055:51;18123:43;18159:6;18151;18123:43;:::i;18177:184::-;18247:6;18300:2;18288:9;18279:7;18275:23;18271:32;18268:52;;;18316:1;18313;18306:12;18268:52;-1:-1:-1;18339:16:1;;18177:184;-1:-1:-1;18177:184:1:o;18366:639::-;18494:4;18500:6;18560:11;18547:25;18650:66;18639:8;18623:14;18619:29;18615:102;18595:18;18591:127;18581:155;;18732:1;18729;18722:12;18581:155;18759:33;;18811:20;;;-1:-1:-1;18854:18:1;18843:30;;18840:50;;;18886:1;18883;18876:12;18840:50;18919:4;18907:17;;-1:-1:-1;18970:1:1;18966:14;;;18950;18946:35;18936:46;;18933:66;;;18995:1;18992;18985:12;19010:391;19111:4;19169:11;19156:25;19259:66;19248:8;19232:14;19228:29;19224:102;19204:18;19200:127;19190:155;;19341:1;19338;19331:12;19992:326;20081:6;20076:3;20069:19;20133:6;20126:5;20119:4;20114:3;20110:14;20097:43;;20185:1;20178:4;20169:6;20164:3;20160:16;20156:27;20149:38;20051:3;20307:4;-1:-1:-1;;20232:2:1;20224:6;20220:15;20216:88;20211:3;20207:98;20203:109;20196:116;;19992:326;;;;:::o;20323:437::-;20540:2;20529:9;20522:21;20503:4;20566:62;20624:2;20613:9;20609:18;20601:6;20593;20566:62;:::i;:::-;20676:9;20668:6;20664:22;20659:2;20648:9;20644:18;20637:50;20704;20747:6;20739;20731;20704:50;:::i;:::-;20696:58;20323:437;-1:-1:-1;;;;;;;20323:437:1:o;20891:545::-;20993:2;20988:3;20985:11;20982:448;;;21029:1;21054:5;21050:2;21043:17;21099:4;21095:2;21085:19;21169:2;21157:10;21153:19;21150:1;21146:27;21140:4;21136:38;21205:4;21193:10;21190:20;21187:47;;;-1:-1:-1;21228:4:1;21187:47;21283:2;21278:3;21274:12;21271:1;21267:20;21261:4;21257:31;21247:41;;21338:82;21356:2;21349:5;21346:13;21338:82;;;21401:17;;;21382:1;21371:13;21338:82;;;21342:3;;;20891:545;;;:::o;21672:1325::-;21796:18;21791:3;21788:27;21785:53;;;21818:18;;:::i;:::-;21847:94;21937:3;21897:38;21929:4;21923:11;21897:38;:::i;:::-;21891:4;21847:94;:::i;:::-;21967:1;21992:2;21987:3;21984:11;22009:1;22004:735;;;;22783:1;22800:3;22797:93;;;-1:-1:-1;22856:19:1;;;22843:33;22797:93;21578:66;21569:1;21565:11;;;21561:84;21557:89;21547:100;21653:1;21649:11;;;21544:117;22903:78;;21977:1014;;22004:735;20838:1;20831:14;;;20875:4;20862:18;;-1:-1:-1;;22040:76:1;;;22200:9;22222:229;22236:7;22233:1;22230:14;22222:229;;;22325:19;;;22312:33;22297:49;;22432:4;22417:20;;;;22385:1;22373:14;;;;22252:12;22222:229;;;22226:3;22479;22470:7;22467:16;22464:219;;;22599:66;22593:3;22587;22584:1;22580:11;22576:21;22572:94;22568:99;22555:9;22550:3;22546:19;22533:33;22529:139;22521:6;22514:155;22464:219;;;22726:1;22720:3;22717:1;22713:11;22709:19;22703:4;22696:33;21977:1014;;21672:1325;;;:::o;23002:636::-;23127:4;23133:6;23193:11;23180:25;23283:66;23272:8;23256:14;23252:29;23248:102;23228:18;23224:127;23214:155;;23365:1;23362;23355:12;23214:155;23392:33;;23444:20;;;-1:-1:-1;23487:18:1;23476:30;;23473:50;;;23519:1;23516;23509:12;23473:50;23552:4;23540:17;;-1:-1:-1;23603:1:1;23599:14;;;23583;23579:35;23569:46;;23566:66;;;23628:1;23625;23618:12;23643:508;23888:6;23877:9;23870:25;23931:2;23926;23915:9;23911:18;23904:30;23851:4;23957:62;24015:2;24004:9;24000:18;23992:6;23984;23957:62;:::i;:::-;24067:9;24059:6;24055:22;24050:2;24039:9;24035:18;24028:50;24095;24138:6;24130;24122;24095:50;:::i;24156:270::-;24229:6;24282:2;24270:9;24261:7;24257:23;24253:32;24250:52;;;24298:1;24295;24288:12;24250:52;24337:9;24324:23;24376:1;24369:5;24366:12;24356:40;;24392:1;24389;24382:12;24431:140;24512:1;24505:5;24502:12;24492:46;;24518:18;;:::i;:::-;24547;;24431:140::o;24576:717::-;24903:25;;;-1:-1:-1;;;;;25025:15:1;;;25020:2;25005:18;;24998:43;25077:15;;25072:2;25057:18;;25050:43;25124:2;25109:18;;25102:34;;;25167:3;25152:19;;25145:35;;;24890:3;24875:19;;25189:54;25238:3;25223:19;;25215:6;25189:54;:::i;:::-;25280:6;25274:3;25263:9;25259:19;25252:35;24576:717;;;;;;;;;;:::o;25298:350::-;25512:25;;;25568:2;25553:18;;25546:34;;;25500:2;25485:18;;25589:53;25638:2;25623:18;;25615:6;25589:53;:::i;25653:512::-;25847:4;-1:-1:-1;;;;;25957:2:1;25949:6;25945:15;25934:9;25927:34;26009:2;26001:6;25997:15;25992:2;25981:9;25977:18;25970:43;;26049:6;26044:2;26033:9;26029:18;26022:34;26092:3;26087:2;26076:9;26072:18;26065:31;26113:46;26154:3;26143:9;26139:19;26131:6;26113:46;:::i;:::-;26105:54;25653:512;-1:-1:-1;;;;;;25653:512:1:o;26170:249::-;26239:6;26292:2;26280:9;26271:7;26267:23;26263:32;26260:52;;;26308:1;26305;26298:12;26260:52;26340:9;26334:16;26359:30;26383:5;26359:30;:::i;26726:1471::-;26852:3;26846:10;26879:18;26871:6;26868:30;26865:56;;;26901:18;;:::i;:::-;26930:97;27020:6;26980:38;27012:4;27006:11;26980:38;:::i;:::-;26974:4;26930:97;:::i;:::-;27082:4;;27146:2;27135:14;;27163:1;27158:782;;;;27984:1;28001:6;27998:89;;;-1:-1:-1;28053:19:1;;;28047:26;27998:89;21578:66;21569:1;21565:11;;;21561:84;21557:89;21547:100;21653:1;21649:11;;;21544:117;28100:81;;27128:1063;;27158:782;20838:1;20831:14;;;20875:4;20862:18;;-1:-1:-1;;27194:79:1;;;27371:236;27385:7;27382:1;27379:14;27371:236;;;27474:19;;;27468:26;27453:42;;27566:27;;;;27534:1;27522:14;;;;27401:19;;27371:236;;;27375:3;27635:6;27626:7;27623:19;27620:261;;;27696:19;;;27690:26;27797:66;27779:1;27775:14;;;27791:3;27771:24;27767:97;27763:102;27748:118;27733:134;;27620:261;-1:-1:-1;;;;;27927:1:1;27911:14;;;27907:22;27894:36;;-1:-1:-1;26726:1471:1:o;28504:272::-;28562:6;28615:2;28603:9;28594:7;28590:23;28586:32;28583:52;;;28631:1;28628;28621:12;28583:52;28670:9;28657:23;28720:6;28713:5;28709:18;28702:5;28699:29;28689:57;;28742:1;28739;28732:12;28781:168;28854:9;;;28885;;28902:15;;;28896:22;;28882:37;28872:71;;28923:18;;:::i;28954:274::-;28994:1;29020;29010:189;;29055:77;29052:1;29045:88;29156:4;29153:1;29146:15;29184:4;29181:1;29174:15;29010:189;-1:-1:-1;29213:9:1;;28954:274::o;29233:287::-;29362:3;29400:6;29394:13;29416:66;29475:6;29470:3;29463:4;29455:6;29451:17;29416:66;:::i;30476:271::-;30659:6;30651;30646:3;30633:33;30615:3;30685:16;;30710:13;;;30685:16;30476:271;-1:-1:-1;30476:271:1:o;30752:543::-;30970:13;;30913:3;;30944;;31023:4;31050:15;;;30913:3;31093:175;31107:6;31104:1;31101:13;31093:175;;;31170:13;;31156:28;;31206:14;;;;31243:15;;;;31129:1;31122:9;31093:175;;;-1:-1:-1;31284:5:1;;30752:543;-1:-1:-1;;;;;;30752:543:1:o;31300:789::-;31600:4;31642:3;31631:9;31627:19;31619:27;;31673:6;31662:9;31655:25;-1:-1:-1;;;;;31789:2:1;31781:6;31777:15;31772:2;31761:9;31757:18;31750:43;31829:6;31824:2;31813:9;31809:18;31802:34;31872:6;31867:2;31856:9;31852:18;31845:34;31916:6;31910:3;31899:9;31895:19;31888:35;31932:54;31981:3;31970:9;31966:19;31958:6;31932:54;:::i;:::-;32023:6;32017:3;32006:9;32002:19;31995:35;32079:2;32071:6;32067:15;32061:3;32050:9;32046:19;32039:44;;31300:789;;;;;;;;;;;:::o
Swarm Source
ipfs://cce68c050e730a1dd7997428d1c036ada487ef84a100a2cfd78c4c8dd0e8a8c8
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in XDAI
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.