State Variables
LICENSE_REGISTRY
DISPUTE_MODULE
licensingModule
isWhitelistedRoyaltyPolicy
isWhitelistedRoyaltyToken
royaltyPolicies
Functions
initialize
accessManager: The address of the protocol admin roles contract.
setLicensingModule
licensing: The address of the license module.
whitelistRoyaltyPolicy
royaltyPolicy: The address of the royalty policy.allowed: Indicates if the royalty policy is whitelisted or not.
whitelistRoyaltyToken
token: The token address.allowed: Indicates if the token is whitelisted or not.
onLicenseMinting
ipId: The ipId whose license is being minted (licensor).royaltyPolicy: The royalty policy address of the license being minted.licenseData: The license data custom to each the royalty policy.externalData: The external data custom to each the royalty policy.
onLinkToParents
ipId: The children ipId that is being linked to parents.royaltyPolicy: The common royalty policy address of all the licenses being burned.parentIpIds: The parent ipIds that the children ipId is being linked to.licenseData: The license data custom to each the royalty policy.externalData: The external data custom to each the royalty policy.
payRoyaltyOnBehalf
receiverIpId: The ipId that receives the royalties.payerIpId: The ipId that pays the royalties.token: The token to use to pay the royalties.amount: The amount to pay.
payLicenseMintingFee
receiverIpId: The ipId that receives the royalties.payerAddress: The address that pays the royalties.licenseRoyaltyPolicy: The royalty policy of the license being minted.token: The token to use to pay the royalties.amount: The amount to pay.
licensingModule
- The address of the licensing module.
isWhitelistedRoyaltyPolicy
royaltyPolicy: The address of the royalty policy.
isWhitelisted: True if the royalty policy is whitelisted.
isWhitelistedRoyaltyToken
token: The address of the royalty token.
isWhitelisted: True if the royalty token is whitelisted.
royaltyPolicies
ipId: The ID of IP asset.
royaltyPolicy: The address of the royalty policy.
supportsInterface
interfaceId: The interface identifier.
- Returns true if the interface is supported.
Security Considerations
The RoyaltyModule contract implements several security measures:-
Access Control: Most administrative functions are restricted to be called only by the protocol admin through the
restrictedmodifier. -
Module Interaction Control: Functions like
onLicenseMintingandpayLicenseMintingFeecan only be called by the Licensing Module through theonlyLicensingModulemodifier. -
Reentrancy Protection: The
nonReentrantmodifier is used on functions that handle token transfers to prevent reentrancy attacks. -
Pausability: The contract can be paused in emergency situations using the
whenNotPausedmodifier. - Whitelisting Mechanism: The contract implements whitelisting for royalty policies and tokens to ensure that only approved components can interact with the royalty system.
- Dispute Resolution Integration: The contract integrates with the Dispute Module to handle any disputes related to royalty payments.

