License Config

Optionally, you can attach a LicensingConfig to an IP Asset (for a specific licenseTermsId attached to that asset) which contains fields like a mintingFee and a licensingHook, as shown below.

/// @notice This struct is used by IP owners to define the configuration
/// when others are minting license tokens of their IP through the LicensingModule.
/// When the `mintLicenseTokens` function of LicensingModule is called, the LicensingModule will read
/// this configuration to determine the minting fee and execute the licensing hook if set.
/// IP owners can set these configurations for each License or set the configuration for the IP
/// so that the configuration applies to all licenses of the IP.
/// If both the license and IP have the configuration, then the license configuration takes precedence.
/// @param isSet Whether the configuration is set or not.
/// @param mintingFee The minting fee to be paid when minting license tokens.
/// @param licensingHook  The hook contract address for the licensing module, or address(0) if none
/// @param hookData The data to be used by the licensing hook.
/// @param commercialRevShare The commercial revenue share percentage.
/// @param disabled Whether the license is disabled or not.
/// @param expectMinimumGroupRewardShare The minimum percentage of the group's reward share
/// (from 0 to 100%, represented as 100 * 10 ** 6) that can be allocated to the IP when it is added to the group.
/// If the remaining reward share in the group is less than the minimumGroupRewardShare,
/// the IP cannot be added to the group.
/// @param expectGroupRewardPool The address of the expected group reward pool.
/// The IP can only be added to a group with this specified reward pool address,
/// or address(0) if the IP does not want to be added to any group.
struct LicensingConfig {
  bool isSet;
  uint256 mintingFee;
  address licensingHook;
  bytes hookData;
  uint32 commercialRevShare;
  bool disabled;
  uint32 expectMinimumGroupRewardShare;
  address expectGroupRewardPool;
}

What do some of these mean?

  1. isSet - if this is false, the license config is completely ignored
  2. disabled - if this is true, then no licenses can be minted and no more derivatives can be attached at all

Fields like the mintingFee and commercialRevShare overwrite their duplicate in the license terms themselves. A benefit of this is that derivative IP Assets, which normally cannot change their license terms, are able to overwrite certain fields.

The licensingHook is an address to a smart contract that implements the ILicensingHook interface, which contains a beforeMintLicenseTokens function which will be run before a user mints a License Token. This means you can insert logic to be run upon minting a license.

The hook itself is described in a different section. You can see it contains information about the license, who is minting the License Token, and who is receiving it.

Learn all about Licensing Hooks here.

Setting the License Config

You can set the License Config by calling the setLicenseConfig function in the LicensingModule.sol contract.

Logic that is Possible with License Config

  1. Max Number of Licenses: The licensingHook (described in the next section) is where you can define logic for the max number of licenses that can be minted. For example, reverting the transaction if the max number of licenses has already been minted.
  2. Disallowing Derivatives: If you register a derivative of an IP Asset, that derivative cannot change its License Terms as described here. You can be wondering: “What if I, as a derivative, want to disallow derivatives of myself, but my License Terms allow derivatives and I cannot change this?” To solve this, you can simply set disabled to true.
  3. Minting Fee: Similar to #2 above… what about the minting fee? Although you cannot change License Terms on a derivative IP Asset (and thus the minting fee inside of it), you can change the minting fee for that derivative by modifying the mintingFee in the License Config, or returning a totalMintingFee from the licensingHook (described in the next section).
  4. Commercial Revenue Share: Similar to #2 and #3 above, you can modify the commercialRevShare in the License Config.
  5. Dynamic Pricing for Minting a License Token: Set dynamic pricing for minting a License Token from an IP Asset based on how many total have been minted, how many licenses the user is minting, or even who the user is. All of this data is available in the licensingHook (described in the next section).

… and more.

Restrictions

See IP Modifications & Restrictions for the various restrictions on setting the License Config.