Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Initialize | 16049158 | 1192 days ago | IN | 0 ETH | 0.00176287 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
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:
FreeNFTDailyCargo
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Unliscensed
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "./Base64.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/*
███████ ██████ ███████ ███████ ███ ██ ███████ ████████
██ ██ ██ ██ ██ ████ ██ ██ ██
█████ ██████ █████ █████ ██ ██ ██ █████ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ███████ ███████ ██ ████ ██ ██
*/
contract FreeNFTDailyCargo is ERC721A, Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, UUPSUpgradeable, DefaultOperatorFilterer {
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------- ERC721A/PROXY SET-UP ------ ||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
using Strings for uint256;
using ECDSA for bytes32;
string suffix;
function initialize() public initializer {
__Ownable_init();
__ReentrancyGuard_init();
_name = "Daily Cargo";
_symbol = "DC";
_currentIndex = _startTokenId();
}
function _authorizeUpgrade(address _newImplementation) internal override onlyOwner {}
string description = "Go to https://freenft.xyz every day to upgrade your cargo, maintain your streak and win rewards.";
string externalUrl = "https://freenft.xyz";
string baseURI = "https://a2vh8vk6r7.execute-api.us-east-1.amazonaws.com/prod/daily_chest_image/";
string baseName = "Daily Cargo #";
string attributesStart = '[{"trait_type": "Streak", "value":';
string attributesEnd = "}]";
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ---- DAILY CONTAINER VARIABLES --- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
address signerAddress;
/**
* @notice struct defining a player.
* @param lastClaimed the last time the player claimed a cargo.
* @param streak the number of consecutive daily cargos minted by the
* player.
* @param activeChestId the id of the ctonainer the player is currently upgrading.
*/
struct Player {
uint64 lastClaimed;
uint64 streak;
uint128 activeCargoId;
}
/**
* @notice mapping from address to their player data.
* @dev keeps track of the last time a player claimed a cargo, the number
* of consecutive days they have claimed a cargo, and the id of the chest
* @dev used in { getDailyCargo } to determine if a player can upgrade
* their cargo, or need to mint a new one.
*/
mapping(address => Player) public players;
/**
* @notice keeps track of a cargo's streak. A cargo's streak is the number of
* times { getDailyCargo } has been called by the minter of the cargo consecutively
* without missing a day.
*
* @dev this is incremented in { getDailyCargo } if the sender is on time. A cargo
* streak can becomes immutable if the sender is not on time - they must mint
* a new cargo and start a new streak. Nonetheless, the cargo's streak is still
* stored and the ERC721 is still ownable/tradeable.
*/
mapping (uint256 => uint256) public cargoStreak;
/**
* @notice one/two day/s in seconds.
*
* @dev used in time calculations in { getDailyCargo } and { missedADay }
*/
uint256 private constant DAY_IN_SECONDS = 86400;
uint256 private constant TWO_DAYS_IN_SECONDS = 86400 * 2;
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ----- DAILY CONTAINER FUNCTIONS -- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
//TODO: SIGNATURE INPUT
/**
* @notice mints a new ERC721 cargo for the sender if they haven't minted before
* OR updates their existing cargo's streak if they call within the 24 hour window
* starting when the function becomes callable again.
* @notice the function becomes callable again after 24 hours.
*/
function getDailyCargo(bytes calldata _signature) public nonReentrant /* onlyProxy */ {
// gets the timestamp the address last called the function at //
// then checks they did not call the function less than a day ago //
Player memory player = players[msg.sender];
uint256 lastMintedTimestamp = uint256(player.lastClaimed);
uint256 addressStreak= uint256(player.streak);
require(_verifyDailyCargo(_signature, addressStreak, lastMintedTimestamp), "invalid signature.");
require(lastMintedTimestamp + DAY_IN_SECONDS < block.timestamp, "you can only mint one per day");
// checks if the sender hasn't minted or missed the 24 hour callable window //
if (addressStreak == 0 || missedADay(lastMintedTimestamp)) {
// if so we grab the new cargo id //
uint256 nextCargoId = _nextTokenId();
// create a new Player struct with the new cargo id and a streak of 1 //
Player memory newPlayerData;
newPlayerData.streak = 1;
newPlayerData.lastClaimed = uint64(block.timestamp);
newPlayerData.activeCargoId = uint128(nextCargoId);
// update the players mapping with the new Player struct //
players[msg.sender] = newPlayerData;
// set the cargo's streak to 1 //
cargoStreak[nextCargoId] = 1;
// we mint the new cargo and increment the supply //
return _mint(msg.sender, 1);
}
// if the sender has a cargo and is on time... //
// we grab the cargo id the most recently minted //
// increment their address streak //
// increment the cargo streak //
uint128 activeCargoId = player.activeCargoId;
Player memory updatedPlayerData;
updatedPlayerData.streak = player.streak + 1;
updatedPlayerData.lastClaimed = uint64(block.timestamp);
updatedPlayerData.activeCargoId = activeCargoId;
// update the mapping //
players[msg.sender] = updatedPlayerData;
// update the cargo streak //
cargoStreak[activeCargoId] += 1;
emit Transfer(address(0), msg.sender, activeCargoId);
}
/**
* @notice checks if the sender missed the 24 hour window to call { getDailyCargo }
*
* @dev after they call { getDailyCargo } the function
* becomes callable again
* after 24 hours. If they call within the 24 hour window after it is callable,
* they are on time, so this will return false.
*/
function missedADay(uint256 _lastMintedTimestamp) public view returns (bool) {
// using two days in seconds to account for the 24 hour uncallable period //
return _lastMintedTimestamp + TWO_DAYS_IN_SECONDS < block.timestamp;
}
/**
* @notice signature functions to verify a cargo is being minted from
* freenft.xyz to stop bots from minting.
*/
function _hashDailyCargo(address _address, uint256 _streakCount, uint256 _lastMintedTimestamp) internal view returns (bytes32) {
return keccak256(abi.encode(
address(this),
_address,
_streakCount,
_lastMintedTimestamp
)).toEthSignedMessageHash();
}
function _verifyDailyCargo(bytes memory signature, uint256 _streakCount, uint256 _lastMintedTimestamp) internal view returns (bool) {
return (_hashDailyCargo(msg.sender, _streakCount, _lastMintedTimestamp).recover(signature) == signerAddress);
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------ CONTAINER METADATA ------- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice returns the cargo's metadata.
* @dev constructs a json string in compliance with the ERC721/A metadata standard.
* @dev the json string is constructed using the cargo's id and streak.
* @dev used in { tokenURI }.
*/
function buildJSON(uint256 _cargoId) public view returns (string memory) {
uint256 streak = cargoStreak[_cargoId];
string memory openBracket = "{";
string memory quotation = '"';
string memory descriptionAdded = string(abi.encodePacked(openBracket, '"description":', quotation, description, quotation, ","));
string memory urlAdded = string(abi.encodePacked(descriptionAdded, '"external_url":', quotation, externalUrl, quotation, ","));
string memory imageAdded = string(abi.encodePacked(urlAdded, '"image":', quotation, baseURI, streak.toString(), quotation, ","));
string memory nameAdded = string(abi.encodePacked(imageAdded, '"name":', quotation, baseName, _cargoId.toString(), quotation, ","));
string memory attributesAdded = string(abi.encodePacked(nameAdded, '"attributes":', attributesStart, quotation, streak.toString(), quotation, attributesEnd, "}"));
return attributesAdded;
}
/**
* @notice overrides the ERC721 tokenURI, uses { buildJSON }.
* @dev return a base64 encoded string of the JSON metadata.
*
*/
function tokenURI(uint256 _cargoId) public view override returns (string memory) {
require(_exists(_cargoId), "cargo has not been minted.");
string memory json = buildJSON(_cargoId);
return string(abi.encodePacked("data:application/json;base64,", Base64.encode(bytes(json))));
}
/**
* @notice sets the baseName used in { buildJSON }.
*/
function setBaseName(string memory _baseName) public onlyOwner {
baseName = _baseName;
}
/**
* @notice sets the externalUrl used in { buildJSON }.
*/
function setExternalUrl(string memory _externalUrl) public onlyOwner {
externalUrl = _externalUrl;
}
/**
* @notice sets the attributesStart used in { buildJSON }.
*/
function setAttributesStart(string memory _attributesStart) public onlyOwner {
attributesStart = _attributesStart;
}
/**
* @notice sets the attributesEnd used in { buildJSON }.
*/
function setAttributesEnd(string memory _attributesEnd) public onlyOwner {
attributesEnd = _attributesEnd;
}
/**
* @notice sets the description used in { buildJSON }.
*/
function setDescription(string memory _description) public onlyOwner {
description = _description;
}
/**
* @notice sets the baseURI used in { tokenURI }.
*/
function setBaseURI(string memory _baseURI) public onlyOwner {
baseURI = _baseURI;
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------- ERC721A OVERRIDDES ------- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice overrides the ERC721A transferFrom function to delete an address'
* streak when they transfer a cargo.
*
* @dev this is so that the address needs to mint a new cargo to start a streak again.
* the cargo data is not cleared, the receiver may use the cargo's streak benefits as they please.
* BUT the new owner cannot increment the cargo's streak, as they are not the minter.
* calling { getDailyCargo } will still just update the receivers streak, or mint them a token.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public override payable onlyAllowedOperator(from) {
// deleteing the from address' streak if it's their active cargo //
Player memory player = players[from];
if (player.activeCargoId == tokenId) {
delete players[from];
}
// complete the transfer //
ERC721A.transferFrom(from, to, tokenId);
}
/**
* @notice overrides the ERC721A { _startTokenId } function to start at 1.
*
* @dev starting at 1 makes the first mint cheaper, since moving from 0 -> 1
* is more expensive than x > 0 => y > 0.
*/
function _startTokenId() internal pure override returns (uint256) {
return 1;
}
/**
* overrides of { ERC721A } approval/transfer functions in compliance
* with exchange on-chain royalty requirements.
*
* read more https://support.opensea.io/hc/en-us/articles/1500009575482-How-do-creator-fees-work-on-OpenSea-
*/
function approve(address to, uint256 tokenId)
public
payable
virtual
override
onlyAllowedOperatorApproval(to)
{
super.approve(to, tokenId);
}
function setApprovalForAll(address operator, bool approved)
public
virtual
override
onlyAllowedOperatorApproval(operator)
{
super.setApprovalForAll(operator, approved);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
)
public
payable
virtual
override
onlyAllowedOperator(from)
{
super.safeTransferFrom(from, to, tokenId, '');
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
)
public
payable
virtual
override
onlyAllowedOperator(from)
{
super.safeTransferFrom(from, to, tokenId, _data);
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| -- VIEW FUNCTIONS FOR FRONT END -- |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice returns the address' streak and the cargo's streak.
*
* @dev used in the front end to display the address' streak and the cargo's streak.
*
* @param _address the address to check.
*/
function getAddressStreak(address _address) public view returns (uint256) {
return players[_address].streak;
}
/**
* @notice returns the the cargo's streak.
*
* @dev used in the front end to display the cargo' streak.
*
* @param _cargoId the cargo id to check.
*/
function getCargoStreak(uint256 _cargoId) public view returns (uint256) {
return cargoStreak[_cargoId];
}
/**
* @notice returns the address' latest cargo minted.
*
* @dev used in the front end the address' active cargo.
*
* @param _address the address to check.
*/
function getLatestCargoMinted(address _address) public view returns (uint256) {
return players[_address].activeCargoId;
}
/**
* @notice returns the address' latest cargo minted.
*
* @dev used in the front end to check if the address needs to mint a new cargo,
* or can simply upgrade their active one.
*
* @param _address the address to check.
*/
function hasToMintNewCargo(address _address) public view returns (bool) {
Player memory player = players[_address];
return player.streak == 0 || missedADay(player.lastClaimed);
}
/**
* @notice burns a cargoId
*
* @dev used by an auction contract to burn the winning cargo
*/
function burnCargo(uint256 _cargoId) public {
_burn(_cargoId);
}
/* ------------------------------------ *\
||||||||||||||||||||||||||||||||||||||||||
||| ------- CONTRACT MANAGEMENT ------ |||
||||||||||||||||||||||||||||||||||||||||||
\* ------------------------------------ */
/**
* @notice sets the signer address used in { _verifyDailyCargo }.
*/
function setSignerAddress(address _signerAddress) public onlyOwner {
signerAddress = _signerAddress;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
library Base64 {
string internal constant TABLE_ENCODE =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
bytes internal constant TABLE_DECODE =
hex"0000000000000000000000000000000000000000000000000000000000000000"
hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";
function encode(bytes memory data) internal pure returns (string memory) {
if (data.length == 0) return "";
// load the table into memory
string memory table = TABLE_ENCODE;
// multiply by 4/3 rounded up
uint256 encodedLen = 4 * ((data.length + 2) / 3);
// add some extra buffer at the end required for the writing
string memory result = new string(encodedLen + 32);
assembly {
// set the actual output length
mstore(result, encodedLen)
// prepare the lookup table
let tablePtr := add(table, 1)
// input ptr
let dataPtr := data
let endPtr := add(dataPtr, mload(data))
// result ptr, jump over length
let resultPtr := add(result, 32)
// run over the input, 3 bytes at a time
for {
} lt(dataPtr, endPtr) {
} {
// read 3 bytes
dataPtr := add(dataPtr, 3)
let input := mload(dataPtr)
// write 4 characters
mstore8(
resultPtr,
mload(add(tablePtr, and(shr(18, input), 0x3F)))
)
resultPtr := add(resultPtr, 1)
mstore8(
resultPtr,
mload(add(tablePtr, and(shr(12, input), 0x3F)))
)
resultPtr := add(resultPtr, 1)
mstore8(
resultPtr,
mload(add(tablePtr, and(shr(6, input), 0x3F)))
)
resultPtr := add(resultPtr, 1)
mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
resultPtr := add(resultPtr, 1)
}
// padding with '='
switch mod(mload(data), 3)
case 1 {
mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
}
case 2 {
mstore(sub(resultPtr, 1), shl(248, 0x3d))
}
}
return result;
}
function decode(string memory _data) internal pure returns (bytes memory) {
bytes memory data = bytes(_data);
if (data.length == 0) return new bytes(0);
require(data.length % 4 == 0, "invalid base64 decoder input");
// load the table into memory
bytes memory table = TABLE_DECODE;
// every 4 characters represent 3 bytes
uint256 decodedLen = (data.length / 4) * 3;
// add some extra buffer at the end required for the writing
bytes memory result = new bytes(decodedLen + 32);
assembly {
// padding with '='
let lastBytes := mload(add(data, mload(data)))
if eq(and(lastBytes, 0xFF), 0x3d) {
decodedLen := sub(decodedLen, 1)
if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
decodedLen := sub(decodedLen, 1)
}
}
// set the actual output length
mstore(result, decodedLen)
// prepare the lookup table
let tablePtr := add(table, 1)
// input ptr
let dataPtr := data
let endPtr := add(dataPtr, mload(data))
// result ptr, jump over length
let resultPtr := add(result, 32)
// run over the input, 4 characters at a time
for {
} lt(dataPtr, endPtr) {
} {
// read 4 characters
dataPtr := add(dataPtr, 4)
let input := mload(dataPtr)
// write 3 bytes
let output := add(
add(
shl(
18,
and(
mload(add(tablePtr, and(shr(24, input), 0xFF))),
0xFF
)
),
shl(
12,
and(
mload(add(tablePtr, and(shr(16, input), 0xFF))),
0xFF
)
)
),
add(
shl(
6,
and(
mload(add(tablePtr, and(shr(8, input), 0xFF))),
0xFF
)
),
and(mload(add(tablePtr, and(input, 0xFF))), 0xFF)
)
)
mstore(resultPtr, shl(232, output))
resultPtr := add(resultPtr, 3)
}
}
return result;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {OperatorFilterer} from "./OperatorFilterer.sol";
/**
* @title DefaultOperatorFilterer
* @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
*/
abstract contract DefaultOperatorFilterer is OperatorFilterer {
address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);
constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuardUpgradeable is Initializable {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
function __ReentrancyGuard_init() internal onlyInitializing {
__ReentrancyGuard_init_unchained();
}
function __ReentrancyGuard_init_unchained() internal onlyInitializing {
_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 {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.0;
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../ERC1967/ERC1967UpgradeUpgradeable.sol";
import "./Initializable.sol";
/**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*
* _Available since v4.1._
*/
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {
function __UUPSUpgradeable_init() internal onlyInitializing {
}
function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
}
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
address private immutable __self = address(this);
/**
* @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() {
require(address(this) != __self, "Function must be called through delegatecall");
require(_getImplementation() == __self, "Function must be called through active proxy");
_;
}
/**
* @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() {
require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
_;
}
/**
* @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 override notDelegated returns (bytes32) {
return _IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*/
function upgradeTo(address newImplementation) external virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*/
function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data, true);
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeTo} and {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal override onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Internal function that returns the initialized version. Returns `_initialized`
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Internal function that returns the initialized version. Returns `_initializing`
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import './IERC721A.sol';
/**
* @dev Interface of ERC721 token receiver.
*/
interface ERC721A__IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
/**
* @title ERC721A
*
* @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
* Non-Fungible Token Standard, including the Metadata extension.
* Optimized for lower gas during batch mints.
*
* Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
* starting from `_startTokenId()`.
*
* Assumptions:
*
* - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
* - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is IERC721A {
// Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
struct TokenApprovalRef {
address value;
}
// =============================================================
// CONSTANTS
// =============================================================
// Mask of an entry in packed address data.
uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;
// The bit position of `numberMinted` in packed address data.
uint256 private constant _BITPOS_NUMBER_MINTED = 64;
// The bit position of `numberBurned` in packed address data.
uint256 private constant _BITPOS_NUMBER_BURNED = 128;
// The bit position of `aux` in packed address data.
uint256 private constant _BITPOS_AUX = 192;
// Mask of all 256 bits in packed address data except the 64 bits for `aux`.
uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;
// The bit position of `startTimestamp` in packed ownership.
uint256 private constant _BITPOS_START_TIMESTAMP = 160;
// The bit mask of the `burned` bit in packed ownership.
uint256 private constant _BITMASK_BURNED = 1 << 224;
// The bit position of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;
// The bit mask of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;
// The bit position of `extraData` in packed ownership.
uint256 private constant _BITPOS_EXTRA_DATA = 232;
// Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;
// The mask of the lower 160 bits for addresses.
uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;
// The maximum `quantity` that can be minted with {_mintERC2309}.
// This limit is to prevent overflows on the address data entries.
// For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
// is required to cause an overflow, which is unrealistic.
uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;
// The `Transfer` event signature is given by:
// `keccak256(bytes("Transfer(address,address,uint256)"))`.
bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;
// =============================================================
// STORAGE
// =============================================================
// The next token ID to be minted.
uint256 internal _currentIndex;
// The number of tokens burned.
uint256 private _burnCounter;
// Token name
string internal _name;
// Token symbol
string internal _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned.
// See {_packedOwnershipOf} implementation for details.
//
// Bits Layout:
// - [0..159] `addr`
// - [160..223] `startTimestamp`
// - [224] `burned`
// - [225] `nextInitialized`
// - [232..255] `extraData`
mapping(uint256 => uint256) private _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0..63] `balance`
// - [64..127] `numberMinted`
// - [128..191] `numberBurned`
// - [192..255] `aux`
mapping(address => uint256) private _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => TokenApprovalRef) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
// =============================================================
// TOKEN COUNTING OPERATIONS
// =============================================================
/**
* @dev Returns the starting token ID.
* To change the starting token ID, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev Returns the next token ID to be minted.
*/
function _nextTokenId() internal view virtual returns (uint256) {
return _currentIndex;
}
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() public view virtual override returns (uint256) {
// Counter underflow is impossible as _burnCounter cannot be incremented
// more than `_currentIndex - _startTokenId()` times.
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
/**
* @dev Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view virtual returns (uint256) {
// Counter underflow is impossible as `_currentIndex` does not decrement,
// and it is initialized to `_startTokenId()`.
unchecked {
return _currentIndex - _startTokenId();
}
}
/**
* @dev Returns the total number of tokens burned.
*/
function _totalBurned() internal view virtual returns (uint256) {
return _burnCounter;
}
// =============================================================
// ADDRESS DATA OPERATIONS
// =============================================================
/**
* @dev Returns the number of tokens in `owner`'s account.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
}
/**
* Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal virtual {
uint256 packed = _packedAddressData[owner];
uint256 auxCasted;
// Cast `aux` with assembly to avoid redundant masking.
assembly {
auxCasted := aux
}
packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
_packedAddressData[owner] = packed;
}
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
// The interface IDs are constants representing the first 4 bytes
// of the XOR of all function selectors in the interface.
// See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
// (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
return
interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
}
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @dev Returns the token collection name.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the token collection symbol.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
}
/**
* @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, it can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return '';
}
// =============================================================
// OWNERSHIPS OPERATIONS
// =============================================================
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
return address(uint160(_packedOwnershipOf(tokenId)));
}
/**
* @dev Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around over time.
*/
function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnershipOf(tokenId));
}
/**
* @dev Returns the unpacked `TokenOwnership` struct at `index`.
*/
function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnerships[index]);
}
/**
* @dev Initializes the ownership slot minted at `index` for efficiency purposes.
*/
function _initializeOwnershipAt(uint256 index) internal virtual {
if (_packedOwnerships[index] == 0) {
_packedOwnerships[index] = _packedOwnershipOf(index);
}
}
/**
* Returns the packed ownership data of `tokenId`.
*/
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr)
if (curr < _currentIndex) {
uint256 packed = _packedOwnerships[curr];
// If not burned.
if (packed & _BITMASK_BURNED == 0) {
// Invariant:
// There will always be an initialized ownership slot
// (i.e. `ownership.addr != address(0) && ownership.burned == false`)
// before an unintialized ownership slot
// (i.e. `ownership.addr == address(0) && ownership.burned == false`)
// Hence, `curr` will not underflow.
//
// We can directly compare the packed value.
// If the address is zero, packed will be zero.
while (packed == 0) {
packed = _packedOwnerships[--curr];
}
return packed;
}
}
}
revert OwnerQueryForNonexistentToken();
}
/**
* @dev Returns the unpacked `TokenOwnership` struct from `packed`.
*/
function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
ownership.addr = address(uint160(packed));
ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
ownership.burned = packed & _BITMASK_BURNED != 0;
ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
}
/**
* @dev Packs ownership data into a single uint256.
*/
function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
}
}
/**
* @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
*/
function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
// For branchless setting of the `nextInitialized` flag.
assembly {
// `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
}
}
// =============================================================
// APPROVAL OPERATIONS
// =============================================================
/**
* @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) public payable virtual override {
address owner = ownerOf(tokenId);
if (_msgSenderERC721A() != owner)
if (!isApprovedForAll(owner, _msgSenderERC721A())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_tokenApprovals[tokenId].value = to;
emit Approval(owner, to, tokenId);
}
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId].value;
}
/**
* @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 caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_operatorApprovals[_msgSenderERC721A()][operator] = approved;
emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
}
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted. See {_mint}.
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return
_startTokenId() <= tokenId &&
tokenId < _currentIndex && // If within bounds,
_packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
}
/**
* @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
*/
function _isSenderApprovedOrOwner(
address approvedAddress,
address owner,
address msgSender
) private pure returns (bool result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
msgSender := and(msgSender, _BITMASK_ADDRESS)
// `msgSender == owner || msgSender == approvedAddress`.
result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
}
}
/**
* @dev Returns the storage slot and value for the approved address of `tokenId`.
*/
function _getApprovedSlotAndAddress(uint256 tokenId)
private
view
returns (uint256 approvedAddressSlot, address approvedAddress)
{
TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
// The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
assembly {
approvedAddressSlot := tokenApproval.slot
approvedAddress := sload(approvedAddressSlot)
}
}
// =============================================================
// TRANSFER OPERATIONS
// =============================================================
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* 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
) public payable virtual override {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();
(uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);
// The nested ifs save around 20+ gas over a compound boolean condition.
if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
if (to == address(0)) revert TransferToZeroAddress();
_beforeTokenTransfers(from, to, tokenId, 1);
// Clear approvals from the previous owner.
assembly {
if approvedAddress {
// This is equivalent to `delete _tokenApprovals[tokenId]`.
sstore(approvedAddressSlot, 0)
}
}
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
unchecked {
// We can directly increment and decrement the balances.
--_packedAddressData[from]; // Updates: `balance -= 1`.
++_packedAddressData[to]; // Updates: `balance += 1`.
// Updates:
// - `address` to the next owner.
// - `startTimestamp` to the timestamp of transfering.
// - `burned` to `false`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] = _packOwnershipData(
to,
_BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
);
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable virtual override {
safeTransferFrom(from, to, tokenId, '');
}
/**
* @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 memory _data
) public payable virtual override {
transferFrom(from, to, tokenId);
if (to.code.length != 0)
if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
/**
* @dev Hook that is called before a set of serially-ordered token IDs
* are about to be transferred. This includes minting.
* And also called before burning one token.
*
* `startTokenId` - the first token ID to be transferred.
* `quantity` - the amount to be transferred.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token IDs
* have been transferred. This includes minting.
* And also called after one token has been burned.
*
* `startTokenId` - the first token ID to be transferred.
* `quantity` - the amount to be transferred.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
*
* `from` - Previous owner of the given token ID.
* `to` - Target address that will receive the token.
* `tokenId` - Token ID to be transferred.
* `_data` - Optional data to send along with the call.
*
* Returns whether the call correctly returned the expected magic value.
*/
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
bytes4 retval
) {
return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert TransferToNonERC721ReceiverImplementer();
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
// =============================================================
// MINT OPERATIONS
// =============================================================
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event for each mint.
*/
function _mint(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are incredibly unrealistic.
// `balance` and `numberMinted` have a maximum limit of 2**64.
// `tokenId` has a maximum limit of 2**256.
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
uint256 toMasked;
uint256 end = startTokenId + quantity;
// Use assembly to loop and emit the `Transfer` event for gas savings.
// The duplicated `log4` removes an extra check and reduces stack juggling.
// The assembly, together with the surrounding Solidity code, have been
// delicately arranged to nudge the compiler into producing optimized opcodes.
assembly {
// Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
toMasked := and(to, _BITMASK_ADDRESS)
// Emit the `Transfer` event.
log4(
0, // Start of data (0, since no data).
0, // End of data (0, since no data).
_TRANSFER_EVENT_SIGNATURE, // Signature.
0, // `address(0)`.
toMasked, // `to`.
startTokenId // `tokenId`.
)
// The `iszero(eq(,))` check ensures that large values of `quantity`
// that overflows uint256 will make the loop run out of gas.
// The compiler will optimize the `iszero` away for performance.
for {
let tokenId := add(startTokenId, 1)
} iszero(eq(tokenId, end)) {
tokenId := add(tokenId, 1)
} {
// Emit the `Transfer` event. Similar to above.
log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
}
}
if (toMasked == 0) revert MintToZeroAddress();
_currentIndex = end;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* This function is intended for efficient minting only during contract creation.
*
* It emits only one {ConsecutiveTransfer} as defined in
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
* instead of a sequence of {Transfer} event(s).
*
* Calling this function outside of contract creation WILL make your contract
* non-compliant with the ERC721 standard.
* For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
* {ConsecutiveTransfer} event is only permissible during contract creation.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {ConsecutiveTransfer} event.
*/
function _mintERC2309(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are unrealistic due to the above check for `quantity` to be below the limit.
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);
_currentIndex = startTokenId + quantity;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* See {_mint}.
*
* Emits a {Transfer} event for each mint.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal virtual {
_mint(to, quantity);
unchecked {
if (to.code.length != 0) {
uint256 end = _currentIndex;
uint256 index = end - quantity;
do {
if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
} while (index < end);
// Reentrancy protection.
if (_currentIndex != end) revert();
}
}
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal virtual {
_safeMint(to, quantity, '');
}
// =============================================================
// BURN OPERATIONS
// =============================================================
/**
* @dev Equivalent to `_burn(tokenId, false)`.
*/
function _burn(uint256 tokenId) internal virtual {
_burn(tokenId, false);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
address from = address(uint160(prevOwnershipPacked));
(uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);
if (approvalCheck) {
// The nested ifs save around 20+ gas over a compound boolean condition.
if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
}
_beforeTokenTransfers(from, address(0), tokenId, 1);
// Clear approvals from the previous owner.
assembly {
if approvedAddress {
// This is equivalent to `delete _tokenApprovals[tokenId]`.
sstore(approvedAddressSlot, 0)
}
}
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
unchecked {
// Updates:
// - `balance -= 1`.
// - `numberBurned += 1`.
//
// We can directly decrement the balance, and increment the number burned.
// This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
_packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;
// Updates:
// - `address` to the last owner.
// - `startTimestamp` to the timestamp of burning.
// - `burned` to `true`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] = _packOwnershipData(
from,
(_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
);
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, address(0), tokenId);
_afterTokenTransfers(from, address(0), tokenId, 1);
// Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
unchecked {
_burnCounter++;
}
}
// =============================================================
// EXTRA DATA OPERATIONS
// =============================================================
/**
* @dev Directly sets the extra data for the ownership data `index`.
*/
function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
uint256 packed = _packedOwnerships[index];
if (packed == 0) revert OwnershipNotInitializedForExtraData();
uint256 extraDataCasted;
// Cast `extraData` with assembly to avoid redundant masking.
assembly {
extraDataCasted := extraData
}
packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
_packedOwnerships[index] = packed;
}
/**
* @dev Called during each token transfer to set the 24bit `extraData` field.
* Intended to be overridden by the cosumer contract.
*
* `previousExtraData` - the value of `extraData` before transfer.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _extraData(
address from,
address to,
uint24 previousExtraData
) internal view virtual returns (uint24) {}
/**
* @dev Returns the next extra data for the packed ownership data.
* The returned result is shifted into position.
*/
function _nextExtraData(
address from,
address to,
uint256 prevOwnershipPacked
) private view returns (uint256) {
uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
}
// =============================================================
// OTHER OPERATIONS
// =============================================================
/**
* @dev Returns the message sender (defaults to `msg.sender`).
*
* If you are writing GSN compatible contracts, you need to override this function.
*/
function _msgSenderERC721A() internal view virtual returns (address) {
return msg.sender;
}
/**
* @dev Converts a uint256 to its ASCII string decimal representation.
*/
function _toString(uint256 value) internal pure virtual returns (string memory str) {
assembly {
// The maximum value of a uint256 contains 78 digits (1 byte per digit), but
// we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
// We will need 1 word for the trailing zeros padding, 1 word for the length,
// and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
let m := add(mload(0x40), 0xa0)
// Update the free memory pointer to allocate.
mstore(0x40, m)
// Assign the `str` to the end.
str := sub(m, 0x20)
// Zeroize the slot after the string.
mstore(str, 0)
// Cache the end of the memory to calculate the length later.
let end := str
// We write the string from rightmost digit to leftmost digit.
// The following is essentially a do-while loop that also handles the zero case.
// prettier-ignore
for { let temp := value } 1 {} {
str := sub(str, 1)
// Write the character to the pointer.
// The ASCII index of the '0' character is 48.
mstore8(str, add(48, mod(temp, 10)))
// Keep dividing `temp` until zero.
temp := div(temp, 10)
// prettier-ignore
if iszero(temp) { break }
}
let length := sub(end, str)
// Move the pointer 32 bytes leftwards to make room for the length.
str := sub(str, 0x20)
// Store the length.
mstore(str, length)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.0;
import "../Strings.sol";
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV // Deprecated in v4.8
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
/**
* @title OperatorFilterer
* @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
* registrant's entries in the OperatorFilterRegistry.
* @dev This smart contract is meant to be inherited by token contracts so they can use the following:
* - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
* - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
*/
abstract contract OperatorFilterer {
error OperatorNotAllowed(address operator);
IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);
constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
// If an inheriting token contract is deployed to a network without the registry deployed, the modifier
// will not revert, but the contract will need to be registered with the registry once it is deployed in
// order for the modifier to filter addresses.
if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
if (subscribe) {
OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
} else {
if (subscriptionOrRegistrantToCopy != address(0)) {
OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
} else {
OPERATOR_FILTER_REGISTRY.register(address(this));
}
}
}
}
modifier onlyAllowedOperator(address from) virtual {
// Allow spending tokens from addresses with balance
// Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
// from an EOA.
if (from != msg.sender) {
_checkFilterOperator(msg.sender);
}
_;
}
modifier onlyAllowedOperatorApproval(address operator) virtual {
_checkFilterOperator(operator);
_;
}
function _checkFilterOperator(address operator) internal view virtual {
// Check registry code length to facilitate testing in environments without a deployed registry.
if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
revert OperatorNotAllowed(operator);
}
}
}
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721A.
*/
interface IERC721A {
/**
* The caller must own the token or be an approved operator.
*/
error ApprovalCallerNotOwnerNorApproved();
/**
* The token does not exist.
*/
error ApprovalQueryForNonexistentToken();
/**
* Cannot query the balance for the zero address.
*/
error BalanceQueryForZeroAddress();
/**
* Cannot mint to the zero address.
*/
error MintToZeroAddress();
/**
* The quantity of tokens minted must be more than zero.
*/
error MintZeroQuantity();
/**
* The token does not exist.
*/
error OwnerQueryForNonexistentToken();
/**
* The caller must own the token or be an approved operator.
*/
error TransferCallerNotOwnerNorApproved();
/**
* The token must be owned by `from`.
*/
error TransferFromIncorrectOwner();
/**
* Cannot safely transfer to a contract that does not implement the
* ERC721Receiver interface.
*/
error TransferToNonERC721ReceiverImplementer();
/**
* Cannot transfer to the zero address.
*/
error TransferToZeroAddress();
/**
* The token does not exist.
*/
error URIQueryForNonexistentToken();
/**
* The `quantity` minted with ERC2309 exceeds the safety limit.
*/
error MintERC2309QuantityExceedsLimit();
/**
* The `extraData` cannot be set on an unintialized ownership slot.
*/
error OwnershipNotInitializedForExtraData();
// =============================================================
// STRUCTS
// =============================================================
struct TokenOwnership {
// The address of the owner.
address addr;
// Stores the start time of ownership with minimal overhead for tokenomics.
uint64 startTimestamp;
// Whether the token has been burned.
bool burned;
// Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
uint24 extraData;
}
// =============================================================
// TOKEN COUNTERS
// =============================================================
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() external view returns (uint256);
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
// =============================================================
// IERC721
// =============================================================
/**
* @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`,
* 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 be 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,
bytes calldata data
) external payable;
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external payable;
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom}
* whenever possible.
*
* 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 payable;
/**
* @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 payable;
/**
* @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 caller.
*
* 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);
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @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);
// =============================================================
// IERC2309
// =============================================================
/**
* @dev Emitted when tokens in `fromTokenId` to `toTokenId`
* (inclusive) is transferred from `from` to `to`, as defined in the
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
*
* See {_mintERC2309} for more details.
*/
event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1);
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator,
Rounding rounding
) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10**64) {
value /= 10**64;
result += 64;
}
if (value >= 10**32) {
value /= 10**32;
result += 32;
}
if (value >= 10**16) {
value /= 10**16;
result += 16;
}
if (value >= 10**8) {
value /= 10**8;
result += 8;
}
if (value >= 10**4) {
value /= 10**4;
result += 4;
}
if (value >= 10**2) {
value /= 10**2;
result += 2;
}
if (value >= 10**1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)
pragma solidity ^0.8.2;
import "../beacon/IBeaconUpgradeable.sol";
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/StorageSlotUpgradeable.sol";
import "../utils/Initializable.sol";
/**
* @dev This abstract contract provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
*
* _Available since v4.1._
*
* @custom:oz-upgrades-unsafe-allow delegatecall
*/
abstract contract ERC1967UpgradeUpgradeable is Initializable {
function __ERC1967Upgrade_init() internal onlyInitializing {
}
function __ERC1967Upgrade_init_unchained() internal onlyInitializing {
}
// This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Returns the current implementation address.
*/
function _getImplementation() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract");
StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Perform implementation upgrade
*
* Emits an {Upgraded} event.
*/
function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
/**
* @dev Perform implementation upgrade with additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCall(
address newImplementation,
bytes memory data,
bool forceCall
) internal {
_upgradeTo(newImplementation);
if (data.length > 0 || forceCall) {
_functionDelegateCall(newImplementation, data);
}
}
/**
* @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCallUUPS(
address newImplementation,
bytes memory data,
bool forceCall
) internal {
// Upgrades from old implementations will perform a rollback test. This test requires the new
// implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
// this special case will break upgrade paths from old UUPS implementation to new ones.
if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {
_setImplementation(newImplementation);
} else {
try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
} catch {
revert("ERC1967Upgrade: new implementation is not UUPS");
}
_upgradeToAndCall(newImplementation, data, forceCall);
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Returns the current admin.
*/
function _getAdmin() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
require(newAdmin != address(0), "ERC1967: new admin is the zero address");
StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {AdminChanged} event.
*/
function _changeAdmin(address newAdmin) internal {
emit AdminChanged(_getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
*/
bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Emitted when the beacon is upgraded.
*/
event BeaconUpgraded(address indexed beacon);
/**
* @dev Returns the current beacon.
*/
function _getBeacon() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the EIP1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
require(
AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
"ERC1967: beacon implementation is not a contract"
);
StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;
}
/**
* @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
* not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
*
* Emits a {BeaconUpgraded} event.
*/
function _upgradeBeaconToAndCall(
address newBeacon,
bytes memory data,
bool forceCall
) internal {
_setBeacon(newBeacon);
emit BeaconUpgraded(newBeacon);
if (data.length > 0 || forceCall) {
_functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
}
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {
require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed");
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822ProxiableUpgradeable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
interface IOperatorFilterRegistry {
function isOperatorAllowed(address registrant, address operator) external view returns (bool);
function register(address registrant) external;
function registerAndSubscribe(address registrant, address subscription) external;
function registerAndCopyEntries(address registrant, address registrantToCopy) external;
function unregister(address addr) external;
function updateOperator(address registrant, address operator, bool filtered) external;
function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
function subscribe(address registrant, address registrantToSubscribe) external;
function unsubscribe(address registrant, bool copyExistingEntries) external;
function subscriptionOf(address addr) external returns (address registrant);
function subscribers(address registrant) external returns (address[] memory);
function subscriberAt(address registrant, uint256 index) external returns (address);
function copyEntriesOf(address registrant, address registrantToCopy) external;
function isOperatorFiltered(address registrant, address operator) external returns (bool);
function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
function filteredOperators(address addr) external returns (address[] memory);
function filteredCodeHashes(address addr) external returns (bytes32[] memory);
function filteredOperatorAt(address registrant, uint256 index) external returns (address);
function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
function isRegistered(address addr) external returns (bool);
function codeHashOf(address addr) external returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)
pragma solidity ^0.8.0;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
*/
library StorageSlotUpgradeable {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 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
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)
pragma solidity ^0.8.0;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeaconUpgradeable {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {BeaconProxy} will check that this address is a contract.
*/
function implementation() external view returns (address);
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"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":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cargoId","type":"uint256"}],"name":"buildJSON","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cargoId","type":"uint256"}],"name":"burnCargo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cargoStreak","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getAddressStreak","outputs":[{"internalType":"uint256","name":"","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":"uint256","name":"_cargoId","type":"uint256"}],"name":"getCargoStreak","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"getDailyCargo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getLatestCargoMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"hasToMintNewCargo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lastMintedTimestamp","type":"uint256"}],"name":"missedADay","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"players","outputs":[{"internalType":"uint64","name":"lastClaimed","type":"uint64"},{"internalType":"uint64","name":"streak","type":"uint64"},{"internalType":"uint128","name":"activeCargoId","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"payable","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_attributesEnd","type":"string"}],"name":"setAttributesEnd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_attributesStart","type":"string"}],"name":"setAttributesStart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseName","type":"string"}],"name":"setBaseName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_externalUrl","type":"string"}],"name":"setExternalUrl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signerAddress","type":"address"}],"name":"setSignerAddress","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":"_cargoId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","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"}]Contract Creation Code
60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250604051806080016040528060608152602001620066fe6060913961010490816200006291906200062f565b506040518060400160405280601381526020017f68747470733a2f2f667265656e66742e78797a000000000000000000000000008152506101059081620000aa91906200062f565b506040518060800160405280604e81526020016200675e604e91396101069081620000d691906200062f565b506040518060400160405280600d81526020017f4461696c7920436172676f20230000000000000000000000000000000000000081525061010790816200011e91906200062f565b50604051806060016040528060228152602001620067ac6022913961010890816200014a91906200062f565b506040518060400160405280600281526020017f7d5d00000000000000000000000000000000000000000000000000000000000081525061010990816200019291906200062f565b50348015620001a057600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb6600160006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115620003ad57801562000273576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff16637d3e3dbe30846040518363ffffffff1660e01b8152600401620002399291906200075b565b600060405180830381600087803b1580156200025457600080fd5b505af115801562000269573d6000803e3d6000fd5b50505050620003ac565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146200032d576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663a0af290330846040518363ffffffff1660e01b8152600401620002f39291906200075b565b600060405180830381600087803b1580156200030e57600080fd5b505af115801562000323573d6000803e3d6000fd5b50505050620003ab565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff16634420e486306040518263ffffffff1660e01b815260040162000376919062000788565b600060405180830381600087803b1580156200039157600080fd5b505af1158015620003a6573d6000803e3d6000fd5b505050505b5b5b5050620007a5565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200043757607f821691505b6020821081036200044d576200044c620003ef565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620004b77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000478565b620004c3868362000478565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620005106200050a6200050484620004db565b620004e5565b620004db565b9050919050565b6000819050919050565b6200052c83620004ef565b620005446200053b8262000517565b84845462000485565b825550505050565b600090565b6200055b6200054c565b6200056881848462000521565b505050565b5b8181101562000590576200058460008262000551565b6001810190506200056e565b5050565b601f821115620005df57620005a98162000453565b620005b48462000468565b81016020851015620005c4578190505b620005dc620005d38562000468565b8301826200056d565b50505b505050565b600082821c905092915050565b60006200060460001984600802620005e4565b1980831691505092915050565b60006200061f8383620005f1565b9150826002028217905092915050565b6200063a82620003b5565b67ffffffffffffffff811115620006565762000655620003c0565b5b6200066282546200041e565b6200066f82828562000594565b600060209050601f831160018114620006a7576000841562000692578287015190505b6200069e858262000611565b8655506200070e565b601f198416620006b78662000453565b60005b82811015620006e157848901518255600182019150602085019450602081019050620006ba565b86831015620007015784890151620006fd601f891682620005f1565b8355505b6001600288020188555050505b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620007438262000716565b9050919050565b620007558162000736565b82525050565b60006040820190506200077260008301856200074a565b6200078160208301846200074a565b9392505050565b60006020820190506200079f60008301846200074a565b92915050565b608051615f21620007dd60003960008181610f7401528181611002015281816111f401528181611282015261134c0152615f216000f3fe6080604052600436106102305760003560e01c8063501e20f01161012e57806395d89b41116100ab578063e2eb41ff1161006f578063e2eb41ff14610816578063e985e9c514610855578063eaebdd5314610892578063f2fde38b146108cf578063fae99f71146108f857610230565b806395d89b4114610740578063962cb6021461076b578063a22cb46514610794578063b88d4fde146107bd578063c87b56dd146107d957610230565b806370a08231116100f257806370a0823114610681578063715018a6146106be5780638129fc1c146106d55780638da5cb5b146106ec57806390c3f38f1461071757610230565b8063501e20f01461057657806352d1902d146105b357806355f804b3146105de5780635dba7a50146106075780636352211e1461064457610230565b80631dba95ac116101bc57806341f434341161018057806341f43434146104ad57806342842e0e146104d857806346ccc416146104f45780634e63510f146105315780634f1ef2861461055a57610230565b80631dba95ac146103d95780631edbd4c81461041657806323b872dd1461043f57806326d58ad31461045b5780633659cfe61461048457610230565b8063081812fc11610203578063081812fc14610303578063095ea7b3146103405780630a928aef1461035c57806318160ddd146103855780631b2121aa146103b057610230565b806301ffc9a71461023557806302053b7714610272578063046dc166146102af57806306fdde03146102d8575b600080fd5b34801561024157600080fd5b5061025c60048036038101906102579190613ff0565b610935565b6040516102699190614038565b60405180910390f35b34801561027e57600080fd5b5061029960048036038101906102949190614089565b6109c7565b6040516102a691906140c5565b60405180910390f35b3480156102bb57600080fd5b506102d660048036038101906102d1919061413e565b6109e0565b005b3480156102e457600080fd5b506102ed610a2d565b6040516102fa91906141fb565b60405180910390f35b34801561030f57600080fd5b5061032a60048036038101906103259190614089565b610abf565b604051610337919061422c565b60405180910390f35b61035a60048036038101906103559190614247565b610b3e565b005b34801561036857600080fd5b50610383600480360381019061037e9190614089565b610b57565b005b34801561039157600080fd5b5061039a610b63565b6040516103a791906140c5565b60405180910390f35b3480156103bc57600080fd5b506103d760048036038101906103d291906143bc565b610b7a565b005b3480156103e557600080fd5b5061040060048036038101906103fb9190614089565b610b96565b60405161040d91906141fb565b60405180910390f35b34801561042257600080fd5b5061043d600480360381019061043891906143bc565b610d33565b005b61045960048036038101906104549190614405565b610d4f565b005b34801561046757600080fd5b50610482600480360381019061047d91906143bc565b610f56565b005b34801561049057600080fd5b506104ab60048036038101906104a6919061413e565b610f72565b005b3480156104b957600080fd5b506104c26110fa565b6040516104cf91906144b7565b60405180910390f35b6104f260048036038101906104ed9190614405565b61110c565b005b34801561050057600080fd5b5061051b6004803603810190610516919061413e565b61116b565b60405161052891906140c5565b60405180910390f35b34801561053d57600080fd5b50610558600480360381019061055391906143bc565b6111d6565b005b610574600480360381019061056f9190614573565b6111f2565b005b34801561058257600080fd5b5061059d60048036038101906105989190614089565b61132e565b6040516105aa9190614038565b60405180910390f35b3480156105bf57600080fd5b506105c8611348565b6040516105d591906145e8565b60405180910390f35b3480156105ea57600080fd5b50610605600480360381019061060091906143bc565b611401565b005b34801561061357600080fd5b5061062e6004803603810190610629919061413e565b61141d565b60405161063b9190614038565b60405180910390f35b34801561065057600080fd5b5061066b60048036038101906106669190614089565b611553565b604051610678919061422c565b60405180910390f35b34801561068d57600080fd5b506106a860048036038101906106a3919061413e565b611565565b6040516106b591906140c5565b60405180910390f35b3480156106ca57600080fd5b506106d361161d565b005b3480156106e157600080fd5b506106ea611631565b005b3480156106f857600080fd5b50610701611816565b60405161070e919061422c565b60405180910390f35b34801561072357600080fd5b5061073e600480360381019061073991906143bc565b611840565b005b34801561074c57600080fd5b5061075561185c565b60405161076291906141fb565b60405180910390f35b34801561077757600080fd5b50610792600480360381019061078d9190614663565b6118ee565b005b3480156107a057600080fd5b506107bb60048036038101906107b691906146dc565b611ed5565b005b6107d760048036038101906107d2919061471c565b611eee565b005b3480156107e557600080fd5b5061080060048036038101906107fb9190614089565b611f3f565b60405161080d91906141fb565b60405180910390f35b34801561082257600080fd5b5061083d6004803603810190610838919061413e565b611fc6565b60405161084c939291906147ed565b60405180910390f35b34801561086157600080fd5b5061087c60048036038101906108779190614824565b612035565b6040516108899190614038565b60405180910390f35b34801561089e57600080fd5b506108b960048036038101906108b49190614089565b6120c9565b6040516108c691906140c5565b60405180910390f35b3480156108db57600080fd5b506108f660048036038101906108f1919061413e565b6120e7565b005b34801561090457600080fd5b5061091f600480360381019061091a919061413e565b61216a565b60405161092c91906140c5565b60405180910390f35b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061099057506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806109c05750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b61010c6020528060005260406000206000915090505481565b6109e86121e5565b8061010a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606060028054610a3c90614893565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6890614893565b8015610ab55780601f10610a8a57610100808354040283529160200191610ab5565b820191906000526020600020905b815481529060010190602001808311610a9857829003601f168201915b5050505050905090565b6000610aca82612263565b610b00576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610b48816122c2565b610b5283836123bf565b505050565b610b6081612503565b50565b6000610b6d612511565b6001546000540303905090565b610b826121e5565b806101079081610b929190614a66565b5050565b6060600061010c600084815260200190815260200160002054905060006040518060400160405280600181526020017f7b00000000000000000000000000000000000000000000000000000000000000815250905060006040518060400160405280600181526020017f220000000000000000000000000000000000000000000000000000000000000081525090506000828261010484604051602001610c409493929190614c8f565b60405160208183030381529060405290506000818361010585604051602001610c6c9493929190614d2f565b604051602081830303815290604052905060008184610106610c8d8961251a565b87604051602001610ca2959493929190614dcf565b604051602081830303815290604052905060008185610107610cc38c61251a565b88604051602001610cd8959493929190614e7c565b604051602081830303815290604052905060008161010887610cf98b61251a565b89610109604051602001610d1296959493929190614f75565b60405160208183030381529060405290508098505050505050505050919050565b610d3b6121e5565b806101089081610d4b9190614a66565b5050565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d8d57610d8c336122c2565b5b600061010b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff168152505090508281604001516fffffffffffffffffffffffffffffffff1603610f445761010b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600080820160006101000a81549067ffffffffffffffff02191690556000820160086101000a81549067ffffffffffffffff02191690556000820160106101000a8154906fffffffffffffffffffffffffffffffff021916905550505b610f4f8585856125e8565b5050505050565b610f5e6121e5565b806101059081610f6e9190614a66565b5050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1603611000576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff790615055565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661103f61290a565b73ffffffffffffffffffffffffffffffffffffffff1614611095576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108c906150e7565b60405180910390fd5b61109e81612961565b6110f781600067ffffffffffffffff8111156110bd576110bc614291565b5b6040519080825280601f01601f1916602001820160405280156110ef5781602001600182028036833780820191505090505b50600061296c565b50565b6daaeb6d7670e522a718067333cd4e81565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461114a57611149336122c2565b5b61116584848460405180602001604052806000815250612ada565b50505050565b600061010b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160089054906101000a900467ffffffffffffffff1667ffffffffffffffff169050919050565b6111de6121e5565b8061010990816111ee9190614a66565b5050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1603611280576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127790615055565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166112bf61290a565b73ffffffffffffffffffffffffffffffffffffffff1614611315576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130c906150e7565b60405180910390fd5b61131e82612961565b61132a8282600161296c565b5050565b6000426202a300836113409190615136565b109050919050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16146113d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113cf906151dc565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b6114096121e5565b8061010690816114199190614a66565b5050565b60008061010b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff168152505090506000816020015167ffffffffffffffff16148061154b575061154a816000015167ffffffffffffffff1661132e565b5b915050919050565b600061155e82612b4d565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036115cc576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6116256121e5565b61162f6000612c19565b565b6000600860019054906101000a900460ff1615905080801561166557506001600860009054906101000a900460ff1660ff16105b80611694575061167430612cdf565b15801561169357506001600860009054906101000a900460ff1660ff16145b5b6116d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ca9061526e565b60405180910390fd5b6001600860006101000a81548160ff021916908360ff1602179055508015611711576001600860016101000a81548160ff0219169083151502179055505b611719612d02565b611721612d5b565b6040518060400160405280600b81526020017f4461696c7920436172676f000000000000000000000000000000000000000000815250600290816117659190614a66565b506040518060400160405280600281526020017f4443000000000000000000000000000000000000000000000000000000000000815250600390816117aa9190614a66565b506117b3612511565b6000819055508015611813576000600860016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405161180a91906152d6565b60405180910390a15b50565b6000603b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6118486121e5565b8061010490816118589190614a66565b5050565b60606003805461186b90614893565b80601f016020809104026020016040519081016040528092919081815260200182805461189790614893565b80156118e45780601f106118b9576101008083540402835291602001916118e4565b820191906000526020600020905b8154815290600101906020018083116118c757829003601f168201915b5050505050905090565b6118f6612db4565b600061010b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff168152505090506000816000015167ffffffffffffffff1690506000826020015167ffffffffffffffff169050611a6885858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508284612e03565b611aa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9e9061533d565b60405180910390fd5b426201518083611ab79190615136565b10611af7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aee906153a9565b60405180910390fd5b6000811480611b0b5750611b0a8261132e565b5b15611ca5576000611b1a612e7c565b9050611b24613f3d565b6001816020019067ffffffffffffffff16908167ffffffffffffffff168152505042816000019067ffffffffffffffff16908167ffffffffffffffff16815250508181604001906fffffffffffffffffffffffffffffffff1690816fffffffffffffffffffffffffffffffff16815250508061010b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060208201518160000160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060408201518160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550905050600161010c600084815260200190815260200160002081905550611c9b336001612e85565b5050505050611ec9565b600083604001519050611cb6613f3d565b60018560200151611cc791906153c9565b816020019067ffffffffffffffff16908167ffffffffffffffff168152505042816000019067ffffffffffffffff16908167ffffffffffffffff16815250508181604001906fffffffffffffffffffffffffffffffff1690816fffffffffffffffffffffffffffffffff16815250508061010b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060208201518160000160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060408201518160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550905050600161010c6000846fffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e4e9190615136565b92505081905550816fffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050505b611ed1613040565b5050565b81611edf816122c2565b611ee9838361304a565b505050565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611f2c57611f2b336122c2565b5b611f3885858585612ada565b5050505050565b6060611f4a82612263565b611f89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f8090615451565b60405180910390fd5b6000611f9483610b96565b9050611f9f81613155565b604051602001611faf91906154bd565b604051602081830303815290604052915050919050565b61010b6020528060005260406000206000915090508060000160009054906101000a900467ffffffffffffffff16908060000160089054906101000a900467ffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905083565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600061010c6000838152602001908152602001600020549050919050565b6120ef6121e5565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361215e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215590615551565b60405180910390fd5b61216781612c19565b50565b600061010b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169050919050565b6121ed6132cd565b73ffffffffffffffffffffffffffffffffffffffff1661220b611816565b73ffffffffffffffffffffffffffffffffffffffff1614612261576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612258906155bd565b60405180910390fd5b565b60008161226e612511565b1115801561227d575060005482105b80156122bb575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b60006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b11156123bc576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b81526004016123399291906155dd565b602060405180830381865afa158015612356573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061237a919061561b565b6123bb57806040517fede71dcc0000000000000000000000000000000000000000000000000000000081526004016123b2919061422c565b60405180910390fd5b5b50565b60006123ca82611553565b90508073ffffffffffffffffffffffffffffffffffffffff166123eb6132d5565b73ffffffffffffffffffffffffffffffffffffffff161461244e57612417816124126132d5565b612035565b61244d576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b61250e8160006132dd565b50565b60006001905090565b6060600060016125298461352f565b01905060008167ffffffffffffffff81111561254857612547614291565b5b6040519080825280601f01601f19166020018201604052801561257a5781602001600182028036833780820191505090505b509050600082602001820190505b6001156125dd578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816125d1576125d0615648565b5b04945060008503612588575b819350505050919050565b60006125f382612b4d565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461265a576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061266684613682565b9150915061267c81876126776132d5565b6136a9565b6126c8576126918661268c6132d5565b612035565b6126c7576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361272e576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61273b86868660016136ed565b801561274657600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550612814856127f08888876136f3565b7c02000000000000000000000000000000000000000000000000000000001761371b565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084160361289a5760006001850190506000600460008381526020019081526020016000205403612898576000548114612897578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46129028686866001613746565b505050505050565b60006129387f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61374c565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6129696121e5565b50565b6129987f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b613756565b60000160009054906101000a900460ff16156129bc576129b783613760565b612ad5565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612a2457506040513d601f19601f82011682018060405250810190612a2191906156a3565b60015b612a63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a5a90615742565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b8114612ac8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612abf906157d4565b60405180910390fd5b50612ad4838383613819565b5b505050565b612ae5848484610d4f565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612b4757612b1084848484613845565b612b46576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b60008082905080612b5c612511565b11612be257600054811015612be15760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603612bdf575b60008103612bd5576004600083600190039350838152602001908152602001600020549050612bab565b8092505050612c14565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000603b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600860019054906101000a900460ff16612d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4890615866565b60405180910390fd5b612d59613995565b565b600860019054906101000a900460ff16612daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612da190615866565b60405180910390fd5b612db26139f6565b565b6002606d5403612df9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612df0906158d2565b60405180910390fd5b6002606d81905550565b600061010a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612e5c85612e4e338787613a4f565b613a8f90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff161490509392505050565b60008054905090565b60008054905060008203612ec5576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612ed260008483856136ed565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612f4983612f3a60008660006136f3565b612f4385613ab6565b1761371b565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b818114612fea57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050612faf565b5060008203613025576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600081905550505061303b6000848385613746565b505050565b6001606d81905550565b80600760006130576132d5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166131046132d5565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516131499190614038565b60405180910390a35050565b60606000825103613177576040518060200160405280600081525090506132c8565b6000604051806060016040528060408152602001615e8560409139905060006003600285516131a69190615136565b6131b091906158f2565b60046131bc9190615923565b905060006020826131cd9190615136565b67ffffffffffffffff8111156131e6576131e5614291565b5b6040519080825280601f01601f1916602001820160405280156132185781602001600182028036833780820191505090505b509050818152600183018586518101602084015b81831015613287576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f811685015182536001820191505061322c565b6003895106600181146132a157600281146132b1576132bc565b613d3d60f01b60028303526132bc565b603d60f81b60018303525b50505050508093505050505b919050565b600033905090565b600033905090565b60006132e883612b4d565b905060008190506000806132fb86613682565b9150915084156133645761331781846133126132d5565b6136a9565b6133635761332c836133276132d5565b612035565b613362576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b6133728360008860016136ed565b801561337d57600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550613425836133e2856000886136f3565b7c02000000000000000000000000000000000000000000000000000000007c0100000000000000000000000000000000000000000000000000000000171761371b565b600460008881526020019081526020016000208190555060007c02000000000000000000000000000000000000000000000000000000008516036134ab57600060018701905060006004600083815260200190815260200160002054036134a95760005481146134a8578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4613515836000886001613746565b600160008154809291906001019190505550505050505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061358d577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161358357613582615648565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106135ca576d04ee2d6d415b85acef810000000083816135c0576135bf615648565b5b0492506020810190505b662386f26fc1000083106135f957662386f26fc1000083816135ef576135ee615648565b5b0492506010810190505b6305f5e1008310613622576305f5e100838161361857613617615648565b5b0492506008810190505b612710831061364757612710838161363d5761363c615648565b5b0492506004810190505b6064831061366a57606483816136605761365f615648565b5b0492506002810190505b600a8310613679576001810190505b80915050919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e861370a868684613ac6565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6000819050919050565b6000819050919050565b61376981612cdf565b6137a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161379f906159d7565b60405180910390fd5b806137d57f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61374c565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61382283613acf565b60008251118061382f5750805b156138405761383e8383613b1e565b505b505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261386b6132d5565b8786866040518563ffffffff1660e01b815260040161388d9493929190615a4c565b6020604051808303816000875af19250505080156138c957506040513d601f19601f820116820180604052508101906138c69190615aad565b60015b613942573d80600081146138f9576040519150601f19603f3d011682016040523d82523d6000602084013e6138fe565b606091505b50600081510361393a576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b600860019054906101000a900460ff166139e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139db90615866565b60405180910390fd5b6139f46139ef6132cd565b612c19565b565b600860019054906101000a900460ff16613a45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613a3c90615866565b60405180910390fd5b6001606d81905550565b6000613a8630858585604051602001613a6b9493929190615ada565b60405160208183030381529060405280519060200120613c02565b90509392505050565b6000806000613a9e8585613c32565b91509150613aab81613c83565b819250505092915050565b60006001821460e11b9050919050565b60009392505050565b613ad881613760565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b6060613b2983612cdf565b613b68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b5f90615b91565b60405180910390fd5b6000808473ffffffffffffffffffffffffffffffffffffffff1684604051613b909190615bed565b600060405180830381855af49150503d8060008114613bcb576040519150601f19603f3d011682016040523d82523d6000602084013e613bd0565b606091505b5091509150613bf88282604051806060016040528060278152602001615ec560279139613de9565b9250505092915050565b600081604051602001613c159190615c71565b604051602081830303815290604052805190602001209050919050565b6000806041835103613c735760008060006020860151925060408601519150606086015160001a9050613c6787828585613e0b565b94509450505050613c7c565b60006002915091505b9250929050565b60006004811115613c9757613c96615c97565b5b816004811115613caa57613ca9615c97565b5b0315613de65760016004811115613cc457613cc3615c97565b5b816004811115613cd757613cd6615c97565b5b03613d17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d0e90615d12565b60405180910390fd5b60026004811115613d2b57613d2a615c97565b5b816004811115613d3e57613d3d615c97565b5b03613d7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d7590615d7e565b60405180910390fd5b60036004811115613d9257613d91615c97565b5b816004811115613da557613da4615c97565b5b03613de5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613ddc90615e10565b60405180910390fd5b5b50565b60608315613df957829050613e04565b613e038383613eed565b5b9392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115613e46576000600391509150613ee4565b600060018787878760405160008152602001604052604051613e6b9493929190615e3f565b6020604051602081039080840390855afa158015613e8d573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603613edb57600060019250925050613ee4565b80600092509250505b94509492505050565b600082511115613f005781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613f3491906141fb565b60405180910390fd5b6040518060600160405280600067ffffffffffffffff168152602001600067ffffffffffffffff16815260200160006fffffffffffffffffffffffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613fcd81613f98565b8114613fd857600080fd5b50565b600081359050613fea81613fc4565b92915050565b60006020828403121561400657614005613f8e565b5b600061401484828501613fdb565b91505092915050565b60008115159050919050565b6140328161401d565b82525050565b600060208201905061404d6000830184614029565b92915050565b6000819050919050565b61406681614053565b811461407157600080fd5b50565b6000813590506140838161405d565b92915050565b60006020828403121561409f5761409e613f8e565b5b60006140ad84828501614074565b91505092915050565b6140bf81614053565b82525050565b60006020820190506140da60008301846140b6565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061410b826140e0565b9050919050565b61411b81614100565b811461412657600080fd5b50565b60008135905061413881614112565b92915050565b60006020828403121561415457614153613f8e565b5b600061416284828501614129565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156141a557808201518184015260208101905061418a565b60008484015250505050565b6000601f19601f8301169050919050565b60006141cd8261416b565b6141d78185614176565b93506141e7818560208601614187565b6141f0816141b1565b840191505092915050565b6000602082019050818103600083015261421581846141c2565b905092915050565b61422681614100565b82525050565b6000602082019050614241600083018461421d565b92915050565b6000806040838503121561425e5761425d613f8e565b5b600061426c85828601614129565b925050602061427d85828601614074565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6142c9826141b1565b810181811067ffffffffffffffff821117156142e8576142e7614291565b5b80604052505050565b60006142fb613f84565b905061430782826142c0565b919050565b600067ffffffffffffffff82111561432757614326614291565b5b614330826141b1565b9050602081019050919050565b82818337600083830152505050565b600061435f61435a8461430c565b6142f1565b90508281526020810184848401111561437b5761437a61428c565b5b61438684828561433d565b509392505050565b600082601f8301126143a3576143a2614287565b5b81356143b384826020860161434c565b91505092915050565b6000602082840312156143d2576143d1613f8e565b5b600082013567ffffffffffffffff8111156143f0576143ef613f93565b5b6143fc8482850161438e565b91505092915050565b60008060006060848603121561441e5761441d613f8e565b5b600061442c86828701614129565b935050602061443d86828701614129565b925050604061444e86828701614074565b9150509250925092565b6000819050919050565b600061447d614478614473846140e0565b614458565b6140e0565b9050919050565b600061448f82614462565b9050919050565b60006144a182614484565b9050919050565b6144b181614496565b82525050565b60006020820190506144cc60008301846144a8565b92915050565b600067ffffffffffffffff8211156144ed576144ec614291565b5b6144f6826141b1565b9050602081019050919050565b6000614516614511846144d2565b6142f1565b9050828152602081018484840111156145325761453161428c565b5b61453d84828561433d565b509392505050565b600082601f83011261455a57614559614287565b5b813561456a848260208601614503565b91505092915050565b6000806040838503121561458a57614589613f8e565b5b600061459885828601614129565b925050602083013567ffffffffffffffff8111156145b9576145b8613f93565b5b6145c585828601614545565b9150509250929050565b6000819050919050565b6145e2816145cf565b82525050565b60006020820190506145fd60008301846145d9565b92915050565b600080fd5b600080fd5b60008083601f84011261462357614622614287565b5b8235905067ffffffffffffffff8111156146405761463f614603565b5b60208301915083600182028301111561465c5761465b614608565b5b9250929050565b6000806020838503121561467a57614679613f8e565b5b600083013567ffffffffffffffff81111561469857614697613f93565b5b6146a48582860161460d565b92509250509250929050565b6146b98161401d565b81146146c457600080fd5b50565b6000813590506146d6816146b0565b92915050565b600080604083850312156146f3576146f2613f8e565b5b600061470185828601614129565b9250506020614712858286016146c7565b9150509250929050565b6000806000806080858703121561473657614735613f8e565b5b600061474487828801614129565b945050602061475587828801614129565b935050604061476687828801614074565b925050606085013567ffffffffffffffff81111561478757614786613f93565b5b61479387828801614545565b91505092959194509250565b600067ffffffffffffffff82169050919050565b6147bc8161479f565b82525050565b60006fffffffffffffffffffffffffffffffff82169050919050565b6147e7816147c2565b82525050565b600060608201905061480260008301866147b3565b61480f60208301856147b3565b61481c60408301846147de565b949350505050565b6000806040838503121561483b5761483a613f8e565b5b600061484985828601614129565b925050602061485a85828601614129565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806148ab57607f821691505b6020821081036148be576148bd614864565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026149267fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826148e9565b61493086836148e9565b95508019841693508086168417925050509392505050565b600061496361495e61495984614053565b614458565b614053565b9050919050565b6000819050919050565b61497d83614948565b6149916149898261496a565b8484546148f6565b825550505050565b600090565b6149a6614999565b6149b1818484614974565b505050565b5b818110156149d5576149ca60008261499e565b6001810190506149b7565b5050565b601f821115614a1a576149eb816148c4565b6149f4846148d9565b81016020851015614a03578190505b614a17614a0f856148d9565b8301826149b6565b50505b505050565b600082821c905092915050565b6000614a3d60001984600802614a1f565b1980831691505092915050565b6000614a568383614a2c565b9150826002028217905092915050565b614a6f8261416b565b67ffffffffffffffff811115614a8857614a87614291565b5b614a928254614893565b614a9d8282856149d9565b600060209050601f831160018114614ad05760008415614abe578287015190505b614ac88582614a4a565b865550614b30565b601f198416614ade866148c4565b60005b82811015614b0657848901518255600182019150602085019450602081019050614ae1565b86831015614b235784890151614b1f601f891682614a2c565b8355505b6001600288020188555050505b505050505050565b600081905092915050565b6000614b4e8261416b565b614b588185614b38565b9350614b68818560208601614187565b80840191505092915050565b7f226465736372697074696f6e223a000000000000000000000000000000000000600082015250565b6000614baa600e83614b38565b9150614bb582614b74565b600e82019050919050565b60008154614bcd81614893565b614bd78186614b38565b94506001821660008114614bf25760018114614c0757614c3a565b60ff1983168652811515820286019350614c3a565b614c10856148c4565b60005b83811015614c3257815481890152600182019150602081019050614c13565b838801955050505b50505092915050565b7f2c00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614c79600183614b38565b9150614c8482614c43565b600182019050919050565b6000614c9b8287614b43565b9150614ca682614b9d565b9150614cb28286614b43565b9150614cbe8285614bc0565b9150614cca8284614b43565b9150614cd582614c6c565b915081905095945050505050565b7f2265787465726e616c5f75726c223a0000000000000000000000000000000000600082015250565b6000614d19600f83614b38565b9150614d2482614ce3565b600f82019050919050565b6000614d3b8287614b43565b9150614d4682614d0c565b9150614d528286614b43565b9150614d5e8285614bc0565b9150614d6a8284614b43565b9150614d7582614c6c565b915081905095945050505050565b7f22696d616765223a000000000000000000000000000000000000000000000000600082015250565b6000614db9600883614b38565b9150614dc482614d83565b600882019050919050565b6000614ddb8288614b43565b9150614de682614dac565b9150614df28287614b43565b9150614dfe8286614bc0565b9150614e0a8285614b43565b9150614e168284614b43565b9150614e2182614c6c565b91508190509695505050505050565b7f226e616d65223a00000000000000000000000000000000000000000000000000600082015250565b6000614e66600783614b38565b9150614e7182614e30565b600782019050919050565b6000614e888288614b43565b9150614e9382614e59565b9150614e9f8287614b43565b9150614eab8286614bc0565b9150614eb78285614b43565b9150614ec38284614b43565b9150614ece82614c6c565b91508190509695505050505050565b7f2261747472696275746573223a00000000000000000000000000000000000000600082015250565b6000614f13600d83614b38565b9150614f1e82614edd565b600d82019050919050565b7f7d00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614f5f600183614b38565b9150614f6a82614f29565b600182019050919050565b6000614f818289614b43565b9150614f8c82614f06565b9150614f988288614bc0565b9150614fa48287614b43565b9150614fb08286614b43565b9150614fbc8285614b43565b9150614fc88284614bc0565b9150614fd382614f52565b9150819050979650505050505050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b600061503f602c83614176565b915061504a82614fe3565b604082019050919050565b6000602082019050818103600083015261506e81615032565b9050919050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b60006150d1602c83614176565b91506150dc82615075565b604082019050919050565b60006020820190508181036000830152615100816150c4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061514182614053565b915061514c83614053565b925082820190508082111561516457615163615107565b5b92915050565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b60006151c6603883614176565b91506151d18261516a565b604082019050919050565b600060208201905081810360008301526151f5816151b9565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000615258602e83614176565b9150615263826151fc565b604082019050919050565b600060208201905081810360008301526152878161524b565b9050919050565b6000819050919050565b600060ff82169050919050565b60006152c06152bb6152b68461528e565b614458565b615298565b9050919050565b6152d0816152a5565b82525050565b60006020820190506152eb60008301846152c7565b92915050565b7f696e76616c6964207369676e61747572652e0000000000000000000000000000600082015250565b6000615327601283614176565b9150615332826152f1565b602082019050919050565b600060208201905081810360008301526153568161531a565b9050919050565b7f796f752063616e206f6e6c79206d696e74206f6e652070657220646179000000600082015250565b6000615393601d83614176565b915061539e8261535d565b602082019050919050565b600060208201905081810360008301526153c281615386565b9050919050565b60006153d48261479f565b91506153df8361479f565b9250828201905067ffffffffffffffff8111156153ff576153fe615107565b5b92915050565b7f636172676f20686173206e6f74206265656e206d696e7465642e000000000000600082015250565b600061543b601a83614176565b915061544682615405565b602082019050919050565b6000602082019050818103600083015261546a8161542e565b9050919050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000600082015250565b60006154a7601d83614b38565b91506154b282615471565b601d82019050919050565b60006154c88261549a565b91506154d48284614b43565b915081905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061553b602683614176565b9150615546826154df565b604082019050919050565b6000602082019050818103600083015261556a8161552e565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006155a7602083614176565b91506155b282615571565b602082019050919050565b600060208201905081810360008301526155d68161559a565b9050919050565b60006040820190506155f2600083018561421d565b6155ff602083018461421d565b9392505050565b600081519050615615816146b0565b92915050565b60006020828403121561563157615630613f8e565b5b600061563f84828501615606565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b615680816145cf565b811461568b57600080fd5b50565b60008151905061569d81615677565b92915050565b6000602082840312156156b9576156b8613f8e565b5b60006156c78482850161568e565b91505092915050565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b600061572c602e83614176565b9150615737826156d0565b604082019050919050565b6000602082019050818103600083015261575b8161571f565b9050919050565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b60006157be602983614176565b91506157c982615762565b604082019050919050565b600060208201905081810360008301526157ed816157b1565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000615850602b83614176565b915061585b826157f4565b604082019050919050565b6000602082019050818103600083015261587f81615843565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006158bc601f83614176565b91506158c782615886565b602082019050919050565b600060208201905081810360008301526158eb816158af565b9050919050565b60006158fd82614053565b915061590883614053565b92508261591857615917615648565b5b828204905092915050565b600061592e82614053565b915061593983614053565b925082820261594781614053565b9150828204841483151761595e5761595d615107565b5b5092915050565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b60006159c1602d83614176565b91506159cc82615965565b604082019050919050565b600060208201905081810360008301526159f0816159b4565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000615a1e826159f7565b615a288185615a02565b9350615a38818560208601614187565b615a41816141b1565b840191505092915050565b6000608082019050615a61600083018761421d565b615a6e602083018661421d565b615a7b60408301856140b6565b8181036060830152615a8d8184615a13565b905095945050505050565b600081519050615aa781613fc4565b92915050565b600060208284031215615ac357615ac2613f8e565b5b6000615ad184828501615a98565b91505092915050565b6000608082019050615aef600083018761421d565b615afc602083018661421d565b615b0960408301856140b6565b615b1660608301846140b6565b95945050505050565b7f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b6000615b7b602683614176565b9150615b8682615b1f565b604082019050919050565b60006020820190508181036000830152615baa81615b6e565b9050919050565b600081905092915050565b6000615bc7826159f7565b615bd18185615bb1565b9350615be1818560208601614187565b80840191505092915050565b6000615bf98284615bbc565b915081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000615c3a601c83614b38565b9150615c4582615c04565b601c82019050919050565b6000819050919050565b615c6b615c66826145cf565b615c50565b82525050565b6000615c7c82615c2d565b9150615c888284615c5a565b60208201915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b6000615cfc601883614176565b9150615d0782615cc6565b602082019050919050565b60006020820190508181036000830152615d2b81615cef565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b6000615d68601f83614176565b9150615d7382615d32565b602082019050919050565b60006020820190508181036000830152615d9781615d5b565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000615dfa602283614176565b9150615e0582615d9e565b604082019050919050565b60006020820190508181036000830152615e2981615ded565b9050919050565b615e3981615298565b82525050565b6000608082019050615e5460008301876145d9565b615e616020830186615e30565b615e6e60408301856145d9565b615e7b60608301846145d9565b9594505050505056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220029edef40efacaf7230a37062d62698a4145b5098d7de7e19f16c03bff375fb264736f6c63430008110033476f20746f2068747470733a2f2f667265656e66742e78797a2065766572792064617920746f207570677261646520796f757220636172676f2c206d61696e7461696e20796f75722073747265616b20616e642077696e20726577617264732e68747470733a2f2f6132766838766b3672372e657865637574652d6170692e75732d656173742d312e616d617a6f6e6177732e636f6d2f70726f642f6461696c795f63686573745f696d6167652f5b7b2274726169745f74797065223a202253747265616b222c202276616c7565223a
Deployed Bytecode
0x6080604052600436106102305760003560e01c8063501e20f01161012e57806395d89b41116100ab578063e2eb41ff1161006f578063e2eb41ff14610816578063e985e9c514610855578063eaebdd5314610892578063f2fde38b146108cf578063fae99f71146108f857610230565b806395d89b4114610740578063962cb6021461076b578063a22cb46514610794578063b88d4fde146107bd578063c87b56dd146107d957610230565b806370a08231116100f257806370a0823114610681578063715018a6146106be5780638129fc1c146106d55780638da5cb5b146106ec57806390c3f38f1461071757610230565b8063501e20f01461057657806352d1902d146105b357806355f804b3146105de5780635dba7a50146106075780636352211e1461064457610230565b80631dba95ac116101bc57806341f434341161018057806341f43434146104ad57806342842e0e146104d857806346ccc416146104f45780634e63510f146105315780634f1ef2861461055a57610230565b80631dba95ac146103d95780631edbd4c81461041657806323b872dd1461043f57806326d58ad31461045b5780633659cfe61461048457610230565b8063081812fc11610203578063081812fc14610303578063095ea7b3146103405780630a928aef1461035c57806318160ddd146103855780631b2121aa146103b057610230565b806301ffc9a71461023557806302053b7714610272578063046dc166146102af57806306fdde03146102d8575b600080fd5b34801561024157600080fd5b5061025c60048036038101906102579190613ff0565b610935565b6040516102699190614038565b60405180910390f35b34801561027e57600080fd5b5061029960048036038101906102949190614089565b6109c7565b6040516102a691906140c5565b60405180910390f35b3480156102bb57600080fd5b506102d660048036038101906102d1919061413e565b6109e0565b005b3480156102e457600080fd5b506102ed610a2d565b6040516102fa91906141fb565b60405180910390f35b34801561030f57600080fd5b5061032a60048036038101906103259190614089565b610abf565b604051610337919061422c565b60405180910390f35b61035a60048036038101906103559190614247565b610b3e565b005b34801561036857600080fd5b50610383600480360381019061037e9190614089565b610b57565b005b34801561039157600080fd5b5061039a610b63565b6040516103a791906140c5565b60405180910390f35b3480156103bc57600080fd5b506103d760048036038101906103d291906143bc565b610b7a565b005b3480156103e557600080fd5b5061040060048036038101906103fb9190614089565b610b96565b60405161040d91906141fb565b60405180910390f35b34801561042257600080fd5b5061043d600480360381019061043891906143bc565b610d33565b005b61045960048036038101906104549190614405565b610d4f565b005b34801561046757600080fd5b50610482600480360381019061047d91906143bc565b610f56565b005b34801561049057600080fd5b506104ab60048036038101906104a6919061413e565b610f72565b005b3480156104b957600080fd5b506104c26110fa565b6040516104cf91906144b7565b60405180910390f35b6104f260048036038101906104ed9190614405565b61110c565b005b34801561050057600080fd5b5061051b6004803603810190610516919061413e565b61116b565b60405161052891906140c5565b60405180910390f35b34801561053d57600080fd5b50610558600480360381019061055391906143bc565b6111d6565b005b610574600480360381019061056f9190614573565b6111f2565b005b34801561058257600080fd5b5061059d60048036038101906105989190614089565b61132e565b6040516105aa9190614038565b60405180910390f35b3480156105bf57600080fd5b506105c8611348565b6040516105d591906145e8565b60405180910390f35b3480156105ea57600080fd5b50610605600480360381019061060091906143bc565b611401565b005b34801561061357600080fd5b5061062e6004803603810190610629919061413e565b61141d565b60405161063b9190614038565b60405180910390f35b34801561065057600080fd5b5061066b60048036038101906106669190614089565b611553565b604051610678919061422c565b60405180910390f35b34801561068d57600080fd5b506106a860048036038101906106a3919061413e565b611565565b6040516106b591906140c5565b60405180910390f35b3480156106ca57600080fd5b506106d361161d565b005b3480156106e157600080fd5b506106ea611631565b005b3480156106f857600080fd5b50610701611816565b60405161070e919061422c565b60405180910390f35b34801561072357600080fd5b5061073e600480360381019061073991906143bc565b611840565b005b34801561074c57600080fd5b5061075561185c565b60405161076291906141fb565b60405180910390f35b34801561077757600080fd5b50610792600480360381019061078d9190614663565b6118ee565b005b3480156107a057600080fd5b506107bb60048036038101906107b691906146dc565b611ed5565b005b6107d760048036038101906107d2919061471c565b611eee565b005b3480156107e557600080fd5b5061080060048036038101906107fb9190614089565b611f3f565b60405161080d91906141fb565b60405180910390f35b34801561082257600080fd5b5061083d6004803603810190610838919061413e565b611fc6565b60405161084c939291906147ed565b60405180910390f35b34801561086157600080fd5b5061087c60048036038101906108779190614824565b612035565b6040516108899190614038565b60405180910390f35b34801561089e57600080fd5b506108b960048036038101906108b49190614089565b6120c9565b6040516108c691906140c5565b60405180910390f35b3480156108db57600080fd5b506108f660048036038101906108f1919061413e565b6120e7565b005b34801561090457600080fd5b5061091f600480360381019061091a919061413e565b61216a565b60405161092c91906140c5565b60405180910390f35b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061099057506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806109c05750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b61010c6020528060005260406000206000915090505481565b6109e86121e5565b8061010a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606060028054610a3c90614893565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6890614893565b8015610ab55780601f10610a8a57610100808354040283529160200191610ab5565b820191906000526020600020905b815481529060010190602001808311610a9857829003601f168201915b5050505050905090565b6000610aca82612263565b610b00576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610b48816122c2565b610b5283836123bf565b505050565b610b6081612503565b50565b6000610b6d612511565b6001546000540303905090565b610b826121e5565b806101079081610b929190614a66565b5050565b6060600061010c600084815260200190815260200160002054905060006040518060400160405280600181526020017f7b00000000000000000000000000000000000000000000000000000000000000815250905060006040518060400160405280600181526020017f220000000000000000000000000000000000000000000000000000000000000081525090506000828261010484604051602001610c409493929190614c8f565b60405160208183030381529060405290506000818361010585604051602001610c6c9493929190614d2f565b604051602081830303815290604052905060008184610106610c8d8961251a565b87604051602001610ca2959493929190614dcf565b604051602081830303815290604052905060008185610107610cc38c61251a565b88604051602001610cd8959493929190614e7c565b604051602081830303815290604052905060008161010887610cf98b61251a565b89610109604051602001610d1296959493929190614f75565b60405160208183030381529060405290508098505050505050505050919050565b610d3b6121e5565b806101089081610d4b9190614a66565b5050565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d8d57610d8c336122c2565b5b600061010b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff168152505090508281604001516fffffffffffffffffffffffffffffffff1603610f445761010b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600080820160006101000a81549067ffffffffffffffff02191690556000820160086101000a81549067ffffffffffffffff02191690556000820160106101000a8154906fffffffffffffffffffffffffffffffff021916905550505b610f4f8585856125e8565b5050505050565b610f5e6121e5565b806101059081610f6e9190614a66565b5050565b7f000000000000000000000000ba446a1b6af7aeaf976c9ed56d9341fc0464813673ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1603611000576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff790615055565b60405180910390fd5b7f000000000000000000000000ba446a1b6af7aeaf976c9ed56d9341fc0464813673ffffffffffffffffffffffffffffffffffffffff1661103f61290a565b73ffffffffffffffffffffffffffffffffffffffff1614611095576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108c906150e7565b60405180910390fd5b61109e81612961565b6110f781600067ffffffffffffffff8111156110bd576110bc614291565b5b6040519080825280601f01601f1916602001820160405280156110ef5781602001600182028036833780820191505090505b50600061296c565b50565b6daaeb6d7670e522a718067333cd4e81565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461114a57611149336122c2565b5b61116584848460405180602001604052806000815250612ada565b50505050565b600061010b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160089054906101000a900467ffffffffffffffff1667ffffffffffffffff169050919050565b6111de6121e5565b8061010990816111ee9190614a66565b5050565b7f000000000000000000000000ba446a1b6af7aeaf976c9ed56d9341fc0464813673ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1603611280576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127790615055565b60405180910390fd5b7f000000000000000000000000ba446a1b6af7aeaf976c9ed56d9341fc0464813673ffffffffffffffffffffffffffffffffffffffff166112bf61290a565b73ffffffffffffffffffffffffffffffffffffffff1614611315576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130c906150e7565b60405180910390fd5b61131e82612961565b61132a8282600161296c565b5050565b6000426202a300836113409190615136565b109050919050565b60007f000000000000000000000000ba446a1b6af7aeaf976c9ed56d9341fc0464813673ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16146113d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113cf906151dc565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905090565b6114096121e5565b8061010690816114199190614a66565b5050565b60008061010b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff168152505090506000816020015167ffffffffffffffff16148061154b575061154a816000015167ffffffffffffffff1661132e565b5b915050919050565b600061155e82612b4d565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036115cc576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6116256121e5565b61162f6000612c19565b565b6000600860019054906101000a900460ff1615905080801561166557506001600860009054906101000a900460ff1660ff16105b80611694575061167430612cdf565b15801561169357506001600860009054906101000a900460ff1660ff16145b5b6116d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ca9061526e565b60405180910390fd5b6001600860006101000a81548160ff021916908360ff1602179055508015611711576001600860016101000a81548160ff0219169083151502179055505b611719612d02565b611721612d5b565b6040518060400160405280600b81526020017f4461696c7920436172676f000000000000000000000000000000000000000000815250600290816117659190614a66565b506040518060400160405280600281526020017f4443000000000000000000000000000000000000000000000000000000000000815250600390816117aa9190614a66565b506117b3612511565b6000819055508015611813576000600860016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405161180a91906152d6565b60405180910390a15b50565b6000603b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6118486121e5565b8061010490816118589190614a66565b5050565b60606003805461186b90614893565b80601f016020809104026020016040519081016040528092919081815260200182805461189790614893565b80156118e45780601f106118b9576101008083540402835291602001916118e4565b820191906000526020600020905b8154815290600101906020018083116118c757829003601f168201915b5050505050905090565b6118f6612db4565b600061010b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016000820160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff168152505090506000816000015167ffffffffffffffff1690506000826020015167ffffffffffffffff169050611a6885858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508284612e03565b611aa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9e9061533d565b60405180910390fd5b426201518083611ab79190615136565b10611af7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aee906153a9565b60405180910390fd5b6000811480611b0b5750611b0a8261132e565b5b15611ca5576000611b1a612e7c565b9050611b24613f3d565b6001816020019067ffffffffffffffff16908167ffffffffffffffff168152505042816000019067ffffffffffffffff16908167ffffffffffffffff16815250508181604001906fffffffffffffffffffffffffffffffff1690816fffffffffffffffffffffffffffffffff16815250508061010b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060208201518160000160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060408201518160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550905050600161010c600084815260200190815260200160002081905550611c9b336001612e85565b5050505050611ec9565b600083604001519050611cb6613f3d565b60018560200151611cc791906153c9565b816020019067ffffffffffffffff16908167ffffffffffffffff168152505042816000019067ffffffffffffffff16908167ffffffffffffffff16815250508181604001906fffffffffffffffffffffffffffffffff1690816fffffffffffffffffffffffffffffffff16815250508061010b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060208201518160000160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060408201518160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550905050600161010c6000846fffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e4e9190615136565b92505081905550816fffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050505b611ed1613040565b5050565b81611edf816122c2565b611ee9838361304a565b505050565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611f2c57611f2b336122c2565b5b611f3885858585612ada565b5050505050565b6060611f4a82612263565b611f89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f8090615451565b60405180910390fd5b6000611f9483610b96565b9050611f9f81613155565b604051602001611faf91906154bd565b604051602081830303815290604052915050919050565b61010b6020528060005260406000206000915090508060000160009054906101000a900467ffffffffffffffff16908060000160089054906101000a900467ffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905083565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600061010c6000838152602001908152602001600020549050919050565b6120ef6121e5565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361215e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215590615551565b60405180910390fd5b61216781612c19565b50565b600061010b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169050919050565b6121ed6132cd565b73ffffffffffffffffffffffffffffffffffffffff1661220b611816565b73ffffffffffffffffffffffffffffffffffffffff1614612261576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612258906155bd565b60405180910390fd5b565b60008161226e612511565b1115801561227d575060005482105b80156122bb575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b60006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b11156123bc576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b81526004016123399291906155dd565b602060405180830381865afa158015612356573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061237a919061561b565b6123bb57806040517fede71dcc0000000000000000000000000000000000000000000000000000000081526004016123b2919061422c565b60405180910390fd5b5b50565b60006123ca82611553565b90508073ffffffffffffffffffffffffffffffffffffffff166123eb6132d5565b73ffffffffffffffffffffffffffffffffffffffff161461244e57612417816124126132d5565b612035565b61244d576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b61250e8160006132dd565b50565b60006001905090565b6060600060016125298461352f565b01905060008167ffffffffffffffff81111561254857612547614291565b5b6040519080825280601f01601f19166020018201604052801561257a5781602001600182028036833780820191505090505b509050600082602001820190505b6001156125dd578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816125d1576125d0615648565b5b04945060008503612588575b819350505050919050565b60006125f382612b4d565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461265a576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061266684613682565b9150915061267c81876126776132d5565b6136a9565b6126c8576126918661268c6132d5565b612035565b6126c7576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361272e576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61273b86868660016136ed565b801561274657600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550612814856127f08888876136f3565b7c02000000000000000000000000000000000000000000000000000000001761371b565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084160361289a5760006001850190506000600460008381526020019081526020016000205403612898576000548114612897578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46129028686866001613746565b505050505050565b60006129387f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61374c565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6129696121e5565b50565b6129987f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914360001b613756565b60000160009054906101000a900460ff16156129bc576129b783613760565b612ad5565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612a2457506040513d601f19601f82011682018060405250810190612a2191906156a3565b60015b612a63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a5a90615742565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b8114612ac8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612abf906157d4565b60405180910390fd5b50612ad4838383613819565b5b505050565b612ae5848484610d4f565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612b4757612b1084848484613845565b612b46576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b60008082905080612b5c612511565b11612be257600054811015612be15760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603612bdf575b60008103612bd5576004600083600190039350838152602001908152602001600020549050612bab565b8092505050612c14565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000603b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600860019054906101000a900460ff16612d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4890615866565b60405180910390fd5b612d59613995565b565b600860019054906101000a900460ff16612daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612da190615866565b60405180910390fd5b612db26139f6565b565b6002606d5403612df9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612df0906158d2565b60405180910390fd5b6002606d81905550565b600061010a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612e5c85612e4e338787613a4f565b613a8f90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff161490509392505050565b60008054905090565b60008054905060008203612ec5576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612ed260008483856136ed565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612f4983612f3a60008660006136f3565b612f4385613ab6565b1761371b565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b818114612fea57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050612faf565b5060008203613025576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600081905550505061303b6000848385613746565b505050565b6001606d81905550565b80600760006130576132d5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166131046132d5565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516131499190614038565b60405180910390a35050565b60606000825103613177576040518060200160405280600081525090506132c8565b6000604051806060016040528060408152602001615e8560409139905060006003600285516131a69190615136565b6131b091906158f2565b60046131bc9190615923565b905060006020826131cd9190615136565b67ffffffffffffffff8111156131e6576131e5614291565b5b6040519080825280601f01601f1916602001820160405280156132185781602001600182028036833780820191505090505b509050818152600183018586518101602084015b81831015613287576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f811685015182536001820191505061322c565b6003895106600181146132a157600281146132b1576132bc565b613d3d60f01b60028303526132bc565b603d60f81b60018303525b50505050508093505050505b919050565b600033905090565b600033905090565b60006132e883612b4d565b905060008190506000806132fb86613682565b9150915084156133645761331781846133126132d5565b6136a9565b6133635761332c836133276132d5565b612035565b613362576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b6133728360008860016136ed565b801561337d57600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550613425836133e2856000886136f3565b7c02000000000000000000000000000000000000000000000000000000007c0100000000000000000000000000000000000000000000000000000000171761371b565b600460008881526020019081526020016000208190555060007c02000000000000000000000000000000000000000000000000000000008516036134ab57600060018701905060006004600083815260200190815260200160002054036134a95760005481146134a8578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4613515836000886001613746565b600160008154809291906001019190505550505050505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061358d577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161358357613582615648565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106135ca576d04ee2d6d415b85acef810000000083816135c0576135bf615648565b5b0492506020810190505b662386f26fc1000083106135f957662386f26fc1000083816135ef576135ee615648565b5b0492506010810190505b6305f5e1008310613622576305f5e100838161361857613617615648565b5b0492506008810190505b612710831061364757612710838161363d5761363c615648565b5b0492506004810190505b6064831061366a57606483816136605761365f615648565b5b0492506002810190505b600a8310613679576001810190505b80915050919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e861370a868684613ac6565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6000819050919050565b6000819050919050565b61376981612cdf565b6137a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161379f906159d7565b60405180910390fd5b806137d57f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61374c565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61382283613acf565b60008251118061382f5750805b156138405761383e8383613b1e565b505b505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261386b6132d5565b8786866040518563ffffffff1660e01b815260040161388d9493929190615a4c565b6020604051808303816000875af19250505080156138c957506040513d601f19601f820116820180604052508101906138c69190615aad565b60015b613942573d80600081146138f9576040519150601f19603f3d011682016040523d82523d6000602084013e6138fe565b606091505b50600081510361393a576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b600860019054906101000a900460ff166139e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139db90615866565b60405180910390fd5b6139f46139ef6132cd565b612c19565b565b600860019054906101000a900460ff16613a45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613a3c90615866565b60405180910390fd5b6001606d81905550565b6000613a8630858585604051602001613a6b9493929190615ada565b60405160208183030381529060405280519060200120613c02565b90509392505050565b6000806000613a9e8585613c32565b91509150613aab81613c83565b819250505092915050565b60006001821460e11b9050919050565b60009392505050565b613ad881613760565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b6060613b2983612cdf565b613b68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b5f90615b91565b60405180910390fd5b6000808473ffffffffffffffffffffffffffffffffffffffff1684604051613b909190615bed565b600060405180830381855af49150503d8060008114613bcb576040519150601f19603f3d011682016040523d82523d6000602084013e613bd0565b606091505b5091509150613bf88282604051806060016040528060278152602001615ec560279139613de9565b9250505092915050565b600081604051602001613c159190615c71565b604051602081830303815290604052805190602001209050919050565b6000806041835103613c735760008060006020860151925060408601519150606086015160001a9050613c6787828585613e0b565b94509450505050613c7c565b60006002915091505b9250929050565b60006004811115613c9757613c96615c97565b5b816004811115613caa57613ca9615c97565b5b0315613de65760016004811115613cc457613cc3615c97565b5b816004811115613cd757613cd6615c97565b5b03613d17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d0e90615d12565b60405180910390fd5b60026004811115613d2b57613d2a615c97565b5b816004811115613d3e57613d3d615c97565b5b03613d7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d7590615d7e565b60405180910390fd5b60036004811115613d9257613d91615c97565b5b816004811115613da557613da4615c97565b5b03613de5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613ddc90615e10565b60405180910390fd5b5b50565b60608315613df957829050613e04565b613e038383613eed565b5b9392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115613e46576000600391509150613ee4565b600060018787878760405160008152602001604052604051613e6b9493929190615e3f565b6020604051602081039080840390855afa158015613e8d573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603613edb57600060019250925050613ee4565b80600092509250505b94509492505050565b600082511115613f005781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613f3491906141fb565b60405180910390fd5b6040518060600160405280600067ffffffffffffffff168152602001600067ffffffffffffffff16815260200160006fffffffffffffffffffffffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613fcd81613f98565b8114613fd857600080fd5b50565b600081359050613fea81613fc4565b92915050565b60006020828403121561400657614005613f8e565b5b600061401484828501613fdb565b91505092915050565b60008115159050919050565b6140328161401d565b82525050565b600060208201905061404d6000830184614029565b92915050565b6000819050919050565b61406681614053565b811461407157600080fd5b50565b6000813590506140838161405d565b92915050565b60006020828403121561409f5761409e613f8e565b5b60006140ad84828501614074565b91505092915050565b6140bf81614053565b82525050565b60006020820190506140da60008301846140b6565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061410b826140e0565b9050919050565b61411b81614100565b811461412657600080fd5b50565b60008135905061413881614112565b92915050565b60006020828403121561415457614153613f8e565b5b600061416284828501614129565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156141a557808201518184015260208101905061418a565b60008484015250505050565b6000601f19601f8301169050919050565b60006141cd8261416b565b6141d78185614176565b93506141e7818560208601614187565b6141f0816141b1565b840191505092915050565b6000602082019050818103600083015261421581846141c2565b905092915050565b61422681614100565b82525050565b6000602082019050614241600083018461421d565b92915050565b6000806040838503121561425e5761425d613f8e565b5b600061426c85828601614129565b925050602061427d85828601614074565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6142c9826141b1565b810181811067ffffffffffffffff821117156142e8576142e7614291565b5b80604052505050565b60006142fb613f84565b905061430782826142c0565b919050565b600067ffffffffffffffff82111561432757614326614291565b5b614330826141b1565b9050602081019050919050565b82818337600083830152505050565b600061435f61435a8461430c565b6142f1565b90508281526020810184848401111561437b5761437a61428c565b5b61438684828561433d565b509392505050565b600082601f8301126143a3576143a2614287565b5b81356143b384826020860161434c565b91505092915050565b6000602082840312156143d2576143d1613f8e565b5b600082013567ffffffffffffffff8111156143f0576143ef613f93565b5b6143fc8482850161438e565b91505092915050565b60008060006060848603121561441e5761441d613f8e565b5b600061442c86828701614129565b935050602061443d86828701614129565b925050604061444e86828701614074565b9150509250925092565b6000819050919050565b600061447d614478614473846140e0565b614458565b6140e0565b9050919050565b600061448f82614462565b9050919050565b60006144a182614484565b9050919050565b6144b181614496565b82525050565b60006020820190506144cc60008301846144a8565b92915050565b600067ffffffffffffffff8211156144ed576144ec614291565b5b6144f6826141b1565b9050602081019050919050565b6000614516614511846144d2565b6142f1565b9050828152602081018484840111156145325761453161428c565b5b61453d84828561433d565b509392505050565b600082601f83011261455a57614559614287565b5b813561456a848260208601614503565b91505092915050565b6000806040838503121561458a57614589613f8e565b5b600061459885828601614129565b925050602083013567ffffffffffffffff8111156145b9576145b8613f93565b5b6145c585828601614545565b9150509250929050565b6000819050919050565b6145e2816145cf565b82525050565b60006020820190506145fd60008301846145d9565b92915050565b600080fd5b600080fd5b60008083601f84011261462357614622614287565b5b8235905067ffffffffffffffff8111156146405761463f614603565b5b60208301915083600182028301111561465c5761465b614608565b5b9250929050565b6000806020838503121561467a57614679613f8e565b5b600083013567ffffffffffffffff81111561469857614697613f93565b5b6146a48582860161460d565b92509250509250929050565b6146b98161401d565b81146146c457600080fd5b50565b6000813590506146d6816146b0565b92915050565b600080604083850312156146f3576146f2613f8e565b5b600061470185828601614129565b9250506020614712858286016146c7565b9150509250929050565b6000806000806080858703121561473657614735613f8e565b5b600061474487828801614129565b945050602061475587828801614129565b935050604061476687828801614074565b925050606085013567ffffffffffffffff81111561478757614786613f93565b5b61479387828801614545565b91505092959194509250565b600067ffffffffffffffff82169050919050565b6147bc8161479f565b82525050565b60006fffffffffffffffffffffffffffffffff82169050919050565b6147e7816147c2565b82525050565b600060608201905061480260008301866147b3565b61480f60208301856147b3565b61481c60408301846147de565b949350505050565b6000806040838503121561483b5761483a613f8e565b5b600061484985828601614129565b925050602061485a85828601614129565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806148ab57607f821691505b6020821081036148be576148bd614864565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026149267fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826148e9565b61493086836148e9565b95508019841693508086168417925050509392505050565b600061496361495e61495984614053565b614458565b614053565b9050919050565b6000819050919050565b61497d83614948565b6149916149898261496a565b8484546148f6565b825550505050565b600090565b6149a6614999565b6149b1818484614974565b505050565b5b818110156149d5576149ca60008261499e565b6001810190506149b7565b5050565b601f821115614a1a576149eb816148c4565b6149f4846148d9565b81016020851015614a03578190505b614a17614a0f856148d9565b8301826149b6565b50505b505050565b600082821c905092915050565b6000614a3d60001984600802614a1f565b1980831691505092915050565b6000614a568383614a2c565b9150826002028217905092915050565b614a6f8261416b565b67ffffffffffffffff811115614a8857614a87614291565b5b614a928254614893565b614a9d8282856149d9565b600060209050601f831160018114614ad05760008415614abe578287015190505b614ac88582614a4a565b865550614b30565b601f198416614ade866148c4565b60005b82811015614b0657848901518255600182019150602085019450602081019050614ae1565b86831015614b235784890151614b1f601f891682614a2c565b8355505b6001600288020188555050505b505050505050565b600081905092915050565b6000614b4e8261416b565b614b588185614b38565b9350614b68818560208601614187565b80840191505092915050565b7f226465736372697074696f6e223a000000000000000000000000000000000000600082015250565b6000614baa600e83614b38565b9150614bb582614b74565b600e82019050919050565b60008154614bcd81614893565b614bd78186614b38565b94506001821660008114614bf25760018114614c0757614c3a565b60ff1983168652811515820286019350614c3a565b614c10856148c4565b60005b83811015614c3257815481890152600182019150602081019050614c13565b838801955050505b50505092915050565b7f2c00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614c79600183614b38565b9150614c8482614c43565b600182019050919050565b6000614c9b8287614b43565b9150614ca682614b9d565b9150614cb28286614b43565b9150614cbe8285614bc0565b9150614cca8284614b43565b9150614cd582614c6c565b915081905095945050505050565b7f2265787465726e616c5f75726c223a0000000000000000000000000000000000600082015250565b6000614d19600f83614b38565b9150614d2482614ce3565b600f82019050919050565b6000614d3b8287614b43565b9150614d4682614d0c565b9150614d528286614b43565b9150614d5e8285614bc0565b9150614d6a8284614b43565b9150614d7582614c6c565b915081905095945050505050565b7f22696d616765223a000000000000000000000000000000000000000000000000600082015250565b6000614db9600883614b38565b9150614dc482614d83565b600882019050919050565b6000614ddb8288614b43565b9150614de682614dac565b9150614df28287614b43565b9150614dfe8286614bc0565b9150614e0a8285614b43565b9150614e168284614b43565b9150614e2182614c6c565b91508190509695505050505050565b7f226e616d65223a00000000000000000000000000000000000000000000000000600082015250565b6000614e66600783614b38565b9150614e7182614e30565b600782019050919050565b6000614e888288614b43565b9150614e9382614e59565b9150614e9f8287614b43565b9150614eab8286614bc0565b9150614eb78285614b43565b9150614ec38284614b43565b9150614ece82614c6c565b91508190509695505050505050565b7f2261747472696275746573223a00000000000000000000000000000000000000600082015250565b6000614f13600d83614b38565b9150614f1e82614edd565b600d82019050919050565b7f7d00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614f5f600183614b38565b9150614f6a82614f29565b600182019050919050565b6000614f818289614b43565b9150614f8c82614f06565b9150614f988288614bc0565b9150614fa48287614b43565b9150614fb08286614b43565b9150614fbc8285614b43565b9150614fc88284614bc0565b9150614fd382614f52565b9150819050979650505050505050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f64656c656761746563616c6c0000000000000000000000000000000000000000602082015250565b600061503f602c83614176565b915061504a82614fe3565b604082019050919050565b6000602082019050818103600083015261506e81615032565b9050919050565b7f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060008201527f6163746976652070726f78790000000000000000000000000000000000000000602082015250565b60006150d1602c83614176565b91506150dc82615075565b604082019050919050565b60006020820190508181036000830152615100816150c4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061514182614053565b915061514c83614053565b925082820190508082111561516457615163615107565b5b92915050565b7f555550535570677261646561626c653a206d757374206e6f742062652063616c60008201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015250565b60006151c6603883614176565b91506151d18261516a565b604082019050919050565b600060208201905081810360008301526151f5816151b9565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000615258602e83614176565b9150615263826151fc565b604082019050919050565b600060208201905081810360008301526152878161524b565b9050919050565b6000819050919050565b600060ff82169050919050565b60006152c06152bb6152b68461528e565b614458565b615298565b9050919050565b6152d0816152a5565b82525050565b60006020820190506152eb60008301846152c7565b92915050565b7f696e76616c6964207369676e61747572652e0000000000000000000000000000600082015250565b6000615327601283614176565b9150615332826152f1565b602082019050919050565b600060208201905081810360008301526153568161531a565b9050919050565b7f796f752063616e206f6e6c79206d696e74206f6e652070657220646179000000600082015250565b6000615393601d83614176565b915061539e8261535d565b602082019050919050565b600060208201905081810360008301526153c281615386565b9050919050565b60006153d48261479f565b91506153df8361479f565b9250828201905067ffffffffffffffff8111156153ff576153fe615107565b5b92915050565b7f636172676f20686173206e6f74206265656e206d696e7465642e000000000000600082015250565b600061543b601a83614176565b915061544682615405565b602082019050919050565b6000602082019050818103600083015261546a8161542e565b9050919050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000600082015250565b60006154a7601d83614b38565b91506154b282615471565b601d82019050919050565b60006154c88261549a565b91506154d48284614b43565b915081905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061553b602683614176565b9150615546826154df565b604082019050919050565b6000602082019050818103600083015261556a8161552e565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006155a7602083614176565b91506155b282615571565b602082019050919050565b600060208201905081810360008301526155d68161559a565b9050919050565b60006040820190506155f2600083018561421d565b6155ff602083018461421d565b9392505050565b600081519050615615816146b0565b92915050565b60006020828403121561563157615630613f8e565b5b600061563f84828501615606565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b615680816145cf565b811461568b57600080fd5b50565b60008151905061569d81615677565b92915050565b6000602082840312156156b9576156b8613f8e565b5b60006156c78482850161568e565b91505092915050565b7f45524331393637557067726164653a206e657720696d706c656d656e7461746960008201527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015250565b600061572c602e83614176565b9150615737826156d0565b604082019050919050565b6000602082019050818103600083015261575b8161571f565b9050919050565b7f45524331393637557067726164653a20756e737570706f727465642070726f7860008201527f6961626c65555549440000000000000000000000000000000000000000000000602082015250565b60006157be602983614176565b91506157c982615762565b604082019050919050565b600060208201905081810360008301526157ed816157b1565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000615850602b83614176565b915061585b826157f4565b604082019050919050565b6000602082019050818103600083015261587f81615843565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006158bc601f83614176565b91506158c782615886565b602082019050919050565b600060208201905081810360008301526158eb816158af565b9050919050565b60006158fd82614053565b915061590883614053565b92508261591857615917615648565b5b828204905092915050565b600061592e82614053565b915061593983614053565b925082820261594781614053565b9150828204841483151761595e5761595d615107565b5b5092915050565b7f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60008201527f6f74206120636f6e747261637400000000000000000000000000000000000000602082015250565b60006159c1602d83614176565b91506159cc82615965565b604082019050919050565b600060208201905081810360008301526159f0816159b4565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000615a1e826159f7565b615a288185615a02565b9350615a38818560208601614187565b615a41816141b1565b840191505092915050565b6000608082019050615a61600083018761421d565b615a6e602083018661421d565b615a7b60408301856140b6565b8181036060830152615a8d8184615a13565b905095945050505050565b600081519050615aa781613fc4565b92915050565b600060208284031215615ac357615ac2613f8e565b5b6000615ad184828501615a98565b91505092915050565b6000608082019050615aef600083018761421d565b615afc602083018661421d565b615b0960408301856140b6565b615b1660608301846140b6565b95945050505050565b7f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b6000615b7b602683614176565b9150615b8682615b1f565b604082019050919050565b60006020820190508181036000830152615baa81615b6e565b9050919050565b600081905092915050565b6000615bc7826159f7565b615bd18185615bb1565b9350615be1818560208601614187565b80840191505092915050565b6000615bf98284615bbc565b915081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000615c3a601c83614b38565b9150615c4582615c04565b601c82019050919050565b6000819050919050565b615c6b615c66826145cf565b615c50565b82525050565b6000615c7c82615c2d565b9150615c888284615c5a565b60208201915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b6000615cfc601883614176565b9150615d0782615cc6565b602082019050919050565b60006020820190508181036000830152615d2b81615cef565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b6000615d68601f83614176565b9150615d7382615d32565b602082019050919050565b60006020820190508181036000830152615d9781615d5b565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000615dfa602283614176565b9150615e0582615d9e565b604082019050919050565b60006020820190508181036000830152615e2981615ded565b9050919050565b615e3981615298565b82525050565b6000608082019050615e5460008301876145d9565b615e616020830186615e30565b615e6e60408301856145d9565b615e7b60608301846145d9565b9594505050505056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220029edef40efacaf7230a37062d62698a4145b5098d7de7e19f16c03bff375fb264736f6c63430008110033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.