State Variables
LICENSE_REGISTRY
ROYALTY_MODULE
licenseTerms
hashedLicenseTerms
licenseTermsCounter
Functions
initialize
accessManager
: The address of the protocol admin roles contract.name
: The name of the license template.metadataURI
: The URL to the off-chain metadata.
registerLicenseTerms
terms
: The PILTerms to register.
id
: The ID of the newly registered license terms.
exists
licenseTermsId
: The ID of the license terms.
- Returns true if the license terms exists, false otherwise.
verifyMintLicenseToken
licenseTermsId
: The ID of the license terms.licensee
: The address of the licensee who will receive the license token.licensorIpId
: The IP ID of the licensor who attached the license terms minting the license token.
- Returns true if the minting is verified, false otherwise.
verifyRegisterDerivative
childIpId
: The IP ID of the derivative.parentIpId
: The IP ID of the parent.licenseTermsId
: The ID of the license terms.licensee
: The address of the licensee.
- Returns true if the registration is verified, false otherwise.
verifyCompatibleLicenses
licenseTermsIds
: The IDs of the license terms.
- Returns true if the licenses are compatible, false otherwise.
verifyRegisterDerivativeForAllParents
childIpId
: The IP ID of the derivative.parentIpIds
: The IP IDs of the parents.licenseTermsIds
: The IDs of the license terms.childIpOwner
: The address of the derivative IP owner.
- Returns true if the registration is verified, false otherwise.
getRoyaltyPolicy
licenseTermsId
: The ID of the license terms.
royaltyPolicy
: The address of the royalty policy specified for the license terms.royaltyData
: The data of the royalty policy.mintingFee
: The fee for minting a license.currency
: The address of the ERC20 token, used for minting license fee and royalties.
isLicenseTransferable
licenseTermsId
: The ID of the license terms.
- Returns true if the license terms is transferable, false otherwise.
getEarlierExpireTime
licenseTermsIds
: The IDs of the license terms.start
: The start time.
- Returns the earliest expiration time.
getExpireTime
licenseTermsId
: The ID of the license terms.start
: The start time.
- Returns the expiration time.
getLicenseTermsId
terms
: The PILTerms to get the ID for.
selectedLicenseTermsId
: The ID of the given license terms.
getLicenseTerms
selectedLicenseTermsId
: The ID of the license terms.
terms
: The PILTerms associated with the given ID.
getLicenseTermsURI
licenseTermsId
: The ID of the license terms.
- Returns the URI of the license terms.
totalRegisteredLicenseTerms
- Returns the total number of registered license terms.
supportsInterface
interfaceId
: The interface identifier.
- Returns true if the contract supports the interface, false otherwise.
toJson
licenseTermsId
: The ID of the license terms.
- Returns the JSON string of the license terms, following the OpenSea metadata standard.
PILTerms Structure
The PILTerms structure defines the terms for a Programmable IP License (PIL):transferable
: Indicates whether the license is transferable or not.royaltyPolicy
: The address of the royalty policy contract which is required by StoryProtocol in advance.mintingFee
: The fee to be paid when minting a license.expiration
: The expiration period of the license.commercialUse
: Indicates whether the work can be used commercially or not.commercialAttribution
: Whether attribution is required when reproducing the work commercially or not.commercializerChecker
: Commercializers that are allowed to commercially exploit the work. If zero address, then no restrictions are enforced.commercializerCheckerData
: The data to be passed to the commercializer checker contract.commercialRevShare
: Percentage of revenue that must be shared with the licensor.commercialRevCelling
: The maximum revenue that can be generated from the commercial use of the work.derivativesAllowed
: Indicates whether the licensee can create derivatives of their work or not.derivativesAttribution
: Indicates whether attribution is required for derivatives of the work or not.derivativesApproval
: Indicates whether the licensor must approve derivatives of the work before they can be linked to the licensor IP ID or not.derivativesReciprocal
: Indicates whether the licensee must license derivatives of the work under the same terms or not.derivativeRevCelling
: The maximum revenue that can be generated from the derivative use of the work.currency
: The ERC20 token to be used to pay the minting fee. The token must be registered in Story Protocol.uri
: The URI of the license terms, which can be used to fetch the off-chain license terms.