From c6a38a95650c6406f28e7159730bc18edb560912 Mon Sep 17 00:00:00 2001 From: KENDAL Date: Tue, 11 Aug 2026 15:37:38 +0300 Subject: [PATCH] fix(metadata): allow setting zero royalty address when royalty basis points is zero --- src/ERC721ContractMetadata.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ERC721ContractMetadata.sol b/src/ERC721ContractMetadata.sol index 52e3f075..5081f5d1 100644 --- a/src/ERC721ContractMetadata.sol +++ b/src/ERC721ContractMetadata.sol @@ -197,8 +197,8 @@ contract ERC721ContractMetadata is // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); - // Revert if the new royalty address is the zero address. - if (newInfo.royaltyAddress == address(0)) { + // Revert if the new royalty address is the zero address and basis points is non-zero. + if (newInfo.royaltyAddress == address(0) && newInfo.royaltyBps != 0) { revert RoyaltyAddressCannotBeZeroAddress(); }