Source Code
Overview
CELO Balance
CELO Value
$0.00Multichain Info
View more zero value Internal Transactions in Advanced View mode
Advanced 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 celoscan.io on 2024-02-26
*/
// SPDX-License-Identifier: Apache-2.0
/*
.____ ________
| | _____ ___.__. __________\_____ \
| | \__ \< | |/ __ \_ __ \_(__ <
| |___ / __ \\___ \ ___/| | \/ \
|_______ (____ / ____|\___ >__| /______ /
\/ \/\/ \/ \/
*/
pragma solidity 0.8.20;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Muldiv operation overflow.
*/
error MathOverflowedMulDiv();
enum Rounding {
Floor, // Toward negative infinity
Ceil, // Toward positive infinity
Trunc, // Toward zero
Expand // Away from zero
}
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds towards infinity instead
* of rounding towards zero.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
// Guarantee the same behavior as in a regular Solidity division.
return a / b;
}
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
* Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator)
internal
pure
returns (uint256 result)
{
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0 = x * y; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
if (denominator <= prod1) {
revert MathOverflowedMulDiv();
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator.
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363.
uint256 twos = denominator & (0 - denominator);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
// works in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding)
internal
pure
returns (uint256)
{
uint256 result = mulDiv(x, y, denominator);
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}
/**
* @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);
}
}
}
/**
* @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));
}
}
/**
* @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)
}
}
}
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
);
}
/**
* @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
}
}
}
/**
* @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("");
}
}
}
}
/**
* @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);
}
}
}
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
/**
* @dev 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);
}
/**
* @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);
}
/**
* @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);
}
/**
* @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;
}
}
/**
* @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;
}
}
/**
* @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);
}
/**
* @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))
}
}
}
}
}
}
/**
* @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;
}
/**
* @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;
}
}
}
/**
* @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);
}
/**
* @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);
}
/**
* @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();
}
}
}
// 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
}
}
}
/**
* @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();
}
}
}
/**
* @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);
}
}
}
/**
* @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;
}
}
/// @title CUBE
/// @dev Implementation of an NFT smart contract with EIP712 signatures.
/// The contract is upgradeable using OpenZeppelin's UUPSUpgradeable pattern.
contract CUBE is
Initializable,
ERC721Upgradeable,
AccessControlUpgradeable,
UUPSUpgradeable,
EIP712Upgradeable,
ReentrancyGuardUpgradeable
{
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();
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)"
);
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)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;
enum QuestType {
QUEST,
STREAK
}
enum Difficulty {
BEGINNER,
INTERMEDIATE,
ADVANCED
}
enum TokenType {
ERC20,
ERC721,
ERC1155,
NATIVE
}
/// @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);
/// @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
struct RewardData {
address tokenAddress;
uint256 chainId;
uint256 amount;
uint256 tokenId;
TokenType tokenType;
}
/// @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 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 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 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) {
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
)
);
}
/// @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) {
emit QuestMetadata(questId, questType, difficulty, title, tags, communities);
}
/// @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__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"},{"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 CUBE.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":"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":[{"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 CUBE.TokenType","name":"tokenType","type":"uint8"}],"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":"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
60a0604052306080523480156200001557600080fd5b506200002062000026565b620000da565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000775760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000d75780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516141d86200010460003960008181611882015281816118ab0152611a7d01526141d86000f3fe6080604052600436106101d85760003560e01c806370a0823111610102578063aab4160111610095578063d547741f11610064578063d547741f146105e9578063e985e9c514610609578063f72c0d8b14610671578063f907497c146106a557600080fd5b8063aab4160114610546578063ad3cb1cc14610560578063b88d4fde146105a9578063c87b56dd146105c957600080fd5b8063a1ebf35d116100d1578063a1ebf35d146104bd578063a217fddf146104f1578063a22cb46514610506578063a35d3d861461052657600080fd5b806370a08231146103fb57806384b0196e1461041b57806391d148541461044357806395d89b41146104a857600080fd5b80632e6400241161017a57806342842e0e1161014957806342842e0e146103935780634f1ef286146103b357806352d1902d146103c65780636352211e146103db57600080fd5b80632e6400241461031e5780632f2ff15d1461033e57806336568abe1461035e5780633ccfd60b1461037e57600080fd5b8063095ea7b3116101b6578063095ea7b31461026c5780630bdd68751461028e57806323b872dd146102a1578063248a9ca3146102c157600080fd5b806301ffc9a7146101dd57806306fdde0314610212578063081812fc14610234575b600080fd5b3480156101e957600080fd5b506101fd6101f83660046132bd565b6106c5565b60405190151581526020015b60405180910390f35b34801561021e57600080fd5b506102276106d6565b604051610209919061332a565b34801561024057600080fd5b5061025461024f36600461333d565b61078c565b6040516001600160a01b039091168152602001610209565b34801561027857600080fd5b5061028c610287366004613372565b6107d4565b005b61028c61029c3660046133e8565b6107e3565b3480156102ad57600080fd5b5061028c6102bc366004613454565b610977565b3480156102cd57600080fd5b506103106102dc36600461333d565b60009081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b604051908152602001610209565b34801561032a57600080fd5b5061028c610339366004613560565b610a33565b34801561034a57600080fd5b5061028c61035936600461361e565b610bf2565b34801561036a57600080fd5b5061028c61037936600461361e565b610c36565b34801561038a57600080fd5b5061028c610c87565b34801561039f57600080fd5b5061028c6103ae366004613454565b610d4c565b61028c6103c136600461364a565b610d67565b3480156103d257600080fd5b50610310610d82565b3480156103e757600080fd5b506102546103f636600461333d565b610db1565b34801561040757600080fd5b50610310610416366004613698565b610dbc565b34801561042757600080fd5b50610430610e43565b60405161020997969594939291906136b3565b34801561044f57600080fd5b506101fd61045e36600461361e565b60009182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156104b457600080fd5b50610227610f3f565b3480156104c957600080fd5b506103107f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca4081565b3480156104fd57600080fd5b50610310600081565b34801561051257600080fd5b5061028c610521366004613775565b610f90565b34801561053257600080fd5b5061028c61054136600461379f565b610f9b565b34801561055257600080fd5b506001546101fd9060ff1681565b34801561056c57600080fd5b506102276040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b3480156105b557600080fd5b5061028c6105c43660046137ba565b610fe7565b3480156105d557600080fd5b506102276105e436600461333d565b610ffe565b3480156105f557600080fd5b5061028c61060436600461361e565b6110a0565b34801561061557600080fd5b506101fd610624366004613822565b6001600160a01b0391821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b34801561067d57600080fd5b506103107fa615a8afb6fffcb8c6809ac0997b5c9c12b8cc97651150f14c8f6203168cff4c81565b3480156106b157600080fd5b5061028c6106c03660046138fa565b6110e4565b60006106d082611157565b92915050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793008054606091908190610708906139b5565b80601f0160208091040260200160405190810160405280929190818152602001828054610734906139b5565b80156107815780601f1061075657610100808354040283529160200191610781565b820191906000526020600020905b81548152906001019060200180831161076457829003601f168201915b505050505091505090565b6000610797826111ad565b5060008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b03166106d0565b6107df82823361121e565b5050565b6107eb61122b565b60015460ff16610827576040517f9d2c8e7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828114610860576040517fc70ea82800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b848110156108a85785858281811061087e5761087e613a08565b90506020028101906108909190613a37565b61089e906040013583613aa4565b9150600101610864565b50803410156108e3576040517fea259f9100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b848110156109465761093e86868381811061090357610903613a08565b90506020028101906109159190613a37565b85858481811061092757610927613a08565b90506020028101906109399190613ab7565b6112ac565b6001016108e6565b505061097160017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50505050565b6001600160a01b0382166109bf576040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b60006109cc83833361153e565b9050836001600160a01b0316816001600160a01b031614610971576040517f64283d7b0000000000000000000000000000000000000000000000000000000081526001600160a01b03808616600483015260248201849052821660448201526064016109b6565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff16600081158015610a7e5750825b905060008267ffffffffffffffff166001148015610a9b5750303b155b905081158015610aa9575080155b15610ae0576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315610b415784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b610b4b8a8a6116b7565b610b5588886116c9565b610b5d6116db565b610b656116db565b610b6d6116e5565b6001805460ff191681179055610b846000876116f5565b508315610be65784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526040902060010154610c2c816117c4565b61097183836116f5565b6001600160a01b0381163314610c78576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c8282826117d1565b505050565b6000610c92816117c4565b604051600090339047908381818185875af1925050503d8060008114610cd4576040519150601f19603f3d011682016040523d82523d6000602084013e610cd9565b606091505b5050905080610d14576040517f2baafbf900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040514781527f6c9cf7ce96a10a51ae8b3fc5aca25e4754a77b3e821c133c5cebb1d30abe7e8e906020015b60405180910390a15050565b610c8283838360405180602001604052806000815250610fe7565b610d6f611877565b610d7882611947565b6107df8282611971565b6000610d8c611a72565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b60006106d0826111ad565b60007f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793006001600160a01b038316610e22576040517f89c62b64000000000000000000000000000000000000000000000000000000008152600060048201526024016109b6565b6001600160a01b039092166000908152600390920160205250604090205490565b600060608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1008054909150158015610e8257506001810154155b610ee8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064016109b6565b610ef0611ad4565b610ef8611b25565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930180546060917f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930091610708906139b5565b6107df338383611b76565b6000610fa6816117c4565b6001805460ff19168315159081179091556040519081527f7d16763644b2f7d5a11e2b05fe3a9cc4edb4568049295f4e62024269ae2f6eab90602001610d40565b610ff2848484610977565b61097184848484611c52565b600081815260036020526040902080546060919061101b906139b5565b80601f0160208091040260200160405190810160405280929190818152602001828054611047906139b5565b80156110945780601f1061106957610100808354040283529160200191611094565b820191906000526020600020905b81548152906001019060200180831161107757829003601f168201915b50505050509050919050565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260409020600101546110da816117c4565b61097183836117d1565b7f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca4061110e816117c4565b867f8a2c815542d43af541960cd9124f5ec6a55c4b8c69f0dda02ed413b401e309cd848688868b604051611146959493929190613ba0565b60405180910390a250505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806106d057506106d082611df7565b60008181527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260408120546001600160a01b0316806106d0576040517f7e273289000000000000000000000000000000000000000000000000000000008152600481018490526024016109b6565b610c828383836001611eda565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016112a6576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b6000546112ba848484612071565b60005b6112ca60e0860186613c05565b905081101561138b57817fabd48d213cb20ec6f191e95c191131c8fc3832f194f53febcb53d4834baae50761130260e0880188613c05565b8481811061131257611312613a08565b90506020028101906113249190613c6d565b61132e9080613ab7565b61133b60e08a018a613c05565b8681811061134b5761134b613a08565b905060200281019061135d9190613c6d565b61136b906020810190613ab7565b60405161137b9493929190613ccc565b60405180910390a26001016112bd565b5061139960a0850185613ab7565b6000838152600360205260409020916113b3919083613d4c565b50833560009081526002602052604081208054600190810190915581540181556113e1610100860186613e48565b905011156113f2576113f284612165565b61140b6114056080860160608701613698565b826123fd565b61141b6080850160608601613698565b84356000818152600260205260409020546001600160a01b0392909216918391907ffe94555d033bd3fc0f75671674d030640f03095d8345426fcab3a9a0bffdc4fb9061146b60808a018a613ab7565b61147860c08c018c613ab7565b604051611489959493929190613eb0565b60405180910390a4610140840135156109715761014084018035906114b2906101208701613698565b6001600160a01b0316827f6d6039156ec873b5c217b996d727775a9eea208e1329e87aaa4b617c76d2bb946101608801356101808901356114fb6101c08b016101a08c01613edd565b60405161150a93929190613f12565b60405180910390a450505050565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b60008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260408120547f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300906001600160a01b03908116908416156115ac576115ac818587612417565b6001600160a01b0381161561160a576115c9600086600080611eda565b6001600160a01b0381166000908152600383016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190555b6001600160a01b0386161561163b576001600160a01b03861660009081526003830160205260409020805460010190555b600085815260028301602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a49150505b9392505050565b6116bf6124ad565b6107df8282612514565b6116d16124ad565b6107df8282612557565b6116e36124ad565b565b6116ed6124ad565b6116e36125ca565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff166117ba576000848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556117703390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506106d0565b60009150506106d0565b6117ce81336125d2565b50565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16156117ba576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506106d0565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061191057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166119047f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b156116e3576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa615a8afb6fffcb8c6809ac0997b5c9c12b8cc97651150f14c8f6203168cff4c6107df816117c4565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156119cb575060408051601f3d908101601f191682019092526119c891810190613f2d565b60015b611a0c576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016109b6565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114611a68576040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600481018290526024016109b6565b610c82838361265f565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116e3576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610708906139b5565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610708906139b5565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793006001600160a01b038316611be2576040517f5b08ba180000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024016109b6565b6001600160a01b038481166000818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b6001600160a01b0383163b15610971576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0384169063150b7a0290611cad903390889087908790600401613f46565b6020604051808303816000875af1925050508015611ce8575060408051601f3d908101601f19168201909252611ce591810190613f82565b60015b611d6a573d808015611d16576040519150601f19603f3d011682016040523d82523d6000602084013e611d1b565b606091505b508051600003611d62576040517f64a0ae920000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016109b6565b805181602001fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081167f150b7a020000000000000000000000000000000000000000000000000000000014611df0576040517f64a0ae920000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016109b6565b5050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480611e8a57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806106d057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106d0565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793008180611f0f57506001600160a01b03831615155b15612028576000611f1f856111ad565b90506001600160a01b03841615801590611f4b5750836001600160a01b0316816001600160a01b031614155b8015611f9c57506001600160a01b0380821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602090815260408083209388168352929052205460ff16155b15611fde576040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016109b6565b82156120265784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b600093845260040160205250506040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600061207e8484846126b5565b6001600160a01b03811660009081527fbc6704768de17ac743a4c41122099f7a3464fc20363467b8527e22c7572f5d3a602052604090205490915060ff166120f2576040517f0f3c13fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208085013560009081526004909152604090205460ff1615612141576040517f76abf21400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050506020908101356000908152600490915260409020805460ff19166001179055565b600061271047825b61217b610100860186613e48565b9050811015611df05761ffff8316612197610100870187613e48565b838181106121a7576121a7613a08565b90506040020160200160208101906121bf9190613f9f565b61ffff1611156121fb576040517f635015ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061ffff8416612210610100880188613e48565b8481811061222057612220613a08565b90506040020160200160208101906122389190613f9f565b61224a9061ffff166040890135613fc3565b6122549190613fda565b90506122608186613aa4565b945085604001358511156122a0576040517fcc3b3ebc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828511156122da576040517f2c2cae9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006122ea610100880188613e48565b848181106122fa576122fa613a08565b6123109260206040909202019081019150613698565b90506001600160a01b038116156123f3576000816001600160a01b03168360405160006040518083038185875af1925050503d806000811461236e576040519150601f19603f3d011682016040523d82523d6000602084013e612373565b606091505b50509050806123ae576040517f7327470c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816001600160a01b03167fc9a9861643a061bfa3739f3b26e5d64578cd78bb863dbd5dac0aca396728d9a7846040516123e991815260200190565b60405180910390a2505b505060010161216d565b6107df82826040518060200160405280600081525061270e565b612422838383612725565b610c82576001600160a01b038316612469576040517f7e273289000000000000000000000000000000000000000000000000000000008152600481018290526024016109b6565b6040517f177e802f0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602481018290526044016109b6565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff166116e3576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61251c6124ad565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300806125488482614015565b50600181016109718382614015565b61255f6124ad565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1026125ab8482614015565b50600381016125ba8382614015565b5060008082556001909101555050565b6115186124ad565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408083206001600160a01b038516845290915290205460ff166107df576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602481018390526044016109b6565b612668826127e9565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156126ad57610c828282612891565b6107df6128fe565b6000806126c185612936565b905061270584848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525085939250506129509050565b95945050505050565b612718838361297a565b610c826000848484611c52565b60006001600160a01b038316158015906127e15750826001600160a01b0316846001600160a01b0316148061279e57506001600160a01b0380851660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602090815260408083209387168352929052205460ff165b806127e1575060008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b038481169116145b949350505050565b806001600160a01b03163b600003612838576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016109b6565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516128ae9190614111565b600060405180830381855af49150503d80600081146128e9576040519150601f19603f3d011682016040523d82523d6000602084013e6128ee565b606091505b5091509150612705858383612a11565b34156116e3576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006106d061294483612a86565b80519060200120612ba3565b6000806000806129608686612beb565b9250925092506129708282612c38565b5090949350505050565b6001600160a01b0382166129bd576040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600060048201526024016109b6565b60006129cb8383600061153e565b90506001600160a01b03811615610c82576040517f73c6ac6e000000000000000000000000000000000000000000000000000000008152600060048201526024016109b6565b606082612a2657612a2182612d3c565b6116b0565b8151158015612a3d57506001600160a01b0384163b155b15612a7f576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016109b6565b50806116b0565b60607f7b49e75f5dee25184e7fc560a05a02fa4311f0290980e85c2f8d7733b7fd3aba823560208401356040850135612ac460808701878701613698565b612ad9612ad46080890189613ab7565b612d7e565b612ae9612ad460a08a018a613ab7565b612af9612ad460c08b018b613ab7565b612b0e612b0960e08c018c613c05565b612da0565b612b24612b1f6101008d018d613e48565b612e7c565b612b318c61012001612f1b565b60408051602081019c909c528b019990995260608a019790975260808901959095526001600160a01b0390931660a088015260c087019190915260e0860152610100850152610120840152610140830152610160820152610180015b6040516020818303038152906040529050919050565b60006106d0612bb0612f9c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b60008060008351604103612c255760208401516040850151606086015160001a612c1788828585612fab565b955095509550505050612c31565b50508151600091506002905b9250925092565b6000826003811115612c4c57612c4c613b1c565b03612c55575050565b6001826003811115612c6957612c69613b1c565b03612ca0576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612cb457612cb4613b1c565b03612cee576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016109b6565b6003826003811115612d0257612d02613b1c565b036107df576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016109b6565b805115612d4c5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008282604051612d90929190614123565b6040518091039020905092915050565b6000808267ffffffffffffffff811115612dbc57612dbc613490565b604051908082528060200260200182016040528015612de5578160200160208202803683370190505b50905060005b83811015612e4b57612e1f858583818110612e0857612e08613a08565b9050602002810190612e1a9190613c6d565b61307a565b80519060200120828281518110612e3857612e38613a08565b6020908102919091010152600101612deb565b5080604051602001612e5d9190614133565b6040516020818303038152906040528051906020012091505092915050565b6000808267ffffffffffffffff811115612e9857612e98613490565b604051908082528060200260200182016040528015612ec1578160200160208202803683370190505b50905060005b83811015612e4b57612eef858583818110612ee457612ee4613a08565b9050604002016130d9565b80519060200120828281518110612f0857612f08613a08565b6020908102919091010152600101612ec7565b60007fbb5588251ed87f59437bd9a89dd0ef74f88c736ab95bdcd74955ff21bcf35e79612f4b6020840184613698565b602084013560408501356060860135612f6a60a0880160808901613edd565b604051602001612f7f96959493929190614169565b604051602081830303815290604052805190602001209050919050565b6000612fa6613149565b905090565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115612fe65750600091506003905082613070565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561303a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661306657506000925060019150829050613070565b9250600091508190505b9450945094915050565b60607f93dc1bac6b117acdbb889b9a825b9bc731449f703cc02b69049722fcba5dbe346130aa612ad48480613ab7565b6130ba612ad46020860186613ab7565b6040805160208101949094528301919091526060820152608001612b8d565b60607fdf3d1189f68f42c28f9fad9d69ff7a974d0a800a2e4420ed400e45a46d2fac2f6131096020840184613698565b6131196040850160208601613f9f565b604051602001612b8d939291909283526001600160a01b0391909116602083015261ffff16604082015260600190565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6131746131bd565b61317c613239565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816131e9611ad4565b80519091501561320157805160209091012092915050565b81548015613210579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613265611b25565b80519091501561327d57805160209091012092915050565b60018201548015613210579392505050565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146117ce57600080fd5b6000602082840312156132cf57600080fd5b81356116b08161328f565b60005b838110156132f55781810151838201526020016132dd565b50506000910152565b600081518084526133168160208601602086016132da565b601f01601f19169290920160200192915050565b6020815260006116b060208301846132fe565b60006020828403121561334f57600080fd5b5035919050565b80356001600160a01b038116811461336d57600080fd5b919050565b6000806040838503121561338557600080fd5b61338e83613356565b946020939093013593505050565b60008083601f8401126133ae57600080fd5b50813567ffffffffffffffff8111156133c657600080fd5b6020830191508360208260051b85010111156133e157600080fd5b9250929050565b600080600080604085870312156133fe57600080fd5b843567ffffffffffffffff8082111561341657600080fd5b6134228883890161339c565b9096509450602087013591508082111561343b57600080fd5b506134488782880161339c565b95989497509550505050565b60008060006060848603121561346957600080fd5b61347284613356565b925061348060208501613356565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156134e8576134e8613490565b604052919050565b600082601f83011261350157600080fd5b813567ffffffffffffffff81111561351b5761351b613490565b61352e6020601f19601f840116016134bf565b81815284602083860101111561354357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561357857600080fd5b853567ffffffffffffffff8082111561359057600080fd5b61359c89838a016134f0565b965060208801359150808211156135b257600080fd5b6135be89838a016134f0565b955060408801359150808211156135d457600080fd5b6135e089838a016134f0565b945060608801359150808211156135f657600080fd5b50613603888289016134f0565b92505061361260808701613356565b90509295509295909350565b6000806040838503121561363157600080fd5b8235915061364160208401613356565b90509250929050565b6000806040838503121561365d57600080fd5b61366683613356565b9150602083013567ffffffffffffffff81111561368257600080fd5b61368e858286016134f0565b9150509250929050565b6000602082840312156136aa57600080fd5b6116b082613356565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e0818401526136ef60e084018a6132fe565b8381036040850152613701818a6132fe565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b8181101561375357835183529284019291840191600101613737565b50909c9b505050505050505050505050565b8035801515811461336d57600080fd5b6000806040838503121561378857600080fd5b61379183613356565b915061364160208401613765565b6000602082840312156137b157600080fd5b6116b082613765565b600080600080608085870312156137d057600080fd5b6137d985613356565b93506137e760208601613356565b925060408501359150606085013567ffffffffffffffff81111561380a57600080fd5b613816878288016134f0565b91505092959194509250565b6000806040838503121561383557600080fd5b61383e83613356565b915061364160208401613356565b600082601f83011261385d57600080fd5b8135602067ffffffffffffffff8083111561387a5761387a613490565b8260051b6138898382016134bf565b93845285810183019383810190888611156138a357600080fd5b84880192505b858310156138df578235848111156138c15760008081fd5b6138cf8a87838c01016134f0565b83525091840191908401906138a9565b98975050505050505050565b80356002811061336d57600080fd5b60008060008060008060c0878903121561391357600080fd5b86359550602087013567ffffffffffffffff8082111561393257600080fd5b61393e8a838b0161384c565b9650604089013591508082111561395457600080fd5b6139608a838b016134f0565b9550606089013591506003821061397657600080fd5b81945061398560808a016138eb565b935060a089013591508082111561399b57600080fd5b506139a889828a0161384c565b9150509295509295509295565b600181811c908216806139c957607f821691505b602082108103613a02577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe41833603018112613a6b57600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156106d0576106d0613a75565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613aec57600080fd5b83018035915067ffffffffffffffff821115613b0757600080fd5b6020019150368190038213156133e157600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600081518084526020808501808196508360051b8101915082860160005b85811015613b93578284038952613b818483516132fe565b98850198935090840190600101613b69565b5091979650505050505050565b600060028710613bb257613bb2613b1c565b86825260038610613bc557613bc5613b1c565b85602083015260a06040830152613bdf60a08301866132fe565b8281036060840152613bf18186613b4b565b905082810360808401526138df8185613b4b565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613c3a57600080fd5b83018035915067ffffffffffffffff821115613c5557600080fd5b6020019150600581901b36038213156133e157600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112613a6b57600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b604081526000613ce0604083018688613ca1565b8281036020840152613cf3818587613ca1565b979650505050505050565b601f821115610c8257600081815260208120601f850160051c81016020861015613d255750805b601f850160051c820191505b81811015613d4457828155600101613d31565b505050505050565b67ffffffffffffffff831115613d6457613d64613490565b613d7883613d7283546139b5565b83613cfe565b6000601f841160018114613dca5760008515613d945750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611df0565b600083815260209020601f19861690835b82811015613dfb5786850135825560209485019460019092019101613ddb565b5086821015613e36577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613e7d57600080fd5b83018035915067ffffffffffffffff821115613e9857600080fd5b6020019150600681901b36038213156133e157600080fd5b858152606060208201526000613eca606083018688613ca1565b82810360408401526138df818587613ca1565b600060208284031215613eef57600080fd5b8135600481106116b057600080fd5b60048110613f0e57613f0e613b1c565b9052565b83815260208101839052606081016127e16040830184613efe565b600060208284031215613f3f57600080fd5b5051919050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613f7860808301846132fe565b9695505050505050565b600060208284031215613f9457600080fd5b81516116b08161328f565b600060208284031215613fb157600080fd5b813561ffff811681146116b057600080fd5b80820281158282048414176106d0576106d0613a75565b600082614010577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b815167ffffffffffffffff81111561402f5761402f613490565b6140438161403d84546139b5565b84613cfe565b602080601f83116001811461409657600084156140605750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555613d44565b600085815260208120601f198616915b828110156140c5578886015182559484019460019091019084016140a6565b508582101561410157878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60008251613a6b8184602087016132da565b8183823760009101908152919050565b815160009082906020808601845b8381101561415d57815185529382019390820190600101614141565b50929695505050505050565b600060c0820190508782526001600160a01b0387166020830152856040830152846060830152836080830152613cf360a0830184613efe56fea2646970667358221220e623a0d027ed828690c06fbcf3f1ac3fe7010216a0dd1b1de4b7b6260c38c6f264736f6c63430008140033
Deployed Bytecode
0x6080604052600436106101d85760003560e01c806370a0823111610102578063aab4160111610095578063d547741f11610064578063d547741f146105e9578063e985e9c514610609578063f72c0d8b14610671578063f907497c146106a557600080fd5b8063aab4160114610546578063ad3cb1cc14610560578063b88d4fde146105a9578063c87b56dd146105c957600080fd5b8063a1ebf35d116100d1578063a1ebf35d146104bd578063a217fddf146104f1578063a22cb46514610506578063a35d3d861461052657600080fd5b806370a08231146103fb57806384b0196e1461041b57806391d148541461044357806395d89b41146104a857600080fd5b80632e6400241161017a57806342842e0e1161014957806342842e0e146103935780634f1ef286146103b357806352d1902d146103c65780636352211e146103db57600080fd5b80632e6400241461031e5780632f2ff15d1461033e57806336568abe1461035e5780633ccfd60b1461037e57600080fd5b8063095ea7b3116101b6578063095ea7b31461026c5780630bdd68751461028e57806323b872dd146102a1578063248a9ca3146102c157600080fd5b806301ffc9a7146101dd57806306fdde0314610212578063081812fc14610234575b600080fd5b3480156101e957600080fd5b506101fd6101f83660046132bd565b6106c5565b60405190151581526020015b60405180910390f35b34801561021e57600080fd5b506102276106d6565b604051610209919061332a565b34801561024057600080fd5b5061025461024f36600461333d565b61078c565b6040516001600160a01b039091168152602001610209565b34801561027857600080fd5b5061028c610287366004613372565b6107d4565b005b61028c61029c3660046133e8565b6107e3565b3480156102ad57600080fd5b5061028c6102bc366004613454565b610977565b3480156102cd57600080fd5b506103106102dc36600461333d565b60009081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b604051908152602001610209565b34801561032a57600080fd5b5061028c610339366004613560565b610a33565b34801561034a57600080fd5b5061028c61035936600461361e565b610bf2565b34801561036a57600080fd5b5061028c61037936600461361e565b610c36565b34801561038a57600080fd5b5061028c610c87565b34801561039f57600080fd5b5061028c6103ae366004613454565b610d4c565b61028c6103c136600461364a565b610d67565b3480156103d257600080fd5b50610310610d82565b3480156103e757600080fd5b506102546103f636600461333d565b610db1565b34801561040757600080fd5b50610310610416366004613698565b610dbc565b34801561042757600080fd5b50610430610e43565b60405161020997969594939291906136b3565b34801561044f57600080fd5b506101fd61045e36600461361e565b60009182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156104b457600080fd5b50610227610f3f565b3480156104c957600080fd5b506103107f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca4081565b3480156104fd57600080fd5b50610310600081565b34801561051257600080fd5b5061028c610521366004613775565b610f90565b34801561053257600080fd5b5061028c61054136600461379f565b610f9b565b34801561055257600080fd5b506001546101fd9060ff1681565b34801561056c57600080fd5b506102276040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b3480156105b557600080fd5b5061028c6105c43660046137ba565b610fe7565b3480156105d557600080fd5b506102276105e436600461333d565b610ffe565b3480156105f557600080fd5b5061028c61060436600461361e565b6110a0565b34801561061557600080fd5b506101fd610624366004613822565b6001600160a01b0391821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b34801561067d57600080fd5b506103107fa615a8afb6fffcb8c6809ac0997b5c9c12b8cc97651150f14c8f6203168cff4c81565b3480156106b157600080fd5b5061028c6106c03660046138fa565b6110e4565b60006106d082611157565b92915050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793008054606091908190610708906139b5565b80601f0160208091040260200160405190810160405280929190818152602001828054610734906139b5565b80156107815780601f1061075657610100808354040283529160200191610781565b820191906000526020600020905b81548152906001019060200180831161076457829003601f168201915b505050505091505090565b6000610797826111ad565b5060008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b03166106d0565b6107df82823361121e565b5050565b6107eb61122b565b60015460ff16610827576040517f9d2c8e7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828114610860576040517fc70ea82800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b848110156108a85785858281811061087e5761087e613a08565b90506020028101906108909190613a37565b61089e906040013583613aa4565b9150600101610864565b50803410156108e3576040517fea259f9100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b848110156109465761093e86868381811061090357610903613a08565b90506020028101906109159190613a37565b85858481811061092757610927613a08565b90506020028101906109399190613ab7565b6112ac565b6001016108e6565b505061097160017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50505050565b6001600160a01b0382166109bf576040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b60006109cc83833361153e565b9050836001600160a01b0316816001600160a01b031614610971576040517f64283d7b0000000000000000000000000000000000000000000000000000000081526001600160a01b03808616600483015260248201849052821660448201526064016109b6565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff16600081158015610a7e5750825b905060008267ffffffffffffffff166001148015610a9b5750303b155b905081158015610aa9575080155b15610ae0576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315610b415784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b610b4b8a8a6116b7565b610b5588886116c9565b610b5d6116db565b610b656116db565b610b6d6116e5565b6001805460ff191681179055610b846000876116f5565b508315610be65784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526040902060010154610c2c816117c4565b61097183836116f5565b6001600160a01b0381163314610c78576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c8282826117d1565b505050565b6000610c92816117c4565b604051600090339047908381818185875af1925050503d8060008114610cd4576040519150601f19603f3d011682016040523d82523d6000602084013e610cd9565b606091505b5050905080610d14576040517f2baafbf900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040514781527f6c9cf7ce96a10a51ae8b3fc5aca25e4754a77b3e821c133c5cebb1d30abe7e8e906020015b60405180910390a15050565b610c8283838360405180602001604052806000815250610fe7565b610d6f611877565b610d7882611947565b6107df8282611971565b6000610d8c611a72565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b60006106d0826111ad565b60007f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793006001600160a01b038316610e22576040517f89c62b64000000000000000000000000000000000000000000000000000000008152600060048201526024016109b6565b6001600160a01b039092166000908152600390920160205250604090205490565b600060608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1008054909150158015610e8257506001810154155b610ee8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064016109b6565b610ef0611ad4565b610ef8611b25565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930180546060917f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930091610708906139b5565b6107df338383611b76565b6000610fa6816117c4565b6001805460ff19168315159081179091556040519081527f7d16763644b2f7d5a11e2b05fe3a9cc4edb4568049295f4e62024269ae2f6eab90602001610d40565b610ff2848484610977565b61097184848484611c52565b600081815260036020526040902080546060919061101b906139b5565b80601f0160208091040260200160405190810160405280929190818152602001828054611047906139b5565b80156110945780601f1061106957610100808354040283529160200191611094565b820191906000526020600020905b81548152906001019060200180831161107757829003601f168201915b50505050509050919050565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260409020600101546110da816117c4565b61097183836117d1565b7f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca4061110e816117c4565b867f8a2c815542d43af541960cd9124f5ec6a55c4b8c69f0dda02ed413b401e309cd848688868b604051611146959493929190613ba0565b60405180910390a250505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806106d057506106d082611df7565b60008181527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260408120546001600160a01b0316806106d0576040517f7e273289000000000000000000000000000000000000000000000000000000008152600481018490526024016109b6565b610c828383836001611eda565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016112a6576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b6000546112ba848484612071565b60005b6112ca60e0860186613c05565b905081101561138b57817fabd48d213cb20ec6f191e95c191131c8fc3832f194f53febcb53d4834baae50761130260e0880188613c05565b8481811061131257611312613a08565b90506020028101906113249190613c6d565b61132e9080613ab7565b61133b60e08a018a613c05565b8681811061134b5761134b613a08565b905060200281019061135d9190613c6d565b61136b906020810190613ab7565b60405161137b9493929190613ccc565b60405180910390a26001016112bd565b5061139960a0850185613ab7565b6000838152600360205260409020916113b3919083613d4c565b50833560009081526002602052604081208054600190810190915581540181556113e1610100860186613e48565b905011156113f2576113f284612165565b61140b6114056080860160608701613698565b826123fd565b61141b6080850160608601613698565b84356000818152600260205260409020546001600160a01b0392909216918391907ffe94555d033bd3fc0f75671674d030640f03095d8345426fcab3a9a0bffdc4fb9061146b60808a018a613ab7565b61147860c08c018c613ab7565b604051611489959493929190613eb0565b60405180910390a4610140840135156109715761014084018035906114b2906101208701613698565b6001600160a01b0316827f6d6039156ec873b5c217b996d727775a9eea208e1329e87aaa4b617c76d2bb946101608801356101808901356114fb6101c08b016101a08c01613edd565b60405161150a93929190613f12565b60405180910390a450505050565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b60008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260408120547f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300906001600160a01b03908116908416156115ac576115ac818587612417565b6001600160a01b0381161561160a576115c9600086600080611eda565b6001600160a01b0381166000908152600383016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190555b6001600160a01b0386161561163b576001600160a01b03861660009081526003830160205260409020805460010190555b600085815260028301602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a49150505b9392505050565b6116bf6124ad565b6107df8282612514565b6116d16124ad565b6107df8282612557565b6116e36124ad565b565b6116ed6124ad565b6116e36125ca565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff166117ba576000848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556117703390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506106d0565b60009150506106d0565b6117ce81336125d2565b50565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16156117ba576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506106d0565b306001600160a01b037f000000000000000000000000d0ab2d3621dc8a862389f89f52f08c097e3fe8b516148061191057507f000000000000000000000000d0ab2d3621dc8a862389f89f52f08c097e3fe8b56001600160a01b03166119047f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b156116e3576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa615a8afb6fffcb8c6809ac0997b5c9c12b8cc97651150f14c8f6203168cff4c6107df816117c4565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156119cb575060408051601f3d908101601f191682019092526119c891810190613f2d565b60015b611a0c576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016109b6565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114611a68576040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600481018290526024016109b6565b610c82838361265f565b306001600160a01b037f000000000000000000000000d0ab2d3621dc8a862389f89f52f08c097e3fe8b516146116e3576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610708906139b5565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610708906139b5565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793006001600160a01b038316611be2576040517f5b08ba180000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024016109b6565b6001600160a01b038481166000818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b6001600160a01b0383163b15610971576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0384169063150b7a0290611cad903390889087908790600401613f46565b6020604051808303816000875af1925050508015611ce8575060408051601f3d908101601f19168201909252611ce591810190613f82565b60015b611d6a573d808015611d16576040519150601f19603f3d011682016040523d82523d6000602084013e611d1b565b606091505b508051600003611d62576040517f64a0ae920000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016109b6565b805181602001fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081167f150b7a020000000000000000000000000000000000000000000000000000000014611df0576040517f64a0ae920000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016109b6565b5050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480611e8a57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806106d057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106d0565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793008180611f0f57506001600160a01b03831615155b15612028576000611f1f856111ad565b90506001600160a01b03841615801590611f4b5750836001600160a01b0316816001600160a01b031614155b8015611f9c57506001600160a01b0380821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602090815260408083209388168352929052205460ff16155b15611fde576040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016109b6565b82156120265784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b600093845260040160205250506040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600061207e8484846126b5565b6001600160a01b03811660009081527fbc6704768de17ac743a4c41122099f7a3464fc20363467b8527e22c7572f5d3a602052604090205490915060ff166120f2576040517f0f3c13fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208085013560009081526004909152604090205460ff1615612141576040517f76abf21400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050506020908101356000908152600490915260409020805460ff19166001179055565b600061271047825b61217b610100860186613e48565b9050811015611df05761ffff8316612197610100870187613e48565b838181106121a7576121a7613a08565b90506040020160200160208101906121bf9190613f9f565b61ffff1611156121fb576040517f635015ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061ffff8416612210610100880188613e48565b8481811061222057612220613a08565b90506040020160200160208101906122389190613f9f565b61224a9061ffff166040890135613fc3565b6122549190613fda565b90506122608186613aa4565b945085604001358511156122a0576040517fcc3b3ebc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828511156122da576040517f2c2cae9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006122ea610100880188613e48565b848181106122fa576122fa613a08565b6123109260206040909202019081019150613698565b90506001600160a01b038116156123f3576000816001600160a01b03168360405160006040518083038185875af1925050503d806000811461236e576040519150601f19603f3d011682016040523d82523d6000602084013e612373565b606091505b50509050806123ae576040517f7327470c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816001600160a01b03167fc9a9861643a061bfa3739f3b26e5d64578cd78bb863dbd5dac0aca396728d9a7846040516123e991815260200190565b60405180910390a2505b505060010161216d565b6107df82826040518060200160405280600081525061270e565b612422838383612725565b610c82576001600160a01b038316612469576040517f7e273289000000000000000000000000000000000000000000000000000000008152600481018290526024016109b6565b6040517f177e802f0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602481018290526044016109b6565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff166116e3576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61251c6124ad565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300806125488482614015565b50600181016109718382614015565b61255f6124ad565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1026125ab8482614015565b50600381016125ba8382614015565b5060008082556001909101555050565b6115186124ad565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408083206001600160a01b038516845290915290205460ff166107df576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602481018390526044016109b6565b612668826127e9565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156126ad57610c828282612891565b6107df6128fe565b6000806126c185612936565b905061270584848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525085939250506129509050565b95945050505050565b612718838361297a565b610c826000848484611c52565b60006001600160a01b038316158015906127e15750826001600160a01b0316846001600160a01b0316148061279e57506001600160a01b0380851660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602090815260408083209387168352929052205460ff165b806127e1575060008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b038481169116145b949350505050565b806001600160a01b03163b600003612838576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016109b6565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516128ae9190614111565b600060405180830381855af49150503d80600081146128e9576040519150601f19603f3d011682016040523d82523d6000602084013e6128ee565b606091505b5091509150612705858383612a11565b34156116e3576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006106d061294483612a86565b80519060200120612ba3565b6000806000806129608686612beb565b9250925092506129708282612c38565b5090949350505050565b6001600160a01b0382166129bd576040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600060048201526024016109b6565b60006129cb8383600061153e565b90506001600160a01b03811615610c82576040517f73c6ac6e000000000000000000000000000000000000000000000000000000008152600060048201526024016109b6565b606082612a2657612a2182612d3c565b6116b0565b8151158015612a3d57506001600160a01b0384163b155b15612a7f576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016109b6565b50806116b0565b60607f7b49e75f5dee25184e7fc560a05a02fa4311f0290980e85c2f8d7733b7fd3aba823560208401356040850135612ac460808701878701613698565b612ad9612ad46080890189613ab7565b612d7e565b612ae9612ad460a08a018a613ab7565b612af9612ad460c08b018b613ab7565b612b0e612b0960e08c018c613c05565b612da0565b612b24612b1f6101008d018d613e48565b612e7c565b612b318c61012001612f1b565b60408051602081019c909c528b019990995260608a019790975260808901959095526001600160a01b0390931660a088015260c087019190915260e0860152610100850152610120840152610140830152610160820152610180015b6040516020818303038152906040529050919050565b60006106d0612bb0612f9c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b60008060008351604103612c255760208401516040850151606086015160001a612c1788828585612fab565b955095509550505050612c31565b50508151600091506002905b9250925092565b6000826003811115612c4c57612c4c613b1c565b03612c55575050565b6001826003811115612c6957612c69613b1c565b03612ca0576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612cb457612cb4613b1c565b03612cee576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016109b6565b6003826003811115612d0257612d02613b1c565b036107df576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016109b6565b805115612d4c5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008282604051612d90929190614123565b6040518091039020905092915050565b6000808267ffffffffffffffff811115612dbc57612dbc613490565b604051908082528060200260200182016040528015612de5578160200160208202803683370190505b50905060005b83811015612e4b57612e1f858583818110612e0857612e08613a08565b9050602002810190612e1a9190613c6d565b61307a565b80519060200120828281518110612e3857612e38613a08565b6020908102919091010152600101612deb565b5080604051602001612e5d9190614133565b6040516020818303038152906040528051906020012091505092915050565b6000808267ffffffffffffffff811115612e9857612e98613490565b604051908082528060200260200182016040528015612ec1578160200160208202803683370190505b50905060005b83811015612e4b57612eef858583818110612ee457612ee4613a08565b9050604002016130d9565b80519060200120828281518110612f0857612f08613a08565b6020908102919091010152600101612ec7565b60007fbb5588251ed87f59437bd9a89dd0ef74f88c736ab95bdcd74955ff21bcf35e79612f4b6020840184613698565b602084013560408501356060860135612f6a60a0880160808901613edd565b604051602001612f7f96959493929190614169565b604051602081830303815290604052805190602001209050919050565b6000612fa6613149565b905090565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115612fe65750600091506003905082613070565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561303a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661306657506000925060019150829050613070565b9250600091508190505b9450945094915050565b60607f93dc1bac6b117acdbb889b9a825b9bc731449f703cc02b69049722fcba5dbe346130aa612ad48480613ab7565b6130ba612ad46020860186613ab7565b6040805160208101949094528301919091526060820152608001612b8d565b60607fdf3d1189f68f42c28f9fad9d69ff7a974d0a800a2e4420ed400e45a46d2fac2f6131096020840184613698565b6131196040850160208601613f9f565b604051602001612b8d939291909283526001600160a01b0391909116602083015261ffff16604082015260600190565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6131746131bd565b61317c613239565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816131e9611ad4565b80519091501561320157805160209091012092915050565b81548015613210579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b60007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613265611b25565b80519091501561327d57805160209091012092915050565b60018201548015613210579392505050565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146117ce57600080fd5b6000602082840312156132cf57600080fd5b81356116b08161328f565b60005b838110156132f55781810151838201526020016132dd565b50506000910152565b600081518084526133168160208601602086016132da565b601f01601f19169290920160200192915050565b6020815260006116b060208301846132fe565b60006020828403121561334f57600080fd5b5035919050565b80356001600160a01b038116811461336d57600080fd5b919050565b6000806040838503121561338557600080fd5b61338e83613356565b946020939093013593505050565b60008083601f8401126133ae57600080fd5b50813567ffffffffffffffff8111156133c657600080fd5b6020830191508360208260051b85010111156133e157600080fd5b9250929050565b600080600080604085870312156133fe57600080fd5b843567ffffffffffffffff8082111561341657600080fd5b6134228883890161339c565b9096509450602087013591508082111561343b57600080fd5b506134488782880161339c565b95989497509550505050565b60008060006060848603121561346957600080fd5b61347284613356565b925061348060208501613356565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156134e8576134e8613490565b604052919050565b600082601f83011261350157600080fd5b813567ffffffffffffffff81111561351b5761351b613490565b61352e6020601f19601f840116016134bf565b81815284602083860101111561354357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561357857600080fd5b853567ffffffffffffffff8082111561359057600080fd5b61359c89838a016134f0565b965060208801359150808211156135b257600080fd5b6135be89838a016134f0565b955060408801359150808211156135d457600080fd5b6135e089838a016134f0565b945060608801359150808211156135f657600080fd5b50613603888289016134f0565b92505061361260808701613356565b90509295509295909350565b6000806040838503121561363157600080fd5b8235915061364160208401613356565b90509250929050565b6000806040838503121561365d57600080fd5b61366683613356565b9150602083013567ffffffffffffffff81111561368257600080fd5b61368e858286016134f0565b9150509250929050565b6000602082840312156136aa57600080fd5b6116b082613356565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e0818401526136ef60e084018a6132fe565b8381036040850152613701818a6132fe565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b8181101561375357835183529284019291840191600101613737565b50909c9b505050505050505050505050565b8035801515811461336d57600080fd5b6000806040838503121561378857600080fd5b61379183613356565b915061364160208401613765565b6000602082840312156137b157600080fd5b6116b082613765565b600080600080608085870312156137d057600080fd5b6137d985613356565b93506137e760208601613356565b925060408501359150606085013567ffffffffffffffff81111561380a57600080fd5b613816878288016134f0565b91505092959194509250565b6000806040838503121561383557600080fd5b61383e83613356565b915061364160208401613356565b600082601f83011261385d57600080fd5b8135602067ffffffffffffffff8083111561387a5761387a613490565b8260051b6138898382016134bf565b93845285810183019383810190888611156138a357600080fd5b84880192505b858310156138df578235848111156138c15760008081fd5b6138cf8a87838c01016134f0565b83525091840191908401906138a9565b98975050505050505050565b80356002811061336d57600080fd5b60008060008060008060c0878903121561391357600080fd5b86359550602087013567ffffffffffffffff8082111561393257600080fd5b61393e8a838b0161384c565b9650604089013591508082111561395457600080fd5b6139608a838b016134f0565b9550606089013591506003821061397657600080fd5b81945061398560808a016138eb565b935060a089013591508082111561399b57600080fd5b506139a889828a0161384c565b9150509295509295509295565b600181811c908216806139c957607f821691505b602082108103613a02577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe41833603018112613a6b57600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156106d0576106d0613a75565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613aec57600080fd5b83018035915067ffffffffffffffff821115613b0757600080fd5b6020019150368190038213156133e157600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600081518084526020808501808196508360051b8101915082860160005b85811015613b93578284038952613b818483516132fe565b98850198935090840190600101613b69565b5091979650505050505050565b600060028710613bb257613bb2613b1c565b86825260038610613bc557613bc5613b1c565b85602083015260a06040830152613bdf60a08301866132fe565b8281036060840152613bf18186613b4b565b905082810360808401526138df8185613b4b565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613c3a57600080fd5b83018035915067ffffffffffffffff821115613c5557600080fd5b6020019150600581901b36038213156133e157600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112613a6b57600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b604081526000613ce0604083018688613ca1565b8281036020840152613cf3818587613ca1565b979650505050505050565b601f821115610c8257600081815260208120601f850160051c81016020861015613d255750805b601f850160051c820191505b81811015613d4457828155600101613d31565b505050505050565b67ffffffffffffffff831115613d6457613d64613490565b613d7883613d7283546139b5565b83613cfe565b6000601f841160018114613dca5760008515613d945750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611df0565b600083815260209020601f19861690835b82811015613dfb5786850135825560209485019460019092019101613ddb565b5086821015613e36577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613e7d57600080fd5b83018035915067ffffffffffffffff821115613e9857600080fd5b6020019150600681901b36038213156133e157600080fd5b858152606060208201526000613eca606083018688613ca1565b82810360408401526138df818587613ca1565b600060208284031215613eef57600080fd5b8135600481106116b057600080fd5b60048110613f0e57613f0e613b1c565b9052565b83815260208101839052606081016127e16040830184613efe565b600060208284031215613f3f57600080fd5b5051919050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613f7860808301846132fe565b9695505050505050565b600060208284031215613f9457600080fd5b81516116b08161328f565b600060208284031215613fb157600080fd5b813561ffff811681146116b057600080fd5b80820281158282048414176106d0576106d0613a75565b600082614010577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b815167ffffffffffffffff81111561402f5761402f613490565b6140438161403d84546139b5565b84613cfe565b602080601f83116001811461409657600084156140605750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555613d44565b600085815260208120601f198616915b828110156140c5578886015182559484019460019091019084016140a6565b508582101561410157878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60008251613a6b8184602087016132da565b8183823760009101908152919050565b815160009082906020808601845b8381101561415d57815185529382019390820190600101614141565b50929695505050505050565b600060c0820190508782526001600160a01b0387166020830152856040830152846060830152836080830152613cf360a0830184613efe56fea2646970667358221220e623a0d027ed828690c06fbcf3f1ac3fe7010216a0dd1b1de4b7b6260c38c6f264736f6c63430008140033
Deployed Bytecode Sourcemap
124919:23027:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;147712:231;;;;;;;;;;-1:-1:-1;147712:231:0;;;;;:::i;:::-;;:::i;:::-;;;611:14:1;;604:22;586:41;;574:2;559:18;147712:231:0;;;;;;;;68119:149;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;69407:158::-;;;;;;;;;;-1:-1:-1;69407:158:0;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1802:55:1;;;1784:74;;1772:2;1757:18;69407:158:0;1638:226:1;69226:115:0;;;;;;;;;;-1:-1:-1;69226:115:0;;;;;:::i;:::-;;:::i;:::-;;134604:1232;;;;;;:::i;:::-;;:::i;70134:588::-;;;;;;;;;;-1:-1:-1;70134:588:0;;;;;:::i;:::-;;:::i;92322:194::-;;;;;;;;;;-1:-1:-1;92322:194:0;;;;;:::i;:::-;92387:7;92484:14;;;90423:28;92484:14;;;;;:24;;;;92322:194;;;;4233:25:1;;;4221:2;4206:18;92322:194:0;4087:177:1;132985:532:0;;;;;;;;;;-1:-1:-1;132985:532:0;;;;;:::i;:::-;;:::i;92826:138::-;;;;;;;;;;-1:-1:-1;92826:138:0;;;;;:::i;:::-;;:::i;93995:251::-;;;;;;;;;;-1:-1:-1;93995:251:0;;;;;:::i;:::-;;:::i;146333:281::-;;;;;;;;;;;;;:::i;70793:134::-;;;;;;;;;;-1:-1:-1;70793:134:0;;;;;:::i;:::-;;:::i;117932:258::-;;;;;;:::i;:::-;;:::i;117465:136::-;;;;;;;;;;;;;:::i;67932:120::-;;;;;;;;;;-1:-1:-1;67932:120:0;;;;;:::i;:::-;;:::i;67599:271::-;;;;;;;;;;-1:-1:-1;67599:271:0;;;;;:::i;:::-;;:::i;38334:931::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;91266:210::-;;;;;;;;;;-1:-1:-1;91266:210:0;;;;;:::i;:::-;91343:4;91437:14;;;90423:28;91437:14;;;;;;;;-1:-1:-1;;;;;91437:31:0;;;;;;;;;;;;;;;91266:210;68337:153;;;;;;;;;;;;;:::i;125581:57::-;;;;;;;;;;;;125619:19;125581:57;;89800:49;;;;;;;;;;-1:-1:-1;89800:49:0;89845:4;89800:49;;69637:146;;;;;;;;;;-1:-1:-1;69637:146:0;;;;;:::i;:::-;;:::i;145986:191::-;;;;;;;;;;-1:-1:-1;145986:191:0;;;;;:::i;:::-;;:::i;125543:29::-;;;;;;;;;;-1:-1:-1;125543:29:0;;;;;;;;115543:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;70998:234;;;;;;;;;;-1:-1:-1;70998:234:0;;;;;:::i;:::-;;:::i;134116:138::-;;;;;;;;;;-1:-1:-1;134116:138:0;;;;;:::i;:::-;;:::i;93257:172::-;;;;;;;;;;-1:-1:-1;93257:172:0;;;;;:::i;:::-;;:::i;69854:213::-;;;;;;;;;;-1:-1:-1;69854:213:0;;;;;:::i;:::-;-1:-1:-1;;;;;70022:27:0;;;69942:4;70022:27;;;:20;:27;;;;;;;;:37;;;;;;;;;;;;;;;69854:213;125645:61;;;;;;;;;;;;125685:21;125645:61;;147031:345;;;;;;;;;;-1:-1:-1;147031:345:0;;;;;:::i;:::-;;:::i;147712:231::-;147870:4;147899:36;147923:11;147899:23;:36::i;:::-;147892:43;147712:231;-1:-1:-1;;147712:231:0:o;68119:149::-;66555:21;68246:14;;68164:13;;66555:21;;;68246:14;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;68119:149;:::o;69407:158::-;69474:7;69494:22;69508:7;69494:13;:22::i;:::-;-1:-1:-1;72122:7:0;72205:26;;;:17;:26;;;;;;-1:-1:-1;;;;;72205:26:0;69536:21;72052:187;69226:115;69298:35;69307:2;69311:7;57657:10;69298:8;:35::i;:::-;69226:115;;:::o;134604:1232::-;123604:21;:19;:21::i;:::-;134854:17:::1;::::0;::::1;;134849:84;;134895:26;;;;;;;;;;;;;;134849:84;135021:36:::0;;::::1;135017:114;;135081:38;;;;;;;;;;;;;;135017:114;135217:16;::::0;135244:170:::1;135264:19:::0;;::::1;135244:170;;;135323:8;;135332:1;135323:11;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;135312:28;::::0;135323:17:::1;;;135312:8:::0;:28:::1;:::i;:::-;135301:39:::0;-1:-1:-1;135384:3:0::1;;135244:170;;;;135524:8;135512:9;:20;135508:80;;;135556:20;;;;;;;;;;;;;;135508:80;135666:9;135661:168;135681:19:::0;;::::1;135661:168;;;135718:37;135728:8;;135737:1;135728:11;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;135741:10;;135752:1;135741:13;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;135718:9;:37::i;:::-;135799:3;;135661:168;;;;134744:1092;123648:20:::0;122110:1;122715:30;124342:23;124085:288;123648:20;134604:1232;;;;:::o;70134:588::-;-1:-1:-1;;;;;70229:16:0;;70225:89;;70269:33;;;;;70299:1;70269:33;;;1784:74:1;1757:18;;70269:33:0;;;;;;;;70225:89;70535:21;70559:34;70567:2;70571:7;57657:10;70559:7;:34::i;:::-;70535:58;;70625:4;-1:-1:-1;;;;;70608:21:0;:13;-1:-1:-1;;;;;70608:21:0;;70604:111;;70653:50;;;;;-1:-1:-1;;;;;14656:15:1;;;70653:50:0;;;14638:34:1;14688:18;;;14681:34;;;14751:15;;14731:18;;;14724:43;14550:18;;70653:50:0;14375:398:1;132985:532:0;33296:21;28612:15;;;;;;;28611:16;;28659:14;;28465:30;29044:16;;:34;;;;;29064:14;29044:34;29024:54;;29089:17;29109:11;:16;;29124:1;29109:16;:50;;;;-1:-1:-1;29137:4:0;29129:25;:30;29109:50;29089:70;;29177:12;29176:13;:30;;;;;29194:12;29193:13;29176:30;29172:93;;;29230:23;;;;;;;;;;;;;;29172:93;29275:18;;;;29292:1;29275:18;;;29304:69;;;;29339:22;;;;;;;;29304:69;133222:39:::1;133236:10;133248:12;133222:13;:39::i;:::-;133272:48;133286:14;133302:17;133272:13;:48::i;:::-;133331:22;:20;:22::i;:::-;133364:24;:22;:24::i;:::-;133399;:22;:24::i;:::-;133454:4;133434:24:::0;;-1:-1:-1;;133434:24:0::1;::::0;::::1;::::0;;133471:38:::1;133434:17;133502:6:::0;133471:10:::1;:38::i;:::-;;29399:14:::0;29395:104;;;29430:23;;;;;;29473:14;;-1:-1:-1;14931:50:1;;29473:14:0;;14919:2:1;14904:18;29473:14:0;;;;;;;29395:104;28397:1109;;;;;132985:532;;;;;:::o;92826:138::-;92387:7;92484:14;;;90423:28;92484:14;;;;;:24;;;90703:16;90714:4;90703:10;:16::i;:::-;92931:25:::1;92942:4;92948:7;92931:10;:25::i;93995:251::-:0;-1:-1:-1;;;;;94089:34:0;;57657:10;94089:34;94085:104;;94147:30;;;;;;;;;;;;;;94085:104;94201:37;94213:4;94219:18;94201:11;:37::i;:::-;;93995:251;;:::o;146333:281::-;89845:4;90703:16;89845:4;90703:10;:16::i;:::-;146420:49:::1;::::0;146403:12:::1;::::0;146420:10:::1;::::0;146443:21:::1;::::0;146403:12;146420:49;146403:12;146420:49;146443:21;146420:10;:49:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;146402:67;;;146485:7;146480:70;;146516:22;;;;;;;;;;;;;;146480:70;146565:41;::::0;146584:21:::1;4233:25:1::0;;146565:41:0::1;::::0;4221:2:1;4206:18;146565:41:0::1;;;;;;;;146391:223;146333:281:::0;:::o;70793:134::-;70880:39;70897:4;70903:2;70907:7;70880:39;;;;;;;;;;;;:16;:39::i;117932:258::-;116397:13;:11;:13::i;:::-;118089:36:::1;118107:17;118089;:36::i;:::-;118136:46;118158:17;118177:4;118136:21;:46::i;117465:136::-:0;117534:7;116677:20;:18;:20::i;:::-;-1:-1:-1;108496:66:0::1;117465:136:::0;:::o;67932:120::-;67995:7;68022:22;68036:7;68022:13;:22::i;67599:271::-;67662:7;66555:21;-1:-1:-1;;;;;67742:19:0;;67738:89;;67785:30;;;;;67812:1;67785:30;;;1784:74:1;1757:18;;67785:30:0;1638:226:1;67738:89:0;-1:-1:-1;;;;;67844:18:0;;;;;;;:11;;;;:18;;-1:-1:-1;67844:18:0;;;;;67599:271::o;38334:931::-;38437:13;38465:18;;38437:13;;;38465:18;38437:13;35858:21;38955:13;;38686:45;;-1:-1:-1;38955:18:0;:43;;;;-1:-1:-1;38977:16:0;;;;:21;38955:43;38947:77;;;;;;;15404:2:1;38947:77:0;;;15386:21:1;15443:2;15423:18;;;15416:30;15482:23;15462:18;;;15455:51;15523:18;;38947:77:0;15202:345:1;38947:77:0;39090:13;:11;:13::i;:::-;39118:16;:14;:16::i;:::-;39230;;;39213:1;39230:16;;;;;;;;;39037:220;;;;-1:-1:-1;39037:220:0;;-1:-1:-1;39149:13:0;;-1:-1:-1;39185:4:0;;-1:-1:-1;39213:1:0;-1:-1:-1;39230:16:0;-1:-1:-1;39037:220:0;-1:-1:-1;;38334:931:0:o;68337:153::-;68473:9;68466:16;;68384:13;;66555:21;;68466:16;;;:::i;69637:146::-;69723:52;57657:10;69756:8;69766;69723:18;:52::i;145986:191::-;89845:4;90703:16;89845:4;90703:10;:16::i;:::-;146086:17:::1;:36:::0;;-1:-1:-1;;146086:36:0::1;::::0;::::1;;::::0;;::::1;::::0;;;146138:31:::1;::::0;586:41:1;;;146138:31:0::1;::::0;574:2:1;559:18;146138:31:0::1;446:187:1::0;70998:234:0;71135:31;71148:4;71154:2;71158:7;71135:12;:31::i;:::-;71177:47;71200:4;71206:2;71210:7;71219:4;71177:22;:47::i;134116:138::-;134225:21;;;;:11;:21;;;;;134218:28;;134182:23;;134225:21;134218:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;134116:138;;;:::o;93257:172::-;92387:7;92484:14;;;90423:28;92484:14;;;;;:24;;;90703:16;90714:4;90703:10;:16::i;:::-;93395:26:::1;93407:4;93413:7;93395:11;:26::i;147031:345::-:0;125619:19;90703:16;90714:4;90703:10;:16::i;:::-;147311:7:::1;147297:71;147320:9;147331:10;147343:5;147350:4;147356:11;147297:71;;;;;;;;;;:::i;:::-;;;;;;;;147031:345:::0;;;;;;;:::o;90957:217::-;91042:4;91079:47;;;91094:32;91079:47;;:87;;;91130:36;91154:11;91130:23;:36::i;82962:247::-;83025:7;71905:18;;;:9;:18;;;;;;-1:-1:-1;;;;;71905:18:0;;83089:90;;83136:31;;;;;;;;4233:25:1;;;4206:18;;83136:31:0;4087:177:1;81078:122:0;81159:33;81168:2;81172:7;81181:4;81187;81159:8;:33::i;123684:393::-;122715:30;123887:9;;:20;;123883:90;;123931:30;;;;;;;;;;;;;;123883:90;122153:1;124050:19;;123684:393::o;136145:1799::-;136264:15;136282:13;136384:35;136403:4;136409:9;;136384:18;:35::i;:::-;136519:9;136514:267;136538:17;;;;:4;:17;:::i;:::-;:24;;136534:1;:28;136514:267;;;136619:7;136585:122;136628:17;;;;:4;:17;:::i;:::-;136646:1;136628:20;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;:27;;;;:::i;:::-;136657:17;;;;:4;:17;:::i;:::-;136675:1;136657:20;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;:35;;;;;;;:::i;:::-;136585:122;;;;;;;;;:::i;:::-;;;;;;;;136751:3;;136514:267;;;-1:-1:-1;136859:13:0;;;;:4;:13;:::i;:::-;136836:20;;;;:11;:20;;;;;;:36;;;:20;:36;:::i;:::-;-1:-1:-1;137018:12:0;;136998:33;;;;:19;:33;;;;;136996:35;;;;;;;;;137046:15;;;;;137153;;;;137018:4;137153:15;:::i;:::-;:22;;:26;137149:80;;;137196:21;137212:4;137196:15;:21::i;:::-;137290:34;137300:14;;;;;;;;:::i;:::-;137316:7;137290:9;:34::i;:::-;137476:14;;;;;;;;:::i;:::-;137427:12;;;137505:33;;;:19;:33;;;;;;-1:-1:-1;;;;;137403:211:0;;;;;137454:7;;137427:12;137403:211;;137553:19;;;;137427:4;137553:19;:::i;:::-;137587:16;;;;:4;:16;:::i;:::-;137403:211;;;;;;;;;;:::i;:::-;;;;;;;;137631:19;;;;:24;137627:310;;137776:19;;;;;;137733:24;;137776:11;;;137733:24;:::i;:::-;-1:-1:-1;;;;;137677:248:0;137707:7;137677:248;137814:18;;;;137851:19;;;;137889:21;;;;;;;;:::i;:::-;137677:248;;;;;;;;:::i;:::-;;;;;;;;136223:1721;136145:1799;;;:::o;124085:288::-;122110:1;122715:30;124342:23;124085:288::o;75222:918::-;75335:7;71905:18;;;:9;:18;;;;;;66555:21;;-1:-1:-1;;;;;71905:18:0;;;;75511;;;75507:88;;75546:37;75563:4;75569;75575:7;75546:16;:37::i;:::-;-1:-1:-1;;;;;75642:18:0;;;75638:265;;75760:48;75777:1;75781:7;75798:1;75802:5;75760:8;:48::i;:::-;-1:-1:-1;;;;;75854:17:0;;;;;;:11;;;:17;;;;;:22;;;;;;75638:265;-1:-1:-1;;;;;75919:16:0;;;75915:113;;-1:-1:-1;;;;;75981:15:0;;;;;;:11;;;:15;;;;;:20;;76000:1;75981:20;;;75915:113;76040:18;;;;:9;;;:18;;;;;;:23;;;;-1:-1:-1;;;;;76040:23:0;;;;;;;;;76081:27;;76040:18;;76081:27;;;;;;;76128:4;-1:-1:-1;;75222:918:0;;;;;;:::o;66718:151::-;31303:20;:18;:20::i;:::-;66822:39:::1;66846:5;66853:7;66822:23;:39::i;36481:149::-:0;31303:20;:18;:20::i;:::-;36584:38:::1;36608:4;36614:7;36584:23;:38::i;90747:60::-:0;31303:20;:18;:20::i;:::-;90747:60::o;122876:113::-;31303:20;:18;:20::i;:::-;122947:34:::1;:32;:34::i;94944:396::-:0;95021:4;91437:14;;;90423:28;91437:14;;;;;;;;-1:-1:-1;;;;;91437:31:0;;;;;;;;;;;;95108:225;;95152:8;:14;;;;;;;;;;;-1:-1:-1;;;;;95152:31:0;;;;;;;;;:38;;-1:-1:-1;;95152:38:0;95186:4;95152:38;;;95237:12;57657:10;;57577:98;95237:12;-1:-1:-1;;;;;95210:40:0;95228:7;-1:-1:-1;;;;;95210:40:0;95222:4;95210:40;;;;;;;;;;95272:4;95265:11;;;;;95108:225;95316:5;95309:12;;;;;91691:105;91758:30;91769:4;57657:10;91758;:30::i;:::-;91691:105;:::o;95584:397::-;95662:4;91437:14;;;90423:28;91437:14;;;;;;;;-1:-1:-1;;;;;91437:31:0;;;;;;;;;;;;95749:225;;;95826:5;95792:14;;;;;;;;;;;-1:-1:-1;;;;;95792:31:0;;;;;;;;;;:39;;-1:-1:-1;;95792:39:0;;;95851:40;57657:10;;95792:14;;95851:40;;95826:5;95851:40;95913:4;95906:11;;;;;118424:323;118506:4;-1:-1:-1;;;;;118515:6:0;118498:23;;;:125;;;118617:6;-1:-1:-1;;;;;118581:42:0;:32;108496:66;109230:53;-1:-1:-1;;;;;109230:53:0;;109151:140;118581:32;-1:-1:-1;;;;;118581:42:0;;;118498:125;118480:260;;;118699:29;;;;;;;;;;;;;;133757:130;125685:21;90703:16;90714:4;90703:10;:16::i;119921:548::-;120039:17;-1:-1:-1;;;;;120021:50:0;;:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;120021:52:0;;;;;;;;-1:-1:-1;;120021:52:0;;;;;;;;;;;;:::i;:::-;;;120017:445;;120390:60;;;;;-1:-1:-1;;;;;1802:55:1;;120390:60:0;;;1784:74:1;1757:18;;120390:60:0;1638:226:1;120017:445:0;108496:66;120116:40;;120112:122;;120184:34;;;;;;;;4233:25:1;;;4206:18;;120184:34:0;4087:177:1;120112:122:0;120248:54;120278:17;120297:4;120248:29;:54::i;118870:218::-;118945:4;-1:-1:-1;;;;;118954:6:0;118937:23;;118933:148;;119040:29;;;;;;;;;;;;;;39497:158;39640:7;39633:14;;39551:13;;35858:21;;39633:14;;;:::i;39890:164::-;40036:10;40029:17;;39947:13;;35858:21;;40029:17;;;:::i;82343:376::-;66555:21;-1:-1:-1;;;;;82507:22:0;;82503:93;;82553:31;;;;;-1:-1:-1;;;;;1802:55:1;;82553:31:0;;;1784:74:1;1757:18;;82553:31:0;1638:226:1;82503:93:0;-1:-1:-1;;;;;82606:27:0;;;;;;;:20;;;:27;;;;;;;;:37;;;;;;;;;;;;;:48;;-1:-1:-1;;82606:48:0;;;;;;;;;;82670:41;;586::1;;;82670::0;;559:18:1;82670:41:0;;;;;;;82436:283;82343:376;;;:::o;83759:845::-;-1:-1:-1;;;;;83890:14:0;;;:18;83886:711;;83929:71;;;;;-1:-1:-1;;;;;83929:36:0;;;;;:71;;57657:10;;83980:4;;83986:7;;83995:4;;83929:71;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;83929:71:0;;;;;;;;-1:-1:-1;;83929:71:0;;;;;;;;;;;;:::i;:::-;;;83925:661;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;84275:6;:13;84292:1;84275:18;84271:300;;84325:25;;;;;-1:-1:-1;;;;;1802:55:1;;84325:25:0;;;1784:74:1;1757:18;;84325:25:0;1638:226:1;84271:300:0;84521:6;84515:13;84506:6;84502:2;84498:15;84491:38;83925:661;84080:51;;;84090:41;84080:51;84076:132;;84163:25;;;;;-1:-1:-1;;;;;1802:55:1;;84163:25:0;;;1784:74:1;1757:18;;84163:25:0;1638:226:1;84076:132:0;84001:222;83759:845;;;;:::o;67195:340::-;67353:4;67382:40;;;67397:25;67382:40;;:105;;-1:-1:-1;67439:48:0;;;67454:33;67439:48;67382:105;:145;;;-1:-1:-1;58662:25:0;58647:40;;;;67491:36;58547:148;81388:736;66555:21;81606:9;;:31;;-1:-1:-1;;;;;;81619:18:0;;;;81606:31;81602:471;;;81654:13;81670:22;81684:7;81670:13;:22::i;:::-;81654:38;-1:-1:-1;;;;;;81823:18:0;;;;;;:35;;;81854:4;-1:-1:-1;;;;;81845:13:0;:5;-1:-1:-1;;;;;81845:13:0;;;81823:35;:69;;;;-1:-1:-1;;;;;;70022:27:0;;;69942:4;70022:27;;;:20;:27;;;;;;;;:37;;;;;;;;;;;;81862:30;81823:69;81819:144;;;81920:27;;;;;-1:-1:-1;;;;;1802:55:1;;81920:27:0;;;1784:74:1;1757:18;;81920:27:0;1638:226:1;81819:144:0;81983:9;81979:83;;;82038:7;82034:2;-1:-1:-1;;;;;82018:28:0;82027:5;-1:-1:-1;;;;;82018:28:0;;;;;;;;;;;81979:83;81639:434;81602:471;82085:26;;;;:17;;:26;;-1:-1:-1;;82085:26:0;;;:31;;;;-1:-1:-1;;;;;82085:31:0;;;;;;;;;;81388:736::o;138246:380::-;138344:14;138361:27;138372:4;138378:9;;138361:10;:27::i;:::-;-1:-1:-1;;;;;91437:31:0;;91343:4;91437:31;;;:14;;:31;:14;:31;;;138344:44;;-1:-1:-1;91437:31:0;;138399:88;;138456:19;;;;;;;;;;;;;;138399:88;138510:10;;;;;138501:20;;;;:8;:20;;;;;;;;;138497:84;;;138545:24;;;;;;;;;;;;;;138497:84;-1:-1:-1;;;138600:10:0;;;;;138591:20;;;;:8;:20;;;;;;:27;;-1:-1:-1;;138591:27:0;138614:4;138591:27;;;138246:380::o;138877:1440::-;138946:19;139037:6;139080:21;138946:19;139112:1198;139136:15;;;;:4;:15;:::i;:::-;:22;;139132:1;:26;139112:1198;;;139180:31;;;:15;;;;:4;:15;:::i;:::-;139196:1;139180:18;;;;;;;:::i;:::-;;;;;;:22;;;;;;;;;;:::i;:::-;:31;;;139176:97;;;139239:18;;;;;;;;;;;;;;139176:97;139354:22;139379:46;;;139393:15;;;;:4;:15;:::i;:::-;139409:1;139393:18;;;;;;;:::i;:::-;;;;;;:22;;;;;;;;;;:::i;:::-;139380:35;;;;:10;;;;:35;:::i;:::-;139379:46;;;;:::i;:::-;139354:71;-1:-1:-1;139454:28:0;139354:71;139454:11;:28;:::i;:::-;139440:42;;139608:4;:10;;;139594:11;:24;139590:98;;;139646:26;;;;;;;;;;;;;;139590:98;139720:15;139706:11;:29;139702:107;;;139763:30;;;;;;;;;;;;;;139702:107;139887:17;139907:15;;;;:4;:15;:::i;:::-;139923:1;139907:18;;;;;;;:::i;:::-;:28;;;:18;;;;;:28;;;;-1:-1:-1;139907:28:0;:::i;:::-;139887:48;-1:-1:-1;;;;;;139954:23:0;;;139950:287;;139999:12;140016:9;-1:-1:-1;;;;;140016:14:0;140038;140016:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;139998:59;;;140081:7;140076:86;;140120:22;;;;;;;;;;;;;;140076:86;140195:9;-1:-1:-1;;;;;140185:36:0;;140206:14;140185:36;;;;4233:25:1;;4221:2;4206:18;;4087:177;140185:36:0;;;;;;;;139979:258;139950:287;-1:-1:-1;;140280:3:0;;139112:1198;;77174:102;77242:26;77252:2;77256:7;77242:26;;;;;;;;;;;;:9;:26::i;73339:408::-;73484:38;73498:5;73505:7;73514;73484:13;:38::i;:::-;73479:261;;-1:-1:-1;;;;;73543:19:0;;73539:190;;73590:31;;;;;;;;4233:25:1;;;4206:18;;73590:31:0;4087:177:1;73539:190:0;73669:44;;;;;-1:-1:-1;;;;;25761:55:1;;73669:44:0;;;25743:74:1;25833:18;;;25826:34;;;25716:18;;73669:44:0;25569:297:1;31463:145:0;33296:21;32977:40;;;;;;31526:75;;31572:17;;;;;;;;;;;;;;66877:246;31303:20;:18;:20::i;:::-;66555:21;;67070:15:::1;67080:5:::0;66555:21;67070:15:::1;:::i;:::-;-1:-1:-1::0;67096:9:0::1;::::0;::::1;:19;67108:7:::0;67096:9;:19:::1;:::i;36638:361::-:0;31303:20;:18;:20::i;:::-;35858:21;36830:7;:14:::1;36840:4:::0;36830:7;:14:::1;:::i;:::-;-1:-1:-1::0;36855:10:0::1;::::0;::::1;:20;36868:7:::0;36855:10;:20:::1;:::i;:::-;-1:-1:-1::0;36959:1:0::1;36943:17:::0;;;36971:16:::1;::::0;;::::1;:20:::0;-1:-1:-1;;36638:361:0:o;122997:186::-;31303:20;:18;:20::i;91932:201::-;91343:4;91437:14;;;90423:28;91437:14;;;;;;;;-1:-1:-1;;;;;91437:31:0;;;;;;;;;;;;92016:110;;92067:47;;;;;-1:-1:-1;;;;;25761:55:1;;92067:47:0;;;25743:74:1;25833:18;;;25826:34;;;25716:18;;92067:47:0;25569:297:1;109994:344:0;110086:37;110105:17;110086:18;:37::i;:::-;110139:27;;-1:-1:-1;;;;;110139:27:0;;;;;;;;110183:11;;:15;110179:152;;110215:53;110244:17;110263:4;110215:28;:53::i;110179:152::-;110301:18;:16;:18::i;140715:221::-;140829:7;140854:14;140871:20;140886:4;140871:14;:20::i;:::-;140854:37;;140909:19;140924:3;;140909:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;140909:6:0;;:19;-1:-1:-1;;140909:14:0;:19;-1:-1:-1;140909:19:0:i;:::-;140902:26;140715:221;-1:-1:-1;;;;;140715:221:0:o;77503:185::-;77598:18;77604:2;77608:7;77598:5;:18::i;:::-;77627:53;77658:1;77662:2;77666:7;77675:4;77627:22;:53::i;72559:336::-;72698:4;-1:-1:-1;;;;;72727:21:0;;;;;;:160;;;72793:7;-1:-1:-1;;;;;72784:16:0;:5;-1:-1:-1;;;;;72784:16:0;;:52;;;-1:-1:-1;;;;;;70022:27:0;;;69942:4;70022:27;;;:20;:27;;;;;;;;:37;;;;;;;;;;;;72804:32;72784:88;;;-1:-1:-1;72122:7:0;72205:26;;;:17;:26;;;;;;-1:-1:-1;;;;;72840:32:0;;;72205:26;;72840:32;72784:88;72720:167;72559:336;-1:-1:-1;;;;72559:336:0:o;109387:286::-;109465:17;-1:-1:-1;;;;;109465:29:0;;109498:1;109465:34;109461:121;;109523:47;;;;;-1:-1:-1;;;;;1802:55:1;;109523:47:0;;;1784:74:1;1757:18;;109523:47:0;1638:226:1;109461:121:0;108496:66;109592:73;;;;-1:-1:-1;;;;;109592:73:0;;;;;;;;;;109387:286::o;101228:279::-;101329:12;101360;101374:23;101401:6;-1:-1:-1;;;;;101401:19:0;101421:4;101401:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;101359:67;;;;101444:55;101471:6;101479:7;101488:10;101444:26;:55::i;113936:126::-;113987:9;:13;113983:72;;114024:19;;;;;;;;;;;;;;141194:155;141265:7;141292:49;141319:20;141334:4;141319:14;:20::i;:::-;141309:31;;;;;;141292:16;:49::i;45630:259::-;45708:7;45729:17;45748:18;45768:16;45788:27;45799:4;45805:9;45788:10;:27::i;:::-;45728:87;;;;;;45826:28;45838:5;45845:8;45826:11;:28::i;:::-;-1:-1:-1;45872:9:0;;45630:259;-1:-1:-1;;;;45630:259:0:o;76476:335::-;-1:-1:-1;;;;;76544:16:0;;76540:89;;76584:33;;;;;76614:1;76584:33;;;1784:74:1;1757:18;;76584:33:0;1638:226:1;76540:89:0;76639:21;76663:32;76671:2;76675:7;76692:1;76663:7;:32::i;:::-;76639:56;-1:-1:-1;;;;;;76710:27:0;;;76706:98;;76761:31;;;;;76789:1;76761:31;;;1784:74:1;1757:18;;76761:31:0;1638:226:1;101780:595:0;101921:12;101956:7;101951:417;;101980:19;101988:10;101980:7;:19::i;:::-;101951:417;;;102208:17;;:22;:49;;;;-1:-1:-1;;;;;;102234:18:0;;;:23;102208:49;102204:121;;;102285:24;;;;;-1:-1:-1;;;;;1802:55:1;;102285:24:0;;;1784:74:1;1757:18;;102285:24:0;1638:226:1;102204:121:0;-1:-1:-1;102346:10:0;102339:17;;141618:548;141689:12;126175:421;141775:12;;141802:10;;;;141827;;;;141852:14;;;;;;;;:::i;:::-;141881:34;141895:19;;;;:4;:19;:::i;:::-;141881:13;:34::i;:::-;141930:28;141944:13;;;;:4;:13;:::i;141930:28::-;141973:31;141987:16;;;;:4;:16;:::i;141973:31::-;142019:38;142039:17;;;;:4;:17;:::i;:::-;142019:19;:38::i;:::-;142072:34;142090:15;;;;:4;:15;:::i;:::-;142072:17;:34::i;:::-;142121:26;142135:4;:11;;142121:13;:26::i;:::-;141721:437;;;;;;28369:25:1;;;;28410:18;;28403:34;;;;28453:18;;;28446:34;;;;28496:18;;;28489:34;;;;-1:-1:-1;;;;;28560:55:1;;;28539:19;;;28532:84;28632:19;;;28625:35;;;;28676:19;;;28669:35;28720:19;;;28713:35;28764:19;;;28757:35;28808:19;;;28801:35;28852:19;;;28845:36;28341:19;;141721:437:0;;;;;;;;;;;;;141714:444;;141618:548;;;:::o;38100:178::-;38177:7;38204:66;38237:20;:18;:20::i;:::-;38259:10;23495:4;23489:11;23526:9;23514:22;;23566:4;23557:14;;23550:39;;;;23619:4;23610:14;;23603:34;23676:4;23661:20;;;23258:441;43992:815;44100:7;44109:12;44123:7;44152:9;:16;44172:2;44152:22;44148:652;;44496:4;44481:20;;44475:27;44546:4;44531:20;;44525:27;44604:4;44589:20;;44583:27;44191:9;44575:36;44647:25;44658:4;44575:36;44475:27;44525;44647:10;:25::i;:::-;44640:32;;;;;;;;;;;44148:652;-1:-1:-1;;44770:16:0;;44721:1;;-1:-1:-1;44725:35:0;;44148:652;43992:815;;;;;:::o;49236:542::-;49332:20;49323:5;:29;;;;;;;;:::i;:::-;;49319:452;;49236:542;;:::o;49319:452::-;49430:29;49421:5;:38;;;;;;;;:::i;:::-;;49417:354;;49483:23;;;;;;;;;;;;;;49417:354;49537:35;49528:5;:44;;;;;;;;:::i;:::-;;49524:247;;49596:46;;;;;;;;4233:25:1;;;4206:18;;49596:46:0;4087:177:1;49524:247:0;49673:30;49664:5;:39;;;;;;;;:::i;:::-;;49660:111;;49727:32;;;;;;;;4233:25:1;;;4206:18;;49727:32:0;4087:177:1;102960:528:0;103093:17;;:21;103089:392;;103325:10;103319:17;103382:15;103369:10;103365:2;103361:19;103354:44;103089:392;103452:17;;;;;;;;;;;;;;142422:131;142493:7;142536;;142520:25;;;;;;;:::i;:::-;;;;;;;;142513:32;;142422:131;;;;:::o;143476:450::-;143590:7;;143659:6;143645:28;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;143645:28:0;;143615:58;;143689:9;143684:176;143704:17;;;143684:176;;;143765:20;143775:6;;143782:1;143775:9;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;143765;:20::i;:::-;143755:31;;;;;;143739:10;143750:1;143739:13;;;;;;;;:::i;:::-;;;;;;;;;;:47;143830:3;;143684:176;;;;143906:10;143889:28;;;;;;;;:::i;:::-;;;;;;;;;;;;;143879:39;;;;;;143872:46;;;143476:450;;;;:::o;144762:433::-;144842:7;;144913:4;144899:26;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;144899:26:0;;144862:63;;144941:9;144936:186;144956:15;;;144936:186;;;145022:25;145039:4;;145044:1;145039:7;;;;;;;:::i;:::-;;;;;;145022:16;:25::i;:::-;145012:36;;;;;;144989:17;145007:1;144989:20;;;;;;;;:::i;:::-;;;;;;;;;;:59;145092:3;;144936:186;;145397:363;145469:7;126001:124;145584:17;;;;:4;:17;:::i;:::-;145620:12;;;;145651:11;;;;145681:12;;;;145712:14;;;;;;;;:::i;:::-;145520:221;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;145496:256;;;;;;145489:263;;145397:363;;;:::o;37090:111::-;37143:7;37170:23;:21;:23::i;:::-;37163:30;;37090:111;:::o;47150:1545::-;47265:7;;;48213:66;48200:79;;48196:166;;;-1:-1:-1;48312:1:0;;-1:-1:-1;48316:30:0;;-1:-1:-1;48348:1:0;48296:54;;48196:166;48476:24;;;48459:14;48476:24;;;;;;;;;30563:25:1;;;30636:4;30624:17;;30604:18;;;30597:45;;;;30658:18;;;30651:34;;;30701:18;;;30694:34;;;48476:24:0;;30535:19:1;;48476:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;48476:24:0;;-1:-1:-1;;48476:24:0;;;-1:-1:-1;;;;;;;48515:20:0;;48511:115;;-1:-1:-1;48568:1:0;;-1:-1:-1;48572:29:0;;-1:-1:-1;48568:1:0;;-1:-1:-1;48552:62:0;;48511:115;48646:6;-1:-1:-1;48654:20:0;;-1:-1:-1;48654:20:0;;-1:-1:-1;47150:1545:0;;;;;;;;;:::o;142860:272::-;142940:12;125765:65;143024:33;143038:18;:11;;:18;:::i;143024:33::-;143072:41;143086:26;;;;:11;:26;:::i;143072:41::-;142972:152;;;;;;30941:25:1;;;;30982:18;;30975:34;;;;31025:18;;;31018:34;30914:18;;142972:152:0;30739:319:1;144236:174:0;144313:12;125894:55;144377:14;;;;:4;:14;:::i;:::-;144393:8;;;;;;;;:::i;:::-;144345:57;;;;;;;;;31263:25:1;;;-1:-1:-1;;;;;31324:55:1;;;;31319:2;31304:18;;31297:83;31428:6;31416:19;31411:2;31396:18;;31389:47;31251:2;31236:18;;31063:379;37209:249:0;37264:7;35051:111;37355:17;:15;:17::i;:::-;37374:20;:18;:20::i;:::-;37315:124;;;;;;31706:25:1;;;;31747:18;;31740:34;;;;31790:18;;;31783:34;37396:13:0;31833:18:1;;;31826:34;37419:4:0;31876:19:1;;;31869:84;31678:19;;37315:124:0;;;;;;;;;;;;37291:159;;;;;;37284:166;;37209:249;:::o;40276:702::-;40326:7;35858:21;40326:7;40423:13;:11;:13::i;:::-;40451:18;;40402:34;;-1:-1:-1;40451:22:0;40447:524;;40497:22;;;;;;;;40276:702;-1:-1:-1;;40276:702:0:o;40447:524::-;40798:13;;40830:15;;40826:134;;40873:10;40276:702;-1:-1:-1;;;40276:702:0:o;40826:134::-;40931:13;40924:20;;;;;40276:702;:::o;41206:738::-;41259:7;35858:21;41259:7;41359:16;:14;:16::i;:::-;41390:21;;41335:40;;-1:-1:-1;41390:25:0;41386:551;;41439:25;;;;;;;;41206:738;-1:-1:-1;;41206:738:0:o;41386:551::-;41755:16;;;;41790:18;;41786:140;;41836:13;41206:738;-1:-1:-1;;;41206: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:384::-;2409:8;2419:6;2473:3;2466:4;2458:6;2454:17;2450:27;2440:55;;2491:1;2488;2481:12;2440:55;-1:-1:-1;2514:20:1;;2557:18;2546:30;;2543:50;;;2589:1;2586;2579:12;2543:50;2626:4;2618:6;2614:17;2602:29;;2686:3;2679:4;2669:6;2666:1;2662:14;2654:6;2650:27;2646:38;2643:47;2640:67;;;2703:1;2700;2693:12;2640:67;2329:384;;;;;:::o;2718:846::-;2879:6;2887;2895;2903;2956:2;2944:9;2935:7;2931:23;2927:32;2924:52;;;2972:1;2969;2962:12;2924:52;3012:9;2999:23;3041:18;3082:2;3074:6;3071:14;3068:34;;;3098:1;3095;3088:12;3068:34;3137:87;3216:7;3207:6;3196:9;3192:22;3137:87;:::i;:::-;3243:8;;-1:-1:-1;3111:113:1;-1:-1:-1;3331:2:1;3316:18;;3303:32;;-1:-1:-1;3347:16:1;;;3344:36;;;3376:1;3373;3366:12;3344:36;;3415:89;3496:7;3485:8;3474:9;3470:24;3415:89;:::i;:::-;2718:846;;;;-1:-1:-1;3523:8:1;-1:-1:-1;;;;2718:846:1:o;3569:328::-;3646:6;3654;3662;3715:2;3703:9;3694:7;3690:23;3686:32;3683:52;;;3731:1;3728;3721:12;3683:52;3754:29;3773:9;3754:29;:::i;:::-;3744:39;;3802:38;3836:2;3825:9;3821:18;3802:38;:::i;:::-;3792:48;;3887:2;3876:9;3872:18;3859:32;3849:42;;3569:328;;;;;:::o;4269:184::-;4321:77;4318:1;4311:88;4418:4;4415:1;4408:15;4442:4;4439:1;4432:15;4458:334;4529:2;4523:9;4585:2;4575:13;;-1:-1:-1;;4571:86:1;4559:99;;4688:18;4673:34;;4709:22;;;4670:62;4667:88;;;4735:18;;:::i;:::-;4771:2;4764:22;4458:334;;-1:-1:-1;4458:334:1:o;4797:590::-;4840:5;4893:3;4886:4;4878:6;4874:17;4870:27;4860:55;;4911:1;4908;4901:12;4860:55;4947:6;4934:20;4973:18;4969:2;4966:26;4963:52;;;4995:18;;:::i;:::-;5039:114;5147:4;-1:-1:-1;;5071:4:1;5067:2;5063:13;5059:86;5055:97;5039:114;:::i;:::-;5178:2;5169:7;5162:19;5224:3;5217:4;5212:2;5204:6;5200:15;5196:26;5193:35;5190:55;;;5241:1;5238;5231:12;5190:55;5306:2;5299:4;5291:6;5287:17;5280:4;5271:7;5267:18;5254:55;5354:1;5329:16;;;5347:4;5325:27;5318:38;;;;5333:7;4797:590;-1:-1:-1;;;4797:590:1:o;5392:1019::-;5527:6;5535;5543;5551;5559;5612:3;5600:9;5591:7;5587:23;5583:33;5580:53;;;5629:1;5626;5619:12;5580:53;5669:9;5656:23;5698:18;5739:2;5731:6;5728:14;5725:34;;;5755:1;5752;5745:12;5725:34;5778:50;5820:7;5811:6;5800:9;5796:22;5778:50;:::i;:::-;5768:60;;5881:2;5870:9;5866:18;5853:32;5837:48;;5910:2;5900:8;5897:16;5894:36;;;5926:1;5923;5916:12;5894:36;5949:52;5993:7;5982:8;5971:9;5967:24;5949:52;:::i;:::-;5939:62;;6054:2;6043:9;6039:18;6026:32;6010:48;;6083:2;6073:8;6070:16;6067:36;;;6099:1;6096;6089:12;6067:36;6122:52;6166:7;6155:8;6144:9;6140:24;6122:52;:::i;:::-;6112:62;;6227:2;6216:9;6212:18;6199:32;6183:48;;6256:2;6246:8;6243:16;6240:36;;;6272:1;6269;6262:12;6240:36;;6295:52;6339:7;6328:8;6317:9;6313:24;6295:52;:::i;:::-;6285:62;;;6366:39;6400:3;6389:9;6385:19;6366:39;:::i;:::-;6356:49;;5392:1019;;;;;;;;:::o;6416:254::-;6484:6;6492;6545:2;6533:9;6524:7;6520:23;6516:32;6513:52;;;6561:1;6558;6551:12;6513:52;6597:9;6584:23;6574:33;;6626:38;6660:2;6649:9;6645:18;6626:38;:::i;:::-;6616:48;;6416:254;;;;;:::o;6675:395::-;6752:6;6760;6813:2;6801:9;6792:7;6788:23;6784:32;6781:52;;;6829:1;6826;6819:12;6781:52;6852:29;6871:9;6852:29;:::i;:::-;6842:39;;6932:2;6921:9;6917:18;6904:32;6959:18;6951:6;6948:30;6945:50;;;6991:1;6988;6981:12;6945:50;7014;7056:7;7047:6;7036:9;7032:22;7014:50;:::i;:::-;7004:60;;;6675:395;;;;;:::o;7075:186::-;7134:6;7187:2;7175:9;7166:7;7162:23;7158:32;7155:52;;;7203:1;7200;7193:12;7155:52;7226:29;7245:9;7226:29;:::i;7448:1335::-;7845:66;7837:6;7833:79;7822:9;7815:98;7796:4;7932:2;7970:3;7965:2;7954:9;7950:18;7943:31;7997:46;8038:3;8027:9;8023:19;8015:6;7997:46;:::i;:::-;8091:9;8083:6;8079:22;8074:2;8063:9;8059:18;8052:50;8125:33;8151:6;8143;8125:33;:::i;:::-;8189:2;8174:18;;8167:34;;;-1:-1:-1;;;;;8238:55:1;;8232:3;8217:19;;8210:84;8325:3;8310:19;;8303:35;;;8375:22;;;8369:3;8354:19;;8347:51;8447:13;;8469:22;;;8545:15;;;;-1:-1:-1;8507:15:1;;;;-1:-1:-1;8588:169:1;8602:6;8599:1;8596:13;8588:169;;;8663:13;;8651:26;;8732:15;;;;8697:12;;;;8624:1;8617:9;8588:169;;;-1:-1:-1;8774:3:1;;7448:1335;-1:-1:-1;;;;;;;;;;;;7448:1335: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:260::-;10008:6;10016;10069:2;10057:9;10048:7;10044:23;10040:32;10037:52;;;10085:1;10082;10075:12;10037:52;10108:29;10127:9;10108:29;:::i;:::-;10098:39;;10156:38;10190:2;10179:9;10175:18;10156:38;:::i;10205:943::-;10258:5;10311:3;10304:4;10296:6;10292:17;10288:27;10278:55;;10329:1;10326;10319:12;10278:55;10365:6;10352:20;10391:4;10414:18;10451:2;10447;10444:10;10441:36;;;10457:18;;:::i;:::-;10503:2;10500:1;10496:10;10526:28;10550:2;10546;10542:11;10526:28;:::i;:::-;10588:15;;;10658;;;10654:24;;;10619:12;;;;10690:15;;;10687:35;;;10718:1;10715;10708:12;10687:35;10754:2;10746:6;10742:15;10731:26;;10766:353;10782:6;10777:3;10774:15;10766:353;;;10868:3;10855:17;10904:2;10891:11;10888:19;10885:109;;;10948:1;10977:2;10973;10966:14;10885:109;11019:57;11072:3;11067:2;11053:11;11045:6;11041:24;11037:33;11019:57;:::i;:::-;11007:70;;-1:-1:-1;10799:12:1;;;;11097;;;;10766:353;;;11137:5;10205:943;-1:-1:-1;;;;;;;;10205:943:1:o;11153:150::-;11228:20;;11277:1;11267:12;;11257:40;;11293:1;11290;11283:12;11308:1138;11521:6;11529;11537;11545;11553;11561;11614:3;11602:9;11593:7;11589:23;11585:33;11582:53;;;11631:1;11628;11621:12;11582:53;11667:9;11654:23;11644:33;;11728:2;11717:9;11713:18;11700:32;11751:18;11792:2;11784:6;11781:14;11778:34;;;11808:1;11805;11798:12;11778:34;11831:60;11883:7;11874:6;11863:9;11859:22;11831:60;:::i;:::-;11821:70;;11944:2;11933:9;11929:18;11916:32;11900:48;;11973:2;11963:8;11960:16;11957:36;;;11989:1;11986;11979:12;11957:36;12012:52;12056:7;12045:8;12034:9;12030:24;12012:52;:::i;:::-;12002:62;;12114:2;12103:9;12099:18;12086:32;12073:45;;12147:1;12140:5;12137:12;12127:40;;12163:1;12160;12153:12;12127:40;12186:5;12176:15;;12210:46;12251:3;12240:9;12236:19;12210:46;:::i;:::-;12200:56;;12309:3;12298:9;12294:19;12281:33;12265:49;;12339:2;12329:8;12326:16;12323:36;;;12355:1;12352;12345:12;12323:36;;12378:62;12432:7;12421:8;12410:9;12406:24;12378:62;:::i;:::-;12368:72;;;11308:1138;;;;;;;;:::o;12451:437::-;12530:1;12526:12;;;;12573;;;12594:61;;12648:4;12640:6;12636:17;12626:27;;12594:61;12701:2;12693:6;12690:14;12670:18;12667:38;12664:218;;12738:77;12735:1;12728:88;12839:4;12836:1;12829:15;12867:4;12864:1;12857:15;12664:218;;12451:437;;;:::o;12893:184::-;12945:77;12942:1;12935:88;13042:4;13039:1;13032:15;13066:4;13063:1;13056:15;13082:384;13176:4;13234:11;13221:25;13324:66;13313:8;13297:14;13293:29;13289:102;13269:18;13265:127;13255:155;;13406:1;13403;13396:12;13255:155;13427:33;;;;;13082:384;-1:-1:-1;;13082:384:1:o;13471:184::-;13523:77;13520:1;13513:88;13620:4;13617:1;13610:15;13644:4;13641:1;13634:15;13660:125;13725:9;;;13746:10;;;13743:36;;;13759:18;;:::i;13790:580::-;13867:4;13873:6;13933:11;13920:25;14023:66;14012:8;13996:14;13992:29;13988:102;13968:18;13964:127;13954:155;;14105:1;14102;14095:12;13954:155;14132:33;;14184:20;;;-1:-1:-1;14227:18:1;14216:30;;14213:50;;;14259:1;14256;14249:12;14213:50;14292:4;14280:17;;-1:-1:-1;14323:14:1;14319:27;;;14309:38;;14306:58;;;14360:1;14357;14350:12;15552:184;15604:77;15601:1;15594:88;15701:4;15698:1;15691:15;15725:4;15722:1;15715:15;15741:616;15793:3;15831:5;15825:12;15858:6;15853:3;15846:19;15884:4;15925:2;15920:3;15916:12;15950:11;15977;15970:18;;16027:6;16024:1;16020:14;16013:5;16009:26;15997:38;;16069:2;16062:5;16058:14;16090:1;16100:231;16114:6;16111:1;16108:13;16100:231;;;16185:5;16179:4;16175:16;16170:3;16163:29;16213:38;16246:4;16237:6;16231:13;16213:38;:::i;:::-;16309:12;;;;16205:46;-1:-1:-1;16274:15:1;;;;16136:1;16129:9;16100:231;;;-1:-1:-1;16347:4:1;;15741:616;-1:-1:-1;;;;;;;15741:616:1:o;16362:948::-;16751:4;16791:1;16783:6;16780:13;16770:47;;16797:18;;:::i;:::-;16844:6;16833:9;16826:25;16881:1;16873:6;16870:13;16860:47;;16887:18;;:::i;:::-;16943:6;16938:2;16927:9;16923:18;16916:34;16986:3;16981:2;16970:9;16966:18;16959:31;17013:46;17054:3;17043:9;17039:19;17031:6;17013:46;:::i;:::-;17107:9;17099:6;17095:22;17090:2;17079:9;17075:18;17068:50;17141:43;17177:6;17169;17141:43;:::i;:::-;17127:57;;17233:9;17225:6;17221:22;17215:3;17204:9;17200:19;17193:51;17261:43;17297:6;17289;17261:43;:::i;17315:639::-;17443:4;17449:6;17509:11;17496:25;17599:66;17588:8;17572:14;17568:29;17564:102;17544:18;17540:127;17530:155;;17681:1;17678;17671:12;17530:155;17708:33;;17760:20;;;-1:-1:-1;17803:18:1;17792:30;;17789:50;;;17835:1;17832;17825:12;17789:50;17868:4;17856:17;;-1:-1:-1;17919:1:1;17915:14;;;17899;17895:35;17885:46;;17882:66;;;17944:1;17941;17934:12;17959:391;18060:4;18118:11;18105:25;18208:66;18197:8;18181:14;18177:29;18173:102;18153:18;18149:127;18139:155;;18290:1;18287;18280:12;18941:326;19030:6;19025:3;19018:19;19082:6;19075:5;19068:4;19063:3;19059:14;19046:43;;19134:1;19127:4;19118:6;19113:3;19109:16;19105:27;19098:38;19000:3;19256:4;-1:-1:-1;;19181:2:1;19173:6;19169:15;19165:88;19160:3;19156:98;19152:109;19145:116;;18941:326;;;;:::o;19272:437::-;19489:2;19478:9;19471:21;19452:4;19515:62;19573:2;19562:9;19558:18;19550:6;19542;19515:62;:::i;:::-;19625:9;19617:6;19613:22;19608:2;19597:9;19593:18;19586:50;19653;19696:6;19688;19680;19653:50;:::i;:::-;19645:58;19272:437;-1:-1:-1;;;;;;;19272:437:1:o;19840:545::-;19942:2;19937:3;19934:11;19931:448;;;19978:1;20003:5;19999:2;19992:17;20048:4;20044:2;20034:19;20118:2;20106:10;20102:19;20099:1;20095:27;20089:4;20085:38;20154:4;20142:10;20139:20;20136:47;;;-1:-1:-1;20177:4:1;20136:47;20232:2;20227:3;20223:12;20220:1;20216:20;20210:4;20206:31;20196:41;;20287:82;20305:2;20298:5;20295:13;20287:82;;;20350:17;;;20331:1;20320:13;20287:82;;;20291:3;;;19840:545;;;:::o;20621:1325::-;20745:18;20740:3;20737:27;20734:53;;;20767:18;;:::i;:::-;20796:94;20886:3;20846:38;20878:4;20872:11;20846:38;:::i;:::-;20840:4;20796:94;:::i;:::-;20916:1;20941:2;20936:3;20933:11;20958:1;20953:735;;;;21732:1;21749:3;21746:93;;;-1:-1:-1;21805:19:1;;;21792:33;21746:93;20527:66;20518:1;20514:11;;;20510:84;20506:89;20496:100;20602:1;20598:11;;;20493:117;21852:78;;20926:1014;;20953:735;19787:1;19780:14;;;19824:4;19811:18;;-1:-1:-1;;20989:76:1;;;21149:9;21171:229;21185:7;21182:1;21179:14;21171:229;;;21274:19;;;21261:33;21246:49;;21381:4;21366:20;;;;21334:1;21322:14;;;;21201:12;21171:229;;;21175:3;21428;21419:7;21416:16;21413:219;;;21548:66;21542:3;21536;21533:1;21529:11;21525:21;21521:94;21517:99;21504:9;21499:3;21495:19;21482:33;21478:139;21470:6;21463:155;21413:219;;;21675:1;21669:3;21666:1;21662:11;21658:19;21652:4;21645:33;20926:1014;;20621:1325;;;:::o;21951:636::-;22076:4;22082:6;22142:11;22129:25;22232:66;22221:8;22205:14;22201:29;22197:102;22177:18;22173:127;22163:155;;22314:1;22311;22304:12;22163:155;22341:33;;22393:20;;;-1:-1:-1;22436:18:1;22425:30;;22422:50;;;22468:1;22465;22458:12;22422:50;22501:4;22489:17;;-1:-1:-1;22552:1:1;22548:14;;;22532;22528:35;22518:46;;22515:66;;;22577:1;22574;22567:12;22592:508;22837:6;22826:9;22819:25;22880:2;22875;22864:9;22860:18;22853:30;22800:4;22906:62;22964:2;22953:9;22949:18;22941:6;22933;22906:62;:::i;:::-;23016:9;23008:6;23004:22;22999:2;22988:9;22984:18;22977:50;23044;23087:6;23079;23071;23044:50;:::i;23105:270::-;23178:6;23231:2;23219:9;23210:7;23206:23;23202:32;23199:52;;;23247:1;23244;23237:12;23199:52;23286:9;23273:23;23325:1;23318:5;23315:12;23305:40;;23341:1;23338;23331:12;23380:140;23461:1;23454:5;23451:12;23441:46;;23467:18;;:::i;:::-;23496;;23380:140::o;23525:350::-;23739:25;;;23795:2;23780:18;;23773:34;;;23727:2;23712:18;;23816:53;23865:2;23850:18;;23842:6;23816:53;:::i;23880:184::-;23950:6;24003:2;23991:9;23982:7;23978:23;23974:32;23971:52;;;24019:1;24016;24009:12;23971:52;-1:-1:-1;24042:16:1;;23880:184;-1:-1:-1;23880:184:1:o;24069:512::-;24263:4;-1:-1:-1;;;;;24373:2:1;24365:6;24361:15;24350:9;24343:34;24425:2;24417:6;24413:15;24408:2;24397:9;24393:18;24386:43;;24465:6;24460:2;24449:9;24445:18;24438:34;24508:3;24503:2;24492:9;24488:18;24481:31;24529:46;24570:3;24559:9;24555:19;24547:6;24529:46;:::i;:::-;24521:54;24069:512;-1:-1:-1;;;;;;24069:512:1:o;24586:249::-;24655:6;24708:2;24696:9;24687:7;24683:23;24679:32;24676:52;;;24724:1;24721;24714:12;24676:52;24756:9;24750:16;24775:30;24799:5;24775:30;:::i;24840:272::-;24898:6;24951:2;24939:9;24930:7;24926:23;24922:32;24919:52;;;24967:1;24964;24957:12;24919:52;25006:9;24993:23;25056:6;25049:5;25045:18;25038:5;25035:29;25025:57;;25078:1;25075;25068:12;25117:168;25190:9;;;25221;;25238:15;;;25232:22;;25218:37;25208:71;;25259:18;;:::i;25290:274::-;25330:1;25356;25346:189;;25391:77;25388:1;25381:88;25492:4;25489:1;25482:15;25520:4;25517:1;25510:15;25346:189;-1:-1:-1;25549:9:1;;25290:274::o;25871:1471::-;25997:3;25991:10;26024:18;26016:6;26013:30;26010:56;;;26046:18;;:::i;:::-;26075:97;26165:6;26125:38;26157:4;26151:11;26125:38;:::i;:::-;26119:4;26075:97;:::i;:::-;26227:4;;26291:2;26280:14;;26308:1;26303:782;;;;27129:1;27146:6;27143:89;;;-1:-1:-1;27198:19:1;;;27192:26;27143:89;20527:66;20518:1;20514:11;;;20510:84;20506:89;20496:100;20602:1;20598:11;;;20493:117;27245:81;;26273:1063;;26303:782;19787:1;19780:14;;;19824:4;19811:18;;-1:-1:-1;;26339:79:1;;;26516:236;26530:7;26527:1;26524:14;26516:236;;;26619:19;;;26613:26;26598:42;;26711:27;;;;26679:1;26667:14;;;;26546:19;;26516:236;;;26520:3;26780:6;26771:7;26768:19;26765:261;;;26841:19;;;26835:26;26942:66;26924:1;26920:14;;;26936:3;26916:24;26912:97;26908:102;26893:118;26878:134;;26765:261;-1:-1:-1;;;;;27072:1:1;27056:14;;;27052:22;27039:36;;-1:-1:-1;25871:1471:1:o;27649:287::-;27778:3;27816:6;27810:13;27832:66;27891:6;27886:3;27879:4;27871:6;27867:17;27832:66;:::i;28892:271::-;29075:6;29067;29062:3;29049:33;29031:3;29101:16;;29126:13;;;29101:16;28892:271;-1:-1:-1;28892:271:1:o;29168:543::-;29386:13;;29329:3;;29360;;29439:4;29466:15;;;29329:3;29509:175;29523:6;29520:1;29517:13;29509:175;;;29586:13;;29572:28;;29622:14;;;;29659:15;;;;29545:1;29538:9;29509:175;;;-1:-1:-1;29700:5:1;;29168:543;-1:-1:-1;;;;;;29168:543:1:o;29716:615::-;29960:4;30002:3;29991:9;29987:19;29979:27;;30033:6;30022:9;30015:25;-1:-1:-1;;;;;30080:6:1;30076:55;30071:2;30060:9;30056:18;30049:83;30168:6;30163:2;30152:9;30148:18;30141:34;30211:6;30206:2;30195:9;30191:18;30184:34;30255:6;30249:3;30238:9;30234:19;30227:35;30271:54;30320:3;30309:9;30305:19;30297:6;30271:54;:::i
Swarm Source
ipfs://e623a0d027ed828690c06fbcf3f1ac3fe7010216a0dd1b1de4b7b6260c38c6f2
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.