From ea172a0ade70fcfa68a495072006dc7d88511d4d Mon Sep 17 00:00:00 2001 From: Hoang Date: Sat, 20 Jun 2026 20:40:45 +0700 Subject: [PATCH 1/4] chore: add exportSelectors in RoyaltyFacet --- src/token/Royalty/RoyaltyFacet.sol | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/token/Royalty/RoyaltyFacet.sol b/src/token/Royalty/RoyaltyFacet.sol index 33cf00a5..46b0f136 100644 --- a/src/token/Royalty/RoyaltyFacet.sol +++ b/src/token/Royalty/RoyaltyFacet.sol @@ -80,4 +80,13 @@ contract RoyaltyFacet { receiver = royalty.receiver; royaltyAmount = (_salePrice * royalty.royaltyFraction) / FEE_DENOMINATOR; } + + /** + * @notice Exports the function selectors of the RoyaltyFacet. + * @dev Used as the selector discovery mechanism for diamonds. + * @return selectors The exported function selectors of the RoyaltyFacet. + */ + function exportSelectors() external pure returns (bytes memory selectors) { + return bytes.concat(this.royaltyInfo.selector); + } } From 6bf99463a073d4b8a3ba914baf76033eeaa46e1e Mon Sep 17 00:00:00 2001 From: Vagabond Date: Sat, 20 Jun 2026 23:46:02 +0700 Subject: [PATCH 2/4] chore: add changeset --- .changeset/modern-baboons-care.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/modern-baboons-care.md diff --git a/.changeset/modern-baboons-care.md b/.changeset/modern-baboons-care.md new file mode 100644 index 00000000..9331db82 --- /dev/null +++ b/.changeset/modern-baboons-care.md @@ -0,0 +1,5 @@ +--- +"@perfect-abstractions/compose": patch +--- + +Add exportSelectors() to RoyaltyFacet. From 1236b9b235911ef0e15f155b7d8c31b076faf2e4 Mon Sep 17 00:00:00 2001 From: Vagabond Date: Mon, 22 Jun 2026 21:47:31 +0700 Subject: [PATCH 3/4] fix: add IERC1155Metadata_URI --- src/interfaces/IERC1155.sol | 7 ------- src/interfaces/IERC1155Metadata_URI.sol | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 src/interfaces/IERC1155Metadata_URI.sol diff --git a/src/interfaces/IERC1155.sol b/src/interfaces/IERC1155.sol index 4f544943..23c96efb 100644 --- a/src/interfaces/IERC1155.sol +++ b/src/interfaces/IERC1155.sol @@ -156,11 +156,4 @@ interface IERC1155 { uint256[] calldata _values, bytes calldata _data ) external; - - /** - * @notice Returns the URI for token type `id`. - * @param _id The token type to query. - * @return The URI for the token type. - */ - function uri(uint256 _id) external view returns (string memory); } diff --git a/src/interfaces/IERC1155Metadata_URI.sol b/src/interfaces/IERC1155Metadata_URI.sol new file mode 100644 index 00000000..df5e8a5d --- /dev/null +++ b/src/interfaces/IERC1155Metadata_URI.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.30; + +/* Compose + * https://compose.diamonds + */ + +/** + * @title ERC-1155 Multi Token Standard, optional metadata URI extension. + * @dev See https://eips.ethereum.org/EIPS/eip-1155 + * Note: The ERC-165 identifier for this interface is 0x0e89341c. + */ +interface IERC1155Metadata_URI { + /** + * @notice Returns the URI for token type `id`. + * @param _id The token type to query. + * @return The URI for the token type. + */ + function uri(uint256 _id) external view returns (string memory); +} From 2a69f8049a35fdc3337f5d4ed7757b97560ab85d Mon Sep 17 00:00:00 2001 From: Vagabond Date: Mon, 22 Jun 2026 21:52:52 +0700 Subject: [PATCH 4/4] add: changset --- .changeset/tame-ties-thank.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tame-ties-thank.md diff --git a/.changeset/tame-ties-thank.md b/.changeset/tame-ties-thank.md new file mode 100644 index 00000000..e6a3c30c --- /dev/null +++ b/.changeset/tame-ties-thank.md @@ -0,0 +1,5 @@ +--- +"@perfect-abstractions/compose": patch +--- + +Add IERC1155Metadata_URI