Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0.005 ETH
Eth Value
$9.91 (@ $1,982.29/ETH)More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 26 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Mint | 24597489 | 15 hrs ago | IN | 0.005 ETH | 0.00013841 | ||||
| Withdraw | 24596118 | 20 hrs ago | IN | 0 ETH | 0.00000109 | ||||
| Mint | 24593633 | 28 hrs ago | IN | 0.005 ETH | 0.003538 | ||||
| Set Normie | 24589992 | 40 hrs ago | IN | 0 ETH | 0.00301427 | ||||
| Safe Transfer Fr... | 24589730 | 41 hrs ago | IN | 0 ETH | 0.0000859 | ||||
| Mint | 24588291 | 46 hrs ago | IN | 0.005 ETH | 0.00350772 | ||||
| Mint | 24583628 | 2 days ago | IN | 0.005 ETH | 0.003568 | ||||
| Withdraw | 24581958 | 2 days ago | IN | 0 ETH | 0.00000131 | ||||
| Mint | 24580231 | 3 days ago | IN | 0.005 ETH | 0.00286169 | ||||
| Mint | 24580154 | 3 days ago | IN | 0.005 ETH | 0.00026103 | ||||
| Mint | 24580129 | 3 days ago | IN | 0.005 ETH | 0.00007544 | ||||
| Mint | 24579168 | 3 days ago | IN | 0.005 ETH | 0.00016452 | ||||
| Mint | 24575729 | 3 days ago | IN | 0.005 ETH | 0.0032869 | ||||
| Mint | 24568991 | 4 days ago | IN | 0.005 ETH | 0.00012203 | ||||
| Set Painter | 24565581 | 5 days ago | IN | 0 ETH | 0.00006484 | ||||
| Withdraw | 24565226 | 5 days ago | IN | 0 ETH | 0.00006477 | ||||
| Mint | 24564487 | 5 days ago | IN | 0.005 ETH | 0.00009651 | ||||
| Mint | 24563826 | 5 days ago | IN | 0.005 ETH | 0.00164186 | ||||
| Mint | 24557879 | 6 days ago | IN | 0.005 ETH | 0.00034823 | ||||
| Withdraw | 24557662 | 6 days ago | IN | 0 ETH | 0.00006559 | ||||
| Mint | 24557610 | 6 days ago | IN | 0.005 ETH | 0.00016237 | ||||
| Set Painter | 24556592 | 6 days ago | IN | 0 ETH | 0.00009905 | ||||
| Mint | 24550930 | 7 days ago | IN | 0.005 ETH | 0.00024137 | ||||
| Mint | 24550817 | 7 days ago | IN | 0.005 ETH | 0.00009894 | ||||
| Mint | 24550769 | 7 days ago | IN | 0.005 ETH | 0.00009044 |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
NormiesGlitchPass
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
interface IERC721Lite {
function balanceOf(address owner) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
}
interface INormiesStorage {
function getTokenRawImageData(uint256 tokenId) external view returns (bytes memory); // 200 bytes, 40x40, 1bpp
function isTokenDataSet(uint256 tokenId) external view returns (bool);
}
interface IGlitchPassRenderer {
function tokenURI(address pass, uint256 passId) external view returns (string memory);
}
/// @title NormiesGlitchPass
/// @notice ERC721 pass whose image is derived from NormiesStorage (downsampled) + evolves by neighbor swaps.
/// @dev Rendering delegated to external renderer (swappable).
contract NormiesGlitchPass is ERC721, ERC2981, Ownable, ReentrancyGuard {
// ---- constants / config
uint256 public constant MAX_SUPPLY = 120;
uint256 public constant PRICE = 0.005 ether;
// Downsample: 10x10 macro grid mapped onto 40x40 by 4x4 blocks.
// Macro pixel is ON if >= THRESHOLD bits ON inside its 4x4 block.
uint8 public constant DOWNSAMPLE_THRESHOLD = 8; // out of 16
IERC721Lite public immutable NORMIES; // 0x9Eb6E2025B64f340691e424b7fe7022fFDE12438
INormiesStorage public immutable NORMIES_STORAGE; // 0x1B976bAf51cF51F0e369C070d47FBc47A706e602
// renderer (swappable)
address public renderer;
// painter contract (authorized to tick)
address public painter;
// ---- mint state
uint256 public totalMinted;
mapping(address => bool) public mintedBy; // 1 per wallet
// ---- binding
mapping(uint256 => uint256) public boundNormieId; // passId -> normieId
// ---- bitmap state (40x40 = 1600 bits) stored in 7x uint256 (1792 bits capacity)
// Bit index i = y*40 + x (0..1599). Stored MSB-first within each 256-word for determinism.
struct Bitmap7 {
uint256 w0;
uint256 w1;
uint256 w2;
uint256 w3;
uint256 w4;
uint256 w5;
uint256 w6;
}
mapping(uint256 => Bitmap7) internal _bmp;
// nonce for deterministic swaps
mapping(uint256 => uint64) public tickNonce;
// ---- errors
error SoldOut();
error AlreadyMinted();
error BadPrice();
error MustOwnNormies();
error NotPassOwner();
error NotNormieOwner();
error NormieDataMissing();
error PainterNotSet();
error NotPainter();
error InvalidPassId();
error ZeroAddress();
error RendererNotSet();
event PainterSet(address indexed painter);
event RendererSet(address indexed renderer);
event PassMinted(address indexed to, uint256 indexed passId, uint256 indexed normieId);
event NormieRebound(uint256 indexed passId, uint256 indexed normieId);
event Ticked(uint256 indexed passId, uint256 x1, uint256 x2, uint256 y);
constructor(
address normies,
address normiesStorage,
address royaltyReceiver,
address initialRenderer
) ERC721("Normies Glitch Pass", "NGLITCH") {
if (
normies == address(0) ||
normiesStorage == address(0) ||
royaltyReceiver == address(0) ||
initialRenderer == address(0)
) revert ZeroAddress();
// OZ 4.x Ownable uses Ownable() then transfer ownership manually
_transferOwnership(msg.sender);
NORMIES = IERC721Lite(normies);
NORMIES_STORAGE = INormiesStorage(normiesStorage);
renderer = initialRenderer;
emit RendererSet(initialRenderer);
// 5% royalties
_setDefaultRoyalty(royaltyReceiver, 500); // 500 bps = 5%
}
// ---- tiny UX helpers
function totalSupply() external view returns (uint256) {
return totalMinted;
}
function remaining() external view returns (uint256) {
return MAX_SUPPLY - totalMinted;
}
/// @notice Convenience view for UIs (same as bitmapWords)
function previewBitmap(uint256 passId)
external
view
returns (uint256 w0, uint256 w1, uint256 w2, uint256 w3, uint256 w4, uint256 w5, uint256 w6)
{
return this.bitmapWords(passId);
}
// ---- admin
function setPainter(address p) external onlyOwner {
if (p == address(0)) revert ZeroAddress();
painter = p;
emit PainterSet(p);
}
function setRenderer(address r) external onlyOwner {
if (r == address(0)) revert ZeroAddress();
renderer = r;
emit RendererSet(r);
}
function setRoyalty(address receiver, uint96 feeBps) external onlyOwner {
_setDefaultRoyalty(receiver, feeBps);
}
function withdraw(address payable to) external onlyOwner {
if (to == address(0)) revert ZeroAddress();
to.transfer(address(this).balance);
}
// ---- views for renderer
function bitmapWords(uint256 passId)
external
view
returns (uint256 w0, uint256 w1, uint256 w2, uint256 w3, uint256 w4, uint256 w5, uint256 w6)
{
if (!_existsPass(passId)) revert InvalidPassId();
Bitmap7 storage b = _bmp[passId];
return (b.w0, b.w1, b.w2, b.w3, b.w4, b.w5, b.w6);
}
// ---- mint
function mint(uint256 normieId) external payable nonReentrant returns (uint256 passId) {
if (totalMinted >= MAX_SUPPLY) revert SoldOut();
if (mintedBy[msg.sender]) revert AlreadyMinted();
if (msg.value != PRICE) revert BadPrice();
// must own at least 1 Normie
if (NORMIES.balanceOf(msg.sender) == 0) revert MustOwnNormies();
// must own the bound normieId at mint time
if (NORMIES.ownerOf(normieId) != msg.sender) revert NotNormieOwner();
if (!NORMIES_STORAGE.isTokenDataSet(normieId)) revert NormieDataMissing();
passId = ++totalMinted; // 1..MAX_SUPPLY
mintedBy[msg.sender] = true;
_safeMint(msg.sender, passId);
boundNormieId[passId] = normieId;
_initBitmapFromNormie(passId, normieId);
tickNonce[passId] = 0;
emit PassMinted(msg.sender, passId, normieId);
}
/// @notice Rebind pass to a new Normie you own (resets the pass bitmap to the new downsample)
function setNormie(uint256 passId, uint256 normieId) external nonReentrant {
if (!_existsPass(passId)) revert InvalidPassId();
if (ownerOf(passId) != msg.sender) revert NotPassOwner();
if (NORMIES.ownerOf(normieId) != msg.sender) revert NotNormieOwner();
if (!NORMIES_STORAGE.isTokenDataSet(normieId)) revert NormieDataMissing();
boundNormieId[passId] = normieId;
_initBitmapFromNormie(passId, normieId);
tickNonce[passId] = 0;
emit NormieRebound(passId, normieId);
}
// ---- tick (called by painter)
/// @notice Neighbor-swap tick (no flips). Tries a few times to find an edge (b1 != b2), then swaps and exits.
/// @dev "Left/right" is defined in grid coordinates (x axis). Clamp at edges (no wraparound).
function tick(uint256 passId, uint256 seed) external {
if (painter == address(0)) revert PainterNotSet();
if (msg.sender != painter) revert NotPainter();
if (!_existsPass(passId)) revert InvalidPassId();
// deterministic nonce per pass
uint64 n = tickNonce[passId] + 1;
tickNonce[passId] = n;
// base randomness for retries
uint256 base = uint256(keccak256(abi.encodePacked(seed, passId, n)));
uint256 MAX_TRIES = 6;
for (uint256 t = 0; t < MAX_TRIES; t++) {
uint256 r = uint256(keccak256(abi.encodePacked(base, t)));
uint256 y = r % 40;
uint256 x = (r >> 8) % 40;
// dir: 0 = right, 1 = left
uint256 dir = (r >> 16) & 1;
// clamp neighbor selection (no wrap)
uint256 x2;
if (dir == 0) {
// right neighbor; if at right edge, step left
x2 = (x == 39) ? 38 : (x + 1);
} else {
// left neighbor; if at left edge, step right
x2 = (x == 0) ? 1 : (x - 1);
}
bool b1 = _getBit(passId, x, y);
bool b2 = _getBit(passId, x2, y);
// only swap at an edge (otherwise no-op, retry)
if (b1 == b2) continue;
_setBit(passId, x, y, b2);
_setBit(passId, x2, y, b1);
emit Ticked(passId, x, x2, y);
return; // early exit on first successful swap
}
// No edge found in MAX_TRIES => silent no-op.
}
// ---- tokenURI (delegated)
function tokenURI(uint256 passId) public view override returns (string memory) {
if (!_existsPass(passId)) revert InvalidPassId();
address r = renderer;
if (r == address(0)) revert RendererNotSet();
return IGlitchPassRenderer(r).tokenURI(address(this), passId);
}
// ---- init bitmap from NormiesStorage downsample (10x10 into 40x40)
function _initBitmapFromNormie(uint256 passId, uint256 normieId) internal {
bytes memory raw = NORMIES_STORAGE.getTokenRawImageData(normieId);
if (raw.length != 200) revert NormieDataMissing();
// reset bitmap
_bmp[passId] = Bitmap7(0, 0, 0, 0, 0, 0, 0);
for (uint256 my = 0; my < 10; my++) {
for (uint256 mx = 0; mx < 10; mx++) {
uint256 onCount;
uint256 x0 = mx * 4;
uint256 y0 = my * 4;
for (uint256 dy = 0; dy < 4; dy++) {
for (uint256 dx = 0; dx < 4; dx++) {
if (_isPixelOnRaw(raw, x0 + dx, y0 + dy)) onCount++;
}
}
if (onCount >= DOWNSAMPLE_THRESHOLD) {
// fill the 4x4 block
for (uint256 dy2 = 0; dy2 < 4; dy2++) {
for (uint256 dx2 = 0; dx2 < 4; dx2++) {
_setBit(passId, x0 + dx2, y0 + dy2, true);
}
}
}
}
}
}
// ---- raw bit read (NormiesStorage bitmap)
function _isPixelOnRaw(bytes memory data, uint256 x, uint256 y) internal pure returns (bool) {
uint256 i = y * 40 + x; // 0..1599
uint256 byteIndex = i >> 3; // /8
uint256 bitPos = 7 - (i & 7); // msb-first
return (uint8(data[byteIndex]) >> bitPos) & 1 == 1;
}
// ---- pass bitmap bit ops (7x256)
function _getBit(uint256 passId, uint256 x, uint256 y) internal view returns (bool) {
uint256 i = y * 40 + x;
(uint256 wi, uint256 bi) = _wordBit(i);
Bitmap7 storage b = _bmp[passId];
uint256 w = _getWordStorage(b, wi);
return ((w >> bi) & 1) == 1;
}
function _setBit(uint256 passId, uint256 x, uint256 y, bool v) internal {
uint256 i = y * 40 + x;
(uint256 wi, uint256 bi) = _wordBit(i);
Bitmap7 storage b = _bmp[passId];
uint256 w = _getWordStorage(b, wi);
if (v) w = w | (uint256(1) << bi);
else w = w & ~(uint256(1) << bi);
_setWordStorage(b, wi, w);
}
// MSB-first mapping inside 256-bit words:
// wi = i / 256, bi = 255 - (i % 256).
function _wordBit(uint256 i) internal pure returns (uint256 wi, uint256 bi) {
wi = i >> 8;
bi = 255 - (i & 255);
}
// ---- word getters/setters (storage only) to avoid overload ambiguity
function _getWordStorage(Bitmap7 storage b, uint256 wi) internal view returns (uint256) {
if (wi == 0) return b.w0;
if (wi == 1) return b.w1;
if (wi == 2) return b.w2;
if (wi == 3) return b.w3;
if (wi == 4) return b.w4;
if (wi == 5) return b.w5;
return b.w6;
}
function _setWordStorage(Bitmap7 storage b, uint256 wi, uint256 w) internal {
if (wi == 0) b.w0 = w;
else if (wi == 1) b.w1 = w;
else if (wi == 2) b.w2 = w;
else if (wi == 3) b.w3 = w;
else if (wi == 4) b.w4 = w;
else if (wi == 5) b.w5 = w;
else b.w6 = w;
}
// OZ hooks
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC2981) returns (bool) {
return super.supportsInterface(interfaceId);
}
// OZ4 existence helper
function _existsPass(uint256 passId) internal view returns (bool) {
return _exists(passId);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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 Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol)
pragma solidity ^0.8.0;
import "../utils/introspection/IERC165.sol";
/**
* @dev Interface for the NFT Royalty Standard.
*
* A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
* support for royalty payments across all NFT marketplaces and ecosystem participants.
*
* _Available since v4.5._
*/
interface IERC2981 is IERC165 {
/**
* @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
* exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
*/
function royaltyInfo(
uint256 tokenId,
uint256 salePrice
) external view returns (address receiver, uint256 royaltyAmount);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol)
pragma solidity ^0.8.0;
import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
*
* Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
* specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
*
* Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
* fee is specified in basis points by default.
*
* IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
* https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
* voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
*
* _Available since v4.5._
*/
abstract contract ERC2981 is IERC2981, ERC165 {
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
RoyaltyInfo private _defaultRoyaltyInfo;
mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {
return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) {
RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId];
if (royalty.receiver == address(0)) {
royalty = _defaultRoyaltyInfo;
}
uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator();
return (royalty.receiver, royaltyAmount);
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
return 10000;
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
require(receiver != address(0), "ERC2981: invalid receiver");
_defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
}
/**
* @dev Removes default royalty information.
*/
function _deleteDefaultRoyalty() internal virtual {
delete _defaultRoyaltyInfo;
}
/**
* @dev Sets the royalty information for a specific token id, overriding the global default.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual {
require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
require(receiver != address(0), "ERC2981: Invalid parameters");
_tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
}
/**
* @dev Resets royalty information for the token id back to the global default.
*/
function _resetTokenRoyalty(uint256 tokenId) internal virtual {
delete _tokenRoyaltyInfo[tokenId];
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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: address zero is not a valid owner");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _ownerOf(tokenId);
require(owner != address(0), "ERC721: invalid token ID");
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) {
_requireMinted(tokenId);
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 overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual 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 token owner or approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
_requireMinted(tokenId);
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: caller is not token owner or 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: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist
*/
function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
return _owners[tokenId];
}
/**
* @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 _ownerOf(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) {
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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, 1);
// Check that tokenId was not minted by `_beforeTokenTransfer` hook
require(!_exists(tokenId), "ERC721: token already minted");
unchecked {
// Will not overflow unless all 2**256 token ids are minted to the same owner.
// Given that tokens are minted one by one, it is impossible in practice that
// this ever happens. Might change if we allow batch minting.
// The ERC fails to describe this case.
_balances[to] += 1;
}
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId, 1);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
* This is an internal function that does not check if the sender is authorized to operate on the token.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId, 1);
// Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
owner = ERC721.ownerOf(tokenId);
// Clear approvals
delete _tokenApprovals[tokenId];
unchecked {
// Cannot overflow, as that would require more tokens to be burned/transferred
// out than the owner initially received through minting and transferring in.
_balances[owner] -= 1;
}
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId, 1);
}
/**
* @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, 1);
// Check that tokenId was not transferred by `_beforeTokenTransfer` hook
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
// Clear approvals from the previous owner
delete _tokenApprovals[tokenId];
unchecked {
// `_balances[from]` cannot overflow for the same reason as described in `_burn`:
// `from`'s balance is the number of token held, which is at least one before the current
// transfer.
// `_balances[to]` could overflow in the conditions described in `_mint`. That would require
// all 2**256 token ids to be minted, which in practice is impossible.
_balances[from] -= 1;
_balances[to] += 1;
}
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId, 1);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits an {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 an {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 Reverts if the `tokenId` has not been minted yet.
*/
function _requireMinted(uint256 tokenId) internal view virtual {
require(_exists(tokenId), "ERC721: invalid token ID");
}
/**
* @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 {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
* used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
* - When `from` is zero, the tokens will be minted for `to`.
* - When `to` is zero, ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
* - `batchSize` is non-zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}
/**
* @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
* used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
* - When `from` is zero, the tokens were minted for `to`.
* - When `to` is zero, ``from``'s tokens were burned.
* - `from` and `to` are never both zero.
* - `batchSize` is non-zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}
/**
* @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
*
* WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
* being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
* that `ownerOf(tokenId)` is `a`.
*/
// solhint-disable-next-line func-name-mixedcase
function __unsafe_increaseBalance(address account, uint256 amount) internal {
_balances[account] += amount;
}
}// 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 (last updated v4.9.0) (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`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.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.9.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
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// 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 (last updated v4.9.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
import "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"viaIR": true,
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"normies","type":"address"},{"internalType":"address","name":"normiesStorage","type":"address"},{"internalType":"address","name":"royaltyReceiver","type":"address"},{"internalType":"address","name":"initialRenderer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyMinted","type":"error"},{"inputs":[],"name":"BadPrice","type":"error"},{"inputs":[],"name":"InvalidPassId","type":"error"},{"inputs":[],"name":"MustOwnNormies","type":"error"},{"inputs":[],"name":"NormieDataMissing","type":"error"},{"inputs":[],"name":"NotNormieOwner","type":"error"},{"inputs":[],"name":"NotPainter","type":"error"},{"inputs":[],"name":"NotPassOwner","type":"error"},{"inputs":[],"name":"PainterNotSet","type":"error"},{"inputs":[],"name":"RendererNotSet","type":"error"},{"inputs":[],"name":"SoldOut","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"passId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"normieId","type":"uint256"}],"name":"NormieRebound","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":"painter","type":"address"}],"name":"PainterSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"passId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"normieId","type":"uint256"}],"name":"PassMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"renderer","type":"address"}],"name":"RendererSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"passId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"x1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"x2","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"y","type":"uint256"}],"name":"Ticked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOWNSAMPLE_THRESHOLD","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NORMIES","outputs":[{"internalType":"contract IERC721Lite","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NORMIES_STORAGE","outputs":[{"internalType":"contract INormiesStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"passId","type":"uint256"}],"name":"bitmapWords","outputs":[{"internalType":"uint256","name":"w0","type":"uint256"},{"internalType":"uint256","name":"w1","type":"uint256"},{"internalType":"uint256","name":"w2","type":"uint256"},{"internalType":"uint256","name":"w3","type":"uint256"},{"internalType":"uint256","name":"w4","type":"uint256"},{"internalType":"uint256","name":"w5","type":"uint256"},{"internalType":"uint256","name":"w6","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"boundNormieId","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":"normieId","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"passId","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedBy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"painter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"passId","type":"uint256"}],"name":"previewBitmap","outputs":[{"internalType":"uint256","name":"w0","type":"uint256"},{"internalType":"uint256","name":"w1","type":"uint256"},{"internalType":"uint256","name":"w2","type":"uint256"},{"internalType":"uint256","name":"w3","type":"uint256"},{"internalType":"uint256","name":"w4","type":"uint256"},{"internalType":"uint256","name":"w5","type":"uint256"},{"internalType":"uint256","name":"w6","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"remaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"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":"passId","type":"uint256"},{"internalType":"uint256","name":"normieId","type":"uint256"}],"name":"setNormie","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"p","type":"address"}],"name":"setPainter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"r","type":"address"}],"name":"setRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeBps","type":"uint96"}],"name":"setRoyalty","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":"passId","type":"uint256"},{"internalType":"uint256","name":"seed","type":"uint256"}],"name":"tick","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tickNonce","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"passId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60c0346200053057601f62002d0138819003918201601f19168301916001600160401b03831184841017620002a55780849260809460405283398101031262000530576200004d8162000555565b906200005c6020820162000555565b620000786060620000706040850162000555565b930162000555565b6200008262000535565b601381527f4e6f726d69657320476c697463682050617373000000000000000000000000006020820152620000b662000535565b600781526609c8e9892a886960cb1b6020820152815190916001600160401b038211620002a55760005490600182811c9216801562000525575b60208310146200041d5781601f849311620004c2575b50602090601f83116001146200044a576000926200043e575b50508160011b916000199060031b1c1916176000555b8051906001600160401b038211620002a55760015490600182811c9216801562000433575b60208310146200041d5781601f849311620003b9575b50602090601f83116001146200033f5760009262000333575b50508160011b916000199060031b1c1916176001555b620001aa336200056a565b60016009556001600160a01b039384168015801562000328575b80156200031d575b801562000312575b620003005784928391620001e8336200056a565b6080521660a052168060018060a01b0319600a541617600a557f869c6ebc45b752b03abf2550b2114eed8d11ba3a40ea9da00d3ef99fd004af72600080a2168015620002bb57604080519081016001600160401b03811182821017620002a5576101f4916020916040528381520152607d60a21b1760065560405161270d9081620005b4823960805181818161079001528181610e600152610fcf015260a05181818161081c01528181610eb60152818161146f0152611fc30152f35b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b60405163d92e233d60e01b8152600490fd5b5084821615620001d4565b5084841615620001cc565b5084831615620001c4565b01519050388062000189565b6001600090815260008051602062002ce18339815191529350601f198516905b818110620003a0575090846001959493921062000386575b505050811b016001556200019f565b015160001960f88460031b161c1916905538808062000377565b929360206001819287860151815501950193016200035f565b600160005290915060008051602062002ce1833981519152601f840160051c8101916020851062000412575b90601f859493920160051c01905b81811062000402575062000170565b60008155849350600101620003f3565b9091508190620003e5565b634e487b7160e01b600052602260045260246000fd5b91607f16916200015a565b0151905038806200011f565b600080805260008051602062002cc18339815191529350601f198516905b818110620004a957509084600195949392106200048f575b505050811b0160005562000135565b015160001960f88460031b161c1916905538808062000480565b9293602060018192878601518155019501930162000468565b6000805290915060008051602062002cc1833981519152601f840160051c810191602085106200051a575b90601f859493920160051c01905b8181106200050a575062000106565b60008155849350600101620004fb565b9091508190620004ed565b91607f1691620000f0565b600080fd5b60408051919082016001600160401b03811183821017620002a557604052565b51906001600160a01b03821682036200053057565b600880546001600160a01b039283166001600160a01b0319821681179092559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a356fe6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a71461171f5750806306fdde0314611652578063081812fc14611632578063095ea7b3146114c55780630f0d70101461149e578063122907db1461145a5780631434fc27146113b857806318160ddd1461063e57806323b872dd146113935780632a55205a146112d057806332cb6b0c146112b45780633cef28d21461127657806342842e0e1461124257806351cff8d9146111ce57806355234ec01461118f57806356d3163d146111225780636352211e146110f157806370a082311461105b578063715018a614610ffe578063776b346014610fba5780638016438d14610df057806384dc4c6714610dd45780638ada6b0f14610dab5780638d859f3e14610d895780638da5cb5b14610d605780638edb24d514610d375780638f2fc60b14610c2b5780639594521a14610bfb57806395d89b4114610ae1578063a0712d681461072c578063a22cb4651461065d578063a2309ff81461063e578063a4bab3091461054d578063b88d4fde1461049e578063c87b56dd14610383578063ca36341114610309578063cccfdf1e146102eb578063e985e9c5146102995763f2fde38b146101d057600080fd5b34610295576020366003190112610295576101e96117ed565b906101f2611ef8565b6001600160a01b03918216928315610243575050600854826001600160601b0360a01b821617600855167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b5050346102e757806003193601126102e75760ff816020936102b96117ed565b6102c1611808565b6001600160a01b0391821683526005875283832091168252855220549151911615158152f35b5080fd5b8334610306576103036102fd36611853565b90611aa3565b80f35b80fd5b5034610295576020366003190112610295576103236117ed565b61032b611ef8565b6001600160a01b0316918215610376575050600b80546001600160a01b031916821790557fd9d1a32d1a78c49b82094c53d0de57721925a7e48f7c438788c3c8253ed7e6f68280a280f35b5163d92e233d60e01b8152fd5b509190346102e75760203660031901126102e75782356000818152600260205260409020546001600160a01b03161561048e57600a546001600160a01b0316801561047e57825163e9dc637560e01b81523095810195865260208601929092529093839185918290819060400103915afa91821561047357809261041b575b815160208082528190610417908201866117c8565b0390f35b9091503d8082853e61042d81856118b5565b8301926020818503126102e7578051906001600160401b03821161029557019083601f8301121561030657506104179281602061046c93519101611a5f565b9038610402565b9051903d90823e3d90fd5b825163472876d960e11b81528590fd5b815163d54e601f60e01b81528490fd5b509034610295576080366003190112610295576104b96117ed565b906104c2611808565b60443590606435946001600160401b038611610549573660238701121561054957850135936104fc6104f3866118d6565b945194856118b5565b848452863660248789010111610306576020866105449760246103039a01838901378601015261053461052f8433611d1f565b61192f565b61053f838383611de7565b61258a565b612361565b8680fd5b50913461030657602036600319011261030657815192631434fc2760e01b845280359084015260e083602481305afa80156106325781809381829083928480966105cd575b5061041796979850519788978893909796959260c0959260e08601998652602086015260408501526060840152608083015260a08201520152565b96509650505050505060e0833d60e01161062a575b816105ef60e093836118b5565b81010312610306575081516020830151828401516060850151608086015160a087015160c09097015193968796909391929190610417610592565b3d91506105e2565b509051903d90823e3d90fd5b5050346102e757816003193601126102e757602090600c549051908152f35b5090346102955780600319360112610295576106776117ed565b9060243591821515809303610728576001600160a01b0316923384146106e65750338452600560205280842083855260205280842060ff1981541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b6020606492519162461bcd60e51b8352820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152fd5b8480fd5b5082906020928360031936011261029557813590610748611f50565b600c546078811015610ad157338552600d865260ff8286205416610ac1576611c37937e080003403610ab15781516370a0823160e01b815233858201526001600160a01b03907f00000000000000000000000000000000000000000000000000000000000000008216908881602481855afa908115610aa7578891610a76575b5015610a6657876024918551928380926331a9108f60e11b8252898b8301525afa908115610a5c578791610a2f575b508133911603610a1f57866024918451928380926302bafc8b60e21b8252888a8301527f0000000000000000000000000000000000000000000000000000000000000000165afa908115610a155786916109e8575b50156109d85761085b90611a3a565b9283600c55338552600d8652818520600160ff198254161790558151906108818261189a565b858252331561099757509061093961054485936108bc6108b686600052600260205260018060a01b0360406000205416151590565b1561268b565b6000858152600260205260409020546108df906001600160a01b031615156108b6565b3380895260038a528489208054600101905585895260028a5284892080546001600160a01b031916821790558590897fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a48433612470565b818552600e8652828186205561094f8383611fa6565b818552601086528085206001600160401b0319815416905551937f973726257f937669c7969e71f1965ec84e684e39bd3343887ebda21951223c97339180a460016009558152f35b606490878085519262461bcd60e51b845283015260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b815163117cf6d360e01b81528490fd5b610a089150873d8911610a0e575b610a0081836118b5565b810190611a22565b8761084c565b503d6109f6565b83513d88823e3d90fd5b825163f5b0a77f60e01b81528590fd5b610a4f9150883d8a11610a55575b610a4781836118b5565b810190611a03565b886107f7565b503d610a3d565b84513d89823e3d90fd5b8351632c3a5fab60e11b81528690fd5b90508881813d8311610aa0575b610a8d81836118b5565b81010312610a9c5751896107c8565b8780fd5b503d610a83565b85513d8a823e3d90fd5b815163fd1ee34960e01b81528490fd5b8151631bbdf5c560e31b81528490fd5b81516352df9fe560e01b81528490fd5b50913461030657806003193601126103065781519181600192600154938460011c9160018616958615610bf1575b6020968785108114610bde578899509688969785829a529182600014610bb7575050600114610b5b575b5050506104179291610b4c9103856118b5565b519282849384528301906117c8565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828410610b9f5750505082010181610b4c610417610b39565b8054848a018601528895508794909301928101610b86565b60ff19168782015293151560051b86019093019350849250610b4c91506104179050610b39565b634e487b7160e01b835260228a52602483fd5b92607f1692610b0f565b503461029557602036600319011261029557816020936001600160401b0392358152601085522054169051908152f35b509034610295578060031936011261029557610c456117ed565b90602435916001600160601b038316808403610d335761271090610c67611ef8565b11610cdd576001600160a01b0316928315610c9b5750610c879051611869565b60a01b6001600160a01b0319161760065580f35b6020606492519162461bcd60e51b8352820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152fd5b815162461bcd60e51b8152602081860152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b8580fd5b5050346102e757816003193601126102e757600b5490516001600160a01b039091168152602090f35b5050346102e757816003193601126102e75760085490516001600160a01b039091168152602090f35b5050346102e757816003193601126102e757602090516611c37937e080008152f35b5050346102e757816003193601126102e757600a5490516001600160a01b039091168152602090f35b5050346102e757816003193601126102e7576020905160088152f35b503461029557610dff36611853565b929091610e0a611f50565b6000838152600260205260409020546001600160a01b031615610fac57610e30836119dd565b6001600160a01b0391903390831603610f9e5782516331a9108f60e11b81528181018690526020929083816024817f000000000000000000000000000000000000000000000000000000000000000086165afa908115610aa7578891610f81575b508133911603610f7257826024918551928380926302bafc8b60e21b82528a878301527f0000000000000000000000000000000000000000000000000000000000000000165afa908115610a5c578791610f55575b5015610f475750601090838652600e81528483872055610f068585611fa6565b838652528320805467ffffffffffffffff191690557fd193670f25474ed8c4413357c5b012bfb11c2afcf5aca5c94ae3e0cb1d17f7918380a3600160095580f35b825163117cf6d360e01b8152fd5b610f6c9150833d8511610a0e57610a0081836118b5565b38610ee6565b50825163f5b0a77f60e01b8152fd5b610f989150843d8611610a5557610a4781836118b5565b38610e91565b8251636061778f60e11b8152fd5b905163d54e601f60e01b8152fd5b5050346102e757816003193601126102e757517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b8334610306578060031936011261030657611017611ef8565b600880546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b508290346102e75760203660031901126102e7576001600160a01b0361107f6117ed565b1690811561109c5760208480858581526003845220549051908152f35b608490602085519162461bcd60e51b8352820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152fd5b5091346103065760203660031901126103065750611111602092356119dd565b90516001600160a01b039091168152f35b50346102955760203660031901126102955761113c6117ed565b611144611ef8565b6001600160a01b0316918215610376575050600a80546001600160a01b031916821790557f869c6ebc45b752b03abf2550b2114eed8d11ba3a40ea9da00d3ef99fd004af728280a280f35b509190346102e757816003193601126102e757600c5460780391607883116111bb576020838351908152f35b634e487b7160e01b815260118452602490fd5b50346102955760203660031901126102955780356001600160a01b038116919082900361123e576111fd611ef8565b8115611230575082808080934790828215611227575bf11561121d575080f35b51903d90823e3d90fd5b506108fc611213565b825163d92e233d60e01b8152fd5b8380fd5b5050346102e757610544610303916112593661181e565b919251926112668461189a565b86845261053461052f8433611d1f565b5050346102e75760203660031901126102e75760209160ff9082906001600160a01b036112a16117ed565b168152600d855220541690519015158152f35b5050346102e757816003193601126102e7576020905160788152f35b509190346102e7576112e136611853565b929081526007602052818120908251916112fa83611869565b546001600160a01b0380821680855260a09290921c602085015292919015611370575b6001600160601b036020830151169485810295818704149015171561135d57815184519084166001600160a01b0316815261271086046020820152604090f35b634e487b7160e01b815260118652602490fd5b9050825161137d81611869565b600654838116825260a01c60208201529061131d565b8334610306576103036113a53661181e565b916113b361052f8433611d1f565b611de7565b509134610306576020366003190112610306578235600081815260026020526040902054909183916001600160a01b03161561144a57918252600f60209081529120805460018201546002830154600384015496840154600585015460069095015496519384529483019190915260408201526060810194909452608084019190915260a083015260c082015260e090f35b5050505163d54e601f60e01b8152fd5b5050346102e757816003193601126102e757517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5034610295576020366003190112610295576020928291358152600e845220549051908152f35b50346102955781600319360112610295576114de6117ed565b6024359290916001600160a01b03919082806114f9876119dd565b169416938085146115e5578033149081156115c6575b501561155e57848652602052842080546001600160a01b03191683179055611536836119dd565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b6020608492519162461bcd60e51b8352820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152fd5b90508652600560205281862033875260205260ff82872054163861150f565b506020608492519162461bcd60e51b8352820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152fd5b5091346103065760203660031901126103065750611111602092356118f1565b5091346103065780600319360112610306578151918182549260018460011c9160018616958615611715575b6020968785108114610bde578899509688969785829a529182600014610bb75750506001146116ba575050506104179291610b4c9103856118b5565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8284106116fd5750505082010181610b4c610417610b39565b8054848a0186015288955087949093019281016116e4565b92607f169261167e565b92505034610295576020366003190112610295573563ffffffff60e01b8116809103610295576020925063152a902d60e11b8114908115611762575b5015158152f35b6380ac58cd60e01b811491508115611794575b8115611783575b503861175b565b6301ffc9a760e01b1490503861177c565b635b5e139f60e01b81149150611775565b60005b8381106117b85750506000910152565b81810151838201526020016117a8565b906020916117e1815180928185528580860191016117a5565b601f01601f1916010190565b600435906001600160a01b038216820361180357565b600080fd5b602435906001600160a01b038216820361180357565b6060906003190112611803576001600160a01b0390600435828116810361180357916024359081168103611803579060443590565b6040906003190112611803576004359060243590565b604081019081106001600160401b0382111761188457604052565b634e487b7160e01b600052604160045260246000fd5b602081019081106001600160401b0382111761188457604052565b90601f801991011681019081106001600160401b0382111761188457604052565b6001600160401b03811161188457601f01601f191660200190565b600081815260026020526040902054611914906001600160a01b03161515611991565b6000908152600460205260409020546001600160a01b031690565b1561193657565b60405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608490fd5b1561199857565b60405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606490fd5b6000908152600260205260409020546001600160a01b0316611a00811515611991565b90565b9081602091031261180357516001600160a01b03811681036118035790565b90816020910312611803575180151581036118035790565b6000198114611a495760010190565b634e487b7160e01b600052601160045260246000fd5b90929192611a6c816118d6565b91611a7a60405193846118b5565b829482845282820111611803576020611a949301906117a5565b565b91908201809211611a4957565b600b549091906001600160a01b03168015611d0d573303611cfb576000828152600260205260409020546001600160a01b031615611ce95781600052602090601060205260016001600160401b0360406000205416016001600160401b038111611a495783600052601060205260406000206001600160401b0382166001600160401b031982541617905560405190602082019283528460408301526001600160401b0360c01b9060c01b16606082015260488152608081018181106001600160401b038211176118845760405251902060005b60068110611b855750505050565b6040518381019083825282604082015260408152606081018181106001600160401b03821117611884576040525190209060289260018360101c1615600014611ca7576027848460081c0614600014611c7b5760265b915b611bef858506868660081c0689612385565b91611bfd868606858a612385565b9182151584151514611c6b57505091611c538492611c4987956060987f6fc833eee3c58c04672ba6f025524512f41fdf4afe32f7dde356df8605d448859a9806878760081c068c6123c6565b848406838a6123c6565b60405193838360081c068552840152066040820152a2565b9350945050506001915001611b77565b6001848460081c060180858560081c061115611bdb57634e487b7160e01b600052601160045260246000fd5b838360081c0615600014611cbe5760015b91611bdd565b600883901c849006600019810190811115611cb857634e487b7160e01b600052601160045260246000fd5b60405163d54e601f60e01b8152600490fd5b60405163bb7fa06b60e01b8152600490fd5b604051633085285560e21b8152600490fd5b906001600160a01b038080611d33846119dd565b16931691838314938415611d66575b508315611d50575b50505090565b611d5c919293506118f1565b1614388080611d4a565b909350600052600560205260406000208260005260205260ff604060002054169238611d42565b15611d9457565b60405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608490fd5b90611e0f91611df5846119dd565b6001600160a01b0393918416928492909183168414611d8d565b16918215611ea75781611e2c91611e25866119dd565b1614611d8d565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60008481526004602052604081206001600160601b0360a01b9081815416905583825260036020526040822060001981540190558482526040822060018154019055858252600260205284604083209182541617905580a4565b60405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b6008546001600160a01b03163303611f0c57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600260095414611f61576002600955565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b604051631a616fcf60e21b815260048101929092526000826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa918215612302576000926122af575b5060c882510361229d5760405160e081018181106001600160401b038211176118845760405260008152600660208201600081526040830160008152606084016000815260808501906000825260a08601926000845260c08701946000865288600052600f6020526040600020975188555160018801555160028701555160038601555160048501555160058401555191015560005b600a8110156122985760005b600a81106120af5750600101612092565b6000818060021b0460041482151715611a4957828060021b0460041483151715611a495760005b600481106121e35750600811156120f0575b60010161209e565b60005b6004811061210157506120e8565b60005b6004811061211557506001016120f3565b612122818460021b611a96565b90612130838660021b611a96565b6028908082810204821481151715611a4957600193612158926121539202611a96565b612613565b87600052600f60205260406000209084612172848461262a565b911b1791806121845750555b01612104565b808503612194575083015561217e565b600281036121a657506002015561217e565b600381036121b857506003015561217e565b600481036121ca57506004015561217e565b6005036121da576005015561217e565b6006015561217e565b60005b600481106121f757506001016120d6565b612204818560021b611a96565b612211838760021b611a96565b90602891828102928184041490151715611a495761222e91611a96565b600780808316810311611a495788518260031c101561228257600382901c89016020015160f81c91811690031c60019081161461226e575b6001016121e6565b9161227a600191611a3a565b929050612266565b634e487b7160e01b600052603260045260246000fd5b505050565b60405163117cf6d360e01b8152600490fd5b9091503d806000833e6122c281836118b5565b810190602081830312611803578051906001600160401b03821161180357019080601f830112156118035781516122fb92602001611a5f565b9038611ffc565b6040513d6000823e3d90fd5b60809060208152603260208201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60608201520190565b1561236857565b60405162461bcd60e51b8152806123816004820161230e565b0390fd5b602883029280840460281490151715611a49576123bf6123ac612153600195948695611a96565b92600052600f602052604060002061262a565b901c161490565b9291602881029080820460281490151715611a49576123e89161215391611a96565b919092600052600f6020526001604060002092612405858561262a565b9215612467571b17915b80612418575055565b60018103612427575060010155565b60028103612436575060020155565b60038103612445575060030155565b60048103612454575060040155565b6005036124615760050155565b60060155565b1b19169161240f565b91929091803b15612581576124bd936040519081630a85bd0160e11b9384825233600483015260009687602484015260448301526080606483015281878160209a8b9660848301906117c8565b03926001600160a01b03165af1849181612541575b50612530575050503d600014612528573d6124ec816118d6565b906124fa60405192836118b5565b81528091833d92013e5b805191826125255760405162461bcd60e51b8152806123816004820161230e565b01fd5b506060612504565b6001600160e01b0319161492509050565b9091508581813d831161257a575b61255981836118b5565b8101031261072857516001600160e01b0319811681036107285790386124d2565b503d61254f565b50915050600190565b9293919290803b15612609576125de9460018060a01b039460405192839187630a85bd0160e11b9687855233600486015216602484015260448301526080606483015281806020998a9560848301906117c8565b03916000988991165af18491816125415750612530575050503d600014612528573d6124ec816118d6565b5050915050600190565b9060ff8260081c921660ff0360ff8111611a495790565b908015612686576001811461267e5760028114612676576003811461266e57600481146126665760051461265f576006015490565b6005015490565b506004015490565b506003015490565b506002015490565b506001015490565b505490565b1561269257565b60405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606490fdfea2646970667358221220a053a73f9239bd22202278a2261bd523244e2b2c789f2155c24e3516dffaa98364736f6c63430008180033290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60000000000000000000000009eb6e2025b64f340691e424b7fe7022ffde124380000000000000000000000001b976baf51cf51f0e369c070d47fbc47a706e602000000000000000000000000019b0ee245fb09aaf92ac93ca3309832b7974681000000000000000000000000de3304ab99e1551188f59341abf160b53a07b80a
Deployed Bytecode
0x6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a71461171f5750806306fdde0314611652578063081812fc14611632578063095ea7b3146114c55780630f0d70101461149e578063122907db1461145a5780631434fc27146113b857806318160ddd1461063e57806323b872dd146113935780632a55205a146112d057806332cb6b0c146112b45780633cef28d21461127657806342842e0e1461124257806351cff8d9146111ce57806355234ec01461118f57806356d3163d146111225780636352211e146110f157806370a082311461105b578063715018a614610ffe578063776b346014610fba5780638016438d14610df057806384dc4c6714610dd45780638ada6b0f14610dab5780638d859f3e14610d895780638da5cb5b14610d605780638edb24d514610d375780638f2fc60b14610c2b5780639594521a14610bfb57806395d89b4114610ae1578063a0712d681461072c578063a22cb4651461065d578063a2309ff81461063e578063a4bab3091461054d578063b88d4fde1461049e578063c87b56dd14610383578063ca36341114610309578063cccfdf1e146102eb578063e985e9c5146102995763f2fde38b146101d057600080fd5b34610295576020366003190112610295576101e96117ed565b906101f2611ef8565b6001600160a01b03918216928315610243575050600854826001600160601b0360a01b821617600855167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b5050346102e757806003193601126102e75760ff816020936102b96117ed565b6102c1611808565b6001600160a01b0391821683526005875283832091168252855220549151911615158152f35b5080fd5b8334610306576103036102fd36611853565b90611aa3565b80f35b80fd5b5034610295576020366003190112610295576103236117ed565b61032b611ef8565b6001600160a01b0316918215610376575050600b80546001600160a01b031916821790557fd9d1a32d1a78c49b82094c53d0de57721925a7e48f7c438788c3c8253ed7e6f68280a280f35b5163d92e233d60e01b8152fd5b509190346102e75760203660031901126102e75782356000818152600260205260409020546001600160a01b03161561048e57600a546001600160a01b0316801561047e57825163e9dc637560e01b81523095810195865260208601929092529093839185918290819060400103915afa91821561047357809261041b575b815160208082528190610417908201866117c8565b0390f35b9091503d8082853e61042d81856118b5565b8301926020818503126102e7578051906001600160401b03821161029557019083601f8301121561030657506104179281602061046c93519101611a5f565b9038610402565b9051903d90823e3d90fd5b825163472876d960e11b81528590fd5b815163d54e601f60e01b81528490fd5b509034610295576080366003190112610295576104b96117ed565b906104c2611808565b60443590606435946001600160401b038611610549573660238701121561054957850135936104fc6104f3866118d6565b945194856118b5565b848452863660248789010111610306576020866105449760246103039a01838901378601015261053461052f8433611d1f565b61192f565b61053f838383611de7565b61258a565b612361565b8680fd5b50913461030657602036600319011261030657815192631434fc2760e01b845280359084015260e083602481305afa80156106325781809381829083928480966105cd575b5061041796979850519788978893909796959260c0959260e08601998652602086015260408501526060840152608083015260a08201520152565b96509650505050505060e0833d60e01161062a575b816105ef60e093836118b5565b81010312610306575081516020830151828401516060850151608086015160a087015160c09097015193968796909391929190610417610592565b3d91506105e2565b509051903d90823e3d90fd5b5050346102e757816003193601126102e757602090600c549051908152f35b5090346102955780600319360112610295576106776117ed565b9060243591821515809303610728576001600160a01b0316923384146106e65750338452600560205280842083855260205280842060ff1981541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b6020606492519162461bcd60e51b8352820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152fd5b8480fd5b5082906020928360031936011261029557813590610748611f50565b600c546078811015610ad157338552600d865260ff8286205416610ac1576611c37937e080003403610ab15781516370a0823160e01b815233858201526001600160a01b03907f0000000000000000000000009eb6e2025b64f340691e424b7fe7022ffde124388216908881602481855afa908115610aa7578891610a76575b5015610a6657876024918551928380926331a9108f60e11b8252898b8301525afa908115610a5c578791610a2f575b508133911603610a1f57866024918451928380926302bafc8b60e21b8252888a8301527f0000000000000000000000001b976baf51cf51f0e369c070d47fbc47a706e602165afa908115610a155786916109e8575b50156109d85761085b90611a3a565b9283600c55338552600d8652818520600160ff198254161790558151906108818261189a565b858252331561099757509061093961054485936108bc6108b686600052600260205260018060a01b0360406000205416151590565b1561268b565b6000858152600260205260409020546108df906001600160a01b031615156108b6565b3380895260038a528489208054600101905585895260028a5284892080546001600160a01b031916821790558590897fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a48433612470565b818552600e8652828186205561094f8383611fa6565b818552601086528085206001600160401b0319815416905551937f973726257f937669c7969e71f1965ec84e684e39bd3343887ebda21951223c97339180a460016009558152f35b606490878085519262461bcd60e51b845283015260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b815163117cf6d360e01b81528490fd5b610a089150873d8911610a0e575b610a0081836118b5565b810190611a22565b8761084c565b503d6109f6565b83513d88823e3d90fd5b825163f5b0a77f60e01b81528590fd5b610a4f9150883d8a11610a55575b610a4781836118b5565b810190611a03565b886107f7565b503d610a3d565b84513d89823e3d90fd5b8351632c3a5fab60e11b81528690fd5b90508881813d8311610aa0575b610a8d81836118b5565b81010312610a9c5751896107c8565b8780fd5b503d610a83565b85513d8a823e3d90fd5b815163fd1ee34960e01b81528490fd5b8151631bbdf5c560e31b81528490fd5b81516352df9fe560e01b81528490fd5b50913461030657806003193601126103065781519181600192600154938460011c9160018616958615610bf1575b6020968785108114610bde578899509688969785829a529182600014610bb7575050600114610b5b575b5050506104179291610b4c9103856118b5565b519282849384528301906117c8565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828410610b9f5750505082010181610b4c610417610b39565b8054848a018601528895508794909301928101610b86565b60ff19168782015293151560051b86019093019350849250610b4c91506104179050610b39565b634e487b7160e01b835260228a52602483fd5b92607f1692610b0f565b503461029557602036600319011261029557816020936001600160401b0392358152601085522054169051908152f35b509034610295578060031936011261029557610c456117ed565b90602435916001600160601b038316808403610d335761271090610c67611ef8565b11610cdd576001600160a01b0316928315610c9b5750610c879051611869565b60a01b6001600160a01b0319161760065580f35b6020606492519162461bcd60e51b8352820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152fd5b815162461bcd60e51b8152602081860152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b8580fd5b5050346102e757816003193601126102e757600b5490516001600160a01b039091168152602090f35b5050346102e757816003193601126102e75760085490516001600160a01b039091168152602090f35b5050346102e757816003193601126102e757602090516611c37937e080008152f35b5050346102e757816003193601126102e757600a5490516001600160a01b039091168152602090f35b5050346102e757816003193601126102e7576020905160088152f35b503461029557610dff36611853565b929091610e0a611f50565b6000838152600260205260409020546001600160a01b031615610fac57610e30836119dd565b6001600160a01b0391903390831603610f9e5782516331a9108f60e11b81528181018690526020929083816024817f0000000000000000000000009eb6e2025b64f340691e424b7fe7022ffde1243886165afa908115610aa7578891610f81575b508133911603610f7257826024918551928380926302bafc8b60e21b82528a878301527f0000000000000000000000001b976baf51cf51f0e369c070d47fbc47a706e602165afa908115610a5c578791610f55575b5015610f475750601090838652600e81528483872055610f068585611fa6565b838652528320805467ffffffffffffffff191690557fd193670f25474ed8c4413357c5b012bfb11c2afcf5aca5c94ae3e0cb1d17f7918380a3600160095580f35b825163117cf6d360e01b8152fd5b610f6c9150833d8511610a0e57610a0081836118b5565b38610ee6565b50825163f5b0a77f60e01b8152fd5b610f989150843d8611610a5557610a4781836118b5565b38610e91565b8251636061778f60e11b8152fd5b905163d54e601f60e01b8152fd5b5050346102e757816003193601126102e757517f0000000000000000000000009eb6e2025b64f340691e424b7fe7022ffde124386001600160a01b03168152602090f35b8334610306578060031936011261030657611017611ef8565b600880546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b508290346102e75760203660031901126102e7576001600160a01b0361107f6117ed565b1690811561109c5760208480858581526003845220549051908152f35b608490602085519162461bcd60e51b8352820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152fd5b5091346103065760203660031901126103065750611111602092356119dd565b90516001600160a01b039091168152f35b50346102955760203660031901126102955761113c6117ed565b611144611ef8565b6001600160a01b0316918215610376575050600a80546001600160a01b031916821790557f869c6ebc45b752b03abf2550b2114eed8d11ba3a40ea9da00d3ef99fd004af728280a280f35b509190346102e757816003193601126102e757600c5460780391607883116111bb576020838351908152f35b634e487b7160e01b815260118452602490fd5b50346102955760203660031901126102955780356001600160a01b038116919082900361123e576111fd611ef8565b8115611230575082808080934790828215611227575bf11561121d575080f35b51903d90823e3d90fd5b506108fc611213565b825163d92e233d60e01b8152fd5b8380fd5b5050346102e757610544610303916112593661181e565b919251926112668461189a565b86845261053461052f8433611d1f565b5050346102e75760203660031901126102e75760209160ff9082906001600160a01b036112a16117ed565b168152600d855220541690519015158152f35b5050346102e757816003193601126102e7576020905160788152f35b509190346102e7576112e136611853565b929081526007602052818120908251916112fa83611869565b546001600160a01b0380821680855260a09290921c602085015292919015611370575b6001600160601b036020830151169485810295818704149015171561135d57815184519084166001600160a01b0316815261271086046020820152604090f35b634e487b7160e01b815260118652602490fd5b9050825161137d81611869565b600654838116825260a01c60208201529061131d565b8334610306576103036113a53661181e565b916113b361052f8433611d1f565b611de7565b509134610306576020366003190112610306578235600081815260026020526040902054909183916001600160a01b03161561144a57918252600f60209081529120805460018201546002830154600384015496840154600585015460069095015496519384529483019190915260408201526060810194909452608084019190915260a083015260c082015260e090f35b5050505163d54e601f60e01b8152fd5b5050346102e757816003193601126102e757517f0000000000000000000000001b976baf51cf51f0e369c070d47fbc47a706e6026001600160a01b03168152602090f35b5034610295576020366003190112610295576020928291358152600e845220549051908152f35b50346102955781600319360112610295576114de6117ed565b6024359290916001600160a01b03919082806114f9876119dd565b169416938085146115e5578033149081156115c6575b501561155e57848652602052842080546001600160a01b03191683179055611536836119dd565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b6020608492519162461bcd60e51b8352820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152fd5b90508652600560205281862033875260205260ff82872054163861150f565b506020608492519162461bcd60e51b8352820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152fd5b5091346103065760203660031901126103065750611111602092356118f1565b5091346103065780600319360112610306578151918182549260018460011c9160018616958615611715575b6020968785108114610bde578899509688969785829a529182600014610bb75750506001146116ba575050506104179291610b4c9103856118b5565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8284106116fd5750505082010181610b4c610417610b39565b8054848a0186015288955087949093019281016116e4565b92607f169261167e565b92505034610295576020366003190112610295573563ffffffff60e01b8116809103610295576020925063152a902d60e11b8114908115611762575b5015158152f35b6380ac58cd60e01b811491508115611794575b8115611783575b503861175b565b6301ffc9a760e01b1490503861177c565b635b5e139f60e01b81149150611775565b60005b8381106117b85750506000910152565b81810151838201526020016117a8565b906020916117e1815180928185528580860191016117a5565b601f01601f1916010190565b600435906001600160a01b038216820361180357565b600080fd5b602435906001600160a01b038216820361180357565b6060906003190112611803576001600160a01b0390600435828116810361180357916024359081168103611803579060443590565b6040906003190112611803576004359060243590565b604081019081106001600160401b0382111761188457604052565b634e487b7160e01b600052604160045260246000fd5b602081019081106001600160401b0382111761188457604052565b90601f801991011681019081106001600160401b0382111761188457604052565b6001600160401b03811161188457601f01601f191660200190565b600081815260026020526040902054611914906001600160a01b03161515611991565b6000908152600460205260409020546001600160a01b031690565b1561193657565b60405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608490fd5b1561199857565b60405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606490fd5b6000908152600260205260409020546001600160a01b0316611a00811515611991565b90565b9081602091031261180357516001600160a01b03811681036118035790565b90816020910312611803575180151581036118035790565b6000198114611a495760010190565b634e487b7160e01b600052601160045260246000fd5b90929192611a6c816118d6565b91611a7a60405193846118b5565b829482845282820111611803576020611a949301906117a5565b565b91908201809211611a4957565b600b549091906001600160a01b03168015611d0d573303611cfb576000828152600260205260409020546001600160a01b031615611ce95781600052602090601060205260016001600160401b0360406000205416016001600160401b038111611a495783600052601060205260406000206001600160401b0382166001600160401b031982541617905560405190602082019283528460408301526001600160401b0360c01b9060c01b16606082015260488152608081018181106001600160401b038211176118845760405251902060005b60068110611b855750505050565b6040518381019083825282604082015260408152606081018181106001600160401b03821117611884576040525190209060289260018360101c1615600014611ca7576027848460081c0614600014611c7b5760265b915b611bef858506868660081c0689612385565b91611bfd868606858a612385565b9182151584151514611c6b57505091611c538492611c4987956060987f6fc833eee3c58c04672ba6f025524512f41fdf4afe32f7dde356df8605d448859a9806878760081c068c6123c6565b848406838a6123c6565b60405193838360081c068552840152066040820152a2565b9350945050506001915001611b77565b6001848460081c060180858560081c061115611bdb57634e487b7160e01b600052601160045260246000fd5b838360081c0615600014611cbe5760015b91611bdd565b600883901c849006600019810190811115611cb857634e487b7160e01b600052601160045260246000fd5b60405163d54e601f60e01b8152600490fd5b60405163bb7fa06b60e01b8152600490fd5b604051633085285560e21b8152600490fd5b906001600160a01b038080611d33846119dd565b16931691838314938415611d66575b508315611d50575b50505090565b611d5c919293506118f1565b1614388080611d4a565b909350600052600560205260406000208260005260205260ff604060002054169238611d42565b15611d9457565b60405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608490fd5b90611e0f91611df5846119dd565b6001600160a01b0393918416928492909183168414611d8d565b16918215611ea75781611e2c91611e25866119dd565b1614611d8d565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60008481526004602052604081206001600160601b0360a01b9081815416905583825260036020526040822060001981540190558482526040822060018154019055858252600260205284604083209182541617905580a4565b60405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b6008546001600160a01b03163303611f0c57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600260095414611f61576002600955565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b604051631a616fcf60e21b815260048101929092526000826024817f0000000000000000000000001b976baf51cf51f0e369c070d47fbc47a706e6026001600160a01b03165afa918215612302576000926122af575b5060c882510361229d5760405160e081018181106001600160401b038211176118845760405260008152600660208201600081526040830160008152606084016000815260808501906000825260a08601926000845260c08701946000865288600052600f6020526040600020975188555160018801555160028701555160038601555160048501555160058401555191015560005b600a8110156122985760005b600a81106120af5750600101612092565b6000818060021b0460041482151715611a4957828060021b0460041483151715611a495760005b600481106121e35750600811156120f0575b60010161209e565b60005b6004811061210157506120e8565b60005b6004811061211557506001016120f3565b612122818460021b611a96565b90612130838660021b611a96565b6028908082810204821481151715611a4957600193612158926121539202611a96565b612613565b87600052600f60205260406000209084612172848461262a565b911b1791806121845750555b01612104565b808503612194575083015561217e565b600281036121a657506002015561217e565b600381036121b857506003015561217e565b600481036121ca57506004015561217e565b6005036121da576005015561217e565b6006015561217e565b60005b600481106121f757506001016120d6565b612204818560021b611a96565b612211838760021b611a96565b90602891828102928184041490151715611a495761222e91611a96565b600780808316810311611a495788518260031c101561228257600382901c89016020015160f81c91811690031c60019081161461226e575b6001016121e6565b9161227a600191611a3a565b929050612266565b634e487b7160e01b600052603260045260246000fd5b505050565b60405163117cf6d360e01b8152600490fd5b9091503d806000833e6122c281836118b5565b810190602081830312611803578051906001600160401b03821161180357019080601f830112156118035781516122fb92602001611a5f565b9038611ffc565b6040513d6000823e3d90fd5b60809060208152603260208201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60608201520190565b1561236857565b60405162461bcd60e51b8152806123816004820161230e565b0390fd5b602883029280840460281490151715611a49576123bf6123ac612153600195948695611a96565b92600052600f602052604060002061262a565b901c161490565b9291602881029080820460281490151715611a49576123e89161215391611a96565b919092600052600f6020526001604060002092612405858561262a565b9215612467571b17915b80612418575055565b60018103612427575060010155565b60028103612436575060020155565b60038103612445575060030155565b60048103612454575060040155565b6005036124615760050155565b60060155565b1b19169161240f565b91929091803b15612581576124bd936040519081630a85bd0160e11b9384825233600483015260009687602484015260448301526080606483015281878160209a8b9660848301906117c8565b03926001600160a01b03165af1849181612541575b50612530575050503d600014612528573d6124ec816118d6565b906124fa60405192836118b5565b81528091833d92013e5b805191826125255760405162461bcd60e51b8152806123816004820161230e565b01fd5b506060612504565b6001600160e01b0319161492509050565b9091508581813d831161257a575b61255981836118b5565b8101031261072857516001600160e01b0319811681036107285790386124d2565b503d61254f565b50915050600190565b9293919290803b15612609576125de9460018060a01b039460405192839187630a85bd0160e11b9687855233600486015216602484015260448301526080606483015281806020998a9560848301906117c8565b03916000988991165af18491816125415750612530575050503d600014612528573d6124ec816118d6565b5050915050600190565b9060ff8260081c921660ff0360ff8111611a495790565b908015612686576001811461267e5760028114612676576003811461266e57600481146126665760051461265f576006015490565b6005015490565b506004015490565b506003015490565b506002015490565b506001015490565b505490565b1561269257565b60405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606490fdfea2646970667358221220a053a73f9239bd22202278a2261bd523244e2b2c789f2155c24e3516dffaa98364736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009eb6e2025b64f340691e424b7fe7022ffde124380000000000000000000000001b976baf51cf51f0e369c070d47fbc47a706e602000000000000000000000000019b0ee245fb09aaf92ac93ca3309832b7974681000000000000000000000000de3304ab99e1551188f59341abf160b53a07b80a
-----Decoded View---------------
Arg [0] : normies (address): 0x9Eb6E2025B64f340691e424b7fe7022fFDE12438
Arg [1] : normiesStorage (address): 0x1B976bAf51cF51F0e369C070d47FBc47A706e602
Arg [2] : royaltyReceiver (address): 0x019B0EE245fb09aaf92aC93Ca3309832B7974681
Arg [3] : initialRenderer (address): 0xDE3304AB99e1551188F59341AbF160B53A07B80A
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000009eb6e2025b64f340691e424b7fe7022ffde12438
Arg [1] : 0000000000000000000000001b976baf51cf51f0e369c070d47fbc47a706e602
Arg [2] : 000000000000000000000000019b0ee245fb09aaf92ac93ca3309832b7974681
Arg [3] : 000000000000000000000000de3304ab99e1551188f59341abf160b53a07b80a
Loading...
Loading
Loading...
Loading
Net Worth in USD
$9.91
Net Worth in ETH
0.005
Token Allocations
ETH
100.00%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $1,982.29 | 0.005 | $9.91 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.