Skip to content

Commit dc731cd

Browse files
committed
update IERC6909ContentURI and ERC6909ContentURI to implement IERC7572
1 parent d048008 commit dc731cd

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

contracts/interfaces/draft-IERC6909.sol

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
pragma solidity ^0.8.20;
55

66
import {IERC165} from "../utils/introspection/IERC165.sol";
7+
import {IERC7572} from "./draft-IERC7572.sol";
78

89
/**
910
* @dev Required interface of an ERC-6909 compliant contract, as defined in the
@@ -102,12 +103,7 @@ interface IERC6909Metadata is IERC6909 {
102103
/**
103104
* @dev Optional extension of {IERC6909} that adds content URI functions.
104105
*/
105-
interface IERC6909ContentURI is IERC6909 {
106-
/**
107-
* @dev Returns URI for the contract.
108-
*/
109-
function contractURI() external view returns (string memory);
110-
106+
interface IERC6909ContentURI is IERC6909, IERC7572 {
111107
/**
112108
* @dev Returns the URI for the token of type `id`.
113109
*/

contracts/token/ERC6909/extensions/draft-ERC6909ContentURI.sol

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
pragma solidity ^0.8.20;
55

66
import {ERC6909} from "../draft-ERC6909.sol";
7+
import {IERC7572} from "../../../interfaces/draft-IERC7572.sol";
78
import {IERC6909ContentURI} from "../../../interfaces/draft-IERC6909.sol";
89

910
/**
@@ -13,13 +14,10 @@ contract ERC6909ContentURI is ERC6909, IERC6909ContentURI {
1314
string private _contractURI;
1415
mapping(uint256 id => string) private _tokenURIs;
1516

16-
/// @dev Event emitted when the contract URI is changed. See https://eips.ethereum.org/EIPS/eip-7572[ERC-7572] for details.
17-
event ContractURIUpdated();
18-
1917
/// @dev See {IERC1155-URI}
2018
event URI(string value, uint256 indexed id);
2119

22-
/// @inheritdoc IERC6909ContentURI
20+
/// @inheritdoc IERC7572
2321
function contractURI() public view virtual override returns (string memory) {
2422
return _contractURI;
2523
}

0 commit comments

Comments
 (0)