Skip to content

Commit

Permalink
add setTransferValidator to contractmetadatacloneable
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanio committed Mar 30, 2024
1 parent c86df49 commit 91852c1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/clones/ERC1155ContractMetadataCloneable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,14 @@ contract ERC1155ContractMetadataCloneable is
return _baseURI;
}

/**
* @notice Set the transfer validator. Only callable by the token owner.
*/
function setTransferValidator(address newValidator) external onlyOwner {
// Set the new transfer validator.
_setTransferValidator(newValidator);
}

/// @dev Override this function to return true if `_beforeTokenTransfer` is used.
function _useBeforeTokenTransfer() internal view virtual override returns (bool) {
return true;
Expand Down

0 comments on commit 91852c1

Please sign in to comment.