You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it is not possible to call super.uri() because of the external "modifier". uri() is the only way to access the _uri private member in ERC1155.sol which is set in ctor.
🔢 Code to reproduce bug
contract test is ERC1155 {
function uri(uint256 tokenId) external view virtual override returns (string memory) {
// return URI for special cases
//fallback:
return super.uri(). <- compilation failed because uri() can only be called from external
}
The text was updated successfully, but these errors were encountered:
uri() function in ERC1155.sol is declared external and subclasses overriding uri() cannot call super.uri().
💻 Environment
hardhat
📝 Details
When overwriting uri() implemented here:
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol#L58
it is not possible to call super.uri() because of the external "modifier". uri() is the only way to access the _uri private member in ERC1155.sol which is set in ctor.
🔢 Code to reproduce bug
contract test is ERC1155 {
function uri(uint256 tokenId) external view virtual override returns (string memory) {
// return URI for special cases
//fallback:
return super.uri(). <- compilation failed because uri() can only be called from external
}
The text was updated successfully, but these errors were encountered: