ETH Price: $3,488.98 (+4.65%)
Gas: 6.1 Gwei

Token

Divine Apples (DAA)
 

Overview

Max Total Supply

3,000 DAA

Holders

1,168

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
metavelliott.eth
Balance
1 DAA
0x0d73aa5de89b309798f9fcbba8b86c4fd5f542fc
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
DivineApples

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 300 runs

Other Settings:
default evmVersion
File 1 of 14 : DivineApples.sol
/**
 * @title  Divine Apples Smart Contract
 * @author Diveristy - twitter.com/DiversityETH
 *
 * 8888b.  88 Yb    dP 88 88b 88 888888      db    88b 88    db    88""Yb  dP""b8 88  88 Yb  dP
 *  8I  Yb 88  Yb  dP  88 88Yb88 88__       dPYb   88Yb88   dPYb   88__dP dP   `" 88  88  YbdP
 *  8I  dY 88   YbdP   88 88 Y88 88""      dP__Yb  88 Y88  dP__Yb  88"Yb  Yb      888888   8P
 * 8888Y"  88    YP    88 88  Y8 888888   dP""""Yb 88  Y8 dP""""Yb 88  Yb  YboodP 88  88  dP
 *
 * Why is this a ERC721 contract? Because I made it in a few hours and was not thinking straight.
 * ----- yes it should of been ERC1155, but this works and im not wasting all this testing now :(
 */

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol";
import "./interfaces/IDivineAnarchyToken.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

contract DivineApples is Ownable, ERC721A, ReentrancyGuard {
    using Address for address;
    using Strings for uint256;

	uint256 public constant MAX_ASCENSION_APPLES_SACRAFICE = 1500;
	uint256 public constant MAX_ASCENSION_APPLE_AD         = 1500;
	uint256 public constant MAX_ASCENSION_APPLES           = MAX_ASCENSION_APPLE_AD + MAX_ASCENSION_APPLES_SACRAFICE;
	uint256 public constant MAX_BAD_APPLES                 = 1500;
	uint256 public constant MAX_STATE_AIRDROP              = 500;
	uint256 public constant MAX_AIRDROP_AMOUNT             = 3000;
	uint256 public constant MAX_SUPPLY                     = MAX_ASCENSION_APPLES + MAX_BAD_APPLES;

	uint256 private _airdropState    = 0;     // 0 is ascension, 1 is bad apple
	uint256 private _airdropAmount   = 0;     // Track the amount airdropped in the current state
	uint256 private _airdropTotal    = 0;
	uint256 private _ascensionApples = 0;
	uint256 private _badApples       = 0;
	bool    private _canAirdrop      = true;
	string  private _baseExtension   = ".json";
    string  private _useBaseURI;
	address private _daContract;

	mapping(address => uint256[]) public ascendedMap;
	mapping(address => uint256[]) public burnedMap;

	constructor(address daContract, string memory initUri) ERC721A("Divine Apples", "DAA") {
		_daContract = daContract;
		_useBaseURI = initUri;
	}

	function isAscensionApple(uint256 id) public view virtual returns(bool) {
		require(id < 4500 && id >= 0, "ID is not in token range");

		// Account for 0 index
		id += 1;

		// First airdrop
		if(id <= 500) {
			return true;
		}

		// Second airdrop
		if(id > 1000 && id <= 1500) {
			return true;
		}

		// Third airdrop
		if(id > 2000 && id <= 2500) {
			return true;
		}

		// Bad apple sacrafice to create ascension apples
		if(id > 3000) {
			return true;
		}

		return false;
	}

	function airdropAscensionApples(uint256 amount, address account) external onlyOwner {
		require(amount > 0, "Cannot airdrop less than 1 apple");
		require(_ascensionApples + amount <= MAX_ASCENSION_APPLE_AD, "Ascension apple overflow");
		require(_airdropTotal + amount <= MAX_AIRDROP_AMOUNT, "No more apples can be dropped");
		require(_airdropState == 0, "Wrong airdrop state");
		require(_airdropAmount + amount <= MAX_STATE_AIRDROP, "Exceeded MAX_STATE_AIRDROP");

		_safeMint(account, amount);

		_ascensionApples += amount;
		_airdropAmount   += amount;
		_airdropTotal    += amount;

		if(_airdropAmount == MAX_STATE_AIRDROP) {
			_airdropState  = 1;
			_airdropAmount = 0;
		}
	}

	function airdropBadApples(uint256 amount, address account) external onlyOwner {
		require(amount > 0, "Cannot airdrop less than 1 apple");
		require(_badApples + amount <= MAX_BAD_APPLES, "Bad apple overflow");
		require(_airdropTotal + amount <= MAX_AIRDROP_AMOUNT, "No more apples can be dropped");
		require(_airdropState == 1, "Wrong airdrop state");
		require(_airdropAmount + amount <= MAX_STATE_AIRDROP, "Airdrop state will exceed 500");

		_safeMint(account, amount);

		_badApples     += amount;
		_airdropAmount += amount;
		_airdropTotal    += amount;

		if(_airdropAmount == MAX_STATE_AIRDROP) {
			_airdropState  = 0;
			_airdropAmount = 0;
		}
	}

	function consumeAscensionApple(uint256 daId, uint256 appleId) public nonReentrant {
		require(_airdropTotal >= 3000, "Airdropping apples still");
        require(_exists(appleId), "Nonexistent token");
		require(isAscensionApple(appleId), "Incorrect apple");
		require(IDivineAnarchyToken(_daContract).ownerOf(daId) == msg.sender, "Not the owner of given DA");
		require(ownerOf(appleId) == msg.sender, "Not the owner of given Apple");
		require(daId > 10, "Can't ascend a monarch...");

		_burn(appleId);

		ascendedMap[msg.sender].push(daId);
	}

	function consumeBadApple(uint256 daId, uint256 appleId) public nonReentrant {
		require(_airdropTotal >= 3000, "Airdropping apples still");
        require(_exists(appleId), "Nonexistent token");
		require(!isAscensionApple(appleId), "Incorrect apple");
		require(IDivineAnarchyToken(_daContract).ownerOf(daId) == msg.sender, "Not the owner of given DA");
		require(ownerOf(appleId) == msg.sender, "Not the owner of given Apple");
		require(daId > 10, "Attempting to burn a monarch!?");

		IDivineAnarchyToken(_daContract).burn(msg.sender, daId);
		_burn(appleId);
		_safeMint(msg.sender, 1);

		burnedMap[msg.sender].push(daId);
	}

    function walletOfOwner(address account) public view returns (uint256[] memory) {
		uint256 holdingAmount  = balanceOf(account);
		uint256 numMintedSoFar = _currentIndex;
        uint256 tokenIdsIdx;
        address currOwnershipAddr;

		uint256[] memory result = new uint256[](holdingAmount);

        unchecked {
            for (uint256 i; i < numMintedSoFar; i++) {
                TokenOwnership memory ownership = _ownerships[i];

                if (ownership.burned) {
                    continue;
                }

                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }

                if (currOwnershipAddr == account) {
					result[tokenIdsIdx] = i;
                    tokenIdsIdx++;
                }
            }
        }

		return result;
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

		string memory appleType = isAscensionApple(tokenId) ? "Ascension" : "Bad";

        return bytes(_useBaseURI).length != 0 ? string(
			abi.encodePacked(
				_useBaseURI,
				appleType,
				_baseExtension
			)
		) : "";
    }

	function isAirdropFinished() public view returns(bool) {
		return _airdropTotal == MAX_AIRDROP_AMOUNT;
	}

	function getAscendedNfts(address account) public view returns(uint256[] memory) {
		return ascendedMap[account];
	}

	function getBurnedNfts(address account) public view returns(uint256[] memory) {
		return burnedMap[account];
	}

	function setCanAirdrop(bool state) external onlyOwner {
		_canAirdrop = state;
	}

	function setDaContract(address contractAddr) external onlyOwner {
		_daContract = contractAddr;
	}

    function setBaseURI(string memory uri) public onlyOwner {
        _useBaseURI = uri;
    }
}

File 2 of 14 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "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");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason 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 {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 3 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 5 of 14 : ERC721A.sol
// SPDX-License-Identifier: MIT
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintedQueryForZeroAddress();
error BurnedQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerIndexOutOfBounds();
error OwnerQueryForNonexistentToken();
error TokenIndexOutOfBounds();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**128 - 1 (max value of uint128).
 */
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
    using Address for address;
    using Strings for uint256;

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
    }

    // Compiler will pack the following 
    // _currentIndex and _burnCounter into a single 256bit word.
    
    // The tokenId of the next token to be minted.
    uint128 internal _currentIndex;

    // The number of tokens burned.
    uint128 internal _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex times
        unchecked {
            return _currentIndex - _burnCounter;    
        }
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
     * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
     */
    function tokenByIndex(uint256 index) public view override returns (uint256) {
        uint256 numMintedSoFar = _currentIndex;
        uint256 tokenIdsIdx;

        // Counter overflow is impossible as the loop breaks when
        // uint256 i is equal to another uint256 numMintedSoFar.
        unchecked {
            for (uint256 i; i < numMintedSoFar; i++) {
                TokenOwnership memory ownership = _ownerships[i];
                if (!ownership.burned) {
                    if (tokenIdsIdx == index) {
                        return i;
                    }
                    tokenIdsIdx++;
                }
            }
        }
        revert TokenIndexOutOfBounds();
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
     * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
        if (index >= balanceOf(owner)) revert OwnerIndexOutOfBounds();
        uint256 numMintedSoFar = _currentIndex;
        uint256 tokenIdsIdx;
        address currOwnershipAddr;

        // Counter overflow is impossible as the loop breaks when
        // uint256 i is equal to another uint256 numMintedSoFar.
        unchecked {
            for (uint256 i; i < numMintedSoFar; i++) {
                TokenOwnership memory ownership = _ownerships[i];
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    if (tokenIdsIdx == index) {
                        return i;
                    }
                    tokenIdsIdx++;
                }
            }
        }

        // Execution should never reach this point.
        revert();
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            interfaceId == type(IERC721Enumerable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    function _numberMinted(address owner) internal view returns (uint256) {
        if (owner == address(0)) revert MintedQueryForZeroAddress();
        return uint256(_addressData[owner].numberMinted);
    }

    function _numberBurned(address owner) internal view returns (uint256) {
        if (owner == address(0)) revert BurnedQueryForZeroAddress();
        return uint256(_addressData[owner].numberBurned);
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        uint256 curr = tokenId;

        unchecked {
            if (curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // Invariant: 
                    // There will always be an ownership that has an address and is not burned 
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return ownershipOf(tokenId).addr;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    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, tokenId.toString())) : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = ERC721A.ownerOf(tokenId);
        if (to == owner) revert ApprovalToCurrentOwner();

        if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {
            revert ApprovalCallerNotOwnerNorApproved();
        }

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public override {
        if (operator == _msgSender()) revert ApproveToCaller();

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        _transfer(from, to, tokenId);
        if (!_checkOnERC721Received(from, to, tokenId, _data)) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

    /**
     * @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 (`_mint`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return tokenId < _currentIndex && !_ownerships[tokenId].burned;
    }

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, 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.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        _mint(to, quantity, _data, true);
    }

    /**
     * @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.
     */
    function _mint(
        address to,
        uint256 quantity,
        bytes memory _data,
        bool safe
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 3.4e38 (2**128) - 1
        // updatedIndex overflows if _currentIndex + quantity > 3.4e38 (2**128) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;

            for (uint256 i; i < quantity; i++) {
                emit Transfer(address(0), to, updatedIndex);
                if (safe && !_checkOnERC721Received(address(0), to, updatedIndex, _data)) {
                    revert TransferToNonERC721ReceiverImplementer();
                }
                updatedIndex++;
            }

            _currentIndex = uint128(updatedIndex);
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) private {
        TokenOwnership memory prevOwnership = ownershipOf(tokenId);

        bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
            isApprovedForAll(prevOwnership.addr, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, prevOwnership.addr);

        // 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**128.
        unchecked {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            _ownerships[tokenId].addr = to;
            _ownerships[tokenId].startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            if (_ownerships[nextTokenId].addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId < _currentIndex) {
                    _ownerships[nextTokenId].addr = prevOwnership.addr;
                    _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        TokenOwnership memory prevOwnership = ownershipOf(tokenId);

        _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, prevOwnership.addr);

        // 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**128.
        unchecked {
            _addressData[prevOwnership.addr].balance -= 1;
            _addressData[prevOwnership.addr].numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            _ownerships[tokenId].addr = prevOwnership.addr;
            _ownerships[tokenId].startTimestamp = uint64(block.timestamp);
            _ownerships[tokenId].burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            if (_ownerships[nextTokenId].addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId < _currentIndex) {
                    _ownerships[nextTokenId].addr = prevOwnership.addr;
                    _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(prevOwnership.addr, address(0), tokenId);
        _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked { 
            _burnCounter++;
        }
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert TransferToNonERC721ReceiverImplementer();
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @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 {}
}

File 6 of 14 : IDivineAnarchyToken.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

interface IDivineAnarchyToken {
    function getTokenClass(uint256 _id) external view returns(uint256);
    function getTokenClassSupplyCap(uint256 _classId) external view returns(uint256);
    function getTokenClassCurrentSupply(uint256 _classId) external view returns(uint256);
    function getTokenClassVotingPower(uint256 _classId) external view returns(uint256);
    function getTokensMintedAtPresale(address account) external view returns(uint256);
    function isTokenClass(uint256 _id) external pure returns(bool);
    function isTokenClassMintable(uint256 _id) external pure returns(bool);
    function isAscensionApple(uint256 _id) external pure returns(bool);
    function isBadApple(uint256 _id) external pure returns(bool);
    function consumedAscensionApples(address account) external view returns(uint256);
    function airdropApples(uint256 amount, uint256 appleClass, address[] memory accounts) external;
	function burn(address account, uint256 id) external;
    function ownerOf(uint256 _id) external view returns(address);
}

File 7 of 14 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 8 of 14 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 9 of 14 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, 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
    ) external;

    /**
     * @dev Transfers `tokenId` token 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;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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 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);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 10 of 14 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 11 of 14 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 12 of 14 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 13 of 14 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.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 ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 14 of 14 : IERC165.sol
// 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 IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 300
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"daContract","type":"address"},{"internalType":"string","name":"initUri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerIndexOutOfBounds","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TokenIndexOutOfBounds","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":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"},{"inputs":[],"name":"MAX_AIRDROP_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ASCENSION_APPLES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ASCENSION_APPLES_SACRAFICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ASCENSION_APPLE_AD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BAD_APPLES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_STATE_AIRDROP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"airdropAscensionApples","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"airdropBadApples","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"ascendedMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"burnedMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"daId","type":"uint256"},{"internalType":"uint256","name":"appleId","type":"uint256"}],"name":"consumeAscensionApple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"daId","type":"uint256"},{"internalType":"uint256","name":"appleId","type":"uint256"}],"name":"consumeBadApple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAscendedNfts","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getBurnedNfts","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAirdropFinished","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"id","type":"uint256"}],"name":"isAscensionApple","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setCanAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddr","type":"address"}],"name":"setDaContract","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"}]

60006009819055600a819055600b819055600c819055600d55600e805460ff1916600117905560c06040526005608081905264173539b7b760d91b60a09081526200004e91600f91906200019b565b503480156200005c57600080fd5b5060405162002e8538038062002e858339810160408190526200007f9162000241565b6040518060400160405280600d81526020016c446976696e65204170706c657360981b8152506040518060400160405280600381526020016244414160e81b815250620000db620000d56200014760201b60201c565b6200014b565b8151620000f09060029060208501906200019b565b508051620001069060039060208401906200019b565b5050600160085550601180546001600160a01b0319166001600160a01b03841617905580516200013e9060109060208401906200019b565b5050506200038d565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620001a9906200033a565b90600052602060002090601f016020900481019282620001cd576000855562000218565b82601f10620001e857805160ff191683800117855562000218565b8280016001018555821562000218579182015b8281111562000218578251825591602001919060010190620001fb565b50620002269291506200022a565b5090565b5b808211156200022657600081556001016200022b565b6000806040838503121562000254578182fd5b82516001600160a01b03811681146200026b578283fd5b602084810151919350906001600160401b03808211156200028a578384fd5b818601915086601f8301126200029e578384fd5b815181811115620002b357620002b362000377565b604051601f8201601f19908116603f01168101908382118183101715620002de57620002de62000377565b816040528281528986848701011115620002f6578687fd5b8693505b82841015620003195784840186015181850187015292850192620002fa565b828411156200032a57868684830101525b8096505050505050509250929050565b600181811c908216806200034f57607f821691505b602082108114156200037157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b612ae8806200039d6000396000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c806386afe0e41161013b578063c0e57944116100b8578063dc4554f31161007c578063dc4554f3146103fb578063e23bf79d146104f0578063e8b0be82146104f9578063e985e9c514610501578063f2fde38b1461053d57600080fd5b8063c0e5794414610498578063c87b56dd146104ab578063cdc6b2e2146104be578063cfccb2d1146104d1578063dada170a146104dd57600080fd5b80639884d2c8116100ff5780639884d2c8146103fb578063a14dca7714610456578063a22cb46514610469578063a99dc3891461047c578063b88d4fde1461048557600080fd5b806386afe0e4146104045780638da5cb5b146104175780639168f7f91461042857806395781d381461043b57806395d89b411461044e57600080fd5b8063438b6300116101c957806370a082311161018d57806370a08231146103ba578063715018a6146103cd5780637678cab5146103d557806378b70a50146103e85780638358d872146103fb57600080fd5b8063438b63001461034e5780634f6ccce71461036e57806355f804b3146103815780635c3e4cec146103945780636352211e146103a757600080fd5b806323b872dd1161021057806323b872dd146102fa5780632f745c591461030d57806332cb6b0c146103205780633f4ca9b71461032857806342842e0e1461033b57600080fd5b806301ffc9a71461024d57806306fdde0314610275578063081812fc1461028a578063095ea7b3146102b557806318160ddd146102ca575b600080fd5b61026061025b366004612761565b610550565b60405190151581526020015b60405180910390f35b61027d6105bd565b60405161026c91906129b3565b61029d6102983660046127df565b61064f565b6040516001600160a01b03909116815260200161026c565b6102c86102c336600461271c565b610693565b005b6102ec6001546001600160801b03600160801b82048116918116919091031690565b60405190815260200161026c565b6102c861030836600461262b565b610721565b6102ec61031b36600461271c565b61072c565b6102ec610829565b6102c86103363660046127f7565b610843565b6102c861034936600461262b565b610aa8565b61036161035c3660046125bb565b610ac3565b60405161026c919061296f565b6102ec61037c3660046127df565b610c18565b6102c861038f366004612799565b610cc5565b6102c86103a23660046125bb565b610d20565b61029d6103b53660046127df565b610d8a565b6102ec6103c83660046125bb565b610d9c565b6102c8610deb565b6102c86103e3366004612747565b610e3f565b6102c86103f636600461281b565b610e9a565b6102ec6105dc81565b6102ec61041236600461271c565b6111f8565b6000546001600160a01b031661029d565b6102606104363660046127df565b611229565b6102c861044936600461281b565b6112fe565b61027d6115ec565b6103616104643660046125bb565b6115fb565b6102c86104773660046126e8565b611667565b6102ec610bb881565b6102c861049336600461266b565b6116fd565b6103616104a63660046125bb565b611737565b61027d6104b93660046127df565b6117a1565b6102c86104cc3660046127f7565b6118bd565b600b54610bb814610260565b6102ec6104eb36600461271c565b611b25565b6102ec6101f481565b6102ec611b41565b61026061050f3660046125f3565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6102c861054b3660046125bb565b611b4d565b60006001600160e01b031982166380ac58cd60e01b148061058157506001600160e01b03198216635b5e139f60e01b145b8061059c57506001600160e01b0319821663780e9d6360e01b145b806105b757506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600280546105cc90612a16565b80601f01602080910402602001604051908101604052809291908181526020018280546105f890612a16565b80156106455780601f1061061a57610100808354040283529160200191610645565b820191906000526020600020905b81548152906001019060200180831161062857829003601f168201915b5050505050905090565b600061065a82611c06565b610677576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061069e82610d8a565b9050806001600160a01b0316836001600160a01b031614156106d35760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216148015906106f357506106f1813361050f565b155b15610711576040516367d9dca160e11b815260040160405180910390fd5b61071c838383611c3c565b505050565b61071c838383611c98565b600061073783610d9c565b8210610756576040516306ed618760e11b815260040160405180910390fd5b6001546001600160801b0316600080805b8381101561082357600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff1615801592820192909252906107cf575061081b565b80516001600160a01b0316156107e457805192505b876001600160a01b0316836001600160a01b031614156108195786841415610812575093506105b792505050565b6001909301925b505b600101610767565b50600080fd5b6105dc61083681806129c6565b61084091906129c6565b81565b6000546001600160a01b031633146108905760405162461bcd60e51b81526020600482018190526024820152600080516020612a9383398151915260448201526064015b60405180910390fd5b600082116108e05760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f742061697264726f70206c657373207468616e2031206170706c656044820152606401610887565b6105dc82600d546108f191906129c6565b11156109345760405162461bcd60e51b8152602060048201526012602482015271426164206170706c65206f766572666c6f7760701b6044820152606401610887565b610bb882600b5461094591906129c6565b11156109935760405162461bcd60e51b815260206004820152601d60248201527f4e6f206d6f7265206170706c65732063616e2062652064726f707065640000006044820152606401610887565b6009546001146109db5760405162461bcd60e51b815260206004820152601360248201527257726f6e672061697264726f7020737461746560681b6044820152606401610887565b6101f482600a546109ec91906129c6565b1115610a3a5760405162461bcd60e51b815260206004820152601d60248201527f41697264726f702073746174652077696c6c20657863656564203530300000006044820152606401610887565b610a448183611eb7565b81600d6000828254610a5691906129c6565b9250508190555081600a6000828254610a6f91906129c6565b9250508190555081600b6000828254610a8891906129c6565b9091555050600a546101f41415610aa45760006009819055600a555b5050565b61071c838383604051806020016040528060008152506116fd565b60606000610ad083610d9c565b6001549091506001600160801b0316600080808467ffffffffffffffff811115610b0a57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610b33578160200160208202803683370190505b50905060005b84811015610c0d57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff161580159282019290925290610ba15750610c05565b80516001600160a01b031615610bb657805193505b886001600160a01b0316846001600160a01b03161415610c035781838681518110610bf157634e487b7160e01b600052603260045260246000fd5b60209081029190910101526001909401935b505b600101610b39565b509695505050505050565b6001546000906001600160801b031681805b82811015610cab57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290610ca25785831415610c9b5750949350505050565b6001909201915b50600101610c2a565b506040516329c8c00760e21b815260040160405180910390fd5b6000546001600160a01b03163314610d0d5760405162461bcd60e51b81526020600482018190526024820152600080516020612a938339815191526044820152606401610887565b8051610aa4906010906020840190612497565b6000546001600160a01b03163314610d685760405162461bcd60e51b81526020600482018190526024820152600080516020612a938339815191526044820152606401610887565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d9582611ed1565b5192915050565b60006001600160a01b038216610dc5576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6000546001600160a01b03163314610e335760405162461bcd60e51b81526020600482018190526024820152600080516020612a938339815191526044820152606401610887565b610e3d6000611ff7565b565b6000546001600160a01b03163314610e875760405162461bcd60e51b81526020600482018190526024820152600080516020612a938339815191526044820152606401610887565b600e805460ff1916911515919091179055565b60026008541415610eed5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610887565b6002600855600b54610bb81115610f415760405162461bcd60e51b8152602060048201526018602482015277105a5c991c9bdc1c1a5b99c8185c1c1b195cc81cdd1a5b1b60421b6044820152606401610887565b610f4a81611c06565b610f8a5760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610887565b610f9381611229565b15610fd25760405162461bcd60e51b815260206004820152600f60248201526e496e636f7272656374206170706c6560881b6044820152606401610887565b6011546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561101657600080fd5b505afa15801561102a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104e91906125d7565b6001600160a01b0316146110a45760405162461bcd60e51b815260206004820152601960248201527f4e6f7420746865206f776e6572206f6620676976656e204441000000000000006044820152606401610887565b336110ae82610d8a565b6001600160a01b0316146111045760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420746865206f776e6572206f6620676976656e204170706c65000000006044820152606401610887565b600a82116111545760405162461bcd60e51b815260206004820152601e60248201527f417474656d7074696e6720746f206275726e2061206d6f6e61726368213f00006044820152606401610887565b601154604051632770a7eb60e21b8152336004820152602481018490526001600160a01b0390911690639dc29fac90604401600060405180830381600087803b1580156111a057600080fd5b505af11580156111b4573d6000803e3d6000fd5b505050506111c181612047565b6111cc336001611eb7565b503360009081526013602090815260408220805460018181018355918452919092200191909155600855565b6012602052816000526040600020818154811061121457600080fd5b90600052602060002001600091509150505481565b60006111948210801561123a575060015b6112865760405162461bcd60e51b815260206004820152601860248201527f4944206973206e6f7420696e20746f6b656e2072616e676500000000000000006044820152606401610887565b6112916001836129c6565b91506101f482116112a457506001919050565b6103e8821180156112b757506105dc8211155b156112c457506001919050565b6107d0821180156112d757506109c48211155b156112e457506001919050565b610bb88211156112f657506001919050565b506000919050565b600260085414156113515760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610887565b6002600855600b54610bb811156113a55760405162461bcd60e51b8152602060048201526018602482015277105a5c991c9bdc1c1a5b99c8185c1c1b195cc81cdd1a5b1b60421b6044820152606401610887565b6113ae81611c06565b6113ee5760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610887565b6113f781611229565b6114355760405162461bcd60e51b815260206004820152600f60248201526e496e636f7272656374206170706c6560881b6044820152606401610887565b6011546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561147957600080fd5b505afa15801561148d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b191906125d7565b6001600160a01b0316146115075760405162461bcd60e51b815260206004820152601960248201527f4e6f7420746865206f776e6572206f6620676976656e204441000000000000006044820152606401610887565b3361151182610d8a565b6001600160a01b0316146115675760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420746865206f776e6572206f6620676976656e204170706c65000000006044820152606401610887565b600a82116115b75760405162461bcd60e51b815260206004820152601960248201527f43616e277420617363656e642061206d6f6e617263682e2e2e000000000000006044820152606401610887565b6115c081612047565b503360009081526012602090815260408220805460018181018355918452919092200191909155600855565b6060600380546105cc90612a16565b6001600160a01b03811660009081526013602090815260409182902080548351818402810184019094528084526060939283018282801561165b57602002820191906000526020600020905b815481526020019060010190808311611647575b50505050509050919050565b6001600160a01b0382163314156116915760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611708848484611c98565b611714848484846121e6565b611731576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6001600160a01b03811660009081526012602090815260409182902080548351818402810184019094528084526060939283018282801561165b57602002820191906000526020600020908154815260200190600101908083116116475750505050509050919050565b60606117ac82611c06565b6118105760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610887565b600061181b83611229565b611840576040518060400160405280600381526020016210985960ea1b815250611863565b6040518060400160405280600981526020016820b9b1b2b739b4b7b760b91b8152505b90506010805461187290612a16565b1515905061188f57604051806020016040528060008152506118b6565b601081600f6040516020016118a693929190612900565b6040516020818303038152906040525b9392505050565b6000546001600160a01b031633146119055760405162461bcd60e51b81526020600482018190526024820152600080516020612a938339815191526044820152606401610887565b600082116119555760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f742061697264726f70206c657373207468616e2031206170706c656044820152606401610887565b6105dc82600c5461196691906129c6565b11156119b45760405162461bcd60e51b815260206004820152601860248201527f417363656e73696f6e206170706c65206f766572666c6f7700000000000000006044820152606401610887565b610bb882600b546119c591906129c6565b1115611a135760405162461bcd60e51b815260206004820152601d60248201527f4e6f206d6f7265206170706c65732063616e2062652064726f707065640000006044820152606401610887565b60095415611a595760405162461bcd60e51b815260206004820152601360248201527257726f6e672061697264726f7020737461746560681b6044820152606401610887565b6101f482600a54611a6a91906129c6565b1115611ab85760405162461bcd60e51b815260206004820152601a60248201527f4578636565646564204d41585f53544154455f41495244524f500000000000006044820152606401610887565b611ac28183611eb7565b81600c6000828254611ad491906129c6565b9250508190555081600a6000828254611aed91906129c6565b9250508190555081600b6000828254611b0691906129c6565b9091555050600a546101f41415610aa45760016009556000600a555050565b6013602052816000526040600020818154811061121457600080fd5b6108406105dc806129c6565b6000546001600160a01b03163314611b955760405162461bcd60e51b81526020600482018190526024820152600080516020612a938339815191526044820152606401610887565b6001600160a01b038116611bfa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610887565b611c0381611ff7565b50565b6001546000906001600160801b0316821080156105b7575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000611ca382611ed1565b80519091506000906001600160a01b0316336001600160a01b03161480611cd157508151611cd1903361050f565b80611cec575033611ce18461064f565b6001600160a01b0316145b905080611d0c57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b031614611d415760405162a1148160e81b815260040160405180910390fd5b6001600160a01b038416611d6857604051633a954ecd60e21b815260040160405180910390fd5b611d786000848460000151611c3c565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b429092169190910217909255908601808352912054909116611e6d576001546001600160801b0316811015611e6d578251600082815260046020908152604090912080549186015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b610aa48282604051806020016040528060008152506122f5565b604080516060810182526000808252602082018190529181019190915260015482906001600160801b0316811015611fde57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290611fdc5780516001600160a01b031615611f72579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215611fd7579392505050565b611f72565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061205282611ed1565b90506120646000838360000151611c3c565b80516001600160a01b039081166000908152600560209081526040808320805467ffffffffffffffff19811667ffffffffffffffff91821660001901821617909155855185168452818420805467ffffffffffffffff60801b198116600160801b9182900484166001908101851690920217909155865188865260049094528285208054600160e01b9588166001600160e01b031990911617600160a01b42909416939093029290921760ff60e01b1916939093179055908501808352912054909116612186576001546001600160801b0316811015612186578151600082815260046020908152604090912080549185015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b50805160405183916000916001600160a01b03909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180546001600160801b03600160801b808304821684018216029116179055565b60006001600160a01b0384163b156122e957604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061222a903390899088908890600401612933565b602060405180830381600087803b15801561224457600080fd5b505af1925050508015612274575060408051601f3d908101601f191682019092526122719181019061277d565b60015b6122cf573d8080156122a2576040519150601f19603f3d011682016040523d82523d6000602084013e6122a7565b606091505b5080516122c7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506122ed565b5060015b949350505050565b61071c838383600180546001600160801b03166001600160a01b03851661232e57604051622e076360e81b815260040160405180910390fd5b8361234c5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526004909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b858110156124685760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a483801561243e575061243c60008884886121e6565b155b1561245c576040516368d2bf6b60e11b815260040160405180910390fd5b600191820191016123e7565b50600180546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055611eb0565b8280546124a390612a16565b90600052602060002090601f0160209004810192826124c5576000855561250b565b82601f106124de57805160ff191683800117855561250b565b8280016001018555821561250b579182015b8281111561250b5782518255916020019190600101906124f0565b5061251792915061251b565b5090565b5b80821115612517576000815560010161251c565b600067ffffffffffffffff8084111561254b5761254b612a51565b604051601f8501601f19908116603f0116810190828211818310171561257357612573612a51565b8160405280935085815286868601111561258c57600080fd5b858560208301376000602087830101525050509392505050565b803580151581146125b657600080fd5b919050565b6000602082840312156125cc578081fd5b81356118b681612a67565b6000602082840312156125e8578081fd5b81516118b681612a67565b60008060408385031215612605578081fd5b823561261081612a67565b9150602083013561262081612a67565b809150509250929050565b60008060006060848603121561263f578081fd5b833561264a81612a67565b9250602084013561265a81612a67565b929592945050506040919091013590565b60008060008060808587031215612680578081fd5b843561268b81612a67565b9350602085013561269b81612a67565b925060408501359150606085013567ffffffffffffffff8111156126bd578182fd5b8501601f810187136126cd578182fd5b6126dc87823560208401612530565b91505092959194509250565b600080604083850312156126fa578182fd5b823561270581612a67565b9150612713602084016125a6565b90509250929050565b6000806040838503121561272e578182fd5b823561273981612a67565b946020939093013593505050565b600060208284031215612758578081fd5b6118b6826125a6565b600060208284031215612772578081fd5b81356118b681612a7c565b60006020828403121561278e578081fd5b81516118b681612a7c565b6000602082840312156127aa578081fd5b813567ffffffffffffffff8111156127c0578182fd5b8201601f810184136127d0578182fd5b6122ed84823560208401612530565b6000602082840312156127f0578081fd5b5035919050565b60008060408385031215612809578182fd5b82359150602083013561262081612a67565b6000806040838503121561282d578182fd5b50508035926020909101359150565b600081518084526128548160208601602086016129ea565b601f01601f19169290920160200192915050565b8054600090600181811c908083168061288257607f831692505b60208084108214156128a257634e487b7160e01b86526022600452602486fd5b8180156128b657600181146128c7576128f4565b60ff198616895284890196506128f4565b60008881526020902060005b868110156128ec5781548b8201529085019083016128d3565b505084890196505b50505050505092915050565b600061290c8286612868565b845161291c8183602089016129ea565b61292881830186612868565b979650505050505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612965608083018461283c565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156129a75783518352928401929184019160010161298b565b50909695505050505050565b6020815260006118b6602083018461283c565b600082198211156129e557634e487b7160e01b81526011600452602481fd5b500190565b60005b83811015612a055781810151838201526020016129ed565b838111156117315750506000910152565b600181811c90821680612a2a57607f821691505b60208210811415612a4b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611c0357600080fd5b6001600160e01b031981168114611c0357600080fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220cb59002d9e1f409684bb92ff7e81bb4bade9cb830cc918a2b706b9a17d4345d764736f6c63430008040033000000000000000000000000c631164b6cb1340b5123c9162f8558c866de19260000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005968747470733a2f2f646976696e65616e61726368792e6d7970696e6174612e636c6f75642f697066732f516d5639386434584450366a736843464e387134506a37364336744e58573678636f413832774d4a4432764b4a612f00000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102485760003560e01c806386afe0e41161013b578063c0e57944116100b8578063dc4554f31161007c578063dc4554f3146103fb578063e23bf79d146104f0578063e8b0be82146104f9578063e985e9c514610501578063f2fde38b1461053d57600080fd5b8063c0e5794414610498578063c87b56dd146104ab578063cdc6b2e2146104be578063cfccb2d1146104d1578063dada170a146104dd57600080fd5b80639884d2c8116100ff5780639884d2c8146103fb578063a14dca7714610456578063a22cb46514610469578063a99dc3891461047c578063b88d4fde1461048557600080fd5b806386afe0e4146104045780638da5cb5b146104175780639168f7f91461042857806395781d381461043b57806395d89b411461044e57600080fd5b8063438b6300116101c957806370a082311161018d57806370a08231146103ba578063715018a6146103cd5780637678cab5146103d557806378b70a50146103e85780638358d872146103fb57600080fd5b8063438b63001461034e5780634f6ccce71461036e57806355f804b3146103815780635c3e4cec146103945780636352211e146103a757600080fd5b806323b872dd1161021057806323b872dd146102fa5780632f745c591461030d57806332cb6b0c146103205780633f4ca9b71461032857806342842e0e1461033b57600080fd5b806301ffc9a71461024d57806306fdde0314610275578063081812fc1461028a578063095ea7b3146102b557806318160ddd146102ca575b600080fd5b61026061025b366004612761565b610550565b60405190151581526020015b60405180910390f35b61027d6105bd565b60405161026c91906129b3565b61029d6102983660046127df565b61064f565b6040516001600160a01b03909116815260200161026c565b6102c86102c336600461271c565b610693565b005b6102ec6001546001600160801b03600160801b82048116918116919091031690565b60405190815260200161026c565b6102c861030836600461262b565b610721565b6102ec61031b36600461271c565b61072c565b6102ec610829565b6102c86103363660046127f7565b610843565b6102c861034936600461262b565b610aa8565b61036161035c3660046125bb565b610ac3565b60405161026c919061296f565b6102ec61037c3660046127df565b610c18565b6102c861038f366004612799565b610cc5565b6102c86103a23660046125bb565b610d20565b61029d6103b53660046127df565b610d8a565b6102ec6103c83660046125bb565b610d9c565b6102c8610deb565b6102c86103e3366004612747565b610e3f565b6102c86103f636600461281b565b610e9a565b6102ec6105dc81565b6102ec61041236600461271c565b6111f8565b6000546001600160a01b031661029d565b6102606104363660046127df565b611229565b6102c861044936600461281b565b6112fe565b61027d6115ec565b6103616104643660046125bb565b6115fb565b6102c86104773660046126e8565b611667565b6102ec610bb881565b6102c861049336600461266b565b6116fd565b6103616104a63660046125bb565b611737565b61027d6104b93660046127df565b6117a1565b6102c86104cc3660046127f7565b6118bd565b600b54610bb814610260565b6102ec6104eb36600461271c565b611b25565b6102ec6101f481565b6102ec611b41565b61026061050f3660046125f3565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6102c861054b3660046125bb565b611b4d565b60006001600160e01b031982166380ac58cd60e01b148061058157506001600160e01b03198216635b5e139f60e01b145b8061059c57506001600160e01b0319821663780e9d6360e01b145b806105b757506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600280546105cc90612a16565b80601f01602080910402602001604051908101604052809291908181526020018280546105f890612a16565b80156106455780601f1061061a57610100808354040283529160200191610645565b820191906000526020600020905b81548152906001019060200180831161062857829003601f168201915b5050505050905090565b600061065a82611c06565b610677576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061069e82610d8a565b9050806001600160a01b0316836001600160a01b031614156106d35760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216148015906106f357506106f1813361050f565b155b15610711576040516367d9dca160e11b815260040160405180910390fd5b61071c838383611c3c565b505050565b61071c838383611c98565b600061073783610d9c565b8210610756576040516306ed618760e11b815260040160405180910390fd5b6001546001600160801b0316600080805b8381101561082357600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff1615801592820192909252906107cf575061081b565b80516001600160a01b0316156107e457805192505b876001600160a01b0316836001600160a01b031614156108195786841415610812575093506105b792505050565b6001909301925b505b600101610767565b50600080fd5b6105dc61083681806129c6565b61084091906129c6565b81565b6000546001600160a01b031633146108905760405162461bcd60e51b81526020600482018190526024820152600080516020612a9383398151915260448201526064015b60405180910390fd5b600082116108e05760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f742061697264726f70206c657373207468616e2031206170706c656044820152606401610887565b6105dc82600d546108f191906129c6565b11156109345760405162461bcd60e51b8152602060048201526012602482015271426164206170706c65206f766572666c6f7760701b6044820152606401610887565b610bb882600b5461094591906129c6565b11156109935760405162461bcd60e51b815260206004820152601d60248201527f4e6f206d6f7265206170706c65732063616e2062652064726f707065640000006044820152606401610887565b6009546001146109db5760405162461bcd60e51b815260206004820152601360248201527257726f6e672061697264726f7020737461746560681b6044820152606401610887565b6101f482600a546109ec91906129c6565b1115610a3a5760405162461bcd60e51b815260206004820152601d60248201527f41697264726f702073746174652077696c6c20657863656564203530300000006044820152606401610887565b610a448183611eb7565b81600d6000828254610a5691906129c6565b9250508190555081600a6000828254610a6f91906129c6565b9250508190555081600b6000828254610a8891906129c6565b9091555050600a546101f41415610aa45760006009819055600a555b5050565b61071c838383604051806020016040528060008152506116fd565b60606000610ad083610d9c565b6001549091506001600160801b0316600080808467ffffffffffffffff811115610b0a57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610b33578160200160208202803683370190505b50905060005b84811015610c0d57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff161580159282019290925290610ba15750610c05565b80516001600160a01b031615610bb657805193505b886001600160a01b0316846001600160a01b03161415610c035781838681518110610bf157634e487b7160e01b600052603260045260246000fd5b60209081029190910101526001909401935b505b600101610b39565b509695505050505050565b6001546000906001600160801b031681805b82811015610cab57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290610ca25785831415610c9b5750949350505050565b6001909201915b50600101610c2a565b506040516329c8c00760e21b815260040160405180910390fd5b6000546001600160a01b03163314610d0d5760405162461bcd60e51b81526020600482018190526024820152600080516020612a938339815191526044820152606401610887565b8051610aa4906010906020840190612497565b6000546001600160a01b03163314610d685760405162461bcd60e51b81526020600482018190526024820152600080516020612a938339815191526044820152606401610887565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d9582611ed1565b5192915050565b60006001600160a01b038216610dc5576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6000546001600160a01b03163314610e335760405162461bcd60e51b81526020600482018190526024820152600080516020612a938339815191526044820152606401610887565b610e3d6000611ff7565b565b6000546001600160a01b03163314610e875760405162461bcd60e51b81526020600482018190526024820152600080516020612a938339815191526044820152606401610887565b600e805460ff1916911515919091179055565b60026008541415610eed5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610887565b6002600855600b54610bb81115610f415760405162461bcd60e51b8152602060048201526018602482015277105a5c991c9bdc1c1a5b99c8185c1c1b195cc81cdd1a5b1b60421b6044820152606401610887565b610f4a81611c06565b610f8a5760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610887565b610f9381611229565b15610fd25760405162461bcd60e51b815260206004820152600f60248201526e496e636f7272656374206170706c6560881b6044820152606401610887565b6011546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561101657600080fd5b505afa15801561102a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104e91906125d7565b6001600160a01b0316146110a45760405162461bcd60e51b815260206004820152601960248201527f4e6f7420746865206f776e6572206f6620676976656e204441000000000000006044820152606401610887565b336110ae82610d8a565b6001600160a01b0316146111045760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420746865206f776e6572206f6620676976656e204170706c65000000006044820152606401610887565b600a82116111545760405162461bcd60e51b815260206004820152601e60248201527f417474656d7074696e6720746f206275726e2061206d6f6e61726368213f00006044820152606401610887565b601154604051632770a7eb60e21b8152336004820152602481018490526001600160a01b0390911690639dc29fac90604401600060405180830381600087803b1580156111a057600080fd5b505af11580156111b4573d6000803e3d6000fd5b505050506111c181612047565b6111cc336001611eb7565b503360009081526013602090815260408220805460018181018355918452919092200191909155600855565b6012602052816000526040600020818154811061121457600080fd5b90600052602060002001600091509150505481565b60006111948210801561123a575060015b6112865760405162461bcd60e51b815260206004820152601860248201527f4944206973206e6f7420696e20746f6b656e2072616e676500000000000000006044820152606401610887565b6112916001836129c6565b91506101f482116112a457506001919050565b6103e8821180156112b757506105dc8211155b156112c457506001919050565b6107d0821180156112d757506109c48211155b156112e457506001919050565b610bb88211156112f657506001919050565b506000919050565b600260085414156113515760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610887565b6002600855600b54610bb811156113a55760405162461bcd60e51b8152602060048201526018602482015277105a5c991c9bdc1c1a5b99c8185c1c1b195cc81cdd1a5b1b60421b6044820152606401610887565b6113ae81611c06565b6113ee5760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610887565b6113f781611229565b6114355760405162461bcd60e51b815260206004820152600f60248201526e496e636f7272656374206170706c6560881b6044820152606401610887565b6011546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561147957600080fd5b505afa15801561148d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b191906125d7565b6001600160a01b0316146115075760405162461bcd60e51b815260206004820152601960248201527f4e6f7420746865206f776e6572206f6620676976656e204441000000000000006044820152606401610887565b3361151182610d8a565b6001600160a01b0316146115675760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420746865206f776e6572206f6620676976656e204170706c65000000006044820152606401610887565b600a82116115b75760405162461bcd60e51b815260206004820152601960248201527f43616e277420617363656e642061206d6f6e617263682e2e2e000000000000006044820152606401610887565b6115c081612047565b503360009081526012602090815260408220805460018181018355918452919092200191909155600855565b6060600380546105cc90612a16565b6001600160a01b03811660009081526013602090815260409182902080548351818402810184019094528084526060939283018282801561165b57602002820191906000526020600020905b815481526020019060010190808311611647575b50505050509050919050565b6001600160a01b0382163314156116915760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611708848484611c98565b611714848484846121e6565b611731576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6001600160a01b03811660009081526012602090815260409182902080548351818402810184019094528084526060939283018282801561165b57602002820191906000526020600020908154815260200190600101908083116116475750505050509050919050565b60606117ac82611c06565b6118105760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610887565b600061181b83611229565b611840576040518060400160405280600381526020016210985960ea1b815250611863565b6040518060400160405280600981526020016820b9b1b2b739b4b7b760b91b8152505b90506010805461187290612a16565b1515905061188f57604051806020016040528060008152506118b6565b601081600f6040516020016118a693929190612900565b6040516020818303038152906040525b9392505050565b6000546001600160a01b031633146119055760405162461bcd60e51b81526020600482018190526024820152600080516020612a938339815191526044820152606401610887565b600082116119555760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f742061697264726f70206c657373207468616e2031206170706c656044820152606401610887565b6105dc82600c5461196691906129c6565b11156119b45760405162461bcd60e51b815260206004820152601860248201527f417363656e73696f6e206170706c65206f766572666c6f7700000000000000006044820152606401610887565b610bb882600b546119c591906129c6565b1115611a135760405162461bcd60e51b815260206004820152601d60248201527f4e6f206d6f7265206170706c65732063616e2062652064726f707065640000006044820152606401610887565b60095415611a595760405162461bcd60e51b815260206004820152601360248201527257726f6e672061697264726f7020737461746560681b6044820152606401610887565b6101f482600a54611a6a91906129c6565b1115611ab85760405162461bcd60e51b815260206004820152601a60248201527f4578636565646564204d41585f53544154455f41495244524f500000000000006044820152606401610887565b611ac28183611eb7565b81600c6000828254611ad491906129c6565b9250508190555081600a6000828254611aed91906129c6565b9250508190555081600b6000828254611b0691906129c6565b9091555050600a546101f41415610aa45760016009556000600a555050565b6013602052816000526040600020818154811061121457600080fd5b6108406105dc806129c6565b6000546001600160a01b03163314611b955760405162461bcd60e51b81526020600482018190526024820152600080516020612a938339815191526044820152606401610887565b6001600160a01b038116611bfa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610887565b611c0381611ff7565b50565b6001546000906001600160801b0316821080156105b7575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000611ca382611ed1565b80519091506000906001600160a01b0316336001600160a01b03161480611cd157508151611cd1903361050f565b80611cec575033611ce18461064f565b6001600160a01b0316145b905080611d0c57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b031614611d415760405162a1148160e81b815260040160405180910390fd5b6001600160a01b038416611d6857604051633a954ecd60e21b815260040160405180910390fd5b611d786000848460000151611c3c565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b429092169190910217909255908601808352912054909116611e6d576001546001600160801b0316811015611e6d578251600082815260046020908152604090912080549186015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b610aa48282604051806020016040528060008152506122f5565b604080516060810182526000808252602082018190529181019190915260015482906001600160801b0316811015611fde57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290611fdc5780516001600160a01b031615611f72579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215611fd7579392505050565b611f72565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061205282611ed1565b90506120646000838360000151611c3c565b80516001600160a01b039081166000908152600560209081526040808320805467ffffffffffffffff19811667ffffffffffffffff91821660001901821617909155855185168452818420805467ffffffffffffffff60801b198116600160801b9182900484166001908101851690920217909155865188865260049094528285208054600160e01b9588166001600160e01b031990911617600160a01b42909416939093029290921760ff60e01b1916939093179055908501808352912054909116612186576001546001600160801b0316811015612186578151600082815260046020908152604090912080549185015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b50805160405183916000916001600160a01b03909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180546001600160801b03600160801b808304821684018216029116179055565b60006001600160a01b0384163b156122e957604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061222a903390899088908890600401612933565b602060405180830381600087803b15801561224457600080fd5b505af1925050508015612274575060408051601f3d908101601f191682019092526122719181019061277d565b60015b6122cf573d8080156122a2576040519150601f19603f3d011682016040523d82523d6000602084013e6122a7565b606091505b5080516122c7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506122ed565b5060015b949350505050565b61071c838383600180546001600160801b03166001600160a01b03851661232e57604051622e076360e81b815260040160405180910390fd5b8361234c5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526004909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b858110156124685760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a483801561243e575061243c60008884886121e6565b155b1561245c576040516368d2bf6b60e11b815260040160405180910390fd5b600191820191016123e7565b50600180546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055611eb0565b8280546124a390612a16565b90600052602060002090601f0160209004810192826124c5576000855561250b565b82601f106124de57805160ff191683800117855561250b565b8280016001018555821561250b579182015b8281111561250b5782518255916020019190600101906124f0565b5061251792915061251b565b5090565b5b80821115612517576000815560010161251c565b600067ffffffffffffffff8084111561254b5761254b612a51565b604051601f8501601f19908116603f0116810190828211818310171561257357612573612a51565b8160405280935085815286868601111561258c57600080fd5b858560208301376000602087830101525050509392505050565b803580151581146125b657600080fd5b919050565b6000602082840312156125cc578081fd5b81356118b681612a67565b6000602082840312156125e8578081fd5b81516118b681612a67565b60008060408385031215612605578081fd5b823561261081612a67565b9150602083013561262081612a67565b809150509250929050565b60008060006060848603121561263f578081fd5b833561264a81612a67565b9250602084013561265a81612a67565b929592945050506040919091013590565b60008060008060808587031215612680578081fd5b843561268b81612a67565b9350602085013561269b81612a67565b925060408501359150606085013567ffffffffffffffff8111156126bd578182fd5b8501601f810187136126cd578182fd5b6126dc87823560208401612530565b91505092959194509250565b600080604083850312156126fa578182fd5b823561270581612a67565b9150612713602084016125a6565b90509250929050565b6000806040838503121561272e578182fd5b823561273981612a67565b946020939093013593505050565b600060208284031215612758578081fd5b6118b6826125a6565b600060208284031215612772578081fd5b81356118b681612a7c565b60006020828403121561278e578081fd5b81516118b681612a7c565b6000602082840312156127aa578081fd5b813567ffffffffffffffff8111156127c0578182fd5b8201601f810184136127d0578182fd5b6122ed84823560208401612530565b6000602082840312156127f0578081fd5b5035919050565b60008060408385031215612809578182fd5b82359150602083013561262081612a67565b6000806040838503121561282d578182fd5b50508035926020909101359150565b600081518084526128548160208601602086016129ea565b601f01601f19169290920160200192915050565b8054600090600181811c908083168061288257607f831692505b60208084108214156128a257634e487b7160e01b86526022600452602486fd5b8180156128b657600181146128c7576128f4565b60ff198616895284890196506128f4565b60008881526020902060005b868110156128ec5781548b8201529085019083016128d3565b505084890196505b50505050505092915050565b600061290c8286612868565b845161291c8183602089016129ea565b61292881830186612868565b979650505050505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612965608083018461283c565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156129a75783518352928401929184019160010161298b565b50909695505050505050565b6020815260006118b6602083018461283c565b600082198211156129e557634e487b7160e01b81526011600452602481fd5b500190565b60005b83811015612a055781810151838201526020016129ed565b838111156117315750506000910152565b600181811c90821680612a2a57607f821691505b60208210811415612a4b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611c0357600080fd5b6001600160e01b031981168114611c0357600080fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220cb59002d9e1f409684bb92ff7e81bb4bade9cb830cc918a2b706b9a17d4345d764736f6c63430008040033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000c631164b6cb1340b5123c9162f8558c866de19260000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005968747470733a2f2f646976696e65616e61726368792e6d7970696e6174612e636c6f75642f697066732f516d5639386434584450366a736843464e387134506a37364336744e58573678636f413832774d4a4432764b4a612f00000000000000

-----Decoded View---------------
Arg [0] : daContract (address): 0xc631164B6CB1340B5123c9162f8558c866dE1926
Arg [1] : initUri (string): https://divineanarchy.mypinata.cloud/ipfs/QmV98d4XDP6jshCFN8q4Pj76C6tNXW6xcoA82wMJD2vKJa/

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000c631164b6cb1340b5123c9162f8558c866de1926
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000059
Arg [3] : 68747470733a2f2f646976696e65616e61726368792e6d7970696e6174612e63
Arg [4] : 6c6f75642f697066732f516d5639386434584450366a736843464e387134506a
Arg [5] : 37364336744e58573678636f413832774d4a4432764b4a612f00000000000000


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.