Blockwell

Art Blocks

About

Stats

Public Functions 59
Event Types 4
Code Size 47,521 bytes

Library Use

Uses SafeMath for uint256.

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

Mint Event

Parameters help
_to
address help
_tokenId
uint256 help
_projectId
uint256 help

Transfer Event

Parameters help
from
address help
to
address help
tokenId
uint256 help

Project Event

Members
name
string help
artist
string help
description
string help
website
string help
license
string help
dynamic
bool help
projectBaseURI
string help
projectBaseIpfsURI
string help
invocations
uint256 help
maxInvocations
uint256 help
scriptJSON
string help
scripts
mapping(uint256 => string) help
scriptCount
uint help
ipfsHash
string help
useHashString
bool help
useIpfs
bool help
active
bool help
locked
bool help
paused
bool 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(msg.sender, 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(msg.sender == owner || isApprovedForAll(owner, msg.sender),
            "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
Source Code
    function setApprovalForAll(address to, bool approved) public {
        require(to != msg.sender, "ERC721: approve to caller");

        _operatorApprovals[msg.sender][to] = approved;
        emit ApprovalForAll(msg.sender, 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 {
        transferFrom(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

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];
    }

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];
    }

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;
    }

mint keyboard_arrow_up

Parameters help

Name Type
_to
address help
_projectId
uint256 help
_by
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function mint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId) {
        require(isMintWhitelisted[msg.sender], "Must mint from whitelisted minter contract.");
        require(projects[_projectId].invocations.add(1) <= projects[_projectId].maxInvocations, "Must not exceed max invocations");
        require(projects[_projectId].active || _by == projectIdToArtistAddress[_projectId], "Project must exist and be active");
        require(!projects[_projectId].paused || _by == projectIdToArtistAddress[_projectId], "Purchases are paused.");


        uint256 tokenId = _mintToken(_to, _projectId);

        return tokenId;
    }

updateArtblocksAddress keyboard_arrow_up

Parameters help

Name Type
_artblocksAddress
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateArtblocksAddress(address _artblocksAddress) public onlyAdmin {
        artblocksAddress = _artblocksAddress;
    }

updateArtblocksPercentage keyboard_arrow_up

Parameters help

Name Type
_artblocksPercentage
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function updateArtblocksPercentage(uint256 _artblocksPercentage) public onlyAdmin {
        require(_artblocksPercentage <= 25, "Max of 25%");
        artblocksPercentage = _artblocksPercentage;
    }

addWhitelisted keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function addWhitelisted(address _address) public onlyAdmin {
        isWhitelisted[_address] = true;
    }

removeWhitelisted keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function removeWhitelisted(address _address) public onlyAdmin {
        isWhitelisted[_address] = false;
    }

addMintWhitelisted keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function addMintWhitelisted(address _address) public onlyAdmin {
        isMintWhitelisted[_address] = true;
    }

removeMintWhitelisted keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function removeMintWhitelisted(address _address) public onlyAdmin {
        isMintWhitelisted[_address] = false;
    }

updateRandomizerAddress keyboard_arrow_up

Parameters help

Name Type
_randomizerAddress
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyWhitelisted checks for the following:
Source Code
    function updateRandomizerAddress(address _randomizerAddress) public onlyWhitelisted {
      randomizerContract = Randomizer(_randomizerAddress);
    }

toggleProjectIsLocked keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyWhitelisted checks for the following:
Source Code
    function toggleProjectIsLocked(uint256 _projectId) public onlyWhitelisted onlyUnlocked(_projectId) {
        projects[_projectId].locked = true;
    }

toggleProjectIsActive keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyWhitelisted checks for the following:
Source Code
    function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted {
        projects[_projectId].active = !projects[_projectId].active;
    }

updateProjectArtistAddress keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_artistAddress
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectArtistAddress(uint256 _projectId, address _artistAddress) public onlyArtistOrWhitelisted(_projectId) {
        projectIdToArtistAddress[_projectId] = _artistAddress;
    }

toggleProjectIsPaused keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function toggleProjectIsPaused(uint256 _projectId) public onlyArtist(_projectId) {
        projects[_projectId].paused = !projects[_projectId].paused;
    }

addProject keyboard_arrow_up

Parameters help

Name Type
_projectName
string help
_artistAddress
address help
_pricePerTokenInWei
uint256 help
_dynamic
bool help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyWhitelisted checks for the following:
Source Code
    function addProject(string memory _projectName, address _artistAddress, uint256 _pricePerTokenInWei, bool _dynamic) public onlyWhitelisted {

        uint256 projectId = nextProjectId;
        projectIdToArtistAddress[projectId] = _artistAddress;
        projects[projectId].name = _projectName;
        projectIdToCurrencySymbol[projectId] = "ETH";
        projectIdToPricePerTokenInWei[projectId] = _pricePerTokenInWei;
        projects[projectId].paused=true;
        projects[projectId].dynamic=_dynamic;
        projects[projectId].maxInvocations = ONE_MILLION;
        if (!_dynamic) {
            projects[projectId].useHashString = false;
        } else {
            projects[projectId].useHashString = true;
        }
        nextProjectId = nextProjectId.add(1);
    }

updateProjectCurrencyInfo keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_currencySymbol
string help
_currencyAddress
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectCurrencyInfo(uint256 _projectId, string memory _currencySymbol, address _currencyAddress) onlyArtist(_projectId) public {
        projectIdToCurrencySymbol[_projectId] = _currencySymbol;
        projectIdToCurrencyAddress[_projectId] = _currencyAddress;
    }

updateProjectPricePerTokenInWei keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_pricePerTokenInWei
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public {
        projectIdToPricePerTokenInWei[_projectId] = _pricePerTokenInWei;
    }

updateProjectName keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_projectName
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
        projects[_projectId].name = _projectName;
    }

updateProjectArtistName keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_projectArtistName
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
        projects[_projectId].artist = _projectArtistName;
    }

updateProjectAdditionalPayeeInfo keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_additionalPayee
address help
_additionalPayeePercentage
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function updateProjectAdditionalPayeeInfo(uint256 _projectId, address _additionalPayee, uint256 _additionalPayeePercentage) onlyArtist(_projectId) public {
        require(_additionalPayeePercentage <= 100, "Max of 100%");
        projectIdToAdditionalPayee[_projectId] = _additionalPayee;
        projectIdToAdditionalPayeePercentage[_projectId] = _additionalPayeePercentage;
    }

updateProjectSecondaryMarketRoyaltyPercentage keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_secondMarketRoyalty
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function updateProjectSecondaryMarketRoyaltyPercentage(uint256 _projectId, uint256 _secondMarketRoyalty) onlyArtist(_projectId) public {
        require(_secondMarketRoyalty <= 100, "Max of 100%");
        projectIdToSecondaryMarketRoyaltyPercentage[_projectId] = _secondMarketRoyalty;
    }

updateProjectDescription keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_projectDescription
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public {
        projects[_projectId].description = _projectDescription;
    }

updateProjectWebsite keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_projectWebsite
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public {
        projects[_projectId].website = _projectWebsite;
    }

updateProjectLicense keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_projectLicense
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
        projects[_projectId].license = _projectLicense;
    }

updateProjectMaxInvocations keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_maxInvocations
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyArtist(_projectId) public {
        require((!projects[_projectId].locked || _maxInvocations<projects[_projectId].maxInvocations), "Only if unlocked");
        require(_maxInvocations > projects[_projectId].invocations, "You must set max invocations greater than current invocations");
        require(_maxInvocations <= ONE_MILLION, "Cannot exceed 1,000,000");
        projects[_projectId].maxInvocations = _maxInvocations;
    }

toggleProjectUseHashString keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function toggleProjectUseHashString(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
      require(projects[_projectId].invocations == 0, "Cannot modify after a token is minted.");
      projects[_projectId].useHashString = !projects[_projectId].useHashString;
    }

addProjectScript keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_script
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
        projects[_projectId].scripts[projects[_projectId].scriptCount] = _script;
        projects[_projectId].scriptCount = projects[_projectId].scriptCount.add(1);
    }

updateProjectScript keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_scriptId
uint256 help
_script
string help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
        require(_scriptId < projects[_projectId].scriptCount, "scriptId out of range");
        projects[_projectId].scripts[_scriptId] = _script;
    }

removeProjectLastScript keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
        require(projects[_projectId].scriptCount > 0, "there are no scripts to remove");
        delete projects[_projectId].scripts[projects[_projectId].scriptCount - 1];
        projects[_projectId].scriptCount = projects[_projectId].scriptCount.sub(1);
    }

updateProjectScriptJSON keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_projectScriptJSON
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
        projects[_projectId].scriptJSON = _projectScriptJSON;
    }

updateProjectIpfsHash keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_ipfsHash
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
        projects[_projectId].ipfsHash = _ipfsHash;
    }

updateProjectBaseURI keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_newBaseURI
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public {
        projects[_projectId].projectBaseURI = _newBaseURI;
    }

updateProjectBaseIpfsURI keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_projectBaseIpfsURI
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public {
        projects[_projectId].projectBaseIpfsURI = _projectBaseIpfsURI;
    }

toggleProjectUseIpfsForStatic keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtist(_projectId) public {
        require(!projects[_projectId].dynamic, "can only set static IPFS hash for static projects");
        projects[_projectId].useIpfs = !projects[_projectId].useIpfs;
    }

toggleProjectIsDynamic keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
      require(projects[_projectId].invocations == 0, "Can not switch after a token is minted.");
        if (projects[_projectId].dynamic) {
            projects[_projectId].useHashString = false;
        } else {
            projects[_projectId].useHashString = true;
        }
        projects[_projectId].dynamic = !projects[_projectId].dynamic;
    }

overrideTokenDynamicImageWithIpfsLink keyboard_arrow_up

clearTokenIpfsImageUri keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtist(tokenIdToProjectId[_tokenId]) public {
        delete staticIpfsImageLink[tokenIdToProjectId[_tokenId]];
    }

projectDetails keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
    function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) {
        projectName = projects[_projectId].name;
        artist = projects[_projectId].artist;
        description = projects[_projectId].description;
        website = projects[_projectId].website;
        license = projects[_projectId].license;
        dynamic = projects[_projectId].dynamic;
    }

projectTokenInfo keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
    function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address additionalPayee, uint256 additionalPayeePercentage ,string memory currency, address currencyAddress) {
        artistAddress = projectIdToArtistAddress[_projectId];
        pricePerTokenInWei = projectIdToPricePerTokenInWei[_projectId];
        invocations = projects[_projectId].invocations;
        maxInvocations = projects[_projectId].maxInvocations;
        active = projects[_projectId].active;
        additionalPayee = projectIdToAdditionalPayee[_projectId];
        additionalPayeePercentage = projectIdToAdditionalPayeePercentage[_projectId];
        currency = projectIdToCurrencySymbol[_projectId];
        currencyAddress = projectIdToCurrencyAddress[_projectId];
    }

projectScriptInfo keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
    function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, bool useHashString, string memory ipfsHash, bool locked, bool paused) {
        scriptJSON = projects[_projectId].scriptJSON;
        scriptCount = projects[_projectId].scriptCount;
        useHashString = projects[_projectId].useHashString;
        ipfsHash = projects[_projectId].ipfsHash;
        locked = projects[_projectId].locked;
        paused = projects[_projectId].paused;
    }

projectScriptByIndex keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help
_index
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
    function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){
        return projects[_projectId].scripts[_index];
    }

projectURIInfo keyboard_arrow_up

Parameters help

Name Type
_projectId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
    function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) {
        projectBaseURI = projects[_projectId].projectBaseURI;
        projectBaseIpfsURI = projects[_projectId].projectBaseIpfsURI;
        useIpfs = projects[_projectId].useIpfs;
    }

projectShowAllTokens keyboard_arrow_up

Parameters help

Name Type
_projectId
uint help

Properties

Visibility help public
Mutability help view
Source Code
    function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){
        return projectIdToTokenIds[_projectId];
    }

tokensOfOwner keyboard_arrow_up

Parameters help

Name Type
owner
address help

Properties

Visibility help public
Mutability help view
Source Code
    function tokensOfOwner(address owner) external view returns (uint256[] memory) {
        return _tokensOfOwner(owner);
    }

getRoyaltyData keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
    function getRoyaltyData(uint256 _tokenId) public view returns (address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID) {
        artistAddress = projectIdToArtistAddress[tokenIdToProjectId[_tokenId]];
        additionalPayee = projectIdToAdditionalPayee[tokenIdToProjectId[_tokenId]];
        additionalPayeePercentage = projectIdToAdditionalPayeePercentage[tokenIdToProjectId[_tokenId]];
        royaltyFeeByID = projectIdToSecondaryMarketRoyaltyPercentage[tokenIdToProjectId[_tokenId]];
    }

tokenURI keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Modifiers help

onlyValidTokenId checks for the following:
null
Source Code
    function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) {
        if (bytes(staticIpfsImageLink[_tokenId]).length > 0) {
            return Strings.strConcat(projects[tokenIdToProjectId[_tokenId]].projectBaseIpfsURI, staticIpfsImageLink[_tokenId]);
        }

        if (!projects[tokenIdToProjectId[_tokenId]].dynamic && projects[tokenIdToProjectId[_tokenId]].useIpfs) {
            return Strings.strConcat(projects[tokenIdToProjectId[_tokenId]].projectBaseIpfsURI, projects[tokenIdToProjectId[_tokenId]].ipfsHash);
        }

        return Strings.strConcat(projects[tokenIdToProjectId[_tokenId]].projectBaseURI, Strings.uint2str(_tokenId));
    }