ERC-721
Source Code
Overview
Max Total Supply
20,739 DEEZ
Holders
6,558
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
9 DEEZLoading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
OnchainNutz
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
/*
( ͡° ͜ʖ ͡°) ╰⋃╯╰⋃╯╰⋃╯
*/
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import 'base64-sol/base64.sol';
contract OnchainNutz is ERC721Enumerable, Ownable, ReentrancyGuard {
enum MintStatus { DISABLED, PUBLIC }
MintStatus public mintStatus = MintStatus.PUBLIC;
uint256 public price = 0.0005 ether;
uint256 public mintTokenId = 0;
constructor() ERC721("BasedBallz", "DEEZ") {
}
function _mintSacks(address to, uint256 quantity) private {
for(uint256 i = 0; i < quantity; i++) {
_mint(to, ++mintTokenId);
}
}
function reserveSacks(address to, uint256 numToMint) external onlyOwner {
_mintSacks(to, numToMint);
}
function mintSacks(uint256 numToMint) external payable nonReentrant {
require(numToMint > 0, "Non-zero mint");
require(mintStatus == MintStatus.PUBLIC, "Mint disabled");
require(msg.value >= numToMint * price, "Bad price" );
_mintSacks(msg.sender, numToMint);
}
function setStatus(uint256 _status) external onlyOwner {
mintStatus = MintStatus(_status);
}
function setPrice(uint256 _price) external onlyOwner {
price = _price;
}
function withdraw(address to) external onlyOwner {
uint256 contractBalance = address(this).balance;
(bool success,) = payable(to).call{ value: contractBalance }("");
require(success, "WITHDRAWAL_FAILED");
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "Nonexistent token");
string memory svg = render(tokenId);
string memory json = Base64.encode(
bytes(string(
abi.encodePacked(
'{"name": "BasedBallz #', Strings.toString(tokenId),'",',
'"description": "Do deez nuts hang low? Does it wobble to and fro?",',
'"attributes":[',
'{"trait_type":"Hangs Low", "value":"',"True",'"},'
'{"trait_type":"Deez", "value":"',"Nuts",'"},'
'{"trait_type":"Ballz", "value":"',"True",'"}'
'],',
'"image": "data:image/svg+xml;base64,', Base64.encode(bytes(svg)), '"}'
)
))
);
return string(abi.encodePacked('data:application/json;base64,', json));
}
function randIndex(uint256 seed, uint256 randVal, uint256 len) private pure returns (uint256) {
return (seed/randVal) % len;
}
string[] public backgroundColors = [
"#FAFAFA", // Almost white
"#E0E0E0", // Light gray
"#FCE4EC", // Light pink
"#F3E5F5", // Light purple
"#E8EAF6", // Light indigo
"#E3F2FD", // Light blue
"#E1F5FE", // Lighter blue
"#E0F7FA", // Light cyan
"#E0F2F1", // Light teal
"#E8F5E9", // Light green
"#F1F8E9", // Light lime
"#FFF9C4", // Light yellow
"#FFECB3", // Light amber
"#FFE0B2", // Light orange
"#FFEBEE" // Lighter pink
];
string[] public sackColors = ["#FF0000", "#FF6600", "#FFFF00", "#99FF00", "#00FF33", "#00FF99", "#00FFFF", "#00CCFF", "#0099FF", "#0033FF", "#0000FF", "#FF00FF"];
function render(uint256 tokenId) public view returns (string memory) {
uint256 seed = uint256(keccak256(abi.encodePacked(tokenId)));
// colors
string memory backgroundColor = backgroundColors[randIndex(seed, 1293012390, backgroundColors.length)];
string memory leftColor = sackColors[randIndex(seed, 123, sackColors.length)];
string memory rightColor = sackColors[randIndex(seed, 322, sackColors.length)];
return string.concat(
'<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="300.000000pt" height="258.000000pt" viewBox="0 0 300.000000 258.000000" preserveAspectRatio="xMidYMid meet"> <rect width="300" height="258" fill="',
backgroundColor,
'" /> <circle cx="95" cy="145" r="40" fill="',
leftColor,
'"/> <circle cx="190" cy="145" r="40" fill="',
rightColor,
'"/> <g transform="translate(0.000000,228.000000) scale(0.100000,-0.100000)" fill="#000000" stroke="none"> <path d="M833 2358 c-4 -7 -6 -78 -4 -158 7 -353 -82 -649 -256 -853 -148 -174 -183 -251 -190 -422 -8 -184 43 -320 169 -446 121 -121 267 -175 448 -166 122 6 206 33 302 97 l60 40 38 -30 c99 -78 236 -116 388 -107 163 9 280 65 393 185 114 121 165 262 156 432 -8 151 -54 257 -166 384 -136 154 -212 311 -256 531 -20 98 -32 290 -25 408 3 49 1 95 -3 103 -7 12 -88 14 -527 14 -404 0 -521 -3 -527 -12z m987 -205 c0 -376 98 -659 309 -897 101 -114 140 -215 141 -362 0 -233 -159 -440 -385 -499 -73 -18 -203 -19 -270 -1 -55 14 -147 57 -184 85 l-23 18 33 44 c68 89 118 240 119 355 0 58 -19 86 -48 67 -13 -8 -19 -32 -24 -99 -20 -284 -237 -484 -523 -484 -137 0 -249 42 -348 131 -112 99 -166 225 -167 380 0 159 40 257 163 398 190 217 286 511 287 874 l0 137 460 0 460 0 0 -147z"/> <path d="M1463 1274 c-19 -50 -3 -107 29 -102 21 3 23 9 23 58 0 49 -2 55 -23 58 -14 2 -25 -3 -29 -14z"/> <path d="M973 1226 c-5 -8 -7 -35 -5 -60 4 -45 18 -61 46 -50 19 7 26 93 8 111 -18 17 -39 17 -49 -1z"/> <path d="M1783 1153 c-21 -8 -17 -100 5 -112 31 -16 52 5 52 52 0 56 -19 76 -57 60z"/> <path d="M662 1098 c-7 -7 -12 -33 -12 -59 0 -39 4 -49 20 -54 12 -4 27 -1 35 5 20 16 19 84 -1 104 -19 19 -26 20 -42 4z"/> <path d="M2017 1023 c-4 -3 -7 -28 -7 -55 0 -52 18 -71 49 -51 20 12 27 79 10 99 -12 15 -41 19 -52 7z"/> <path d="M1252 978 c-27 -27 -6 -118 27 -118 20 0 32 32 29 77 -2 39 -7 49 -23 51 -11 1 -26 -3 -33 -10z"/> <path d="M892 928 c-19 -19 -15 -107 4 -115 28 -10 49 11 52 54 4 55 -28 89 -56 61z"/> <path d="M1726 844 c-34 -33 -11 -120 30 -112 15 3 20 13 22 57 2 37 -1 57 -10 62 -18 12 -24 11 -42 -7z"/> <path d="M1082 701 c-9 -5 -12 -25 -10 -57 3 -43 6 -49 27 -52 29 -5 41 12 41 59 0 49 -25 71 -58 50z"/> <path d="M727 673 c-4 -3 -7 -28 -7 -55 0 -36 4 -50 16 -55 38 -14 64 35 50 93 -5 17 -13 24 -30 24 -12 0 -26 -3 -29 -7z"/> <path d="M1936 665 c-11 -30 -6 -82 9 -95 8 -6 22 -10 32 -8 15 3 18 13 18 58 0 52 -1 55 -26 58 -17 2 -29 -3 -33 -13z"/> </g> </svg>'
);
}
}// 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);
}
}// 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;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// 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;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @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 ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @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) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
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 virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_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 {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_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 {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @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.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @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`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId);
}
/**
* @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 {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @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.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* 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, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)
pragma solidity ^0.8.0;
import "../ERC721.sol";
import "./IERC721Enumerable.sol";
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* 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, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnumeration(from, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (to != from) {
_addTokenToOwnerEnumeration(to, tokenId);
}
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
}// 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);
}// 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);
}// 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;
}// 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);
}// 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);
}
}
}
}// 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;
}
}// 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;
}
}// 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);
}// 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);
}
}// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides functions for encoding/decoding base64 library Base64 { string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000" hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000" hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000" hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE_ENCODE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { // read 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // write 4 characters mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and( input, 0x3F)))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } function decode(string memory _data) internal pure returns (bytes memory) { bytes memory data = bytes(_data); if (data.length == 0) return new bytes(0); require(data.length % 4 == 0, "invalid base64 decoder input"); // load the table into memory bytes memory table = TABLE_DECODE; // every 4 characters represent 3 bytes uint256 decodedLen = (data.length / 4) * 3; // add some extra buffer at the end required for the writing bytes memory result = new bytes(decodedLen + 32); assembly { // padding with '=' let lastBytes := mload(add(data, mload(data))) if eq(and(lastBytes, 0xFF), 0x3d) { decodedLen := sub(decodedLen, 1) if eq(and(lastBytes, 0xFFFF), 0x3d3d) { decodedLen := sub(decodedLen, 1) } } // set the actual output length mstore(result, decodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 4 characters at a time for {} lt(dataPtr, endPtr) {} { // read 4 characters dataPtr := add(dataPtr, 4) let input := mload(dataPtr) // write 3 bytes let output := add( add( shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)), shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))), add( shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)), and(mload(add(tablePtr, and( input , 0xFF))), 0xFF) ) ) mstore(resultPtr, shl(232, output)) resultPtr := add(resultPtr, 3) } } return result; } }
{
"optimizer": {
"enabled": true,
"runs": 200,
"details": {
"yul": false
}
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"backgroundColors","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"numToMint","type":"uint256"}],"name":"mintSacks","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintStatus","outputs":[{"internalType":"enum OnchainNutz.MintStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"render","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"numToMint","type":"uint256"}],"name":"reserveSacks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sackColors","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"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":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_status","type":"uint256"}],"name":"setStatus","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":"to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
600c805460ff191660011790556601c6bf52634000600d556000600e556007610260818152662346414641464160c81b6102805260809081526102a0828152660234530453045360cc1b6102c05260a0526102e0828152662346434534454360c81b6103005260c052610320828152662346334535463560c81b6103405260e0526103608281526611a29c22a0a31b60c91b61038052610100526103a08281526608d14cd18c919160ca1b6103c052610120526103e0828152662345314635464560c81b6104005261014052610420828152662345304637464160c81b6104405261016052610460828152662345304632463160c81b61048052610180526104a0828152662345384635453960c81b6104c0526101a0526104e0828152662346314638453960c81b610500526101c0526105208281526608d191918e50cd60ca1b610540526101e052610560828152662346464543423360c81b61058052610200526105a08281526611a3232298211960c91b6105c052610220526106206040526105e0918252662346464542454560c81b6106005261024091909152620001ab90600f90816200042d565b50604080516101c08101825260076101808201818152660234646303030360cc1b6101a0840152825282518084018452818152660234646363630360cc1b6020828101919091528084019190915283518085018552828152660234646464630360cc1b818301528385015283518085018552828152660233939464630360cc1b81830152606084015283518085018552828152662330304646333360c81b81830152608084015283518085018552828152662330304646393960c81b8183015260a084015283518085018552828152661198182323232360c91b8183015260c0840152835180850185528281526611981821a1a32360c91b8183015260e084015283518085018552828152661198181c9ca32360c91b8183015261010084015283518085018552828152661198181999a32360c91b8183015261012084015283518085018552828152661198181818232360c91b8183015261014084015283518085019094529083526611a3231818232360c91b908301526101608101919091526200033c90601090600c62000491565b503480156200034a57600080fd5b50604080518082018252600a8152692130b9b2b22130b6363d60b11b6020808301918252835180850190945260048452632222a2ad60e11b9084015281519192916200039991600091620004e3565b508051620003af906001906020840190620004e3565b505050620003cc620003c6620003d760201b60201c565b620003db565b6001600b556200062f565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280548282559060005260206000209081019282156200047f579160200282015b828111156200047f57825180516200046e918491602090910190620004e3565b50916020019190600101906200044e565b506200048d9291506200056e565b5090565b8280548282559060005260206000209081019282156200047f579160200282015b828111156200047f5782518051620004d2918491602090910190620004e3565b5091602001919060010190620004b2565b828054620004f190620005fe565b90600052602060002090601f01602090048101928262000515576000855562000560565b82601f106200053057805160ff191683800117855562000560565b8280016001018555821562000560579182015b828111156200056057825182559160200191906001019062000543565b506200048d9291506200058f565b808211156200048d576000620005858282620005a6565b506001016200056e565b5b808211156200048d576000815560010162000590565b508054620005b490620005fe565b6000825580601f10620005c5575050565b601f016020900490600052602060002090810190620005e591906200058f565b50565b634e487b7160e01b600052602260045260246000fd5b6002810460018216806200061357607f821691505b60208210811415620006295762000629620005e8565b50919050565b613596806200063f6000396000f3fe6080604052600436106101cd5760003560e01c806370a08231116100f7578063a035b1fe11610095578063c321118c11610064578063c321118c14610505578063c87b56dd14610525578063e985e9c514610545578063f2fde38b1461058e57600080fd5b8063a035b1fe1461048f578063a22cb465146104a5578063a8ce886e146104c5578063b88d4fde146104e557600080fd5b80638da5cb5b116100d15780638da5cb5b1461041557806391b7f5ed1461043357806395d89b41146104535780639da3f8fd1461046857600080fd5b806370a08231146103ca578063715018a6146103ea578063871fd9cc146103ff57600080fd5b80632f745c591161016f57806351cff8d91161013e57806351cff8d91461034a5780636352211e1461036a57806369ba1a751461038a5780636fdcc576146103aa57600080fd5b80632f745c59146102ca57806342842e0e146102ea578063445ed5b31461030a5780634f6ccce71461032a57600080fd5b8063095ea7b3116101ab578063095ea7b31461025757806318160ddd1461027957806323b872dd146102975780632b7e9c87146102b757600080fd5b806301ffc9a7146101d257806306fdde0314610208578063081812fc1461022a575b600080fd5b3480156101de57600080fd5b506101f26101ed366004611a85565b6105ae565b6040516101ff9190611ab0565b60405180910390f35b34801561021457600080fd5b5061021d6105d9565b6040516101ff9190611b1c565b34801561023657600080fd5b5061024a610245366004611b45565b61066b565b6040516101ff9190611b80565b34801561026357600080fd5b50610277610272366004611ba2565b6106c4565b005b34801561028557600080fd5b506008545b6040516101ff9190611be5565b3480156102a357600080fd5b506102776102b2366004611bf3565b61074a565b6102776102c5366004611b45565b61077b565b3480156102d657600080fd5b5061028a6102e5366004611ba2565b610834565b3480156102f657600080fd5b50610277610305366004611bf3565b610886565b34801561031657600080fd5b50610277610325366004611ba2565b6108a1565b34801561033657600080fd5b5061028a610345366004611b45565b6108d9565b34801561035657600080fd5b50610277610365366004611c43565b610927565b34801561037657600080fd5b5061024a610385366004611b45565b6109d2565b34801561039657600080fd5b506102776103a5366004611b45565b610a07565b3480156103b657600080fd5b5061021d6103c5366004611b45565b610a66565b3480156103d657600080fd5b5061028a6103e5366004611c43565b610b12565b3480156103f657600080fd5b50610277610b56565b34801561040b57600080fd5b5061028a600e5481565b34801561042157600080fd5b50600a546001600160a01b031661024a565b34801561043f57600080fd5b5061027761044e366004611b45565b610b8c565b34801561045f57600080fd5b5061021d610bbb565b34801561047457600080fd5b50600c546104829060ff1681565b6040516101ff9190611cad565b34801561049b57600080fd5b5061028a600d5481565b3480156104b157600080fd5b506102776104c0366004611cce565b610bca565b3480156104d157600080fd5b5061021d6104e0366004611b45565b610bd5565b3480156104f157600080fd5b50610277610500366004611df7565b610be5565b34801561051157600080fd5b5061021d610520366004611b45565b610c1d565b34801561053157600080fd5b5061021d610540366004611b45565b610eae565b34801561055157600080fd5b506101f2610560366004611e76565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561059a57600080fd5b506102776105a9366004611c43565b610f59565b60006001600160e01b0319821663780e9d6360e01b14806105d357506105d382610fb5565b92915050565b6060600080546105e890611ebf565b80601f016020809104026020016040519081016040528092919081815260200182805461061490611ebf565b80156106615780601f1061063657610100808354040283529160200191610661565b820191906000526020600020905b81548152906001019060200180831161064457829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166106a85760405162461bcd60e51b815260040161069f90611f38565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006106cf826109d2565b9050806001600160a01b0316836001600160a01b031614156107035760405162461bcd60e51b815260040161069f90611f86565b336001600160a01b038216148061071f575061071f8133610560565b61073b5760405162461bcd60e51b815260040161069f90611ff0565b6107458383611005565b505050565b6107543382611073565b6107705760405162461bcd60e51b815260040161069f9061204e565b610745838383611125565b6002600b54141561079e5760405162461bcd60e51b815260040161069f90612095565b6002600b55806107c05760405162461bcd60e51b815260040161069f906120c9565b6001600c5460ff1660018111156107d9576107d9611c64565b146107f65760405162461bcd60e51b815260040161069f906120fd565b600d546108039082612123565b3410156108225760405162461bcd60e51b815260040161069f90612162565b61082c3382611252565b506001600b55565b600061083f83610b12565b821061085d5760405162461bcd60e51b815260040161069f906121ba565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61074583838360405180602001604052806000815250610be5565b600a546001600160a01b031633146108cb5760405162461bcd60e51b815260040161069f906121fc565b6108d58282611252565b5050565b60006108e460085490565b82106109025760405162461bcd60e51b815260040161069f90612255565b6008828154811061091557610915612265565b90600052602060002001549050919050565b600a546001600160a01b031633146109515760405162461bcd60e51b815260040161069f906121fc565b60004790506000826001600160a01b03168260405161096f9061227b565b60006040518083038185875af1925050503d80600081146109ac576040519150601f19603f3d011682016040523d82523d6000602084013e6109b1565b606091505b50509050806107455760405162461bcd60e51b815260040161069f906122ab565b6000818152600260205260408120546001600160a01b0316806105d35760405162461bcd60e51b815260040161069f90612301565b600a546001600160a01b03163314610a315760405162461bcd60e51b815260040161069f906121fc565b806001811115610a4357610a43611c64565b600c805460ff191660018381811115610a5e57610a5e611c64565b021790555050565b60108181548110610a7657600080fd5b906000526020600020016000915090508054610a9190611ebf565b80601f0160208091040260200160405190810160405280929190818152602001828054610abd90611ebf565b8015610b0a5780601f10610adf57610100808354040283529160200191610b0a565b820191906000526020600020905b815481529060010190602001808311610aed57829003601f168201915b505050505081565b60006001600160a01b038216610b3a5760405162461bcd60e51b815260040161069f90612358565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314610b805760405162461bcd60e51b815260040161069f906121fc565b610b8a600061128c565b565b600a546001600160a01b03163314610bb65760405162461bcd60e51b815260040161069f906121fc565b600d55565b6060600180546105e890611ebf565b6108d53383836112de565b600f8181548110610a7657600080fd5b610bef3383611073565b610c0b5760405162461bcd60e51b815260040161069f9061204e565b610c1784848484611381565b50505050565b6060600082604051602001610c329190612368565b6040516020818303038152906040528051906020012060001c90506000600f610c6583634d11cda6600f805490506113b4565b81548110610c7557610c75612265565b906000526020600020018054610c8a90611ebf565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb690611ebf565b8015610d035780601f10610cd857610100808354040283529160200191610d03565b820191906000526020600020905b815481529060010190602001808311610ce657829003601f168201915b5050505050905060006010610d1f84607b6010805490506113b4565b81548110610d2f57610d2f612265565b906000526020600020018054610d4490611ebf565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7090611ebf565b8015610dbd5780601f10610d9257610100808354040283529160200191610dbd565b820191906000526020600020905b815481529060010190602001808311610da057829003601f168201915b5050505050905060006010610dda856101426010805490506113b4565b81548110610dea57610dea612265565b906000526020600020018054610dff90611ebf565b80601f0160208091040260200160405190810160405280929190818152602001828054610e2b90611ebf565b8015610e785780601f10610e4d57610100808354040283529160200191610e78565b820191906000526020600020905b815481529060010190602001808311610e5b57829003601f168201915b50505050509050828282604051602001610e949392919061241e565b604051602081830303815290604052945050505050919050565b6000818152600260205260409020546060906001600160a01b0316610ee55760405162461bcd60e51b815260040161069f90612f2f565b6000610ef083610c1d565b90506000610f2e610f00856113cb565b610f09846114c9565b604051602001610f1a929190613007565b6040516020818303038152906040526114c9565b905080604051602001610f419190613168565b60405160208183030381529060405292505050919050565b600a546001600160a01b03163314610f835760405162461bcd60e51b815260040161069f906121fc565b6001600160a01b038116610fa95760405162461bcd60e51b815260040161069f906131dd565b610fb28161128c565b50565b60006001600160e01b031982166380ac58cd60e01b1480610fe657506001600160e01b03198216635b5e139f60e01b145b806105d357506301ffc9a760e01b6001600160e01b03198316146105d3565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061103a826109d2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166110a75760405162461bcd60e51b815260040161069f90613236565b60006110b2836109d2565b9050806001600160a01b0316846001600160a01b031614806110ed5750836001600160a01b03166110e28461066b565b6001600160a01b0316145b8061111d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611138826109d2565b6001600160a01b03161461115e5760405162461bcd60e51b815260040161069f90613288565b6001600160a01b0382166111845760405162461bcd60e51b815260040161069f906132d9565b61118f83838361162f565b61119a600082611005565b6001600160a01b03831660009081526003602052604081208054600192906111c39084906132e9565b90915550506001600160a01b03821660009081526003602052604081208054600192906111f1908490613300565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60005b818110156107455761127a83600e6000815461127090613318565b91829055506116e7565b8061128481613318565b915050611255565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156113105760405162461bcd60e51b815260040161069f90613367565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611374908590611ab0565b60405180910390a3505050565b61138c848484611125565b611398848484846117d5565b610c175760405162461bcd60e51b815260040161069f906133c6565b6000816113c184866133ec565b61111d9190613400565b6060816113ef5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611419578061140381613318565b91506114129050600a836133ec565b91506113f3565b60008167ffffffffffffffff81111561143457611434611d01565b6040519080825280601f01601f19166020018201604052801561145e576020820181803683370190505b5090505b841561111d576114736001836132e9565b9150611480600a86613400565b61148b906030613300565b60f81b8183815181106114a0576114a0612265565b60200101906001600160f81b031916908160001a9053506114c2600a866133ec565b9450611462565b60608151600014156114e957505060408051602081019091526000815290565b600060405180606001604052806040815260200161352160409139905060006003845160026115189190613300565b61152291906133ec565b61152d906004612123565b9050600061153c826020613300565b67ffffffffffffffff81111561155457611554611d01565b6040519080825280601f01601f19166020018201604052801561157e576020820181803683370190505b509050818152600183018586518101602084015b818310156115ea576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101611592565b600389510660018114611604576002811461161557611621565b613d3d60f01b600119830152611621565b603d60f81b6000198301525b509398975050505050505050565b6001600160a01b03831661168a5761168581600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6116ad565b816001600160a01b0316836001600160a01b0316146116ad576116ad83826118d3565b6001600160a01b0382166116c45761074581611970565b826001600160a01b0316826001600160a01b031614610745576107458282611a1f565b6001600160a01b03821661170d5760405162461bcd60e51b815260040161069f90613446565b6000818152600260205260409020546001600160a01b0316156117425760405162461bcd60e51b815260040161069f9061348a565b61174e6000838361162f565b6001600160a01b0382166000908152600360205260408120805460019290611777908490613300565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b156118c857604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061181990339089908890889060040161349a565b6020604051808303816000875af1925050508015611854575060408051601f3d908101601f19168201909252611851918101906134e9565b60015b6118ae573d808015611882576040519150601f19603f3d011682016040523d82523d6000602084013e611887565b606091505b5080516118a65760405162461bcd60e51b815260040161069f906133c6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061111d565b506001949350505050565b600060016118e084610b12565b6118ea91906132e9565b60008381526007602052604090205490915080821461193d576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090611982906001906132e9565b600083815260096020526040812054600880549394509092849081106119aa576119aa612265565b9060005260206000200154905080600883815481106119cb576119cb612265565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480611a0357611a0361350a565b6001900381819060005260206000200160009055905550505050565b6000611a2a83610b12565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b031981165b8114610fb257600080fd5b80356105d381611a63565b600060208284031215611a9a57611a9a600080fd5b600061111d8484611a7a565b8015155b82525050565b602081016105d38284611aa6565b60005b83811015611ad9578181015183820152602001611ac1565b83811115610c175750506000910152565b6000611af4825190565b808452602084019350611b0b818560208601611abe565b601f01601f19169290920192915050565b60208082528101611b2d8184611aea565b9392505050565b80611a6f565b80356105d381611b34565b600060208284031215611b5a57611b5a600080fd5b600061111d8484611b3a565b60006001600160a01b0382166105d3565b611aaa81611b66565b602081016105d38284611b77565b611a6f81611b66565b80356105d381611b8e565b60008060408385031215611bb857611bb8600080fd5b6000611bc48585611b97565b9250506020611bd585828601611b3a565b9150509250929050565b80611aaa565b602081016105d38284611bdf565b600080600060608486031215611c0b57611c0b600080fd5b6000611c178686611b97565b9350506020611c2886828701611b97565b9250506040611c3986828701611b3a565b9150509250925092565b600060208284031215611c5857611c58600080fd5b600061111d8484611b97565b634e487b7160e01b600052602160045260246000fd5b60028110610fb257610fb2611c64565b80611c9481611c7a565b919050565b60006105d382611c8a565b611aaa81611c99565b602081016105d38284611ca4565b801515611a6f565b80356105d381611cbb565b60008060408385031215611ce457611ce4600080fd5b6000611cf08585611b97565b9250506020611bd585828601611cc3565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715611d3d57611d3d611d01565b6040525050565b6000611d4f60405190565b9050611c948282611d17565b600067ffffffffffffffff821115611d7557611d75611d01565b601f19601f83011660200192915050565b82818337506000910152565b6000611da5611da084611d5b565b611d44565b905082815260208101848484011115611dc057611dc0600080fd5b611dcb848285611d86565b509392505050565b600082601f830112611de757611de7600080fd5b813561111d848260208601611d92565b60008060008060808587031215611e1057611e10600080fd5b6000611e1c8787611b97565b9450506020611e2d87828801611b97565b9350506040611e3e87828801611b3a565b925050606085013567ffffffffffffffff811115611e5e57611e5e600080fd5b611e6a87828801611dd3565b91505092959194509250565b60008060408385031215611e8c57611e8c600080fd5b6000611e988585611b97565b9250506020611bd585828601611b97565b634e487b7160e01b600052602260045260246000fd5b600281046001821680611ed357607f821691505b60208210811415611ee657611ee6611ea9565b50919050565b602c81526000602082017f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015291505b5060400190565b602080825281016105d381611eec565b602181526000602082017f4552433732313a20617070726f76616c20746f2063757272656e74206f776e658152603960f91b60208201529150611f31565b602080825281016105d381611f48565b603881526000602082017f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060208201529150611f31565b602080825281016105d381611f96565b603181526000602082017f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f8152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60208201529150611f31565b602080825281016105d381612000565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00815291505b5060200190565b602080825281016105d38161205e565b600d81526000602082016c139bdb8b5e995c9bc81b5a5b9d609a1b8152915061208e565b602080825281016105d3816120a5565b600d81526000602082016c135a5b9d08191a5cd8589b1959609a1b8152915061208e565b602080825281016105d3816120d9565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561213d5761213d61210d565b500290565b600981526000602082016842616420707269636560b81b8152915061208e565b602080825281016105d381612142565b602b81526000602082017f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526a74206f6620626f756e647360a81b60208201529150611f31565b602080825281016105d381612172565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65729101908152600061208e565b602080825281016105d3816121ca565b602c81526000602082017f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526b7574206f6620626f756e647360a01b60208201529150611f31565b602080825281016105d38161220c565b634e487b7160e01b600052603260045260246000fd5b6000816105d3565b601181526000602082017015d2551211149055d05317d19052531151607a1b8152915061208e565b602080825281016105d381612283565b602981526000602082017f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b60208201529150611f31565b602080825281016105d3816122bb565b602a81526000602082017f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b60208201529150611f31565b602080825281016105d381612311565b60006123748284611bdf565b50602001919050565b6000612387825190565b612395818560208601611abe565b9290920192915050565b7f22202f3e203c636972636c652063783d223935222063793d223134352220723d81526a111a1811103334b6361e9160a91b602082015260005b50602b0190565b7f222f3e203c636972636c652063783d22313930222063793d223134352220723d81526a111a1811103334b6361e9160a91b602082015260006123d9565b7f3c7376672076657273696f6e3d22312e302220786d6c6e733d22687474703a2f81527f2f7777772e77332e6f72672f323030302f737667222077696474683d2233303060208201527f2e303030303030707422206865696768743d223235382e30303030303070742260408201527f2076696577426f783d22302030203330302e303030303030203235382e30303060608201527f30303022207072657365727665417370656374526174696f3d22784d6964594d60808201527f6964206d656574223e203c726563742077696474683d2233303022206865696760a08201526e343a1e91191a9c11103334b6361e9160891b60c082015260cf016000612526828661237d565b91506125318261239f565b915061253d828561237d565b9150612548826123e0565b9150612554828461237d565b7f222f3e203c67207472616e73666f726d3d227472616e736c61746528302e303081527f303030302c3232382e30303030303029207363616c6528302e3130303030302c60208201527f2d302e31303030303029222066696c6c3d222330303030303022207374726f6b60408201527f653d226e6f6e65223e203c7061746820643d224d383333203233353820632d3460608201527f202d37202d36202d3738202d34202d3135382037202d333533202d3832202d3660808201527f3439202d323536202d383533202d313438202d313734202d313833202d32353160a08201527f202d313930202d343232202d38202d313834203433202d33323020313639202d60c08201527f34343620313231202d31323120323637202d31373520343438202d313636203160e08201527f323220362032303620333320333032203937206c3630203430203338202d33306101008201527f20633939202d373820323336202d31313620333838202d3130372031363320396101208201527f20323830203635203339332031383520313134203132312031363520323632206101408201527f31353620343332202d3820313531202d353420323537202d31363620333834206101608201527f2d31333620313534202d32313220333131202d32353620353331202d323020396101808201527f38202d333220323930202d32352034303820332034392031203935202d3320316101a08201527f3033202d37203132202d3838203134202d353237203134202d3430342030202d6101c08201527f353231202d33202d353237202d31327a206d393837202d323035206330202d336101e08201527f3736203938202d36353920333039202d38393720313031202d313134203134306102008201527f202d32313520313431202d3336322030202d323333202d313539202d343430206102208201527f2d333835202d343939202d3733202d3138202d323033202d3139202d323730206102408201527f2d31202d3535203134202d313437203537202d313834203835206c2d323320316102608201527f38203333203434206336382038392031313820323430203131392033353520306102808201527f203538202d3139203836202d3438203637202d3133202d38202d3139202d33326102a08201527f202d3234202d3939202d3230202d323834202d323337202d343834202d3532336102c08201527f202d343834202d3133372030202d323439203432202d33343820313331202d316102e08201527f3132203939202d31363620323235202d313637203338302030203135392034306103008201527f20323537203136332033393820313930203231372032383620353131203238376103208201527f20383734206c30203133372034363020302034363020302030202d3134377a226103408201527f2f3e203c7061746820643d224d31343633203132373420632d3139202d3530206103608201527f2d33202d313037203239202d31303220323120332032332039203233203538206103808201527f30203439202d32203535202d3233203538202d31342032202d3235202d33202d6103a08201527f3239202d31347a222f3e203c7061746820643d224d393733203132323620632d6103c08201527f35202d38202d37202d3335202d35202d36302034202d3435203138202d3631206103e08201527f3436202d35302031392037203236203933203820313131202d3138203137202d6104008201527f3339203137202d3439202d317a222f3e203c7061746820643d224d31373833206104208201527f3131353320632d3231202d38202d3137202d3130302035202d313132203331206104408201527f2d313620353220352035322035322030203536202d3139203736202d353720366104608201527f307a222f3e203c7061746820643d224d363632203130393820632d37202d37206104808201527f2d3132202d3333202d3132202d35392030202d33392034202d3439203230202d6104a08201527f3534203132202d34203237202d312033352035203230203136203139203834206104c08201527f2d3120313034202d3139203139202d3236203230202d343220347a222f3e203c6104e08201527f7061746820643d224d32303137203130323320632d34202d33202d37202d32386105008201527f202d37202d35352030202d3532203138202d3731203439202d353120323020316105208201527f32203237203739203130203939202d3132203135202d3431203139202d3532206105408201527f377a222f3e203c7061746820643d224d313235322039373820632d3237202d326105608201527f37202d36202d313138203237202d3131382032302030203332203332203239206105808201527f3737202d32203339202d37203439202d3233203531202d31312031202d3236206105a08201527f2d33202d3333202d31307a222f3e203c7061746820643d224d383932203932386105c08201527f20632d3139202d3139202d3135202d3130372034202d313135203238202d31306105e08201527f2034392031312035322035342034203535202d3238203839202d35362036317a6106008201527f222f3e203c7061746820643d224d313732362038343420632d3334202d3333206106208201527f2d3131202d313230203330202d313132203135203320323020313320323220356106408201527f372032203337202d31203537202d3130203632202d3138203132202d323420316106608201527f31202d3432202d377a222f3e203c7061746820643d224d3130383220373031206106808201527f632d39202d35202d3132202d3235202d3130202d35372033202d34332036202d6106a08201527f3439203237202d3532203239202d3520343120313220343120353920302034396106c08201527f202d3235203731202d35382035307a222f3e203c7061746820643d224d3732376106e08201527f2036373320632d34202d33202d37202d3238202d37202d35352030202d3336206107008201527f34202d3530203136202d3535203338202d3134203634203335203530203933206107208201527f2d35203137202d3133203234202d3330203234202d31322030202d3236202d336107408201527f202d3239202d377a222f3e203c7061746820643d224d313933362036363520636107608201527f2d3131202d3330202d36202d38322039202d39352038202d36203232202d31306107808201527f203332202d3820313520332031382031332031382035382030203532202d31206107a08201527f3535202d3236203538202d31372032202d3239202d33202d3333202d31337a226107c08201526d179f101e17b39f101e17b9bb339f60911b6107e08201526107ee0195945050505050565b60118152600060208201702737b732bc34b9ba32b73a103a37b5b2b760791b8152915061208e565b602080825281016105d381612f07565b61088b60f21b815260005b5060020190565b7f7b2274726169745f74797065223a2248616e6773204c6f77222c202276616c7581526332911d1160e11b602082015260005b5060240190565b635472756560e01b815260005b5060040190565b634e75747360e01b81526000612f98565b63089f574b60e21b81526000612f98565b7f22696d616765223a2022646174613a696d6167652f7376672b786d6c3b626173815263194d8d0b60e21b60208201526000612f84565b61227d60f01b81526000612f4a565b757b226e616d65223a2022426173656442616c6c7a202360501b81526016016000613032828561237d565b915061303d82612f3f565b7f226465736372697074696f6e223a2022446f206465657a206e7574732068616e81527f67206c6f773f20446f657320697420776f62626c6520746f20616e642066726f6020820152620fc88b60ea1b60408201526d2261747472696275746573223a5b60901b604382015260510191506130b782612f51565b91506130c282612f8b565b7f227d2c7b2274726169745f74797065223a224465657a222c202276616c7565228152611d1160f11b602082015260220191506130fe82612f9f565b7f227d2c7b2274726169745f74797065223a2242616c6c7a222c202276616c7565815262111d1160e91b6020820152602301915061313b82612f8b565b915061314682612fb0565b915061315182612fc1565b915061315d828461237d565b915061111d82612ff8565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152601d016000611b2d828461237d565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b60208201529150611f31565b602080825281016105d38161319a565b602c81526000602082017f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b60208201529150611f31565b602080825281016105d3816131ed565b602581526000602082017f4552433732313a207472616e736665722066726f6d20696e636f72726563742081526437bbb732b960d91b60208201529150611f31565b602080825281016105d381613246565b602481526000602082017f4552433732313a207472616e7366657220746f20746865207a65726f206164648152637265737360e01b60208201529150611f31565b602080825281016105d381613298565b6000828210156132fb576132fb61210d565b500390565b600082198211156133135761331361210d565b500190565b600060001982141561332c5761332c61210d565b5060010190565b601981526000602082017f4552433732313a20617070726f766520746f2063616c6c6572000000000000008152915061208e565b602080825281016105d381613333565b603281526000602082017f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60208201529150611f31565b602080825281016105d381613377565b634e487b7160e01b600052601260045260246000fd5b6000826133fb576133fb6133d6565b500490565b60008261340f5761340f6133d6565b500690565b60208082527f4552433732313a206d696e7420746f20746865207a65726f20616464726573739101908152600061208e565b602080825281016105d381613414565b601c81526000602082017f4552433732313a20746f6b656e20616c7265616479206d696e746564000000008152915061208e565b602080825281016105d381613456565b608081016134a88287611b77565b6134b56020830186611b77565b6134c26040830185611bdf565b81810360608301526134d48184611aea565b9695505050505050565b80516105d381611a63565b6000602082840312156134fe576134fe600080fd5b600061111d84846134de565b634e487b7160e01b600052603160045260246000fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212209405f4b236d06797e01406fb7def404af7f74f430b77498d3252b235f96c199164736f6c634300080c0033
Deployed Bytecode
0x6080604052600436106101cd5760003560e01c806370a08231116100f7578063a035b1fe11610095578063c321118c11610064578063c321118c14610505578063c87b56dd14610525578063e985e9c514610545578063f2fde38b1461058e57600080fd5b8063a035b1fe1461048f578063a22cb465146104a5578063a8ce886e146104c5578063b88d4fde146104e557600080fd5b80638da5cb5b116100d15780638da5cb5b1461041557806391b7f5ed1461043357806395d89b41146104535780639da3f8fd1461046857600080fd5b806370a08231146103ca578063715018a6146103ea578063871fd9cc146103ff57600080fd5b80632f745c591161016f57806351cff8d91161013e57806351cff8d91461034a5780636352211e1461036a57806369ba1a751461038a5780636fdcc576146103aa57600080fd5b80632f745c59146102ca57806342842e0e146102ea578063445ed5b31461030a5780634f6ccce71461032a57600080fd5b8063095ea7b3116101ab578063095ea7b31461025757806318160ddd1461027957806323b872dd146102975780632b7e9c87146102b757600080fd5b806301ffc9a7146101d257806306fdde0314610208578063081812fc1461022a575b600080fd5b3480156101de57600080fd5b506101f26101ed366004611a85565b6105ae565b6040516101ff9190611ab0565b60405180910390f35b34801561021457600080fd5b5061021d6105d9565b6040516101ff9190611b1c565b34801561023657600080fd5b5061024a610245366004611b45565b61066b565b6040516101ff9190611b80565b34801561026357600080fd5b50610277610272366004611ba2565b6106c4565b005b34801561028557600080fd5b506008545b6040516101ff9190611be5565b3480156102a357600080fd5b506102776102b2366004611bf3565b61074a565b6102776102c5366004611b45565b61077b565b3480156102d657600080fd5b5061028a6102e5366004611ba2565b610834565b3480156102f657600080fd5b50610277610305366004611bf3565b610886565b34801561031657600080fd5b50610277610325366004611ba2565b6108a1565b34801561033657600080fd5b5061028a610345366004611b45565b6108d9565b34801561035657600080fd5b50610277610365366004611c43565b610927565b34801561037657600080fd5b5061024a610385366004611b45565b6109d2565b34801561039657600080fd5b506102776103a5366004611b45565b610a07565b3480156103b657600080fd5b5061021d6103c5366004611b45565b610a66565b3480156103d657600080fd5b5061028a6103e5366004611c43565b610b12565b3480156103f657600080fd5b50610277610b56565b34801561040b57600080fd5b5061028a600e5481565b34801561042157600080fd5b50600a546001600160a01b031661024a565b34801561043f57600080fd5b5061027761044e366004611b45565b610b8c565b34801561045f57600080fd5b5061021d610bbb565b34801561047457600080fd5b50600c546104829060ff1681565b6040516101ff9190611cad565b34801561049b57600080fd5b5061028a600d5481565b3480156104b157600080fd5b506102776104c0366004611cce565b610bca565b3480156104d157600080fd5b5061021d6104e0366004611b45565b610bd5565b3480156104f157600080fd5b50610277610500366004611df7565b610be5565b34801561051157600080fd5b5061021d610520366004611b45565b610c1d565b34801561053157600080fd5b5061021d610540366004611b45565b610eae565b34801561055157600080fd5b506101f2610560366004611e76565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561059a57600080fd5b506102776105a9366004611c43565b610f59565b60006001600160e01b0319821663780e9d6360e01b14806105d357506105d382610fb5565b92915050565b6060600080546105e890611ebf565b80601f016020809104026020016040519081016040528092919081815260200182805461061490611ebf565b80156106615780601f1061063657610100808354040283529160200191610661565b820191906000526020600020905b81548152906001019060200180831161064457829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166106a85760405162461bcd60e51b815260040161069f90611f38565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006106cf826109d2565b9050806001600160a01b0316836001600160a01b031614156107035760405162461bcd60e51b815260040161069f90611f86565b336001600160a01b038216148061071f575061071f8133610560565b61073b5760405162461bcd60e51b815260040161069f90611ff0565b6107458383611005565b505050565b6107543382611073565b6107705760405162461bcd60e51b815260040161069f9061204e565b610745838383611125565b6002600b54141561079e5760405162461bcd60e51b815260040161069f90612095565b6002600b55806107c05760405162461bcd60e51b815260040161069f906120c9565b6001600c5460ff1660018111156107d9576107d9611c64565b146107f65760405162461bcd60e51b815260040161069f906120fd565b600d546108039082612123565b3410156108225760405162461bcd60e51b815260040161069f90612162565b61082c3382611252565b506001600b55565b600061083f83610b12565b821061085d5760405162461bcd60e51b815260040161069f906121ba565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61074583838360405180602001604052806000815250610be5565b600a546001600160a01b031633146108cb5760405162461bcd60e51b815260040161069f906121fc565b6108d58282611252565b5050565b60006108e460085490565b82106109025760405162461bcd60e51b815260040161069f90612255565b6008828154811061091557610915612265565b90600052602060002001549050919050565b600a546001600160a01b031633146109515760405162461bcd60e51b815260040161069f906121fc565b60004790506000826001600160a01b03168260405161096f9061227b565b60006040518083038185875af1925050503d80600081146109ac576040519150601f19603f3d011682016040523d82523d6000602084013e6109b1565b606091505b50509050806107455760405162461bcd60e51b815260040161069f906122ab565b6000818152600260205260408120546001600160a01b0316806105d35760405162461bcd60e51b815260040161069f90612301565b600a546001600160a01b03163314610a315760405162461bcd60e51b815260040161069f906121fc565b806001811115610a4357610a43611c64565b600c805460ff191660018381811115610a5e57610a5e611c64565b021790555050565b60108181548110610a7657600080fd5b906000526020600020016000915090508054610a9190611ebf565b80601f0160208091040260200160405190810160405280929190818152602001828054610abd90611ebf565b8015610b0a5780601f10610adf57610100808354040283529160200191610b0a565b820191906000526020600020905b815481529060010190602001808311610aed57829003601f168201915b505050505081565b60006001600160a01b038216610b3a5760405162461bcd60e51b815260040161069f90612358565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314610b805760405162461bcd60e51b815260040161069f906121fc565b610b8a600061128c565b565b600a546001600160a01b03163314610bb65760405162461bcd60e51b815260040161069f906121fc565b600d55565b6060600180546105e890611ebf565b6108d53383836112de565b600f8181548110610a7657600080fd5b610bef3383611073565b610c0b5760405162461bcd60e51b815260040161069f9061204e565b610c1784848484611381565b50505050565b6060600082604051602001610c329190612368565b6040516020818303038152906040528051906020012060001c90506000600f610c6583634d11cda6600f805490506113b4565b81548110610c7557610c75612265565b906000526020600020018054610c8a90611ebf565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb690611ebf565b8015610d035780601f10610cd857610100808354040283529160200191610d03565b820191906000526020600020905b815481529060010190602001808311610ce657829003601f168201915b5050505050905060006010610d1f84607b6010805490506113b4565b81548110610d2f57610d2f612265565b906000526020600020018054610d4490611ebf565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7090611ebf565b8015610dbd5780601f10610d9257610100808354040283529160200191610dbd565b820191906000526020600020905b815481529060010190602001808311610da057829003601f168201915b5050505050905060006010610dda856101426010805490506113b4565b81548110610dea57610dea612265565b906000526020600020018054610dff90611ebf565b80601f0160208091040260200160405190810160405280929190818152602001828054610e2b90611ebf565b8015610e785780601f10610e4d57610100808354040283529160200191610e78565b820191906000526020600020905b815481529060010190602001808311610e5b57829003601f168201915b50505050509050828282604051602001610e949392919061241e565b604051602081830303815290604052945050505050919050565b6000818152600260205260409020546060906001600160a01b0316610ee55760405162461bcd60e51b815260040161069f90612f2f565b6000610ef083610c1d565b90506000610f2e610f00856113cb565b610f09846114c9565b604051602001610f1a929190613007565b6040516020818303038152906040526114c9565b905080604051602001610f419190613168565b60405160208183030381529060405292505050919050565b600a546001600160a01b03163314610f835760405162461bcd60e51b815260040161069f906121fc565b6001600160a01b038116610fa95760405162461bcd60e51b815260040161069f906131dd565b610fb28161128c565b50565b60006001600160e01b031982166380ac58cd60e01b1480610fe657506001600160e01b03198216635b5e139f60e01b145b806105d357506301ffc9a760e01b6001600160e01b03198316146105d3565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061103a826109d2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166110a75760405162461bcd60e51b815260040161069f90613236565b60006110b2836109d2565b9050806001600160a01b0316846001600160a01b031614806110ed5750836001600160a01b03166110e28461066b565b6001600160a01b0316145b8061111d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611138826109d2565b6001600160a01b03161461115e5760405162461bcd60e51b815260040161069f90613288565b6001600160a01b0382166111845760405162461bcd60e51b815260040161069f906132d9565b61118f83838361162f565b61119a600082611005565b6001600160a01b03831660009081526003602052604081208054600192906111c39084906132e9565b90915550506001600160a01b03821660009081526003602052604081208054600192906111f1908490613300565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60005b818110156107455761127a83600e6000815461127090613318565b91829055506116e7565b8061128481613318565b915050611255565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156113105760405162461bcd60e51b815260040161069f90613367565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611374908590611ab0565b60405180910390a3505050565b61138c848484611125565b611398848484846117d5565b610c175760405162461bcd60e51b815260040161069f906133c6565b6000816113c184866133ec565b61111d9190613400565b6060816113ef5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611419578061140381613318565b91506114129050600a836133ec565b91506113f3565b60008167ffffffffffffffff81111561143457611434611d01565b6040519080825280601f01601f19166020018201604052801561145e576020820181803683370190505b5090505b841561111d576114736001836132e9565b9150611480600a86613400565b61148b906030613300565b60f81b8183815181106114a0576114a0612265565b60200101906001600160f81b031916908160001a9053506114c2600a866133ec565b9450611462565b60608151600014156114e957505060408051602081019091526000815290565b600060405180606001604052806040815260200161352160409139905060006003845160026115189190613300565b61152291906133ec565b61152d906004612123565b9050600061153c826020613300565b67ffffffffffffffff81111561155457611554611d01565b6040519080825280601f01601f19166020018201604052801561157e576020820181803683370190505b509050818152600183018586518101602084015b818310156115ea576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101611592565b600389510660018114611604576002811461161557611621565b613d3d60f01b600119830152611621565b603d60f81b6000198301525b509398975050505050505050565b6001600160a01b03831661168a5761168581600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6116ad565b816001600160a01b0316836001600160a01b0316146116ad576116ad83826118d3565b6001600160a01b0382166116c45761074581611970565b826001600160a01b0316826001600160a01b031614610745576107458282611a1f565b6001600160a01b03821661170d5760405162461bcd60e51b815260040161069f90613446565b6000818152600260205260409020546001600160a01b0316156117425760405162461bcd60e51b815260040161069f9061348a565b61174e6000838361162f565b6001600160a01b0382166000908152600360205260408120805460019290611777908490613300565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b156118c857604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061181990339089908890889060040161349a565b6020604051808303816000875af1925050508015611854575060408051601f3d908101601f19168201909252611851918101906134e9565b60015b6118ae573d808015611882576040519150601f19603f3d011682016040523d82523d6000602084013e611887565b606091505b5080516118a65760405162461bcd60e51b815260040161069f906133c6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061111d565b506001949350505050565b600060016118e084610b12565b6118ea91906132e9565b60008381526007602052604090205490915080821461193d576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090611982906001906132e9565b600083815260096020526040812054600880549394509092849081106119aa576119aa612265565b9060005260206000200154905080600883815481106119cb576119cb612265565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480611a0357611a0361350a565b6001900381819060005260206000200160009055905550505050565b6000611a2a83610b12565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b031981165b8114610fb257600080fd5b80356105d381611a63565b600060208284031215611a9a57611a9a600080fd5b600061111d8484611a7a565b8015155b82525050565b602081016105d38284611aa6565b60005b83811015611ad9578181015183820152602001611ac1565b83811115610c175750506000910152565b6000611af4825190565b808452602084019350611b0b818560208601611abe565b601f01601f19169290920192915050565b60208082528101611b2d8184611aea565b9392505050565b80611a6f565b80356105d381611b34565b600060208284031215611b5a57611b5a600080fd5b600061111d8484611b3a565b60006001600160a01b0382166105d3565b611aaa81611b66565b602081016105d38284611b77565b611a6f81611b66565b80356105d381611b8e565b60008060408385031215611bb857611bb8600080fd5b6000611bc48585611b97565b9250506020611bd585828601611b3a565b9150509250929050565b80611aaa565b602081016105d38284611bdf565b600080600060608486031215611c0b57611c0b600080fd5b6000611c178686611b97565b9350506020611c2886828701611b97565b9250506040611c3986828701611b3a565b9150509250925092565b600060208284031215611c5857611c58600080fd5b600061111d8484611b97565b634e487b7160e01b600052602160045260246000fd5b60028110610fb257610fb2611c64565b80611c9481611c7a565b919050565b60006105d382611c8a565b611aaa81611c99565b602081016105d38284611ca4565b801515611a6f565b80356105d381611cbb565b60008060408385031215611ce457611ce4600080fd5b6000611cf08585611b97565b9250506020611bd585828601611cc3565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715611d3d57611d3d611d01565b6040525050565b6000611d4f60405190565b9050611c948282611d17565b600067ffffffffffffffff821115611d7557611d75611d01565b601f19601f83011660200192915050565b82818337506000910152565b6000611da5611da084611d5b565b611d44565b905082815260208101848484011115611dc057611dc0600080fd5b611dcb848285611d86565b509392505050565b600082601f830112611de757611de7600080fd5b813561111d848260208601611d92565b60008060008060808587031215611e1057611e10600080fd5b6000611e1c8787611b97565b9450506020611e2d87828801611b97565b9350506040611e3e87828801611b3a565b925050606085013567ffffffffffffffff811115611e5e57611e5e600080fd5b611e6a87828801611dd3565b91505092959194509250565b60008060408385031215611e8c57611e8c600080fd5b6000611e988585611b97565b9250506020611bd585828601611b97565b634e487b7160e01b600052602260045260246000fd5b600281046001821680611ed357607f821691505b60208210811415611ee657611ee6611ea9565b50919050565b602c81526000602082017f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015291505b5060400190565b602080825281016105d381611eec565b602181526000602082017f4552433732313a20617070726f76616c20746f2063757272656e74206f776e658152603960f91b60208201529150611f31565b602080825281016105d381611f48565b603881526000602082017f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060208201529150611f31565b602080825281016105d381611f96565b603181526000602082017f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f8152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60208201529150611f31565b602080825281016105d381612000565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00815291505b5060200190565b602080825281016105d38161205e565b600d81526000602082016c139bdb8b5e995c9bc81b5a5b9d609a1b8152915061208e565b602080825281016105d3816120a5565b600d81526000602082016c135a5b9d08191a5cd8589b1959609a1b8152915061208e565b602080825281016105d3816120d9565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561213d5761213d61210d565b500290565b600981526000602082016842616420707269636560b81b8152915061208e565b602080825281016105d381612142565b602b81526000602082017f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526a74206f6620626f756e647360a81b60208201529150611f31565b602080825281016105d381612172565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65729101908152600061208e565b602080825281016105d3816121ca565b602c81526000602082017f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526b7574206f6620626f756e647360a01b60208201529150611f31565b602080825281016105d38161220c565b634e487b7160e01b600052603260045260246000fd5b6000816105d3565b601181526000602082017015d2551211149055d05317d19052531151607a1b8152915061208e565b602080825281016105d381612283565b602981526000602082017f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b60208201529150611f31565b602080825281016105d3816122bb565b602a81526000602082017f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b60208201529150611f31565b602080825281016105d381612311565b60006123748284611bdf565b50602001919050565b6000612387825190565b612395818560208601611abe565b9290920192915050565b7f22202f3e203c636972636c652063783d223935222063793d223134352220723d81526a111a1811103334b6361e9160a91b602082015260005b50602b0190565b7f222f3e203c636972636c652063783d22313930222063793d223134352220723d81526a111a1811103334b6361e9160a91b602082015260006123d9565b7f3c7376672076657273696f6e3d22312e302220786d6c6e733d22687474703a2f81527f2f7777772e77332e6f72672f323030302f737667222077696474683d2233303060208201527f2e303030303030707422206865696768743d223235382e30303030303070742260408201527f2076696577426f783d22302030203330302e303030303030203235382e30303060608201527f30303022207072657365727665417370656374526174696f3d22784d6964594d60808201527f6964206d656574223e203c726563742077696474683d2233303022206865696760a08201526e343a1e91191a9c11103334b6361e9160891b60c082015260cf016000612526828661237d565b91506125318261239f565b915061253d828561237d565b9150612548826123e0565b9150612554828461237d565b7f222f3e203c67207472616e73666f726d3d227472616e736c61746528302e303081527f303030302c3232382e30303030303029207363616c6528302e3130303030302c60208201527f2d302e31303030303029222066696c6c3d222330303030303022207374726f6b60408201527f653d226e6f6e65223e203c7061746820643d224d383333203233353820632d3460608201527f202d37202d36202d3738202d34202d3135382037202d333533202d3832202d3660808201527f3439202d323536202d383533202d313438202d313734202d313833202d32353160a08201527f202d313930202d343232202d38202d313834203433202d33323020313639202d60c08201527f34343620313231202d31323120323637202d31373520343438202d313636203160e08201527f323220362032303620333320333032203937206c3630203430203338202d33306101008201527f20633939202d373820323336202d31313620333838202d3130372031363320396101208201527f20323830203635203339332031383520313134203132312031363520323632206101408201527f31353620343332202d3820313531202d353420323537202d31363620333834206101608201527f2d31333620313534202d32313220333131202d32353620353331202d323020396101808201527f38202d333220323930202d32352034303820332034392031203935202d3320316101a08201527f3033202d37203132202d3838203134202d353237203134202d3430342030202d6101c08201527f353231202d33202d353237202d31327a206d393837202d323035206330202d336101e08201527f3736203938202d36353920333039202d38393720313031202d313134203134306102008201527f202d32313520313431202d3336322030202d323333202d313539202d343430206102208201527f2d333835202d343939202d3733202d3138202d323033202d3139202d323730206102408201527f2d31202d3535203134202d313437203537202d313834203835206c2d323320316102608201527f38203333203434206336382038392031313820323430203131392033353520306102808201527f203538202d3139203836202d3438203637202d3133202d38202d3139202d33326102a08201527f202d3234202d3939202d3230202d323834202d323337202d343834202d3532336102c08201527f202d343834202d3133372030202d323439203432202d33343820313331202d316102e08201527f3132203939202d31363620323235202d313637203338302030203135392034306103008201527f20323537203136332033393820313930203231372032383620353131203238376103208201527f20383734206c30203133372034363020302034363020302030202d3134377a226103408201527f2f3e203c7061746820643d224d31343633203132373420632d3139202d3530206103608201527f2d33202d313037203239202d31303220323120332032332039203233203538206103808201527f30203439202d32203535202d3233203538202d31342032202d3235202d33202d6103a08201527f3239202d31347a222f3e203c7061746820643d224d393733203132323620632d6103c08201527f35202d38202d37202d3335202d35202d36302034202d3435203138202d3631206103e08201527f3436202d35302031392037203236203933203820313131202d3138203137202d6104008201527f3339203137202d3439202d317a222f3e203c7061746820643d224d31373833206104208201527f3131353320632d3231202d38202d3137202d3130302035202d313132203331206104408201527f2d313620353220352035322035322030203536202d3139203736202d353720366104608201527f307a222f3e203c7061746820643d224d363632203130393820632d37202d37206104808201527f2d3132202d3333202d3132202d35392030202d33392034202d3439203230202d6104a08201527f3534203132202d34203237202d312033352035203230203136203139203834206104c08201527f2d3120313034202d3139203139202d3236203230202d343220347a222f3e203c6104e08201527f7061746820643d224d32303137203130323320632d34202d33202d37202d32386105008201527f202d37202d35352030202d3532203138202d3731203439202d353120323020316105208201527f32203237203739203130203939202d3132203135202d3431203139202d3532206105408201527f377a222f3e203c7061746820643d224d313235322039373820632d3237202d326105608201527f37202d36202d313138203237202d3131382032302030203332203332203239206105808201527f3737202d32203339202d37203439202d3233203531202d31312031202d3236206105a08201527f2d33202d3333202d31307a222f3e203c7061746820643d224d383932203932386105c08201527f20632d3139202d3139202d3135202d3130372034202d313135203238202d31306105e08201527f2034392031312035322035342034203535202d3238203839202d35362036317a6106008201527f222f3e203c7061746820643d224d313732362038343420632d3334202d3333206106208201527f2d3131202d313230203330202d313132203135203320323020313320323220356106408201527f372032203337202d31203537202d3130203632202d3138203132202d323420316106608201527f31202d3432202d377a222f3e203c7061746820643d224d3130383220373031206106808201527f632d39202d35202d3132202d3235202d3130202d35372033202d34332036202d6106a08201527f3439203237202d3532203239202d3520343120313220343120353920302034396106c08201527f202d3235203731202d35382035307a222f3e203c7061746820643d224d3732376106e08201527f2036373320632d34202d33202d37202d3238202d37202d35352030202d3336206107008201527f34202d3530203136202d3535203338202d3134203634203335203530203933206107208201527f2d35203137202d3133203234202d3330203234202d31322030202d3236202d336107408201527f202d3239202d377a222f3e203c7061746820643d224d313933362036363520636107608201527f2d3131202d3330202d36202d38322039202d39352038202d36203232202d31306107808201527f203332202d3820313520332031382031332031382035382030203532202d31206107a08201527f3535202d3236203538202d31372032202d3239202d33202d3333202d31337a226107c08201526d179f101e17b39f101e17b9bb339f60911b6107e08201526107ee0195945050505050565b60118152600060208201702737b732bc34b9ba32b73a103a37b5b2b760791b8152915061208e565b602080825281016105d381612f07565b61088b60f21b815260005b5060020190565b7f7b2274726169745f74797065223a2248616e6773204c6f77222c202276616c7581526332911d1160e11b602082015260005b5060240190565b635472756560e01b815260005b5060040190565b634e75747360e01b81526000612f98565b63089f574b60e21b81526000612f98565b7f22696d616765223a2022646174613a696d6167652f7376672b786d6c3b626173815263194d8d0b60e21b60208201526000612f84565b61227d60f01b81526000612f4a565b757b226e616d65223a2022426173656442616c6c7a202360501b81526016016000613032828561237d565b915061303d82612f3f565b7f226465736372697074696f6e223a2022446f206465657a206e7574732068616e81527f67206c6f773f20446f657320697420776f62626c6520746f20616e642066726f6020820152620fc88b60ea1b60408201526d2261747472696275746573223a5b60901b604382015260510191506130b782612f51565b91506130c282612f8b565b7f227d2c7b2274726169745f74797065223a224465657a222c202276616c7565228152611d1160f11b602082015260220191506130fe82612f9f565b7f227d2c7b2274726169745f74797065223a2242616c6c7a222c202276616c7565815262111d1160e91b6020820152602301915061313b82612f8b565b915061314682612fb0565b915061315182612fc1565b915061315d828461237d565b915061111d82612ff8565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152601d016000611b2d828461237d565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b60208201529150611f31565b602080825281016105d38161319a565b602c81526000602082017f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b60208201529150611f31565b602080825281016105d3816131ed565b602581526000602082017f4552433732313a207472616e736665722066726f6d20696e636f72726563742081526437bbb732b960d91b60208201529150611f31565b602080825281016105d381613246565b602481526000602082017f4552433732313a207472616e7366657220746f20746865207a65726f206164648152637265737360e01b60208201529150611f31565b602080825281016105d381613298565b6000828210156132fb576132fb61210d565b500390565b600082198211156133135761331361210d565b500190565b600060001982141561332c5761332c61210d565b5060010190565b601981526000602082017f4552433732313a20617070726f766520746f2063616c6c6572000000000000008152915061208e565b602080825281016105d381613333565b603281526000602082017f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60208201529150611f31565b602080825281016105d381613377565b634e487b7160e01b600052601260045260246000fd5b6000826133fb576133fb6133d6565b500490565b60008261340f5761340f6133d6565b500690565b60208082527f4552433732313a206d696e7420746f20746865207a65726f20616464726573739101908152600061208e565b602080825281016105d381613414565b601c81526000602082017f4552433732313a20746f6b656e20616c7265616479206d696e746564000000008152915061208e565b602080825281016105d381613456565b608081016134a88287611b77565b6134b56020830186611b77565b6134c26040830185611bdf565b81810360608301526134d48184611aea565b9695505050505050565b80516105d381611a63565b6000602082840312156134fe576134fe600080fd5b600061111d84846134de565b634e487b7160e01b600052603160045260246000fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212209405f4b236d06797e01406fb7def404af7f74f430b77498d3252b235f96c199164736f6c634300080c0033
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.