From 27fc83355012cbb3aeff16571cc9401e41717ee3 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Mon, 8 Mar 2021 19:42:34 +0100 Subject: [PATCH] Make ERC1155.uri public (#2576) (cherry picked from commit 5dbbda543537ede4253a5c1cfc6a9d3d84058191) --- CHANGELOG.md | 1 + contracts/token/ERC1155/ERC1155.sol | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9187fdc54..440277d25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ * `ERC777`: Optimize the gas costs of the constructor. ([#2551](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2551)) * `ERC721URIStorage`: Add a new extension that implements the `_setTokenURI` behavior as it was available in 3.4.0. ([#2555](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2555)) * `AccessControl`: Added ERC165 interface detection. ([#2562](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2562)) + * `ERC1155`: Make `uri` public so overloading function can call it using super. ([#2576](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2576)) ### Bug fixes for beta releases diff --git a/contracts/token/ERC1155/ERC1155.sol b/contracts/token/ERC1155/ERC1155.sol index 90746a24f..ed2d8056f 100644 --- a/contracts/token/ERC1155/ERC1155.sol +++ b/contracts/token/ERC1155/ERC1155.sol @@ -55,7 +55,7 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ - function uri(uint256) external view virtual override returns (string memory) { + function uri(uint256) public view virtual override returns (string memory) { return _uri; }