Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/modern-baboons-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@perfect-abstractions/compose": patch
---

Add exportSelectors() to RoyaltyFacet.
5 changes: 5 additions & 0 deletions .changeset/tame-ties-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@perfect-abstractions/compose": patch
---

Add IERC1155Metadata_URI
7 changes: 0 additions & 7 deletions src/interfaces/IERC1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
20 changes: 20 additions & 0 deletions src/interfaces/IERC1155Metadata_URI.sol
Original file line number Diff line number Diff line change
@@ -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);
}
9 changes: 9 additions & 0 deletions src/token/Royalty/RoyaltyFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Loading