OpenZeppelin provides the baseURI()
function to retrieve the base URL of an NFT collection. There are no functions defined as _baseUri()
or baseUri()
in any implementation or standard of OpenZeppelin's ERC721.
The Ark Project will fetch the baseURI
of an NFT collection if the collection implements the MetadataInterface
. First, it will check if the collection implements the baseUri
function. If so, it will retrieve the URL from that function and pass it to the depositTokens
function, which will then send this baseURI
along with the request to Layer 2 Starknet.
_callBaseUri
function :
The above function uses the signatures of _baseUri()
and baseUri()
functions to fetch the base URI of a collection. However, the issue is that these functions are not defined in the ERC721 standard. It's important to note that OpenZeppelin, up until version 3, provided a baseURI
function as a public or external function, which can be verified in the documentation: OpenZeppelin ERC721Metadata baseURI.
In the current version, there is no baseURI
external/public function available. Moreover, the functions that the Ark Project uses are not included in any ERC721 standard implementation. Therefore, it is assumed that these functions will only work if the NFT collection is using OpenZeppelin version 3 or earlier.
NFT collections that implement the baseURI
function following the ERC721 standard are not compatible with the Ark Project and will return an empty value in this context. Many NFT collections use the baseURI
function to retrieve the base URL of the collection and then append the tokenId
to it, without implementing the tokenURI
function. All of these collections will be incompatible with the Ark Project, potentially resulting in the loss of NFTs on the Starknet Layer 2.
Manual Review
One fix would be to add baseURI()
and _baseURI()
function to encodedSignatures
array.
Likelyhood: Medium, no token using OZ version 2.X and 3.X will work. Impact: Low, Valid standard token won’t be mint with the URI but owner can use ERC721UriImpl function on the deployed token.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.