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 | 18019652 | 920 days ago | IN | 0 ETH | 0.00562962 |
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:
smolDollar
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.17;
// V.1
// ____________________________________
// |::::::/-/-/-/-/-/-/-/-/-/-/-::::::|
// |:(1)*······SMOL.DOLLAR·······*(1):|
// |:''·········/¯¯¯¯¯¯¯\··'''''''·'':|
// |':{G}·······| ʕ•ᴥ•ʔ |···········:'|
// |:'···''''''·| { . } |····O.N.E.·':|
// |:(1)········\_______/·········(1):|
// |//-------ONE.SMOL.DOLLAR--------//|
// ------------------------------------
//
import "openzeppelin-contracts-upgradeable/token/common/ERC2981Upgradeable.sol";
import "openzeppelin-contracts-upgradeable/access/OwnableUpgradeable.sol";
import "openzeppelin-contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import {IERC721AUpgradeable, ERC721AUpgradeable} from "erc721a-upgradeable/contracts/ERC721AUpgradeable.sol";
import {ERC721AQueryableUpgradeable} from "erc721a-upgradeable/contracts/extensions/ERC721AQueryableUpgradeable.sol";
import "erc721a-upgradeable/contracts/ERC721A__Initializable.sol";
import "closedsea/src/OperatorFilterer.sol";
import "./seedGenerator.sol";
import "./operatorWhitelist.sol";
contract smolDollar is
ERC721AUpgradeable,
ERC721AQueryableUpgradeable,
ERC2981Upgradeable,
OwnableUpgradeable,
OperatorFilterer,
seedGenerator,
operatorWhitelist,
UUPSUpgradeable
{
address public Minting;
address public Seigniorage;
address public Bonds;
address public SVGRendering;
bool public SeigniorageOn;
bool public BurningBondsOn;
mapping(uint256 => uint256) TokenIdToSeed;
function initialize() public initializerERC721A initializer {
__ERC721A_init("Smol Dollar", "(o_o)");
__Ownable_init();
__ERC2981_init();
__UUPSUpgradeable_init();
_registerForOperatorFiltering();
// Set royalty receiver to the contract creator,
// at 9% (default denominator is 10000).
// this sets the Default Royalty in ERC2981
_setDefaultRoyalty(msg.sender, 900);
SeigniorageOn = false;
BurningBondsOn = false;
}
/// UUPS
function _authorizeUpgrade(
address newImplementation
) internal override onlyOwner {}
// overwrite start token
function _startTokenId() internal pure override returns (uint256) {
return 1;
}
/// Mint Function
function mint(uint256 quantity, address minter) external {
require(msg.sender == Minting, "NOT_AUTORIZED");
uint256 nextID = _nextTokenId();
for (uint256 max = 0; max < quantity; max++) {
TokenIdToSeed[nextID + max] = createTokenChar(nextID + max);
}
// `_mint`'s second argument now takes in a `quantity`, not a `tokenId`.
_mint(minter, quantity);
}
// ERC2981 ROYALTY + Interfaces
function supportsInterface(
bytes4 interfaceId
)
public
view
virtual
override(ERC721AUpgradeable, IERC721AUpgradeable, ERC2981Upgradeable)
returns (bool)
{
// Supports the following `interfaceId`s:
// - IERC165: 0x01ffc9a7
// - IERC721: 0x80ac58cd
// - IERC721Metadata: 0x5b5e139f
// - IERC2981: 0x2a55205a
return
ERC721AUpgradeable.supportsInterface(interfaceId) ||
ERC2981Upgradeable.supportsInterface(interfaceId);
}
// closedsea + ERC2981 ROYALTY
function setDefaultRoyalty(
address receiver,
uint96 feeNumerator
) public onlyOwner {
_setDefaultRoyalty(receiver, feeNumerator);
}
// change Addresses
function setRender(address render) public onlyOwner {
SVGRendering = render;
}
function setSeigniorage(address seigniorage) public onlyOwner {
Seigniorage = seigniorage;
}
function setBonds(address bonds) public onlyOwner {
Bonds = bonds;
}
function setMinting(address minting) public onlyOwner {
Minting = minting;
}
// turn on Seigiorage / Bonds
function setBoolSeigniorage(bool onOf) public onlyOwner {
SeigniorageOn = onOf;
}
function setBoolBonds(bool onOf) public onlyOwner {
BurningBondsOn = onOf;
}
// overwriting transfer
function setApprovalForAll(
address operator,
bool approved
)
public
override(IERC721AUpgradeable, ERC721AUpgradeable)
onlyAllowedOperatorApproval(operator)
{
super.setApprovalForAll(operator, approved);
}
function approve(
address operator,
uint256 tokenId
)
public
payable
override(IERC721AUpgradeable, ERC721AUpgradeable)
onlyAllowedOperatorApproval(operator)
{
super.approve(operator, tokenId);
}
/// both safeTransfer Calls end up here :(
function transferFrom(
address from,
address to,
uint256 tokenId
)
public
payable
override(IERC721AUpgradeable, ERC721AUpgradeable)
onlyAllowedOperator(from)
seigniorageCall(from)
{
super.transferFrom(from, to, tokenId);
}
/// general problem with the openseafilter - safeTransferFrom calls transfer from so the modifier is at least two times enforced - gas bad
function safeTransferFrom(
address from,
address to,
uint256 tokenId
)
public
payable
override(IERC721AUpgradeable, ERC721AUpgradeable)
onlyAllowedOperator(from)
{
super.safeTransferFrom(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
)
public
payable
override(IERC721AUpgradeable, ERC721AUpgradeable)
onlyAllowedOperator(from)
{
super.safeTransferFrom(from, to, tokenId, data);
}
modifier seigniorageCall(address from) virtual {
bool notUsesOperator = (msg.sender != from);
if (
(SeigniorageOn &&
notUsesOperator &&
checkOperatorWhitelist(msg.sender))
) {
(bool suc, ) = address(Seigniorage).call(
abi.encodeWithSignature("addPoint(address)", from)
);
require(suc, "Call_failed");
}
_;
}
/// add Whitelist Operators
function addWhitelistSlot(uint8 slot, address operator) public onlyOwner {
_addSlot(slot, operator);
}
// burningBonds
// If approvalCheck (second argument is true, the caller must own tokenId or be an approved operator.
// DANGER WE SET IT HERE TO FALSE BECAUSE THIS IS CALLED BY A DIFFRENT CONTRACT
// DANGER THE BONDS CONTRACT HAS TO CHECK THAT THE TOKEN IS OWNED BY THE ADDESS WHICH BURNS IT
function burn(uint256 tokenId) external {
require(msg.sender == Bonds);
require(BurningBondsOn == true);
_burn(uint256(tokenId), bool(false));
}
/// renderfunction
function tokenURI(
uint256 tokenId
)
public
view
virtual
override(IERC721AUpgradeable, ERC721AUpgradeable)
returns (string memory)
{
(bool suc, bytes memory returnData) = address(SVGRendering).staticcall(
abi.encodeWithSignature("render(uint256)", TokenIdToSeed[tokenId])
);
require(suc, "Call failed");
return abi.decode(returnData, (string));
}
/// opensea : 0x1E0049783F008A0085193E00003D00cd54003c71
/// blur : 0x2f18f339620a63e43f0839eeb18d7de1e1be4dfb
///closedSea
function _isPriorityOperator(
address operator
) internal pure override returns (bool) {
// OpenSea Seaport Conduit:
// https://etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71
// https://goerli.etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71
return operator == address(0x1E0049783F008A0085193E00003D00cd54003c71);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol)
pragma solidity ^0.8.0;
import "../../interfaces/IERC2981Upgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";
/**
* @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
*
* Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
* specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
*
* Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
* fee is specified in basis points by default.
*
* IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
* https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
* voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
*
* _Available since v4.5._
*/
abstract contract ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable {
function __ERC2981_init() internal onlyInitializing {
}
function __ERC2981_init_unchained() internal onlyInitializing {
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
RoyaltyInfo private _defaultRoyaltyInfo;
mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) {
return interfaceId == type(IERC2981Upgradeable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @inheritdoc IERC2981Upgradeable
*/
function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) {
RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId];
if (royalty.receiver == address(0)) {
royalty = _defaultRoyaltyInfo;
}
uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator();
return (royalty.receiver, royaltyAmount);
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
return 10000;
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
require(receiver != address(0), "ERC2981: invalid receiver");
_defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
}
/**
* @dev Removes default royalty information.
*/
function _deleteDefaultRoyalty() internal virtual {
delete _defaultRoyaltyInfo;
}
/**
* @dev Sets the royalty information for a specific token id, overriding the global default.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual {
require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
require(receiver != address(0), "ERC2981: Invalid parameters");
_tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
}
/**
* @dev Resets royalty information for the token id back to the global default.
*/
function _resetTokenRoyalty(uint256 tokenId) internal virtual {
delete _tokenRoyaltyInfo[tokenId];
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[48] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeTo(address newImplementation) public 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.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeToAndCall(address newImplementation, bytes memory data) public 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
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import './IERC721AUpgradeable.sol';
import {ERC721AStorage} from './ERC721AStorage.sol';
import './ERC721A__Initializable.sol';
/**
* @dev Interface of ERC721 token receiver.
*/
interface ERC721A__IERC721ReceiverUpgradeable {
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 ERC721AUpgradeable is ERC721A__Initializable, IERC721AUpgradeable {
using ERC721AStorage for ERC721AStorage.Layout;
// =============================================================
// 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;
// =============================================================
// CONSTRUCTOR
// =============================================================
function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
__ERC721A_init_unchained(name_, symbol_);
}
function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
ERC721AStorage.layout()._name = name_;
ERC721AStorage.layout()._symbol = symbol_;
ERC721AStorage.layout()._currentIndex = _startTokenId();
}
// =============================================================
// 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 ERC721AStorage.layout()._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 ERC721AStorage.layout()._currentIndex - ERC721AStorage.layout()._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 ERC721AStorage.layout()._currentIndex - _startTokenId();
}
}
/**
* @dev Returns the total number of tokens burned.
*/
function _totalBurned() internal view virtual returns (uint256) {
return ERC721AStorage.layout()._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 ERC721AStorage.layout()._packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
return
(ERC721AStorage.layout()._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
(ERC721AStorage.layout()._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(ERC721AStorage.layout()._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 = ERC721AStorage.layout()._packedAddressData[owner];
uint256 auxCasted;
// Cast `aux` with assembly to avoid redundant masking.
assembly {
auxCasted := aux
}
packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
ERC721AStorage.layout()._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 ERC721AStorage.layout()._name;
}
/**
* @dev Returns the token collection symbol.
*/
function symbol() public view virtual override returns (string memory) {
return ERC721AStorage.layout()._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(ERC721AStorage.layout()._packedOwnerships[index]);
}
/**
* @dev Initializes the ownership slot minted at `index` for efficiency purposes.
*/
function _initializeOwnershipAt(uint256 index) internal virtual {
if (ERC721AStorage.layout()._packedOwnerships[index] == 0) {
ERC721AStorage.layout()._packedOwnerships[index] = _packedOwnershipOf(index);
}
}
/**
* Returns the packed ownership data of `tokenId`.
*/
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) {
if (_startTokenId() <= tokenId) {
packed = ERC721AStorage.layout()._packedOwnerships[tokenId];
// If not burned.
if (packed & _BITMASK_BURNED == 0) {
// If the data at the starting slot does not exist, start the scan.
if (packed == 0) {
if (tokenId >= ERC721AStorage.layout()._currentIndex) revert OwnerQueryForNonexistentToken();
// 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, `tokenId` will not underflow.
//
// We can directly compare the packed value.
// If the address is zero, packed will be zero.
for (;;) {
unchecked {
packed = ERC721AStorage.layout()._packedOwnerships[--tokenId];
}
if (packed == 0) continue;
return packed;
}
}
// Otherwise, the data exists and is not burned. We can skip the scan.
// This is possible because we have already achieved the target condition.
// This saves 2143 gas on transfers of initialized tokens.
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. See {ERC721A-_approve}.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
*/
function approve(address to, uint256 tokenId) public payable virtual override {
_approve(to, tokenId, true);
}
/**
* @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 ERC721AStorage.layout()._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 {
ERC721AStorage.layout()._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 ERC721AStorage.layout()._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 < ERC721AStorage.layout()._currentIndex && // If within bounds,
ERC721AStorage.layout()._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)
{
ERC721AStorage.TokenApprovalRef storage tokenApproval = ERC721AStorage.layout()._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.
--ERC721AStorage.layout()._packedAddressData[from]; // Updates: `balance -= 1`.
++ERC721AStorage.layout()._packedAddressData[to]; // Updates: `balance += 1`.
// Updates:
// - `address` to the next owner.
// - `startTimestamp` to the timestamp of transfering.
// - `burned` to `false`.
// - `nextInitialized` to `true`.
ERC721AStorage.layout()._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 (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
ERC721AStorage.layout()._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__IERC721ReceiverUpgradeable(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data)
returns (bytes4 retval) {
return retval == ERC721A__IERC721ReceiverUpgradeable(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 = ERC721AStorage.layout()._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`.
ERC721AStorage.layout()._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`.
ERC721AStorage.layout()._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();
ERC721AStorage.layout()._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 = ERC721AStorage.layout()._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`.
ERC721AStorage.layout()._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`.
ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);
ERC721AStorage.layout()._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 = ERC721AStorage.layout()._currentIndex;
uint256 index = end - quantity;
do {
if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
} while (index < end);
// Reentrancy protection.
if (ERC721AStorage.layout()._currentIndex != end) revert();
}
}
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal virtual {
_safeMint(to, quantity, '');
}
// =============================================================
// APPROVAL OPERATIONS
// =============================================================
/**
* @dev Equivalent to `_approve(to, tokenId, false)`.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_approve(to, tokenId, false);
}
/**
* @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:
*
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
bool approvalCheck
) internal virtual {
address owner = ownerOf(tokenId);
if (approvalCheck)
if (_msgSenderERC721A() != owner)
if (!isApprovedForAll(owner, _msgSenderERC721A())) {
revert ApprovalCallerNotOwnerNorApproved();
}
ERC721AStorage.layout()._tokenApprovals[tokenId].value = to;
emit Approval(owner, to, tokenId);
}
// =============================================================
// 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;`.
ERC721AStorage.layout()._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`.
ERC721AStorage.layout()._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 (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
ERC721AStorage.layout()._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 {
ERC721AStorage.layout()._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 = ERC721AStorage.layout()._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);
ERC721AStorage.layout()._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
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import './IERC721AQueryableUpgradeable.sol';
import '../ERC721AUpgradeable.sol';
import '../ERC721A__Initializable.sol';
/**
* @title ERC721AQueryable.
*
* @dev ERC721A subclass with convenience query functions.
*/
abstract contract ERC721AQueryableUpgradeable is
ERC721A__Initializable,
ERC721AUpgradeable,
IERC721AQueryableUpgradeable
{
function __ERC721AQueryable_init() internal onlyInitializingERC721A {
__ERC721AQueryable_init_unchained();
}
function __ERC721AQueryable_init_unchained() internal onlyInitializingERC721A {}
/**
* @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
*
* If the `tokenId` is out of bounds:
*
* - `addr = address(0)`
* - `startTimestamp = 0`
* - `burned = false`
* - `extraData = 0`
*
* If the `tokenId` is burned:
*
* - `addr = <Address of owner before token was burned>`
* - `startTimestamp = <Timestamp when token was burned>`
* - `burned = true`
* - `extraData = <Extra data when token was burned>`
*
* Otherwise:
*
* - `addr = <Address of owner>`
* - `startTimestamp = <Timestamp of start of ownership>`
* - `burned = false`
* - `extraData = <Extra data at start of ownership>`
*/
function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) {
TokenOwnership memory ownership;
if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) {
return ownership;
}
ownership = _ownershipAt(tokenId);
if (ownership.burned) {
return ownership;
}
return _ownershipOf(tokenId);
}
/**
* @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
* See {ERC721AQueryable-explicitOwnershipOf}
*/
function explicitOwnershipsOf(uint256[] calldata tokenIds)
external
view
virtual
override
returns (TokenOwnership[] memory)
{
unchecked {
uint256 tokenIdsLength = tokenIds.length;
TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);
for (uint256 i; i != tokenIdsLength; ++i) {
ownerships[i] = explicitOwnershipOf(tokenIds[i]);
}
return ownerships;
}
}
/**
* @dev Returns an array of token IDs owned by `owner`,
* in the range [`start`, `stop`)
* (i.e. `start <= tokenId < stop`).
*
* This function allows for tokens to be queried if the collection
* grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
*
* Requirements:
*
* - `start < stop`
*/
function tokensOfOwnerIn(
address owner,
uint256 start,
uint256 stop
) external view virtual override returns (uint256[] memory) {
unchecked {
if (start >= stop) revert InvalidQueryRange();
uint256 tokenIdsIdx;
uint256 stopLimit = _nextTokenId();
// Set `start = max(start, _startTokenId())`.
if (start < _startTokenId()) {
start = _startTokenId();
}
// Set `stop = min(stop, stopLimit)`.
if (stop > stopLimit) {
stop = stopLimit;
}
uint256 tokenIdsMaxLength = balanceOf(owner);
// Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,
// to cater for cases where `balanceOf(owner)` is too big.
if (start < stop) {
uint256 rangeLength = stop - start;
if (rangeLength < tokenIdsMaxLength) {
tokenIdsMaxLength = rangeLength;
}
} else {
tokenIdsMaxLength = 0;
}
uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);
if (tokenIdsMaxLength == 0) {
return tokenIds;
}
// We need to call `explicitOwnershipOf(start)`,
// because the slot at `start` may not be initialized.
TokenOwnership memory ownership = explicitOwnershipOf(start);
address currOwnershipAddr;
// If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.
// `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.
if (!ownership.burned) {
currOwnershipAddr = ownership.addr;
}
for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {
ownership = _ownershipAt(i);
if (ownership.burned) {
continue;
}
if (ownership.addr != address(0)) {
currOwnershipAddr = ownership.addr;
}
if (currOwnershipAddr == owner) {
tokenIds[tokenIdsIdx++] = i;
}
}
// Downsize the array to fit.
assembly {
mstore(tokenIds, tokenIdsIdx)
}
return tokenIds;
}
}
/**
* @dev Returns an array of token IDs owned by `owner`.
*
* This function scans the ownership mapping and is O(`totalSupply`) in complexity.
* It is meant to be called off-chain.
*
* See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
* multiple smaller scans if the collection is large enough to cause
* an out-of-gas error (10K collections should be fine).
*/
function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) {
unchecked {
uint256 tokenIdsIdx;
address currOwnershipAddr;
uint256 tokenIdsLength = balanceOf(owner);
uint256[] memory tokenIds = new uint256[](tokenIdsLength);
TokenOwnership memory ownership;
for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
ownership = _ownershipAt(i);
if (ownership.burned) {
continue;
}
if (ownership.addr != address(0)) {
currOwnershipAddr = ownership.addr;
}
if (currOwnershipAddr == owner) {
tokenIds[tokenIdsIdx++] = i;
}
}
return tokenIds;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev This is a base contract to aid in writing upgradeable diamond facet 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.
*
* 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.
*/
import {ERC721A__InitializableStorage} from './ERC721A__InitializableStorage.sol';
abstract contract ERC721A__Initializable {
using ERC721A__InitializableStorage for ERC721A__InitializableStorage.Layout;
/**
* @dev Modifier to protect an initializer function from being invoked twice.
*/
modifier initializerERC721A() {
// If the contract is initializing we ignore whether _initialized is set in order to support multiple
// inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
// contract may have been reentered.
require(
ERC721A__InitializableStorage.layout()._initializing
? _isConstructor()
: !ERC721A__InitializableStorage.layout()._initialized,
'ERC721A__Initializable: contract is already initialized'
);
bool isTopLevelCall = !ERC721A__InitializableStorage.layout()._initializing;
if (isTopLevelCall) {
ERC721A__InitializableStorage.layout()._initializing = true;
ERC721A__InitializableStorage.layout()._initialized = true;
}
_;
if (isTopLevelCall) {
ERC721A__InitializableStorage.layout()._initializing = false;
}
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} modifier, directly or indirectly.
*/
modifier onlyInitializingERC721A() {
require(
ERC721A__InitializableStorage.layout()._initializing,
'ERC721A__Initializable: contract is not initializing'
);
_;
}
/// @dev Returns true if and only if the function is running in the constructor
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/// @notice Optimized and flexible operator filterer to abide to OpenSea's
/// mandatory on-chain royalty enforcement in order for new collections to
/// receive royalties.
/// For more information, see:
/// See: https://github.com/ProjectOpenSea/operator-filter-registry
abstract contract OperatorFilterer {
/// @dev The default OpenSea operator blocklist subscription.
address internal constant _DEFAULT_SUBSCRIPTION =
0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
/// @dev The OpenSea operator filter registry.
address internal constant _OPERATOR_FILTER_REGISTRY =
0x000000000000AAeB6D7670E522A718067333cd4E;
/// @dev Registers the current contract to OpenSea's operator filter,
/// and subscribe to the default OpenSea operator blocklist.
/// Note: Will not revert nor update existing settings for repeated registration.
function _registerForOperatorFiltering() internal virtual {
_registerForOperatorFiltering(_DEFAULT_SUBSCRIPTION, true);
}
/// @dev Registers the current contract to OpenSea's operator filter.
/// Note: Will not revert nor update existing settings for repeated registration.
function _registerForOperatorFiltering(
address subscriptionOrRegistrantToCopy,
bool subscribe
) internal virtual {
/// @solidity memory-safe-assembly
assembly {
let functionSelector := 0x7d3e3dbe // `registerAndSubscribe(address,address)`.
// Clean the upper 96 bits of `subscriptionOrRegistrantToCopy` in case they are dirty.
subscriptionOrRegistrantToCopy := shr(
96,
shl(96, subscriptionOrRegistrantToCopy)
)
for {
} iszero(subscribe) {
} {
if iszero(subscriptionOrRegistrantToCopy) {
functionSelector := 0x4420e486 // `register(address)`.
break
}
functionSelector := 0xa0af2903 // `registerAndCopyEntries(address,address)`.
break
}
// Store the function selector.
mstore(0x00, shl(224, functionSelector))
// Store the `address(this)`.
mstore(0x04, address())
// Store the `subscriptionOrRegistrantToCopy`.
mstore(0x24, subscriptionOrRegistrantToCopy)
// Register into the registry.
if iszero(
call(
gas(),
_OPERATOR_FILTER_REGISTRY,
0,
0x00,
0x44,
0x00,
0x04
)
) {
// If the function selector has not been overwritten,
// it is an out-of-gas error.
if eq(shr(224, mload(0x00)), functionSelector) {
// To prevent gas under-estimation.
revert(0, 0)
}
}
// Restore the part of the free memory pointer that was overwritten,
// which is guaranteed to be zero, because of Solidity's memory size limits.
mstore(0x24, 0)
}
}
/// @dev Modifier to guard a function and revert if the caller is a blocked operator.
modifier onlyAllowedOperator(address from) virtual {
if (from != msg.sender) {
if (!_isPriorityOperator(msg.sender)) {
if (_operatorFilteringEnabled()) _revertIfBlocked(msg.sender);
}
}
_;
}
/// @dev Modifier to guard a function from approving a blocked operator..
modifier onlyAllowedOperatorApproval(address operator) virtual {
if (!_isPriorityOperator(operator)) {
if (_operatorFilteringEnabled()) _revertIfBlocked(operator);
}
_;
}
/// @dev Helper function that reverts if the `operator` is blocked by the registry.
function _revertIfBlocked(address operator) private view {
/// @solidity memory-safe-assembly
assembly {
// Store the function selector of `isOperatorAllowed(address,address)`,
// shifted left by 6 bytes, which is enough for 8tb of memory.
// We waste 6-3 = 3 bytes to save on 6 runtime gas (PUSH1 0x224 SHL).
mstore(0x00, 0xc6171134001122334455)
// Store the `address(this)`.
mstore(0x1a, address())
// Store the `operator`.
mstore(0x3a, operator)
// `isOperatorAllowed` always returns true if it does not revert.
if iszero(
staticcall(
gas(),
_OPERATOR_FILTER_REGISTRY,
0x16,
0x44,
0x00,
0x00
)
) {
// Bubble up the revert if the staticcall reverts.
returndatacopy(0x00, 0x00, returndatasize())
revert(0x00, returndatasize())
}
// We'll skip checking if `from` is inside the blacklist.
// Even though that can block transferring out of wrapper contracts,
// we don't want tokens to be stuck.
// Restore the part of the free memory pointer that was overwritten,
// which is guaranteed to be zero, if less than 8tb of memory is used.
mstore(0x3a, 0)
}
}
/// @dev For deriving contracts to override, so that operator filtering
/// can be turned on / off.
/// Returns true by default.
function _operatorFilteringEnabled() internal view virtual returns (bool) {
return true;
}
/// @dev For deriving contracts to override, so that preferred marketplaces can
/// skip operator filtering, helping users save gas.
/// Returns false for all inputs by default.
function _isPriorityOperator(address) internal view virtual returns (bool) {
return false;
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import {LibPRNG} from "solady/utils/LibPRNG.sol";
contract seedGenerator {
using LibPRNG for *;
function createTokenChar(
uint256 n
) internal view returns (uint256 encoded) {
///this was part of smolMoney before - now as own function
LibPRNG.PRNG memory prng;
uint256 seed = uint256(blockhash(block.number - 1)) + n;
prng.seed(seed);
uint256 r0 = prng.uniform(120); //main char
uint256 r1 = prng.uniform(10); //second char
uint256 r2 = prng.uniform(21); //third char
uint256 r3 = prng.uniform(1891); //character
uint256 r4 = prng.uniform(300); //body
uint256 r5 = prng.uniform(28); //animation - note: this produces values from 0 - 27
uint256 r6 = prng.uniform(14); //backgroundcolor
uint256 r7 = prng.uniform(104); //fontcolor
uint256 r8 = prng.uniform(10); //reverse color
///diffrent format encoding - its all just one uint256
//887766554433221199
// 11 = first char (#,+,:,▆,▒▒, etc) 00 - 04
// 22 = second char (*,',~,etc) 00 - 02
// 33 = third char (=,-,>,<,#,/,etc) 00 - 05
// 44 = character 00 - 23
// 55 = body 00 - 24
// 66 = animation
// 77 = backgroundcolor
// 88 = fontcolor
// 99 = filler
encoded = 99;
// codegen from here
// first char
if (r0 < 1) {
encoded = encoded + 0;
} else if (r0 < 3) {
encoded = encoded + 100;
} else if (r0 < 6) {
encoded = encoded + 200;
} else if (r0 < 10) {
encoded = encoded + 300;
} else if (r0 < 15) {
encoded = encoded + 400;
} else if (r0 < 21) {
encoded = encoded + 500;
} else if (r0 < 28) {
encoded = encoded + 600;
} else if (r0 < 36) {
encoded = encoded + 700;
} else if (r0 < 45) {
encoded = encoded + 800;
} else if (r0 < 55) {
encoded = encoded + 900;
} else if (r0 < 66) {
encoded = encoded + 1000;
} else if (r0 < 78) {
encoded = encoded + 1100;
} else if (r0 < 91) {
encoded = encoded + 1200;
} else if (r0 < 105) {
encoded = encoded + 1300;
} else if (r0 < 120) {
encoded = encoded + 1400;
}
/// second char
if (r1 < 1) {
encoded = encoded + 0;
} else if (r1 < 3) {
encoded = encoded + 10000;
} else if (r1 < 6) {
encoded = encoded + 20000;
} else if (r1 < 10) {
encoded = encoded + 30000;
}
/// third char
if (r2 < 1) {
encoded = encoded + 0;
} else if (r2 < 3) {
encoded = encoded + 1000000;
} else if (r2 < 6) {
encoded = encoded + 2000000;
} else if (r2 < 10) {
encoded = encoded + 3000000;
} else if (r2 < 15) {
encoded = encoded + 4000000;
} else if (r2 < 21) {
encoded = encoded + 5000000;
}
/// character char
if (r3 < 1) {
encoded = encoded + 0;
} else if (r3 < 3) {
encoded = encoded + 100000000;
} else if (r3 < 6) {
encoded = encoded + 200000000;
} else if (r3 < 10) {
encoded = encoded + 300000000;
} else if (r3 < 15) {
encoded = encoded + 400000000;
} else if (r3 < 21) {
encoded = encoded + 500000000;
} else if (r3 < 28) {
encoded = encoded + 600000000;
} else if (r3 < 36) {
encoded = encoded + 700000000;
} else if (r3 < 45) {
encoded = encoded + 800000000;
} else if (r3 < 55) {
encoded = encoded + 900000000;
} else if (r3 < 66) {
encoded = encoded + 1000000000;
} else if (r3 < 78) {
encoded = encoded + 1100000000;
} else if (r3 < 91) {
encoded = encoded + 1200000000;
} else if (r3 < 105) {
encoded = encoded + 1300000000;
} else if (r3 < 120) {
encoded = encoded + 1400000000;
} else if (r3 < 136) {
encoded = encoded + 1500000000;
} else if (r3 < 153) {
encoded = encoded + 1600000000;
} else if (r3 < 171) {
encoded = encoded + 1700000000;
} else if (r3 < 190) {
encoded = encoded + 1800000000;
} else if (r3 < 210) {
encoded = encoded + 1900000000;
} else if (r3 < 231) {
encoded = encoded + 2000000000;
} else if (r3 < 253) {
encoded = encoded + 2100000000;
} else if (r3 < 276) {
encoded = encoded + 2200000000;
} else if (r3 < 300) {
encoded = encoded + 2300000000;
} else if (r3 < 325) {
encoded = encoded + 2400000000;
} else if (r3 < 351) {
encoded = encoded + 2500000000;
} else if (r3 < 378) {
encoded = encoded + 2600000000;
} else if (r3 < 406) {
encoded = encoded + 2700000000;
} else if (r3 < 435) {
encoded = encoded + 2800000000;
} else if (r3 < 465) {
encoded = encoded + 2900000000;
} else if (r3 < 496) {
encoded = encoded + 3000000000;
} else if (r3 < 528) {
encoded = encoded + 3100000000;
} else if (r3 < 561) {
encoded = encoded + 3200000000;
} else if (r3 < 595) {
encoded = encoded + 3300000000;
} else if (r3 < 630) {
encoded = encoded + 3400000000;
} else if (r3 < 666) {
encoded = encoded + 3500000000;
} else if (r3 < 703) {
encoded = encoded + 3600000000;
} else if (r3 < 741) {
encoded = encoded + 3700000000;
} else if (r3 < 780) {
encoded = encoded + 3800000000;
} else if (r3 < 820) {
encoded = encoded + 3900000000;
} else if (r3 < 861) {
encoded = encoded + 4000000000;
} else if (r3 < 903) {
encoded = encoded + 4100000000;
} else if (r3 < 946) {
encoded = encoded + 4200000000;
} else if (r3 < 990) {
encoded = encoded + 4300000000;
} else if (r3 < 1035) {
encoded = encoded + 4400000000;
} else if (r3 < 1081) {
encoded = encoded + 4500000000;
} else if (r3 < 1128) {
encoded = encoded + 4600000000;
} else if (r3 < 1176) {
encoded = encoded + 4700000000;
} else if (r3 < 1225) {
encoded = encoded + 4800000000;
} else if (r3 < 1275) {
encoded = encoded + 4900000000;
} else if (r3 < 1326) {
encoded = encoded + 5000000000;
} else if (r3 < 1378) {
encoded = encoded + 5100000000;
} else if (r3 < 1431) {
encoded = encoded + 5200000000;
} else if (r3 < 1485) {
encoded = encoded + 5300000000;
} else if (r3 < 1540) {
encoded = encoded + 5400000000;
} else if (r3 < 1596) {
encoded = encoded + 5500000000;
} else if (r3 < 1653) {
encoded = encoded + 5600000000;
} else if (r3 < 1711) {
encoded = encoded + 5700000000;
} else if (r3 < 1770) {
encoded = encoded + 5800000000;
} else if (r3 < 1830) {
encoded = encoded + 5900000000;
} else if (r3 < 1891) {
encoded = encoded + 6000000000;
}
//body
if (r4 < 1) {
encoded = encoded + 0;
} else if (r4 < 3) {
encoded = encoded + 10000000000;
} else if (r4 < 6) {
encoded = encoded + 20000000000;
} else if (r4 < 10) {
encoded = encoded + 30000000000;
} else if (r4 < 15) {
encoded = encoded + 40000000000;
} else if (r4 < 21) {
encoded = encoded + 50000000000;
} else if (r4 < 28) {
encoded = encoded + 60000000000;
} else if (r4 < 36) {
encoded = encoded + 70000000000;
} else if (r4 < 45) {
encoded = encoded + 80000000000;
} else if (r4 < 55) {
encoded = encoded + 90000000000;
} else if (r4 < 66) {
encoded = encoded + 100000000000;
} else if (r4 < 78) {
encoded = encoded + 110000000000;
} else if (r4 < 91) {
encoded = encoded + 120000000000;
} else if (r4 < 105) {
encoded = encoded + 130000000000;
} else if (r4 < 120) {
encoded = encoded + 140000000000;
} else if (r4 < 136) {
encoded = encoded + 150000000000;
} else if (r4 < 153) {
encoded = encoded + 160000000000;
} else if (r4 < 171) {
encoded = encoded + 170000000000;
} else if (r4 < 190) {
encoded = encoded + 180000000000;
} else if (r4 < 210) {
encoded = encoded + 190000000000;
} else if (r4 < 231) {
encoded = encoded + 200000000000;
} else if (r4 < 253) {
encoded = encoded + 210000000000;
} else if (r4 < 276) {
encoded = encoded + 220000000000;
} else if (r4 < 300) {
encoded = encoded + 230000000000;
}
if (r5 < 2) {
encoded = encoded + 0;
} else if (r5 < 4) {
encoded = encoded + 1000000000000;
} else if (r5 < 8) {
encoded = encoded + 2000000000000;
} else if (r5 < 14) {
encoded = encoded + 3000000000000;
} else if (r5 < 28) {
encoded = encoded + 4000000000000;
}
///background
if (r6 < 2) {
encoded = encoded + 0;
} else if (r6 < 3) {
encoded = encoded + 100000000000000;
} else if (r6 < 6) {
encoded = encoded + 200000000000000;
} else if (r6 < 9) {
encoded = encoded + 300000000000000;
} else if (r6 < 15) {
encoded = encoded + 400000000000000;
}
///fontc
if (r7 < 2) {
encoded = encoded + 0;
} else if (r7 < 5) {
encoded = encoded + 10000000000000000;
} else if (r7 < 12) {
encoded = encoded + 20000000000000000;
} else if (r7 < 20) {
encoded = encoded + 30000000000000000;
} else if (r7 < 29) {
encoded = encoded + 40000000000000000;
} else if (r7 < 39) {
encoded = encoded + 50000000000000000;
} else if (r7 < 50) {
encoded = encoded + 60000000000000000;
} else if (r7 < 62) {
encoded = encoded + 70000000000000000;
} else if (r7 < 75) {
encoded = encoded + 80000000000000000;
} else if (r7 < 89) {
encoded = encoded + 90000000000000000;
}
// reverse colors
if (r8 < 1) {
encoded = encoded + 0;
} else if (r8 < 11) {
encoded = encoded + 1000000000000000000;
}
return encoded;
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
contract operatorWhitelist {
//mainnet opensea = 0x1e0049783f008a0085193e00003d00cd54003c71
//blur = 0x2f18f339620a63e43f0839eeb18d7de1e1be4dfb
address[3] slotsWhitelistOperators;
function _addSlot(uint8 slot, address operator) internal {
require(slot < 3);
slotsWhitelistOperators[slot] = operator;
}
function checkOperatorWhitelist(
address operator
) internal view returns (bool isOnwhitelist) {
isOnwhitelist = false;
for (uint256 i = 0; i < slotsWhitelistOperators.length; i++) {
if (slotsWhitelistOperators[i] == operator) {
isOnwhitelist = true;
break;
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol)
pragma solidity ^0.8.0;
import "../utils/introspection/IERC165Upgradeable.sol";
/**
* @dev Interface for the NFT Royalty Standard.
*
* A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
* support for royalty payments across all NFT marketplaces and ecosystem participants.
*
* _Available since v4.5._
*/
interface IERC2981Upgradeable is IERC165Upgradeable {
/**
* @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
* exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
*/
function royaltyInfo(
uint256 tokenId,
uint256 salePrice
) external view returns (address receiver, uint256 royaltyAmount);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
function __ERC165_init() internal onlyInitializing {
}
function __ERC165_init_unchained() internal onlyInitializing {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165Upgradeable).interfaceId;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts 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
// 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.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)
pragma solidity ^0.8.2;
import "../beacon/IBeaconUpgradeable.sol";
import "../../interfaces/IERC1967Upgradeable.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._
*/
abstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {
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 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) {
AddressUpgradeable.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 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 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) {
AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), 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
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721A.
*/
interface IERC721AUpgradeable {
/**
* 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
pragma solidity ^0.8.0;
library ERC721AStorage {
// Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
struct TokenApprovalRef {
address value;
}
struct Layout {
// =============================================================
// STORAGE
// =============================================================
// The next token ID to be minted.
uint256 _currentIndex;
// The number of tokens burned.
uint256 _burnCounter;
// Token name
string _name;
// Token symbol
string _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) _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0..63] `balance`
// - [64..127] `numberMinted`
// - [128..191] `numberBurned`
// - [192..255] `aux`
mapping(address => uint256) _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => ERC721AStorage.TokenApprovalRef) _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) _operatorApprovals;
}
bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.ERC721A');
function layout() internal pure returns (Layout storage l) {
bytes32 slot = STORAGE_SLOT;
assembly {
l.slot := slot
}
}
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import '../IERC721AUpgradeable.sol';
/**
* @dev Interface of ERC721AQueryable.
*/
interface IERC721AQueryableUpgradeable is IERC721AUpgradeable {
/**
* Invalid query range (`start` >= `stop`).
*/
error InvalidQueryRange();
/**
* @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
*
* If the `tokenId` is out of bounds:
*
* - `addr = address(0)`
* - `startTimestamp = 0`
* - `burned = false`
* - `extraData = 0`
*
* If the `tokenId` is burned:
*
* - `addr = <Address of owner before token was burned>`
* - `startTimestamp = <Timestamp when token was burned>`
* - `burned = true`
* - `extraData = <Extra data when token was burned>`
*
* Otherwise:
*
* - `addr = <Address of owner>`
* - `startTimestamp = <Timestamp of start of ownership>`
* - `burned = false`
* - `extraData = <Extra data at start of ownership>`
*/
function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);
/**
* @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
* See {ERC721AQueryable-explicitOwnershipOf}
*/
function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);
/**
* @dev Returns an array of token IDs owned by `owner`,
* in the range [`start`, `stop`)
* (i.e. `start <= tokenId < stop`).
*
* This function allows for tokens to be queried if the collection
* grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
*
* Requirements:
*
* - `start < stop`
*/
function tokensOfOwnerIn(
address owner,
uint256 start,
uint256 stop
) external view returns (uint256[] memory);
/**
* @dev Returns an array of token IDs owned by `owner`.
*
* This function scans the ownership mapping and is O(`totalSupply`) in complexity.
* It is meant to be called off-chain.
*
* See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
* multiple smaller scans if the collection is large enough to cause
* an out-of-gas error (10K collections should be fine).
*/
function tokensOfOwner(address owner) external view returns (uint256[] memory);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev This is a base storage for the initialization function for upgradeable diamond facet contracts
**/
library ERC721A__InitializableStorage {
struct Layout {
/*
* Indicates that the contract has been initialized.
*/
bool _initialized;
/*
* Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.initializable.facet');
function layout() internal pure returns (Layout storage l) {
bytes32 slot = STORAGE_SLOT;
assembly {
l.slot := slot
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/// @notice Library for generating psuedorandom numbers.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibPRNG.sol)
library LibPRNG {
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* STRUCTS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev A psuedorandom number state in memory.
struct PRNG {
uint256 state;
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* OPERATIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Seeds the `prng` with `state`.
function seed(PRNG memory prng, uint256 state) internal pure {
/// @solidity memory-safe-assembly
assembly {
mstore(prng, state)
}
}
/// @dev Returns the next psuedorandom uint256.
/// All bits of the returned uint256 pass the NIST Statistical Test Suite.
function next(PRNG memory prng) internal pure returns (uint256 result) {
// We simply use `keccak256` for a great balance between
// runtime gas costs, bytecode size, and statistical properties.
//
// A high-quality LCG with a 32-byte state
// is only about 30% more gas efficient during runtime,
// but requires a 32-byte multiplier, which can cause bytecode bloat
// when this function is inlined.
//
// Using this method is about 2x more efficient than
// `nextRandomness = uint256(keccak256(abi.encode(randomness)))`.
/// @solidity memory-safe-assembly
assembly {
result := keccak256(prng, 0x20)
mstore(prng, result)
}
}
/// @dev Returns a psuedorandom uint256, uniformly distributed
/// between 0 (inclusive) and `upper` (exclusive).
/// If your modulus is big, this method is recommended
/// for uniform sampling to avoid modulo bias.
/// For uniform sampling across all uint256 values,
/// or for small enough moduli such that the bias is neligible,
/// use {next} instead.
function uniform(PRNG memory prng, uint256 upper) internal pure returns (uint256 result) {
/// @solidity memory-safe-assembly
assembly {
for {} 1 {} {
result := keccak256(prng, 0x20)
mstore(prng, result)
if iszero(lt(result, mod(sub(0, upper), upper))) { break }
}
result := mod(result, upper)
}
}
/// @dev Shuffles the array in-place with Fisher-Yates shuffle.
function shuffle(PRNG memory prng, uint256[] memory a) internal pure {
/// @solidity memory-safe-assembly
assembly {
let n := mload(a)
let w := not(0)
let mask := shr(128, w)
if n {
for { a := add(a, 0x20) } 1 {} {
// We can just directly use `keccak256`, cuz
// the other approaches don't save much.
let r := keccak256(prng, 0x20)
mstore(prng, r)
// Note that there will be a very tiny modulo bias
// if the length of the array is not a power of 2.
// For all practical purposes, it is negligible
// and will not be a fairness or security concern.
{
let j := add(a, shl(5, mod(shr(128, r), n)))
n := add(n, w) // `sub(n, 1)`.
if iszero(n) { break }
let i := add(a, shl(5, n))
let t := mload(i)
mstore(i, mload(j))
mstore(j, t)
}
{
let j := add(a, shl(5, mod(and(r, mask), n)))
n := add(n, w) // `sub(n, 1)`.
if iszero(n) { break }
let i := add(a, shl(5, n))
let t := mload(i)
mstore(i, mload(j))
mstore(j, t)
}
}
}
}
}
/// @dev Shuffles the bytes in-place with Fisher-Yates shuffle.
function shuffle(PRNG memory prng, bytes memory a) internal pure {
/// @solidity memory-safe-assembly
assembly {
let n := mload(a)
let w := not(0)
let mask := shr(128, w)
if n {
let b := add(a, 0x01)
for { a := add(a, 0x20) } 1 {} {
// We can just directly use `keccak256`, cuz
// the other approaches don't save much.
let r := keccak256(prng, 0x20)
mstore(prng, r)
// Note that there will be a very tiny modulo bias
// if the length of the array is not a power of 2.
// For all practical purposes, it is negligible
// and will not be a fairness or security concern.
{
let o := mod(shr(128, r), n)
n := add(n, w) // `sub(n, 1)`.
if iszero(n) { break }
let t := mload(add(b, n))
mstore8(add(a, n), mload(add(b, o)))
mstore8(add(a, o), t)
}
{
let o := mod(and(r, mask), n)
n := add(n, w) // `sub(n, 1)`.
if iszero(n) { break }
let t := mload(add(b, n))
mstore8(add(a, n), mload(add(b, o)))
mstore8(add(a, o), t)
}
}
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165Upgradeable {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
*
* _Available since v4.8.3._
*/
interface IERC1967Upgradeable {
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Emitted when the beacon is changed.
*/
event BeaconUpgraded(address indexed beacon);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.0;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
* _Available since v4.9 for `string`, `bytes`._
*/
library StorageSlotUpgradeable {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}{
"remappings": [
"forge-std/=lib/forge-std/src/",
"solmate/=lib/solmate/src/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"openzeppelin/=lib/openzeppelin-contracts/contracts/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"solady/=lib/solady/src/",
"closedsea/=lib/closedsea/",
"erc721a-upgradeable/=lib/ERC721A-Upgradeable/",
"ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"erc721a/=lib/closedsea/lib/erc721a/contracts/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"openzeppelin-upgrades/=lib/openzeppelin-upgrades/",
"operator-filter-registry/=lib/closedsea/lib/operator-filter-registry/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "london",
"viaIR": true,
"libraries": {}
}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":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","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":"Bonds","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BurningBondsOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Minting","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SVGRendering","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Seigniorage","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SeigniorageOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"slot","type":"uint8"},{"internalType":"address","name":"operator","type":"address"}],"name":"addWhitelistSlot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","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":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721AUpgradeable.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721AUpgradeable.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"quantity","type":"uint256"},{"internalType":"address","name":"minter","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","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":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"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":"address","name":"bonds","type":"address"}],"name":"setBonds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"onOf","type":"bool"}],"name":"setBoolBonds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"onOf","type":"bool"}],"name":"setBoolSeigniorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minting","type":"address"}],"name":"setMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"render","type":"address"}],"name":"setRender","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"seigniorage","type":"address"}],"name":"setSeigniorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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
60a08060405234610031573060805261493b90816100378239608051818181610b40015281816110fb01526112110152f35b600080fdfe60806040526004361015610013575b600080fd5b60003560e01c8063019d0b371461035b57806301ffc9a71461035257806304634d8d1461034957806306fdde0314610340578063081812fc14610337578063095ea7b31461032e5780630e017dde1461032557806318160ddd1461031c57806323b872dd146103135780632a55205a1461030a5780633659cfe61461030157806342842e0e146102f857806342966c68146102ef5780634762354c146102e65780634f1ef286146102dd57806352d1902d146102d457806356eae195146102cb5780635bbb2177146102c25780636352211e146102b95780636a0469c5146102b057806370a08231146102a7578063715018a61461029e57806380c90d30146102955780638129fc1c1461028c5780638462151c14610283578063851857211461027a57806389024913146102715780638da5cb5b1461026857806394bf804d1461025f57806395d89b411461025657806399a2557a1461024d578063a22cb46514610244578063a3e4160e1461023b578063a65a3f5a14610232578063b88d4fde14610229578063c23dc68f14610220578063c87b56dd14610217578063cfa6097b1461020e578063d83ec27014610205578063e985e9c5146101fc578063f0c136cb146101f35763f2fde38b146101eb57600080fd5b61000e611e08565b5061000e611dc4565b5061000e611d86565b5061000e611d44565b5061000e611d19565b5061000e611c6b565b5061000e611c07565b5061000e611aaa565b5061000e611a82565b5061000e611a0f565b5061000e61196a565b5061000e611931565b5061000e61187a565b5061000e6117ae565b5061000e611784565b5061000e611740565b5061000e6116fc565b5061000e611647565b5061000e611509565b5061000e6114de565b5061000e61147f565b5061000e611453565b5061000e611411565b5061000e6113d2565b5061000e61136c565b5061000e6112c3565b5061000e6111fd565b5061000e6110bd565b5061000e610f8e565b5061000e610e1a565b5061000e610c66565b5061000e610b1c565b5061000e610a5a565b5061000e610937565b5061000e6108ae565b5061000e610883565b5061000e610784565b5061000e6106c2565b5061000e6105ca565b5061000e610481565b5061000e6103e6565b5061000e610390565b600435906001600160a01b038216820361000e57565b602435906001600160a01b038216820361000e57565b503461000e57602036600319011261000e576103aa610364565b6103b26123f1565b61013080546001600160a01b0319166001600160a01b03909216919091179055005b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e576020600435610406816103d4565b63ffffffff60e01b166301ffc9a760e01b81149081908215610470575b821561045f575b821561043d575b50506040519015158152f35b63152a902d60e11b1491508115610457575b503880610431565b90503861044f565b635b5e139f60e01b8114925061042a565b6380ac58cd60e01b81149250610423565b503461000e57604036600319011261000e5761049b610364565b6024356bffffffffffffffffffffffff811680910361000e576104bc6123f1565b612710811161051657610514916001600160a01b0316906104de821515612f42565b604051916104eb83610fcd565b808352602090920181905260a01b6001600160a01b0319166001600160a01b0390911617603355565b005b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b60005b8381106105815750506000910152565b8181015183820152602001610571565b906020916105aa8151809281855285808601910161056e565b601f01601f1916010190565b9060206105c7928181520190610591565b90565b503461000e576000806003193601126106bf5760405190806000805160206148c6833981519152908154906105fe82611f3f565b808652926001928084169081156106925750600114610638575b610634866106288188038261102b565b604051918291826105b6565b0390f35b815292507f933ecf8acb7824b680a8d16f3ff3db8864228d986aa4c2ebab1eeb2703b4beb35b82841061067a5750505081016020016106288261063438610618565b8054602085870181019190915290930192810161065e565b90508695506106349693506020925061062894915060ff191682840152151560051b820101929338610618565b80fd5b503461000e57602036600319011261000e5760043580600111158061076c575b80610731575b1561071f57600090815260008051602061488683398151915260209081526040918290205491516001600160a01b03909216825290f35b6040516333d1c03960e21b8152600490fd5b5060008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c446020526040902054600160e01b16156106e8565b506000805160206148468339815191525481106106e2565b50604036600319011261000e57610799610364565b6024356001600160a01b0382811690731e0049783f008a0085193e00003d00cd54003c70198201610875575b6107ce83611fa8565b16803303610837575b60008381526000805160206148868339815191526020526040812080546001600160a01b0319166001600160a01b03909616959095179094557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b60ff61085d3361084684611e96565b9060018060a01b0316600052602052604060002090565b54166107d7576040516367d9dca160e11b8152600490fd5b61087e8461450b565b6107c5565b503461000e57600036600319011261000e57610133546040516001600160a01b039091168152602090f35b503461000e57600036600319011261000e57600080516020614846833981519152547f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c41546040519103600019018152602090f35b606090600319011261000e576001600160a01b0390600435828116810361000e5791602435908116810361000e579060443590565b5061094136610902565b6001600160a01b0392909190808416338103610a30575b60ff6101335460a01c169081610a25575b50806109e2575b61051494501561458557610131546109dd9060009081906001600160a01b03166040516349779bed60e01b602082019081526001600160a01b03871660248301529083906109cb81604481015b03601f19810183528261102b565b51925af16109d7612811565b5061454b565b614585565b506000805b600381106109fb575b506105149450610970565b33868260c901541614610a1657610a1190612fd6565b6109e7565b505061051493506001386109f0565b905033141538610969565b731e0049783f008a0085193e00003d00cd54003c7133031561095857610a553361450b565b610958565b503461000e57604036600319011261000e576127106024356004356000526034602052610a8a60406000206127d5565b80516001600160a01b031615610b05575b610ad4816bffffffffffffffffffffffff60206106349401511693848102948186041490151715610af8575b516001600160a01b031690565b604080516001600160a01b0390921682529390920460208301529091829190820190565b610b006127fa565b610ac7565b50610634610ad4610b146127af565b915050610a9b565b503461000e57602036600319011261000e57610b36610364565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169190610b6f30841415612492565b610b8c6000805160206148a68339815191529382855416146124f3565b610b946123f1565b60405190610ba182610ff5565b600082527f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610bdb5750506105149150612610565b6020600491604094939451928380926352d1902d60e01b825286165afa60009181610c36575b50610c235760405162461bcd60e51b815280610c1f600482016125c1565b0390fd5b61051493610c319114612563565b6126a0565b610c5891925060203d8111610c5f575b610c50818361102b565b810190612554565b9038610c01565b503d610c46565b50610c7036610902565b6001600160a01b038381163381141594929085610df0575b60405192610c9584610ff5565b60009680888652610dc6575b610d9c575b60ff6101335460a01c169182610d91575b5081610d54575b50610d08575b610ccf818585614585565b833b610cd9578480f35b610cea93610ce69361473e565b1590565b610cf657388080808480f35b6040516368d2bf6b60e11b8152600490fd5b61013154610d4f90869081906001600160a01b03165b6040516349779bed60e01b602082019081526001600160a01b03891660248301529083906109cb81604481016109bd565b610cc4565b869150815b60038110610d6a575b505038610cbe565b33828260c901541614610d8557610d8090612fd6565b610d59565b50505060013880610d62565b331415915038610cb7565b731e0049783f008a0085193e00003d00cd54003c71330315610ca657610dc13361450b565b610ca6565b731e0049783f008a0085193e00003d00cd54003c71330315610ca157610deb3361450b565b610ca1565b731e0049783f008a0085193e00003d00cd54003c71330315610c8857610e153361450b565b610c88565b503461000e57602036600319011261000e5761013254600435906001600160a01b03908116330361000e57600160ff6101335460a81c1615150361000e57600090610e6483611fa8565b600084815260008051602061488683398151915260205260409020805492821692610f85575b50610e9482611ecf565b80546fffffffffffffffffffffffffffffffff0190554260a01b8217600360e01b17610ebf85611f79565b55600160e11b811615610f44575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a4610514610f207f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c415460010190565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4155565b60018401610f5181611f79565b5415610f5e575b50610ecd565b600080516020614846833981519152548114610f5857610f7d90611f79565b553880610f58565b83905538610e8a565b503461000e57600036600319011261000e57602060ff6101335460a01c166040519015158152f35b50634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b03821117610fe857604052565b610ff0610fb6565b604052565b602081019081106001600160401b03821117610fe857604052565b606081019081106001600160401b03821117610fe857604052565b90601f801991011681019081106001600160401b03821117610fe857604052565b6020906001600160401b038111611069575b601f01601f19160190565b611071610fb6565b61105e565b81601f8201121561000e5780359061108d8261104c565b9261109b604051948561102b565b8284526020838301011161000e57816000926020809301838601378301015290565b50604036600319011261000e576110d2610364565b6024356001600160401b03811161000e576110f1903690600401611076565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811692919061112b30851415612492565b6111486000805160206148a68339815191529482865416146124f3565b6111506123f1565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156111865750506105149150612610565b6020600491604094939451928380926352d1902d60e01b825286165afa600091816111dd575b506111ca5760405162461bcd60e51b815280610c1f600482016125c1565b610514936111d89114612563565b61275c565b6111f691925060203d8111610c5f57610c50818361102b565b90386111ac565b503461000e57600036600319011261000e577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163003611258576040516000805160206148a68339815191528152602090f35b60405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608490fd5b503461000e57600036600319011261000e57610131546040516001600160a01b039091168152602090f35b6020908160408183019282815285518094520193019160005b828110611315575050505090565b9091929382608082611360600194895162ffffff6060809260018060a01b0381511685526001600160401b036020820151166020860152604081015115156040860152015116910152565b01950193929101611307565b503461000e57602036600319011261000e576001600160401b0360043581811161000e573660238201121561000e57806004013591821161000e573660248360051b8301011161000e576106349160246113c692016121c0565b604051918291826112ee565b503461000e57602036600319011261000e5760206001600160a01b036113f9600435611fa8565b16604051908152f35b60043590811515820361000e57565b503461000e57602036600319011261000e5761142b611402565b6114336123f1565b610133805460ff60a81b191691151560a81b60ff60a81b16919091179055005b503461000e57602036600319011261000e576020611477611472610364565b611f08565b604051908152f35b503461000e576000806003193601126106bf5761149a6123f1565b609780546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57600036600319011261000e57610130546040516001600160a01b039091168152602090f35b503461000e576000806003193601126106bf576000805160206148e68339815191525460ff8160081c1690816000146116035750303b155b15611598571580611577575b6115556128d2565b61155c5780f35b6000805160206148e6833981519152805461ff001916905580f35b6000805160206148e6833981519152805461ffff191661010117905561154d565b60405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608490fd5b60ff1615611541565b6020908160408183019282815285518094520193019160005b828110611633575050505090565b835185529381019392810192600101611625565b503461000e57602036600319011261000e57611661610364565b6000809161166e81611f08565b6116778161225f565b92611680612035565b506001926001600160a01b0390811690845b8484036116a75760405180610634898261160c565b816116b1826120e4565b8760408201516116f357505116806116eb575b50859083838a16146116d7575b01611692565b806116e5838701968a61219e565b526116d1565b9750856116c4565b929150506116d1565b503461000e57602036600319011261000e57611716610364565b61171e6123f1565b61013180546001600160a01b0319166001600160a01b03909216919091179055005b503461000e57602036600319011261000e5761175a610364565b6117626123f1565b61013280546001600160a01b0319166001600160a01b03909216919091179055005b503461000e57600036600319011261000e576097546040516001600160a01b039091168152602090f35b503461000e57604036600319011261000e576004356117cb61037a565b610130549091906001600160a01b0316330361184557600080516020614846833981519152549160005b828110611806576105148383613855565b8061181c6118176118409387613848565b613970565b61183a6118298388613848565b600052610134602052604060002090565b55612fd6565b6117f5565b60405162461bcd60e51b815260206004820152600d60248201526c1393d517d0555513d492569151609a1b6044820152606490fd5b503461000e576000806003193601126106bf576040519080600080516020614866833981519152908154906118ae82611f3f565b8086529260019280841690811561069257506001146118d757610634866106288188038261102b565b815292507f617167b76dcc8247761fd21f427ad8ec3be6b3be203aed34e3aac08b4d31817c5b8284106119195750505081016020016106288261063438610618565b805460208587018101919091529093019281016118fd565b503461000e57606036600319011261000e5761063461195e611951610364565b6044359060243590612291565b6040519182918261160c565b503461000e57604036600319011261000e57611984610364565b60243580151580910361000e576001600160a01b038216916119c690731e0049783f008a0085193e00003d00cd54003c70198401611a01575b61084633611e96565b60ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b611a0a8161450b565b6119bd565b503461000e57604036600319011261000e5760043560ff81169081810361000e576003611a3a61037a565b92611a436123f1565b101561000e576003811015611a75575b60c90180546001600160a01b0319166001600160a01b03909216919091179055005b611a7d612187565b611a53565b503461000e57600036600319011261000e57602060ff6101335460a81c166040519015158152f35b50608036600319011261000e57611abf610364565b611ac761037a565b906044356064356001600160401b03811161000e57611aea903690600401611076565b906001600160a01b03838116903382141580611bdd575b611bb3575b60ff6101335460a01c169182611ba8575b5081611b6a575b50611b4a575b611b2f818585614585565b833b611b3757005b611b4493610ce69361473e565b610cf657005b61013154611b659060009081906001600160a01b0316610d1e565b611b24565b60009150815b60038110611b81575b505038611b1e565b33828260c901541614611b9c57611b9790612fd6565b611b70565b50505060013880611b79565b331415915038611b17565b731e0049783f008a0085193e00003d00cd54003c71330315611b0657611bd83361450b565b611b06565b731e0049783f008a0085193e00003d00cd54003c71330315611b0157611c023361450b565b611b01565b503461000e57602036600319011261000e576080611c26600435612078565b611c69604051809262ffffff6060809260018060a01b0381511685526001600160401b036020820151166020860152604081015115156040860152015116910152565bf35b503461000e5760208060031936011261000e5760008060018060a01b036101335416600435825261013484526040822054604051858101916330c8446360e21b8352602482015260248152611cbf81611010565b51915afa90611ccc612811565b9115611ce757818161062892610634945183010191016147e7565b6064906040519062461bcd60e51b82526004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152fd5b503461000e57600036600319011261000e57610132546040516001600160a01b039091168152602090f35b503461000e57602036600319011261000e57611d5e611402565b611d666123f1565b610133805460ff60a01b191691151560a01b60ff60a01b16919091179055005b503461000e57604036600319011261000e57602060ff611db8611da7610364565b610846611db261037a565b91611e96565b54166040519015158152f35b503461000e57602036600319011261000e57611dde610364565b611de66123f1565b61013380546001600160a01b0319166001600160a01b03909216919091179055005b503461000e57602036600319011261000e57611e22610364565b611e2a6123f1565b6001600160a01b03811615611e425761051490612449565b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b6001600160a01b031660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020526040902090565b6001600160a01b031660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c456020526040902090565b6001600160a01b03811615611f2d57611f286001600160401b0391611ecf565b541690565b6040516323d3ad8160e21b8152600490fd5b90600182811c92168015611f6f575b6020831014611f5957565b634e487b7160e01b600052602260045260246000fd5b91607f1691611f4e565b6000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c44602052604060002090565b60019080821115611fc6575b604051636f96cda160e11b8152600490fd5b611fcf81611f79565b5491600160e01b831615611fe35750611fb4565b8215611fee57505090565b60008051602061484683398151915254821015611fb45790815b61201157505090565b9091506000190161202181611f79565b5491821561202e57505090565b9081612008565b60405190608082018281106001600160401b0382111761206b575b60405260006060838281528260208201528260408201520152565b612073610fb6565b612050565b612080612035565b50612089612035565b6001821080156120cb575b6120c657506120a2816120e4565b60408101516120c657506120c16105c7916120bb612035565b50611fa8565b61211e565b905090565b5060008051602061484683398151915254821015612094565b6120ec612035565b506000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c446020526105c76040600020545b90612127612035565b6001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b83161515604082015260e89290921c6060830152565b6020906001600160401b03811161217a575b60051b0190565b612182610fb6565b612173565b50634e487b7160e01b600052603260045260246000fd5b60209181518110156121b3575b60051b010190565b6121bb612187565b6121ab565b906121ca81612161565b916121d8604051938461102b565b818352601f196121e783612161565b0160005b81811061224857505060005b8281036122045750505090565b8083600192101561223b575b61221f8160051b840135612078565b612229828761219e565b52612234818661219e565b50016121f7565b612243612187565b612210565b602090612253612035565b828288010152016121eb565b9061226982612161565b612276604051918261102b565b8281528092612287601f1991612161565b0190602036910137565b90828110156123df5760009160008051602061484683398151915254916001928382106123d7575b8086116123cf575b506122cb82611f08565b91858210156123c7578186038381106123bf575b505b6122ea8361225f565b9583156123b65784936122fc84612078565b918794604093612311610ce686830151151590565b6123a4575b50955b61232a575b50505050505050815290565b808614158061239a575b1561239557868661234582986120e4565b8086015161238f57516001600160a01b0390811680612387575b5080871690881614612373575b0195612319565b80612381838c019b8d61219e565b5261236c565b97503861235f565b5061236c565b61231e565b5081881415612334565b516001600160a01b0316955038612316565b50505050505090565b9250386122df565b8492506122e1565b9450386122c1565b8391506122b9565b604051631960ccad60e11b8152600490fd5b6097546001600160a01b0316330361240557565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b609780546001600160a01b039283166001600160a01b0319821681179092559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b1561249957565b60405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608490fd5b156124fa57565b60405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608490fd5b9081602091031261000e575190565b1561256a57565b60405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608490fd5b60809060208152602e60208201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960408201526d6f6e206973206e6f74205555505360901b60608201520190565b803b15612645576000805160206148a683398151915280546001600160a01b0319166001600160a01b03909216919091179055565b60405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b906126aa82612610565b6001600160a01b0382167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2805115801590612754575b6126ec575050565b612751916000806040519361270085611010565b602785527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c6020860152660819985a5b195960ca1b6040860152602081519101845af461274b612811565b91612841565b50565b5060006126e4565b9061276682612610565b6001600160a01b0382167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a28051158015906127a7576126ec575050565b5060016126e4565b604051906127bc82610fcd565b6033546001600160a01b038116835260a01c6020830152565b906040516127e281610fcd565b91546001600160a01b038116835260a01c6020830152565b50634e487b7160e01b600052601160045260246000fd5b3d1561283c573d906128228261104c565b91612830604051938461102b565b82523d6000602084013e565b606090565b919290156128a35750815115612855575090565b3b1561285e5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156128b65750805190602001fd5b60405162461bcd60e51b8152908190610c1f90600483016105b6565b60005460ff8160081c1615809181926129ed575b81156129cd575b50156129715780612906600160ff196000541617600055565b612958575b6129136129fb565b61291957565b61292961ff001960005416600055565b604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a1565b61296c61010061ff00196000541617600055565b61290b565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b303b159150816129df575b50386128ed565b6001915060ff1614386129d8565b600160ff82161091506128e6565b60405190612a0882610fcd565b600b825260206a29b6b7b6102237b63630b960a91b8184015260405190612a2e82610fcd565b6005825264286f5f6f2960d81b81830152612a6660ff6000805160206148e68339815191525460081c16612a6181612bd8565b612bd8565b83516001600160401b038111612bcb575b6000805160206148c683398151915291612a9a82612a958554611f3f565b612c41565b80601f8311600114612b2d57508190612acf9596600092612b22575b50508160011b916000199060031b1c1916179055612d3d565b612ae6600160008051602061484683398151915255565b612aee612f0e565b612af6612f31565b612afe612f31565b612b06612e50565b612b0f33612f8e565b610133805461ffff60a01b19169055565b565b015190503880612ab6565b90601f19831696612b6d6000805160206148c68339815191526000527f933ecf8acb7824b680a8d16f3ff3db8864228d986aa4c2ebab1eeb2703b4beb390565b926000905b898210612bb357505090839291600194612acf989910612b9a575b505050811b019055612d3d565b015160001960f88460031b161c19169055388080612b8d565b80600185968294968601518155019501930190612b72565b612bd3610fb6565b612a77565b15612bdf57565b60405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604482015273206973206e6f7420696e697469616c697a696e6760601b6064820152608490fd5b601f8111612c4d575050565b6000906000805160206148c683398151915282527f933ecf8acb7824b680a8d16f3ff3db8864228d986aa4c2ebab1eeb2703b4beb3906020601f850160051c83019410612cb5575b601f0160051c01915b828110612caa57505050565b818155600101612c9e565b9092508290612c95565b601f8111612ccb575050565b60009060008051602061486683398151915282527f617167b76dcc8247761fd21f427ad8ec3be6b3be203aed34e3aac08b4d31817c906020601f850160051c83019410612d33575b601f0160051c01915b828110612d2857505050565b818155600101612d1c565b9092508290612d13565b9081516001600160401b038111612e43575b60008051602061486683398151915290612d7281612d6d8454611f3f565b612cbf565b602080601f8311600114612dae575081929394600092612da3575b50508160011b916000199060031b1c1916179055565b015190503880612d8d565b90601f19831695612dee6000805160206148668339815191526000527f617167b76dcc8247761fd21f427ad8ec3be6b3be203aed34e3aac08b4d31817c90565b926000905b888210612e2b57505083600195969710612e12575b505050811b019055565b015160001960f88460031b161c19169055388080612e08565b80600185968294968601518155019501930190612df3565b612e4b610fb6565b612d4f565b6000633e9f1edf60e11b815230600452733cc6cdda760b79bafa08df41ecfa224f810dceb6602452600481604481806daaeb6d7670e522a718067333cd4e5af115612e9a57602452565b637d3e3dbe815160e01c146106bf57602452565b15612eb557565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b612f2860ff60005460081c16612f2381612eae565b612eae565b612b2033612449565b612b2060ff60005460081c16612eae565b15612f4957565b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b612b20906001600160a01b0316612fa6811515612f42565b60405190612fb382610fcd565b8082526103846020909201919091526001600160a01b031660e160a21b17603355565b6001906000198114612fe6570190565b612fee6127fa565b0190565b90610514820180921161300157565b612b206127fa565b906104b0820180921161300157565b9061044c820180921161300157565b906103e8820180921161300157565b90610384820180921161300157565b90610320820180921161300157565b906102bc820180921161300157565b90610258820180921161300157565b906101f4820180921161300157565b90610190820180921161300157565b9061012c820180921161300157565b9060c8820180921161300157565b906064820180921161300157565b90617530820180921161300157565b90614e20820180921161300157565b90612710820180921161300157565b90624c4b40820180921161300157565b90623d0900820180921161300157565b90622dc6c0820180921161300157565b90621e8480820180921161300157565b90620f4240820180921161300157565b90640165a0bc00820180921161300157565b9064015faadb00820180921161300157565b90640159b4fa00820180921161300157565b90640153bf1900820180921161300157565b9064014dc93800820180921161300157565b90640147d35700820180921161300157565b90640141dd7600820180921161300157565b9064013be79500820180921161300157565b90640135f1b400820180921161300157565b9064012ffbd300820180921161300157565b9064012a05f200820180921161300157565b90640124101100820180921161300157565b9064011e1a3000820180921161300157565b90640118244f00820180921161300157565b906401122e6e00820180921161300157565b9064010c388d00820180921161300157565b9064010642ac00820180921161300157565b906401004ccb00820180921161300157565b9063fa56ea00820180921161300157565b9063f4610900820180921161300157565b9063ee6b2800820180921161300157565b9063e8754700820180921161300157565b9063e27f6600820180921161300157565b9063dc898500820180921161300157565b9063d693a400820180921161300157565b9063d09dc300820180921161300157565b9063caa7e200820180921161300157565b9063c4b20100820180921161300157565b9063bebc2000820180921161300157565b9063b8c63f00820180921161300157565b9063b2d05e00820180921161300157565b9063acda7d00820180921161300157565b9063a6e49c00820180921161300157565b9063a0eebb00820180921161300157565b90639af8da00820180921161300157565b90639502f900820180921161300157565b90638f0d1800820180921161300157565b906389173700820180921161300157565b906383215600820180921161300157565b90637d2b7500820180921161300157565b906377359400820180921161300157565b9063713fb300820180921161300157565b90636b49d200820180921161300157565b90636553f100820180921161300157565b90635f5e1000820180921161300157565b906359682f00820180921161300157565b906353724e00820180921161300157565b90634d7c6d00820180921161300157565b906347868c00820180921161300157565b90634190ab00820180921161300157565b90633b9aca00820180921161300157565b906335a4e900820180921161300157565b90632faf0800820180921161300157565b906329b92700820180921161300157565b906323c34600820180921161300157565b90631dcd6500820180921161300157565b906317d78400820180921161300157565b906311e1a300820180921161300157565b90630bebc200820180921161300157565b906305f5e100820180921161300157565b9064358d117c00820180921161300157565b90643339059800820180921161300157565b906430e4f9b400820180921161300157565b90642e90edd000820180921161300157565b90642c3ce1ec00820180921161300157565b906429e8d60800820180921161300157565b90642794ca2400820180921161300157565b90642540be4000820180921161300157565b906422ecb25c00820180921161300157565b90642098a67800820180921161300157565b90641e449a9400820180921161300157565b90641bf08eb000820180921161300157565b9064199c82cc00820180921161300157565b9064174876e800820180921161300157565b906414f46b0400820180921161300157565b906412a05f2000820180921161300157565b9064104c533c00820180921161300157565b90640df8475800820180921161300157565b90640ba43b7400820180921161300157565b906409502f9000820180921161300157565b906406fc23ac00820180921161300157565b906404a817c800820180921161300157565b906402540be400820180921161300157565b906503a352944000820180921161300157565b906502ba7def3000820180921161300157565b906501d1a94a2000820180921161300157565b9064e8d4a51000820180921161300157565b9066016bcc41e90000820180921161300157565b90660110d9316ec000820180921161300157565b9065b5e620f48000820180921161300157565b90655af3107a4000820180921161300157565b9067013fbe85edc90000820180921161300157565b9067011c37937e080000820180921161300157565b9066f8b0a10e470000820180921161300157565b9066d529ae9e860000820180921161300157565b9066b1a2bc2ec50000820180921161300157565b90668e1bc9bf040000820180921161300157565b90666a94d74f430000820180921161300157565b9066470de4df820000820180921161300157565b90662386f26fc10000820180921161300157565b90670de0b6b3a7640000820180921161300157565b9190820180921161300157565b906000805160206148468339815191525491811561391e5761387681611ecf565b80546801000000000000000184020190556001600160a01b0316906001904260a01b82821460e11b1783176138aa85611f79565b558301926000827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92808684868180a4015b85810361390f5750505050156138fe5760008051602061484683398151915255565b604051622e076360e81b8152600490fd5b8084918684868180a4016138dc565b60405163b562e8dd60e01b8152600490fd5b60405190602082018281106001600160401b03821117613954575b60405260008252565b61395c610fb6565b61394b565b60001981019190821161300157565b61398b61397b613930565b9161398543613961565b40613848565b815261399681614410565b906139a08161442f565b906139aa8161444e565b906139b48161446d565b916139be8261448e565b906139c8836144ae565b906139d2846144cd565b946139e56139df866144ec565b9561442f565b966063906001998a81106000146142ef57505b898110156142ac5750915b8881101561424357505b87811015613d9a5750915b86811015613bc357505b6002811015613b6d5750915b6002811015613b1857505b6002811015613a635750915b811015613a50575090565b600b11613a5a5790565b6105c790613833565b6005811015613a7d5750613a769061381f565b915b613a45565b600c811015613a905750613a769061380b565b6014811015613aa35750613a76906137f7565b601d811015613ab65750613a76906137e3565b6027811015613ac95750613a76906137cf565b6032811015613adc5750613a76906137bb565b603e811015613aef5750613a76906137a7565b604b811015613b025750613a7690613792565b6059909391931015613a785791613a769061377d565b6003811015613b33575090613b2c9061376a565b905b613a39565b6006811015613b47575090613b2c90613757565b6009811015613b5b575090613b2c90613743565b600f1115613b2e5790613b2c9061372f565b6004811015613b875750613b809061371d565b915b613a2e565b6008811015613b9a5750613b809061370a565b600e811015613bad5750613b80906136f7565b601c909391931015613b825791613b80906136e4565b6003811015613bdd575090613bd7906136d2565b90613a22565b6006811015613bf1575090613bd7906136c0565b600a811015613c05575090613bd7906136ae565b600f811015613c19575090613bd79061369c565b6015811015613c2d575090613bd79061368a565b601c811015613c41575090613bd790613678565b6024811015613c55575090613bd790613666565b602d811015613c69575090613bd790613654565b6037811015613c7d575090613bd790613642565b6042811015613c91575090613bd790613630565b604e811015613ca5575090613bd79061361e565b605b811015613cb9575090613bd79061360c565b6069811015613ccd575090613bd7906135fa565b6078811015613ce1575090613bd7906135e8565b6088811015613cf5575090613bd7906135d6565b6099811015613d09575090613bd7906135c4565b60ab811015613d1d575090613bd7906135b2565b60be811015613d31575090613bd7906135a0565b60d2811015613d45575090613bd79061358e565b60e7811015613d59575090613bd79061357c565b60fd811015613d72575090613bd79061356a565b613a22565b610114811015613d87575090613bd790613558565b61012c1115613d6d5790613bd790613546565b6003811015613db35750613dad90613535565b91613a18565b6006811015613dc65750613dad90613524565b600a811015613dd95750613dad90613513565b600f811015613dec5750613dad90613502565b6015811015613dff5750613dad906134f1565b601c811015613e125750613dad906134e0565b6024811015613e255750613dad906134cf565b602d811015613e385750613dad906134be565b6037811015613e4b5750613dad906134ad565b6042811015613e5e5750613dad9061349c565b604e811015613e715750613dad9061348b565b605b811015613e845750613dad9061347a565b6069811015613e975750613dad90613469565b6078811015613eaa5750613dad90613458565b6088811015613ebd5750613dad90613447565b6099811015613ed05750613dad90613436565b60ab811015613ee35750613dad90613425565b60be811015613ef65750613dad90613414565b60d2811015613f095750613dad90613403565b60e7811015613f1c5750613dad906133f2565b60fd811015613f2f5750613dad906133e1565b610114811015613f435750613dad906133d0565b61012c811015613f575750613dad906133bf565b610145811015613f6b5750613dad906133ae565b61015f811015613f7f5750613dad9061339d565b61017a811015613f935750613dad9061338c565b610196811015613fa75750613dad9061337b565b6101b3811015613fbb5750613dad9061336a565b6101d1811015613fcf5750613dad90613359565b6101f0811015613fe35750613dad90613348565b610210811015613ff75750613dad90613337565b61023181101561400b5750613dad90613326565b61025381101561401f5750613dad90613315565b6102768110156140335750613dad90613304565b61029a8110156140475750613dad906132f3565b6102bf81101561405b5750613dad906132e2565b6102e581101561406f5750613dad906132d1565b61030c8110156140835750613dad906132c0565b6103348110156140975750613dad906132af565b61035d8110156140ab5750613dad9061329e565b6103878110156140bf5750613dad9061328d565b6103b28110156140d35750613dad9061327c565b6103de8110156140e75750613dad9061326a565b61040b8110156140fb5750613dad90613258565b61043981101561410f5750613dad90613246565b6104688110156141235750613dad90613234565b6104988110156141375750613dad90613222565b6104c981101561414b5750613dad90613210565b6104fb81101561415f5750613dad906131fe565b61052e8110156141735750613dad906131ec565b6105628110156141875750613dad906131da565b61059781101561419b5750613dad906131c8565b6105cd8110156141af5750613dad906131b6565b6106048110156141c35750613dad906131a4565b61063c8110156141d75750613dad90613192565b6106758110156141eb5750613dad90613180565b6106af8110156142045750613dad9061316e565b613a18565b6106ea8110156142185750613dad9061315c565b61072681101561422c5750613dad9061314a565b6107639093919310156141ff5791613dad90613138565b600381101561425e57509061425790613128565b905b613a0d565b600681101561427257509061425790613118565b600a81101561428657509061425790613108565b600f81101561429a575090614257906130f8565b601511156142595790614257906130e8565b60038110156142c657506142bf906130d9565b915b613a03565b60068110156142d957506142bf906130ca565b600a9093919310156142c157916142bf906130bb565b6003811015614309575090614303906130ad565b906139f8565b600681101561431d5750906143039061309f565b600a81101561433157509061430390613090565b600f81101561434557509061430390613081565b601581101561435957509061430390613072565b601c81101561436d57509061430390613063565b602481101561438157509061430390613054565b602d81101561439557509061430390613045565b60378110156143ae57509061430390613036565b6139f8565b60428110156143c257509061430390613027565b604e8110156143d657509061430390613018565b605b8110156143ea57509061430390613009565b60698110156143fe57509061430390612ff2565b607811156143a9576105db91506139f8565b5b6020812080825260108110156144275750614411565b607891500690565b5b6020812080825260068110156144465750614430565b600a91500690565b5b602081208082526010811015614465575061444f565b601591500690565b5b602081208082526104da811015614485575061446e565b61076391500690565b5b6020812080825260888110156144a5575061448f565b61012c91500690565b5b6020812080825260108110156144c557506144af565b601c91500690565b5b6020812080825260028110156144e457506144ce565b600e91500690565b5b60208120808252601081101561450357506144ed565b606891500690565b60009069c6171134001122334455825230601a52603a528080604460166daaeb6d7670e522a718067333cd4e5afa1561454357603a52565b3d81803e3d90fd5b1561455257565b60405162461bcd60e51b815260206004820152600b60248201526a10d85b1b17d9985a5b195960aa1b6044820152606490fd5b9061458f83611fa8565b6001600160a01b03838116928282168490036146e757600086815260008051602061488683398151915260205260409020805490926145dd6001600160a01b03881633908114908414171590565b6146b6575b82169586156146a45761460b936145fe9261469a575b50611ecf565b8054600019019055611ecf565b80546001019055600160e11b4260a01b8417811761462886611f79565b55811615614659575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b6001840161466681611f79565b5415614673575b50614631565b60008051602061484683398151915254811461466d5761469290611f79565b55388061466d565b60009055386145f8565b604051633a954ecd60e21b8152600490fd5b6146d0610ce66146c9336108468b611e96565b5460ff1690565b156145e257604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b9081602091031261000e57516105c7816103d4565b6001600160a01b0391821681529116602082015260408101919091526080606082018190526105c792910190610591565b92602091614767936000604051809681958294630a85bd0160e11b9a8b8552336004860161470d565b03926001600160a01b03165af1600091816147b7575b506147a95761478a612811565b805190816147a4576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b6147d991925060203d81116147e0575b6147d1818361102b565b8101906146f8565b903861477d565b503d6147c7565b60208183031261000e578051906001600160401b03821161000e570181601f8201121561000e5780516148198161104c565b92614827604051948561102b565b8184526020828401011161000e576105c7916020808501910161056e56fe2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c402569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c432569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c46360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c42ee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85fa2646970667358221220eee8b58db6fc4ce2fc07ac5742881b7f8ba4da665567b99fc07539f445051d0d64736f6c63430008110033
Deployed Bytecode
0x60806040526004361015610013575b600080fd5b60003560e01c8063019d0b371461035b57806301ffc9a71461035257806304634d8d1461034957806306fdde0314610340578063081812fc14610337578063095ea7b31461032e5780630e017dde1461032557806318160ddd1461031c57806323b872dd146103135780632a55205a1461030a5780633659cfe61461030157806342842e0e146102f857806342966c68146102ef5780634762354c146102e65780634f1ef286146102dd57806352d1902d146102d457806356eae195146102cb5780635bbb2177146102c25780636352211e146102b95780636a0469c5146102b057806370a08231146102a7578063715018a61461029e57806380c90d30146102955780638129fc1c1461028c5780638462151c14610283578063851857211461027a57806389024913146102715780638da5cb5b1461026857806394bf804d1461025f57806395d89b411461025657806399a2557a1461024d578063a22cb46514610244578063a3e4160e1461023b578063a65a3f5a14610232578063b88d4fde14610229578063c23dc68f14610220578063c87b56dd14610217578063cfa6097b1461020e578063d83ec27014610205578063e985e9c5146101fc578063f0c136cb146101f35763f2fde38b146101eb57600080fd5b61000e611e08565b5061000e611dc4565b5061000e611d86565b5061000e611d44565b5061000e611d19565b5061000e611c6b565b5061000e611c07565b5061000e611aaa565b5061000e611a82565b5061000e611a0f565b5061000e61196a565b5061000e611931565b5061000e61187a565b5061000e6117ae565b5061000e611784565b5061000e611740565b5061000e6116fc565b5061000e611647565b5061000e611509565b5061000e6114de565b5061000e61147f565b5061000e611453565b5061000e611411565b5061000e6113d2565b5061000e61136c565b5061000e6112c3565b5061000e6111fd565b5061000e6110bd565b5061000e610f8e565b5061000e610e1a565b5061000e610c66565b5061000e610b1c565b5061000e610a5a565b5061000e610937565b5061000e6108ae565b5061000e610883565b5061000e610784565b5061000e6106c2565b5061000e6105ca565b5061000e610481565b5061000e6103e6565b5061000e610390565b600435906001600160a01b038216820361000e57565b602435906001600160a01b038216820361000e57565b503461000e57602036600319011261000e576103aa610364565b6103b26123f1565b61013080546001600160a01b0319166001600160a01b03909216919091179055005b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e576020600435610406816103d4565b63ffffffff60e01b166301ffc9a760e01b81149081908215610470575b821561045f575b821561043d575b50506040519015158152f35b63152a902d60e11b1491508115610457575b503880610431565b90503861044f565b635b5e139f60e01b8114925061042a565b6380ac58cd60e01b81149250610423565b503461000e57604036600319011261000e5761049b610364565b6024356bffffffffffffffffffffffff811680910361000e576104bc6123f1565b612710811161051657610514916001600160a01b0316906104de821515612f42565b604051916104eb83610fcd565b808352602090920181905260a01b6001600160a01b0319166001600160a01b0390911617603355565b005b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b60005b8381106105815750506000910152565b8181015183820152602001610571565b906020916105aa8151809281855285808601910161056e565b601f01601f1916010190565b9060206105c7928181520190610591565b90565b503461000e576000806003193601126106bf5760405190806000805160206148c6833981519152908154906105fe82611f3f565b808652926001928084169081156106925750600114610638575b610634866106288188038261102b565b604051918291826105b6565b0390f35b815292507f933ecf8acb7824b680a8d16f3ff3db8864228d986aa4c2ebab1eeb2703b4beb35b82841061067a5750505081016020016106288261063438610618565b8054602085870181019190915290930192810161065e565b90508695506106349693506020925061062894915060ff191682840152151560051b820101929338610618565b80fd5b503461000e57602036600319011261000e5760043580600111158061076c575b80610731575b1561071f57600090815260008051602061488683398151915260209081526040918290205491516001600160a01b03909216825290f35b6040516333d1c03960e21b8152600490fd5b5060008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c446020526040902054600160e01b16156106e8565b506000805160206148468339815191525481106106e2565b50604036600319011261000e57610799610364565b6024356001600160a01b0382811690731e0049783f008a0085193e00003d00cd54003c70198201610875575b6107ce83611fa8565b16803303610837575b60008381526000805160206148868339815191526020526040812080546001600160a01b0319166001600160a01b03909616959095179094557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b60ff61085d3361084684611e96565b9060018060a01b0316600052602052604060002090565b54166107d7576040516367d9dca160e11b8152600490fd5b61087e8461450b565b6107c5565b503461000e57600036600319011261000e57610133546040516001600160a01b039091168152602090f35b503461000e57600036600319011261000e57600080516020614846833981519152547f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c41546040519103600019018152602090f35b606090600319011261000e576001600160a01b0390600435828116810361000e5791602435908116810361000e579060443590565b5061094136610902565b6001600160a01b0392909190808416338103610a30575b60ff6101335460a01c169081610a25575b50806109e2575b61051494501561458557610131546109dd9060009081906001600160a01b03166040516349779bed60e01b602082019081526001600160a01b03871660248301529083906109cb81604481015b03601f19810183528261102b565b51925af16109d7612811565b5061454b565b614585565b506000805b600381106109fb575b506105149450610970565b33868260c901541614610a1657610a1190612fd6565b6109e7565b505061051493506001386109f0565b905033141538610969565b731e0049783f008a0085193e00003d00cd54003c7133031561095857610a553361450b565b610958565b503461000e57604036600319011261000e576127106024356004356000526034602052610a8a60406000206127d5565b80516001600160a01b031615610b05575b610ad4816bffffffffffffffffffffffff60206106349401511693848102948186041490151715610af8575b516001600160a01b031690565b604080516001600160a01b0390921682529390920460208301529091829190820190565b610b006127fa565b610ac7565b50610634610ad4610b146127af565b915050610a9b565b503461000e57602036600319011261000e57610b36610364565b6001600160a01b037f000000000000000000000000eb3568b3a0157cd859905cb6f40dd67a10834bb081169190610b6f30841415612492565b610b8c6000805160206148a68339815191529382855416146124f3565b610b946123f1565b60405190610ba182610ff5565b600082527f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610bdb5750506105149150612610565b6020600491604094939451928380926352d1902d60e01b825286165afa60009181610c36575b50610c235760405162461bcd60e51b815280610c1f600482016125c1565b0390fd5b61051493610c319114612563565b6126a0565b610c5891925060203d8111610c5f575b610c50818361102b565b810190612554565b9038610c01565b503d610c46565b50610c7036610902565b6001600160a01b038381163381141594929085610df0575b60405192610c9584610ff5565b60009680888652610dc6575b610d9c575b60ff6101335460a01c169182610d91575b5081610d54575b50610d08575b610ccf818585614585565b833b610cd9578480f35b610cea93610ce69361473e565b1590565b610cf657388080808480f35b6040516368d2bf6b60e11b8152600490fd5b61013154610d4f90869081906001600160a01b03165b6040516349779bed60e01b602082019081526001600160a01b03891660248301529083906109cb81604481016109bd565b610cc4565b869150815b60038110610d6a575b505038610cbe565b33828260c901541614610d8557610d8090612fd6565b610d59565b50505060013880610d62565b331415915038610cb7565b731e0049783f008a0085193e00003d00cd54003c71330315610ca657610dc13361450b565b610ca6565b731e0049783f008a0085193e00003d00cd54003c71330315610ca157610deb3361450b565b610ca1565b731e0049783f008a0085193e00003d00cd54003c71330315610c8857610e153361450b565b610c88565b503461000e57602036600319011261000e5761013254600435906001600160a01b03908116330361000e57600160ff6101335460a81c1615150361000e57600090610e6483611fa8565b600084815260008051602061488683398151915260205260409020805492821692610f85575b50610e9482611ecf565b80546fffffffffffffffffffffffffffffffff0190554260a01b8217600360e01b17610ebf85611f79565b55600160e11b811615610f44575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a4610514610f207f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c415460010190565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4155565b60018401610f5181611f79565b5415610f5e575b50610ecd565b600080516020614846833981519152548114610f5857610f7d90611f79565b553880610f58565b83905538610e8a565b503461000e57600036600319011261000e57602060ff6101335460a01c166040519015158152f35b50634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b03821117610fe857604052565b610ff0610fb6565b604052565b602081019081106001600160401b03821117610fe857604052565b606081019081106001600160401b03821117610fe857604052565b90601f801991011681019081106001600160401b03821117610fe857604052565b6020906001600160401b038111611069575b601f01601f19160190565b611071610fb6565b61105e565b81601f8201121561000e5780359061108d8261104c565b9261109b604051948561102b565b8284526020838301011161000e57816000926020809301838601378301015290565b50604036600319011261000e576110d2610364565b6024356001600160401b03811161000e576110f1903690600401611076565b6001600160a01b037f000000000000000000000000eb3568b3a0157cd859905cb6f40dd67a10834bb0811692919061112b30851415612492565b6111486000805160206148a68339815191529482865416146124f3565b6111506123f1565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156111865750506105149150612610565b6020600491604094939451928380926352d1902d60e01b825286165afa600091816111dd575b506111ca5760405162461bcd60e51b815280610c1f600482016125c1565b610514936111d89114612563565b61275c565b6111f691925060203d8111610c5f57610c50818361102b565b90386111ac565b503461000e57600036600319011261000e577f000000000000000000000000eb3568b3a0157cd859905cb6f40dd67a10834bb06001600160a01b03163003611258576040516000805160206148a68339815191528152602090f35b60405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608490fd5b503461000e57600036600319011261000e57610131546040516001600160a01b039091168152602090f35b6020908160408183019282815285518094520193019160005b828110611315575050505090565b9091929382608082611360600194895162ffffff6060809260018060a01b0381511685526001600160401b036020820151166020860152604081015115156040860152015116910152565b01950193929101611307565b503461000e57602036600319011261000e576001600160401b0360043581811161000e573660238201121561000e57806004013591821161000e573660248360051b8301011161000e576106349160246113c692016121c0565b604051918291826112ee565b503461000e57602036600319011261000e5760206001600160a01b036113f9600435611fa8565b16604051908152f35b60043590811515820361000e57565b503461000e57602036600319011261000e5761142b611402565b6114336123f1565b610133805460ff60a81b191691151560a81b60ff60a81b16919091179055005b503461000e57602036600319011261000e576020611477611472610364565b611f08565b604051908152f35b503461000e576000806003193601126106bf5761149a6123f1565b609780546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57600036600319011261000e57610130546040516001600160a01b039091168152602090f35b503461000e576000806003193601126106bf576000805160206148e68339815191525460ff8160081c1690816000146116035750303b155b15611598571580611577575b6115556128d2565b61155c5780f35b6000805160206148e6833981519152805461ff001916905580f35b6000805160206148e6833981519152805461ffff191661010117905561154d565b60405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608490fd5b60ff1615611541565b6020908160408183019282815285518094520193019160005b828110611633575050505090565b835185529381019392810192600101611625565b503461000e57602036600319011261000e57611661610364565b6000809161166e81611f08565b6116778161225f565b92611680612035565b506001926001600160a01b0390811690845b8484036116a75760405180610634898261160c565b816116b1826120e4565b8760408201516116f357505116806116eb575b50859083838a16146116d7575b01611692565b806116e5838701968a61219e565b526116d1565b9750856116c4565b929150506116d1565b503461000e57602036600319011261000e57611716610364565b61171e6123f1565b61013180546001600160a01b0319166001600160a01b03909216919091179055005b503461000e57602036600319011261000e5761175a610364565b6117626123f1565b61013280546001600160a01b0319166001600160a01b03909216919091179055005b503461000e57600036600319011261000e576097546040516001600160a01b039091168152602090f35b503461000e57604036600319011261000e576004356117cb61037a565b610130549091906001600160a01b0316330361184557600080516020614846833981519152549160005b828110611806576105148383613855565b8061181c6118176118409387613848565b613970565b61183a6118298388613848565b600052610134602052604060002090565b55612fd6565b6117f5565b60405162461bcd60e51b815260206004820152600d60248201526c1393d517d0555513d492569151609a1b6044820152606490fd5b503461000e576000806003193601126106bf576040519080600080516020614866833981519152908154906118ae82611f3f565b8086529260019280841690811561069257506001146118d757610634866106288188038261102b565b815292507f617167b76dcc8247761fd21f427ad8ec3be6b3be203aed34e3aac08b4d31817c5b8284106119195750505081016020016106288261063438610618565b805460208587018101919091529093019281016118fd565b503461000e57606036600319011261000e5761063461195e611951610364565b6044359060243590612291565b6040519182918261160c565b503461000e57604036600319011261000e57611984610364565b60243580151580910361000e576001600160a01b038216916119c690731e0049783f008a0085193e00003d00cd54003c70198401611a01575b61084633611e96565b60ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b611a0a8161450b565b6119bd565b503461000e57604036600319011261000e5760043560ff81169081810361000e576003611a3a61037a565b92611a436123f1565b101561000e576003811015611a75575b60c90180546001600160a01b0319166001600160a01b03909216919091179055005b611a7d612187565b611a53565b503461000e57600036600319011261000e57602060ff6101335460a81c166040519015158152f35b50608036600319011261000e57611abf610364565b611ac761037a565b906044356064356001600160401b03811161000e57611aea903690600401611076565b906001600160a01b03838116903382141580611bdd575b611bb3575b60ff6101335460a01c169182611ba8575b5081611b6a575b50611b4a575b611b2f818585614585565b833b611b3757005b611b4493610ce69361473e565b610cf657005b61013154611b659060009081906001600160a01b0316610d1e565b611b24565b60009150815b60038110611b81575b505038611b1e565b33828260c901541614611b9c57611b9790612fd6565b611b70565b50505060013880611b79565b331415915038611b17565b731e0049783f008a0085193e00003d00cd54003c71330315611b0657611bd83361450b565b611b06565b731e0049783f008a0085193e00003d00cd54003c71330315611b0157611c023361450b565b611b01565b503461000e57602036600319011261000e576080611c26600435612078565b611c69604051809262ffffff6060809260018060a01b0381511685526001600160401b036020820151166020860152604081015115156040860152015116910152565bf35b503461000e5760208060031936011261000e5760008060018060a01b036101335416600435825261013484526040822054604051858101916330c8446360e21b8352602482015260248152611cbf81611010565b51915afa90611ccc612811565b9115611ce757818161062892610634945183010191016147e7565b6064906040519062461bcd60e51b82526004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152fd5b503461000e57600036600319011261000e57610132546040516001600160a01b039091168152602090f35b503461000e57602036600319011261000e57611d5e611402565b611d666123f1565b610133805460ff60a01b191691151560a01b60ff60a01b16919091179055005b503461000e57604036600319011261000e57602060ff611db8611da7610364565b610846611db261037a565b91611e96565b54166040519015158152f35b503461000e57602036600319011261000e57611dde610364565b611de66123f1565b61013380546001600160a01b0319166001600160a01b03909216919091179055005b503461000e57602036600319011261000e57611e22610364565b611e2a6123f1565b6001600160a01b03811615611e425761051490612449565b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b6001600160a01b031660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020526040902090565b6001600160a01b031660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c456020526040902090565b6001600160a01b03811615611f2d57611f286001600160401b0391611ecf565b541690565b6040516323d3ad8160e21b8152600490fd5b90600182811c92168015611f6f575b6020831014611f5957565b634e487b7160e01b600052602260045260246000fd5b91607f1691611f4e565b6000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c44602052604060002090565b60019080821115611fc6575b604051636f96cda160e11b8152600490fd5b611fcf81611f79565b5491600160e01b831615611fe35750611fb4565b8215611fee57505090565b60008051602061484683398151915254821015611fb45790815b61201157505090565b9091506000190161202181611f79565b5491821561202e57505090565b9081612008565b60405190608082018281106001600160401b0382111761206b575b60405260006060838281528260208201528260408201520152565b612073610fb6565b612050565b612080612035565b50612089612035565b6001821080156120cb575b6120c657506120a2816120e4565b60408101516120c657506120c16105c7916120bb612035565b50611fa8565b61211e565b905090565b5060008051602061484683398151915254821015612094565b6120ec612035565b506000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c446020526105c76040600020545b90612127612035565b6001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b83161515604082015260e89290921c6060830152565b6020906001600160401b03811161217a575b60051b0190565b612182610fb6565b612173565b50634e487b7160e01b600052603260045260246000fd5b60209181518110156121b3575b60051b010190565b6121bb612187565b6121ab565b906121ca81612161565b916121d8604051938461102b565b818352601f196121e783612161565b0160005b81811061224857505060005b8281036122045750505090565b8083600192101561223b575b61221f8160051b840135612078565b612229828761219e565b52612234818661219e565b50016121f7565b612243612187565b612210565b602090612253612035565b828288010152016121eb565b9061226982612161565b612276604051918261102b565b8281528092612287601f1991612161565b0190602036910137565b90828110156123df5760009160008051602061484683398151915254916001928382106123d7575b8086116123cf575b506122cb82611f08565b91858210156123c7578186038381106123bf575b505b6122ea8361225f565b9583156123b65784936122fc84612078565b918794604093612311610ce686830151151590565b6123a4575b50955b61232a575b50505050505050815290565b808614158061239a575b1561239557868661234582986120e4565b8086015161238f57516001600160a01b0390811680612387575b5080871690881614612373575b0195612319565b80612381838c019b8d61219e565b5261236c565b97503861235f565b5061236c565b61231e565b5081881415612334565b516001600160a01b0316955038612316565b50505050505090565b9250386122df565b8492506122e1565b9450386122c1565b8391506122b9565b604051631960ccad60e11b8152600490fd5b6097546001600160a01b0316330361240557565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b609780546001600160a01b039283166001600160a01b0319821681179092559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b1561249957565b60405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608490fd5b156124fa57565b60405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608490fd5b9081602091031261000e575190565b1561256a57565b60405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608490fd5b60809060208152602e60208201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960408201526d6f6e206973206e6f74205555505360901b60608201520190565b803b15612645576000805160206148a683398151915280546001600160a01b0319166001600160a01b03909216919091179055565b60405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b906126aa82612610565b6001600160a01b0382167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2805115801590612754575b6126ec575050565b612751916000806040519361270085611010565b602785527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c6020860152660819985a5b195960ca1b6040860152602081519101845af461274b612811565b91612841565b50565b5060006126e4565b9061276682612610565b6001600160a01b0382167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a28051158015906127a7576126ec575050565b5060016126e4565b604051906127bc82610fcd565b6033546001600160a01b038116835260a01c6020830152565b906040516127e281610fcd565b91546001600160a01b038116835260a01c6020830152565b50634e487b7160e01b600052601160045260246000fd5b3d1561283c573d906128228261104c565b91612830604051938461102b565b82523d6000602084013e565b606090565b919290156128a35750815115612855575090565b3b1561285e5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156128b65750805190602001fd5b60405162461bcd60e51b8152908190610c1f90600483016105b6565b60005460ff8160081c1615809181926129ed575b81156129cd575b50156129715780612906600160ff196000541617600055565b612958575b6129136129fb565b61291957565b61292961ff001960005416600055565b604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a1565b61296c61010061ff00196000541617600055565b61290b565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b303b159150816129df575b50386128ed565b6001915060ff1614386129d8565b600160ff82161091506128e6565b60405190612a0882610fcd565b600b825260206a29b6b7b6102237b63630b960a91b8184015260405190612a2e82610fcd565b6005825264286f5f6f2960d81b81830152612a6660ff6000805160206148e68339815191525460081c16612a6181612bd8565b612bd8565b83516001600160401b038111612bcb575b6000805160206148c683398151915291612a9a82612a958554611f3f565b612c41565b80601f8311600114612b2d57508190612acf9596600092612b22575b50508160011b916000199060031b1c1916179055612d3d565b612ae6600160008051602061484683398151915255565b612aee612f0e565b612af6612f31565b612afe612f31565b612b06612e50565b612b0f33612f8e565b610133805461ffff60a01b19169055565b565b015190503880612ab6565b90601f19831696612b6d6000805160206148c68339815191526000527f933ecf8acb7824b680a8d16f3ff3db8864228d986aa4c2ebab1eeb2703b4beb390565b926000905b898210612bb357505090839291600194612acf989910612b9a575b505050811b019055612d3d565b015160001960f88460031b161c19169055388080612b8d565b80600185968294968601518155019501930190612b72565b612bd3610fb6565b612a77565b15612bdf57565b60405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604482015273206973206e6f7420696e697469616c697a696e6760601b6064820152608490fd5b601f8111612c4d575050565b6000906000805160206148c683398151915282527f933ecf8acb7824b680a8d16f3ff3db8864228d986aa4c2ebab1eeb2703b4beb3906020601f850160051c83019410612cb5575b601f0160051c01915b828110612caa57505050565b818155600101612c9e565b9092508290612c95565b601f8111612ccb575050565b60009060008051602061486683398151915282527f617167b76dcc8247761fd21f427ad8ec3be6b3be203aed34e3aac08b4d31817c906020601f850160051c83019410612d33575b601f0160051c01915b828110612d2857505050565b818155600101612d1c565b9092508290612d13565b9081516001600160401b038111612e43575b60008051602061486683398151915290612d7281612d6d8454611f3f565b612cbf565b602080601f8311600114612dae575081929394600092612da3575b50508160011b916000199060031b1c1916179055565b015190503880612d8d565b90601f19831695612dee6000805160206148668339815191526000527f617167b76dcc8247761fd21f427ad8ec3be6b3be203aed34e3aac08b4d31817c90565b926000905b888210612e2b57505083600195969710612e12575b505050811b019055565b015160001960f88460031b161c19169055388080612e08565b80600185968294968601518155019501930190612df3565b612e4b610fb6565b612d4f565b6000633e9f1edf60e11b815230600452733cc6cdda760b79bafa08df41ecfa224f810dceb6602452600481604481806daaeb6d7670e522a718067333cd4e5af115612e9a57602452565b637d3e3dbe815160e01c146106bf57602452565b15612eb557565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b612f2860ff60005460081c16612f2381612eae565b612eae565b612b2033612449565b612b2060ff60005460081c16612eae565b15612f4957565b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b612b20906001600160a01b0316612fa6811515612f42565b60405190612fb382610fcd565b8082526103846020909201919091526001600160a01b031660e160a21b17603355565b6001906000198114612fe6570190565b612fee6127fa565b0190565b90610514820180921161300157565b612b206127fa565b906104b0820180921161300157565b9061044c820180921161300157565b906103e8820180921161300157565b90610384820180921161300157565b90610320820180921161300157565b906102bc820180921161300157565b90610258820180921161300157565b906101f4820180921161300157565b90610190820180921161300157565b9061012c820180921161300157565b9060c8820180921161300157565b906064820180921161300157565b90617530820180921161300157565b90614e20820180921161300157565b90612710820180921161300157565b90624c4b40820180921161300157565b90623d0900820180921161300157565b90622dc6c0820180921161300157565b90621e8480820180921161300157565b90620f4240820180921161300157565b90640165a0bc00820180921161300157565b9064015faadb00820180921161300157565b90640159b4fa00820180921161300157565b90640153bf1900820180921161300157565b9064014dc93800820180921161300157565b90640147d35700820180921161300157565b90640141dd7600820180921161300157565b9064013be79500820180921161300157565b90640135f1b400820180921161300157565b9064012ffbd300820180921161300157565b9064012a05f200820180921161300157565b90640124101100820180921161300157565b9064011e1a3000820180921161300157565b90640118244f00820180921161300157565b906401122e6e00820180921161300157565b9064010c388d00820180921161300157565b9064010642ac00820180921161300157565b906401004ccb00820180921161300157565b9063fa56ea00820180921161300157565b9063f4610900820180921161300157565b9063ee6b2800820180921161300157565b9063e8754700820180921161300157565b9063e27f6600820180921161300157565b9063dc898500820180921161300157565b9063d693a400820180921161300157565b9063d09dc300820180921161300157565b9063caa7e200820180921161300157565b9063c4b20100820180921161300157565b9063bebc2000820180921161300157565b9063b8c63f00820180921161300157565b9063b2d05e00820180921161300157565b9063acda7d00820180921161300157565b9063a6e49c00820180921161300157565b9063a0eebb00820180921161300157565b90639af8da00820180921161300157565b90639502f900820180921161300157565b90638f0d1800820180921161300157565b906389173700820180921161300157565b906383215600820180921161300157565b90637d2b7500820180921161300157565b906377359400820180921161300157565b9063713fb300820180921161300157565b90636b49d200820180921161300157565b90636553f100820180921161300157565b90635f5e1000820180921161300157565b906359682f00820180921161300157565b906353724e00820180921161300157565b90634d7c6d00820180921161300157565b906347868c00820180921161300157565b90634190ab00820180921161300157565b90633b9aca00820180921161300157565b906335a4e900820180921161300157565b90632faf0800820180921161300157565b906329b92700820180921161300157565b906323c34600820180921161300157565b90631dcd6500820180921161300157565b906317d78400820180921161300157565b906311e1a300820180921161300157565b90630bebc200820180921161300157565b906305f5e100820180921161300157565b9064358d117c00820180921161300157565b90643339059800820180921161300157565b906430e4f9b400820180921161300157565b90642e90edd000820180921161300157565b90642c3ce1ec00820180921161300157565b906429e8d60800820180921161300157565b90642794ca2400820180921161300157565b90642540be4000820180921161300157565b906422ecb25c00820180921161300157565b90642098a67800820180921161300157565b90641e449a9400820180921161300157565b90641bf08eb000820180921161300157565b9064199c82cc00820180921161300157565b9064174876e800820180921161300157565b906414f46b0400820180921161300157565b906412a05f2000820180921161300157565b9064104c533c00820180921161300157565b90640df8475800820180921161300157565b90640ba43b7400820180921161300157565b906409502f9000820180921161300157565b906406fc23ac00820180921161300157565b906404a817c800820180921161300157565b906402540be400820180921161300157565b906503a352944000820180921161300157565b906502ba7def3000820180921161300157565b906501d1a94a2000820180921161300157565b9064e8d4a51000820180921161300157565b9066016bcc41e90000820180921161300157565b90660110d9316ec000820180921161300157565b9065b5e620f48000820180921161300157565b90655af3107a4000820180921161300157565b9067013fbe85edc90000820180921161300157565b9067011c37937e080000820180921161300157565b9066f8b0a10e470000820180921161300157565b9066d529ae9e860000820180921161300157565b9066b1a2bc2ec50000820180921161300157565b90668e1bc9bf040000820180921161300157565b90666a94d74f430000820180921161300157565b9066470de4df820000820180921161300157565b90662386f26fc10000820180921161300157565b90670de0b6b3a7640000820180921161300157565b9190820180921161300157565b906000805160206148468339815191525491811561391e5761387681611ecf565b80546801000000000000000184020190556001600160a01b0316906001904260a01b82821460e11b1783176138aa85611f79565b558301926000827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92808684868180a4015b85810361390f5750505050156138fe5760008051602061484683398151915255565b604051622e076360e81b8152600490fd5b8084918684868180a4016138dc565b60405163b562e8dd60e01b8152600490fd5b60405190602082018281106001600160401b03821117613954575b60405260008252565b61395c610fb6565b61394b565b60001981019190821161300157565b61398b61397b613930565b9161398543613961565b40613848565b815261399681614410565b906139a08161442f565b906139aa8161444e565b906139b48161446d565b916139be8261448e565b906139c8836144ae565b906139d2846144cd565b946139e56139df866144ec565b9561442f565b966063906001998a81106000146142ef57505b898110156142ac5750915b8881101561424357505b87811015613d9a5750915b86811015613bc357505b6002811015613b6d5750915b6002811015613b1857505b6002811015613a635750915b811015613a50575090565b600b11613a5a5790565b6105c790613833565b6005811015613a7d5750613a769061381f565b915b613a45565b600c811015613a905750613a769061380b565b6014811015613aa35750613a76906137f7565b601d811015613ab65750613a76906137e3565b6027811015613ac95750613a76906137cf565b6032811015613adc5750613a76906137bb565b603e811015613aef5750613a76906137a7565b604b811015613b025750613a7690613792565b6059909391931015613a785791613a769061377d565b6003811015613b33575090613b2c9061376a565b905b613a39565b6006811015613b47575090613b2c90613757565b6009811015613b5b575090613b2c90613743565b600f1115613b2e5790613b2c9061372f565b6004811015613b875750613b809061371d565b915b613a2e565b6008811015613b9a5750613b809061370a565b600e811015613bad5750613b80906136f7565b601c909391931015613b825791613b80906136e4565b6003811015613bdd575090613bd7906136d2565b90613a22565b6006811015613bf1575090613bd7906136c0565b600a811015613c05575090613bd7906136ae565b600f811015613c19575090613bd79061369c565b6015811015613c2d575090613bd79061368a565b601c811015613c41575090613bd790613678565b6024811015613c55575090613bd790613666565b602d811015613c69575090613bd790613654565b6037811015613c7d575090613bd790613642565b6042811015613c91575090613bd790613630565b604e811015613ca5575090613bd79061361e565b605b811015613cb9575090613bd79061360c565b6069811015613ccd575090613bd7906135fa565b6078811015613ce1575090613bd7906135e8565b6088811015613cf5575090613bd7906135d6565b6099811015613d09575090613bd7906135c4565b60ab811015613d1d575090613bd7906135b2565b60be811015613d31575090613bd7906135a0565b60d2811015613d45575090613bd79061358e565b60e7811015613d59575090613bd79061357c565b60fd811015613d72575090613bd79061356a565b613a22565b610114811015613d87575090613bd790613558565b61012c1115613d6d5790613bd790613546565b6003811015613db35750613dad90613535565b91613a18565b6006811015613dc65750613dad90613524565b600a811015613dd95750613dad90613513565b600f811015613dec5750613dad90613502565b6015811015613dff5750613dad906134f1565b601c811015613e125750613dad906134e0565b6024811015613e255750613dad906134cf565b602d811015613e385750613dad906134be565b6037811015613e4b5750613dad906134ad565b6042811015613e5e5750613dad9061349c565b604e811015613e715750613dad9061348b565b605b811015613e845750613dad9061347a565b6069811015613e975750613dad90613469565b6078811015613eaa5750613dad90613458565b6088811015613ebd5750613dad90613447565b6099811015613ed05750613dad90613436565b60ab811015613ee35750613dad90613425565b60be811015613ef65750613dad90613414565b60d2811015613f095750613dad90613403565b60e7811015613f1c5750613dad906133f2565b60fd811015613f2f5750613dad906133e1565b610114811015613f435750613dad906133d0565b61012c811015613f575750613dad906133bf565b610145811015613f6b5750613dad906133ae565b61015f811015613f7f5750613dad9061339d565b61017a811015613f935750613dad9061338c565b610196811015613fa75750613dad9061337b565b6101b3811015613fbb5750613dad9061336a565b6101d1811015613fcf5750613dad90613359565b6101f0811015613fe35750613dad90613348565b610210811015613ff75750613dad90613337565b61023181101561400b5750613dad90613326565b61025381101561401f5750613dad90613315565b6102768110156140335750613dad90613304565b61029a8110156140475750613dad906132f3565b6102bf81101561405b5750613dad906132e2565b6102e581101561406f5750613dad906132d1565b61030c8110156140835750613dad906132c0565b6103348110156140975750613dad906132af565b61035d8110156140ab5750613dad9061329e565b6103878110156140bf5750613dad9061328d565b6103b28110156140d35750613dad9061327c565b6103de8110156140e75750613dad9061326a565b61040b8110156140fb5750613dad90613258565b61043981101561410f5750613dad90613246565b6104688110156141235750613dad90613234565b6104988110156141375750613dad90613222565b6104c981101561414b5750613dad90613210565b6104fb81101561415f5750613dad906131fe565b61052e8110156141735750613dad906131ec565b6105628110156141875750613dad906131da565b61059781101561419b5750613dad906131c8565b6105cd8110156141af5750613dad906131b6565b6106048110156141c35750613dad906131a4565b61063c8110156141d75750613dad90613192565b6106758110156141eb5750613dad90613180565b6106af8110156142045750613dad9061316e565b613a18565b6106ea8110156142185750613dad9061315c565b61072681101561422c5750613dad9061314a565b6107639093919310156141ff5791613dad90613138565b600381101561425e57509061425790613128565b905b613a0d565b600681101561427257509061425790613118565b600a81101561428657509061425790613108565b600f81101561429a575090614257906130f8565b601511156142595790614257906130e8565b60038110156142c657506142bf906130d9565b915b613a03565b60068110156142d957506142bf906130ca565b600a9093919310156142c157916142bf906130bb565b6003811015614309575090614303906130ad565b906139f8565b600681101561431d5750906143039061309f565b600a81101561433157509061430390613090565b600f81101561434557509061430390613081565b601581101561435957509061430390613072565b601c81101561436d57509061430390613063565b602481101561438157509061430390613054565b602d81101561439557509061430390613045565b60378110156143ae57509061430390613036565b6139f8565b60428110156143c257509061430390613027565b604e8110156143d657509061430390613018565b605b8110156143ea57509061430390613009565b60698110156143fe57509061430390612ff2565b607811156143a9576105db91506139f8565b5b6020812080825260108110156144275750614411565b607891500690565b5b6020812080825260068110156144465750614430565b600a91500690565b5b602081208082526010811015614465575061444f565b601591500690565b5b602081208082526104da811015614485575061446e565b61076391500690565b5b6020812080825260888110156144a5575061448f565b61012c91500690565b5b6020812080825260108110156144c557506144af565b601c91500690565b5b6020812080825260028110156144e457506144ce565b600e91500690565b5b60208120808252601081101561450357506144ed565b606891500690565b60009069c6171134001122334455825230601a52603a528080604460166daaeb6d7670e522a718067333cd4e5afa1561454357603a52565b3d81803e3d90fd5b1561455257565b60405162461bcd60e51b815260206004820152600b60248201526a10d85b1b17d9985a5b195960aa1b6044820152606490fd5b9061458f83611fa8565b6001600160a01b03838116928282168490036146e757600086815260008051602061488683398151915260205260409020805490926145dd6001600160a01b03881633908114908414171590565b6146b6575b82169586156146a45761460b936145fe9261469a575b50611ecf565b8054600019019055611ecf565b80546001019055600160e11b4260a01b8417811761462886611f79565b55811615614659575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b6001840161466681611f79565b5415614673575b50614631565b60008051602061484683398151915254811461466d5761469290611f79565b55388061466d565b60009055386145f8565b604051633a954ecd60e21b8152600490fd5b6146d0610ce66146c9336108468b611e96565b5460ff1690565b156145e257604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b9081602091031261000e57516105c7816103d4565b6001600160a01b0391821681529116602082015260408101919091526080606082018190526105c792910190610591565b92602091614767936000604051809681958294630a85bd0160e11b9a8b8552336004860161470d565b03926001600160a01b03165af1600091816147b7575b506147a95761478a612811565b805190816147a4576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b6147d991925060203d81116147e0575b6147d1818361102b565b8101906146f8565b903861477d565b503d6147c7565b60208183031261000e578051906001600160401b03821161000e570181601f8201121561000e5780516148198161104c565b92614827604051948561102b565b8184526020828401011161000e576105c7916020808501910161056e56fe2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c402569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c432569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c46360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c42ee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85fa2646970667358221220eee8b58db6fc4ce2fc07ac5742881b7f8ba4da665567b99fc07539f445051d0d64736f6c63430008110033
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.