An optional config that can be attached to a specific license for dynamic minting fees and custom logic.
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.
isSet
- if this is false, the whole licensing config is completely ignored. So for example, if the licensing config has mintingFee == 10
and disabled == true
, but the isSet == false
, the mintingFee
and disabled
will be completely ignored.disabled
- if this is true, then no licenses can be minted and no more derivatives can be attached at all for the terms the config is attached to.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.
setLicenseConfig
function in the LicensingModule.sol contract.
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.disabled
to true.mintingFee
in the License Config, or returning a totalMintingFee
from the licensingHook
(described in the next section).commercialRevShare
in the License Config.licensingHook
(described in the next section).