Skip to content

Commit

Permalink
fix: updated contracts and interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishabh Sharma committed Aug 31, 2023
1 parent 3f3927c commit ada27bb
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pragma solidity ^0.8.0;
interface IOperatorFilterRegistry {
///@notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
/// true if supplied registrant address is not registered.
function isOperatorAllowed(address registrant, address operator) external view returns (bool);
function isOperatorAllowed(address registrant, address operator) external view returns (bool isAllowed);

///@notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
function register(address registrant) external;
Expand Down Expand Up @@ -66,46 +66,44 @@ interface IOperatorFilterRegistry {

///@notice Get the set of addresses subscribed to a given registrant.
/// Note that order is not guaranteed as updates are made.

function subscribers(address registrant) external returns (address[] memory);
function subscribers(address registrant) external returns (address[] memory subscribersList);

///@notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
/// Note that order is not guaranteed as updates are made.
function subscriberAt(address registrant, uint256 index) external returns (address);
function subscriberAt(address registrant, uint256 index) external returns (address subscriberAddress);

///@notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.

function copyEntriesOf(address registrant, address registrantToCopy) external;

///@notice Returns true if operator is filtered by a given address or its subscription.
function isOperatorFiltered(address registrant, address operator) external returns (bool);
function isOperatorFiltered(address registrant, address operator) external returns (bool isFiltered);

///@notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool isFiltered);

///@notice Returns true if a codeHash is filtered by a given address or its subscription.
function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool isFiltered);

///@notice Returns a list of filtered operators for a given address or its subscription.
function filteredOperators(address addr) external returns (address[] memory);
function filteredOperators(address addr) external returns (address[] memory operatorList);

///@notice Returns the set of filtered codeHashes for a given address or its subscription.
/// Note that order is not guaranteed as updates are made.
function filteredCodeHashes(address addr) external returns (bytes32[] memory);
function filteredCodeHashes(address addr) external returns (bytes32[] memory codeHashList);

///@notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
/// its subscription.
/// Note that order is not guaranteed as updates are made.
function filteredOperatorAt(address registrant, uint256 index) external returns (address);
function filteredOperatorAt(address registrant, uint256 index) external returns (address operator);

///@notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
/// its subscription.
/// Note that order is not guaranteed as updates are made.
function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32 codeHash);

///@notice Returns true if an address has registered
function isRegistered(address addr) external returns (bool);
function isRegistered(address addr) external returns (bool registered);

///@dev Convenience method to compute the code hash of an arbitrary contract
function codeHashOf(address addr) external returns (bytes32);
function codeHashOf(address addr) external returns (bytes32 codeHash);
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ contract RoyaltyManager is AccessControlUpgradeable, IRoyaltyManager {
/// @dev should only called once per creator
/// @param creator the address of the creator
/// @param recipient the wallet of the recipient where they would receive their royalty
/// @return creatorSplitterAddress creatorSplitterAddress deployed for a creator
/// @return creatorSplitterAddress splitter's address deployed for a creator
function deploySplitter(address creator, address payable recipient)
external
onlyRole(SPLITTER_DEPLOYER_ROLE)
Expand All @@ -155,7 +155,7 @@ contract RoyaltyManager is AccessControlUpgradeable, IRoyaltyManager {

/// @notice returns the address of splitter of a creator.
/// @param creator the address of the creator
/// @return creatorSplitterAddress deployed for a creator
/// @return creatorSplitterAddress splitter's address deployed for a creator
function getCreatorRoyaltySplitter(address creator) external view returns (address payable creatorSplitterAddress) {
creatorSplitterAddress = creatorRoyaltiesSplitter[creator];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ contract RoyaltySplitter is
_disableInitializers();
}

/// @dev this protects the implementation contract from behing initialized.
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}

/// @notice Query if a contract implements interface `id`.
/// @param interfaceId the interface identifier, as specified in ERC-165.
/// @return isSupported `true` if the contract implements `id`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@ interface IRoyaltyManager {
function getCommonRecipient() external view returns (Recipient memory recipient);

///@notice returns the amount of basis points allocated to the creator
///@return creator split
function getCreatorSplit() external view returns (uint16);
///@return creatorSplit the share of creator in bps
function getCreatorSplit() external view returns (uint16 creatorSplit);

///@notice returns the commonRecipient and EIP2981 royalty split
///@return address of common royalty recipient
///@return royalty split
function getRoyaltyInfo() external view returns (address payable, uint16);
///@return recipient address of common royalty recipient
///@return royaltySplit contract EIP2981 royalty bps
function getRoyaltyInfo() external view returns (address payable recipient, uint16 royaltySplit);

///@notice deploys splitter for creator
///@param creator the address of the creator
///@param recipient the wallet of the recipient where they would receive their royalty
///@return splitter address deployed for creator
function deploySplitter(address creator, address payable recipient) external returns (address payable);
///@return creatorSplitterAddress splitter's address deployed for creator
function deploySplitter(address creator, address payable recipient) external returns (address payable creatorSplitterAddress);

///@notice returns the address of splitter of a creator.
///@param creator the address of the creator
///@return address of creator splitter
function getCreatorRoyaltySplitter(address creator) external view returns (address payable);
///@return creatorSplitterAddress splitter's address deployed for a creator
function getCreatorRoyaltySplitter(address creator) external view returns (address payable creatorSplitterAddress);

///@notice returns the EIP2981 royalty split
///@param _contractAddress the address of the contract for which the royalty is required
Expand All @@ -58,6 +58,6 @@ interface IRoyaltyManager {
function setTrustedForwarder(address _newForwarder) external;

///@notice get the current trustedForwarder address
///@return address of current trusted Forwarder
function getTrustedForwarder() external view returns (address);
///@return trustedForwarder address of current trusted Forwarder
function getTrustedForwarder() external view returns (address trustedForwarder);
}

0 comments on commit ada27bb

Please sign in to comment.