Blockwell

Beeple Round 2 Open Edition

About

Stats

Public Functions 24
Event Types 5
Code Size 52,496 bytes

Library Use

Uses Counters for Counters.Counter.

Approval Event

Parameters help
owner
address help
approved
address help
tokenId
uint256 help

ApprovalForAll Event

Parameters help
owner
address help
operator
address help
approved
bool help

NiftyCreated Event

Parameters help
new_owner
address help
_niftyType
uint help
_tokenId
uint help

NiftyPurchased Event

Parameters help
_buyer
address help
_amount
uint256 help
_tokenId
uint help

Transfer Event

Parameters help
from
address help
to
address help
tokenId
uint256 help

Functions Expand All Collapse All

balanceOf keyboard_arrow_up

Parameters help

Name Type
owner
address help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
   function balanceOf(address owner) public view returns (uint256) {
       require(owner != address(0), "ERC721: balance query for the zero address");

       return _ownedTokensCount[owner].current();
   }

ownerOf keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
   function ownerOf(uint256 tokenId) public view returns (address) {
       address owner = _tokenOwner[tokenId];
       require(owner != address(0), "ERC721: owner query for nonexistent token");

       return owner;
   }

safeTransferFrom keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
   function safeTransferFrom(address from, address to, uint256 tokenId) public {
       safeTransferFrom(from, to, tokenId, "");
   }

transferFrom keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
   function transferFrom(address from, address to, uint256 tokenId) public {
       //solhint-disable-next-line max-line-length
       require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

       _transferFrom(from, to, tokenId);
   }

approve keyboard_arrow_up

Parameters help

Name Type
to
address help
tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
   function approve(address to, uint256 tokenId) public {
       address owner = ownerOf(tokenId);
       require(to != owner, "ERC721: approval to current owner");

       require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
           "ERC721: approve caller is not owner nor approved for all"
       );

       _tokenApprovals[tokenId] = to;
       emit Approval(owner, to, tokenId);
   }

getApproved keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
   function getApproved(uint256 tokenId) public view returns (address) {
       require(_exists(tokenId), "ERC721: approved query for nonexistent token");

       return _tokenApprovals[tokenId];
   }

setApprovalForAll keyboard_arrow_up

Parameters help

Name Type
to
address help
approved
bool help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
   function setApprovalForAll(address to, bool approved) public {
       require(to != _msgSender(), "ERC721: approve to caller");

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

isApprovedForAll keyboard_arrow_up

Parameters help

Name Type
owner
address help
operator
address help

Properties

Visibility help public
Mutability help view
Source Code
   function isApprovedForAll(address owner, address operator) public view returns (bool) {
       return _operatorApprovals[owner][operator];
   }

safeTransferFrom keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
tokenId
uint256 help
_data
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
   function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public {
       require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
       _safeTransferFrom(from, to, tokenId, _data);
   }

name keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
   function name() external view returns (string memory) {
       return _name;
   }

symbol keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
   function symbol() external view returns (string memory) {
       return _symbol;
   }

tokenURI keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
   function tokenURI(uint256 tokenId) external view returns (string memory) {
       require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
       return _tokenURIs[tokenId];
   }

supportsInterface keyboard_arrow_up

Parameters help

Name Type
interfaceId
bytes4 help

Properties

Visibility help public
Mutability help view
Source Code
   function supportsInterface(bytes4 interfaceId) external view returns (bool) {
       return _supportedInterfaces[interfaceId];
   }

tokenIPFSHash keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
   function tokenIPFSHash(uint256 tokenId) external view returns (string memory) {
       require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        //master for static calls
       BuilderMaster bm = BuilderMaster(masterBuilderContract);
       uint nifty_type = bm.getNiftyTypeId(tokenId);
       return _niftyTypeIPFSHashes[nifty_type];
   }

tokenName keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
   function tokenName(uint256 tokenId) external view returns (string memory) {
       require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        //master for static calls
       BuilderMaster bm = BuilderMaster(masterBuilderContract);
       uint nifty_type = bm.getNiftyTypeId(tokenId);
       return _niftyTypeName[nifty_type];
   }

totalSupply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
   function totalSupply() public view returns (uint256) {
       return _allTokens.length;
   }

tokenOfOwnerByIndex keyboard_arrow_up

Parameters help

Name Type
owner
address help
index
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
   function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {
       require(index < balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
       return _ownedTokens[owner][index];
   }

tokenByIndex keyboard_arrow_up

Parameters help

Name Type
index
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
   function tokenByIndex(uint256 index) public view returns (uint256) {
       require(index < totalSupply(), "ERC721Enumerable: global index out of bounds");
       return _allTokens[index];
   }

setNiftyName keyboard_arrow_up

Parameters help

Name Type
niftyType
uint help
niftyName
string help

Properties

Visibility help public
Mutability help transaction
Source Code
   function setNiftyName (uint niftyType, string memory niftyName) onlyOwner public {
       //allow owner to change nifty name
        _setNiftyTypeName(niftyType, niftyName);
   }

setBaseURI keyboard_arrow_up

Parameters help

Name Type
newBaseURI
string help

Properties

Visibility help public
Mutability help transaction
Source Code
   function setBaseURI(string memory newBaseURI) onlyOwner public {
       //allow owner to change base URI
        baseURI = newBaseURI;
   }

isNiftySoldOut keyboard_arrow_up

Parameters help

Name Type
niftyType
uint help

Properties

Visibility help public
Mutability help view
Source Code
   function isNiftySoldOut(uint niftyType) public view returns (bool) {
       if (niftyType > numNiftiesCurrentlyInContract) {
           return true;
       }
       if (_numNiftyMinted[niftyType].current() > _numNiftyPermitted[niftyType]) {
           return (true);
       } else {
           return (false);
       }
   }

giftNifty keyboard_arrow_up

Parameters help

Name Type
collector_address
address help
niftyType
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
   function giftNifty(address collector_address, 
                      uint niftyType) onlyOwner public {
       //master for static calls
       BuilderMaster bm = BuilderMaster(masterBuilderContract);
       _numNiftyMinted[niftyType].increment();
       //check if this nifty is sold out
       if (isNiftySoldOut(niftyType)==true) {
           revert("Nifty sold out!");
       }
       //mint a nifty
       uint specificTokenId = _numNiftyMinted[niftyType].current();
       uint tokenId = bm.encodeTokenId(contractId, niftyType, specificTokenId);
       string memory tokenIdStr = bm.uint2str(tokenId);
       string memory tokenURI = bm.strConcat(baseURI, tokenIdStr);
       //mint token
       _mint(collector_address, tokenId);
       _setTokenURI(tokenId, tokenURI);
       //do events
       emit NiftyCreated(collector_address, niftyType, tokenId);
   }

massMintNFTs keyboard_arrow_up

Parameters help

Name Type
collector_address
address help
numToMint
uint help
niftyType
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function massMintNFTs(address collector_address, uint numToMint, uint niftyType) onlyOwner public {
        //loop through array and create nifties
        for (uint i=0; i < numToMint; i++) {
            giftNifty(collector_address,niftyType);
        }
       
   }

closeOpenEdition keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
   function closeOpenEdition() onlyOwner public {
       _numNiftyPermitted[1] = _numNiftyMinted[1].current();
       _numNiftyPermitted[2] = _numNiftyMinted[2].current();
       _numNiftyPermitted[3] = _numNiftyMinted[3].current();
   }