License
License allows you to manage license terms and tokens within Story.
License
Methods
- attach_license_terms
- mint_license_tokens
- register_pil_terms
- register_non_com_social_remixing_pil
- register_commercial_use_pil
- register_commercial_remix_pil
attach_license_terms
Attaches license terms to an IP.
Method |
---|
attach_license_terms |
Parameters:
ip_id
: The address of the IP to which the license terms are attached.license_template
: The address of the license template.license_terms_id
: The ID of the license terms.tx_options
: [Optional] Transaction options dictionary.
mint_license_tokens
Mints license tokens for the license terms attached to an IP.
The license tokens are minted to the receiver.
The license terms must be attached to the IP before calling this function.
IP owners can mint license tokens for their IPs for arbitrary license terms without attaching the license terms to IP.
It might require the caller pay the minting fee, depending on the license terms or configured by the iP owner. The minting fee is paid in the minting fee token specified in the license terms or configured by the IP owner. IP owners can configure the minting fee of their IPs or configure the minting fee module to determine the minting fee.
Method |
---|
mint_license_tokens |
Parameters:
licensor_ip_id
: The licensor IP ID.license_template
: The address of the license template.license_terms_id
: The ID of the license terms within the license template.amount
: The amount of license tokens to mint.receiver
: The address of the receiver.max_minting_fee
: [Optional] The maximum minting fee to pay.max_revenue_share
: [Optional] The maximum revenue share percentage.tx_options
: [Optional] Transaction options dictionary.
register_pil_terms
Registers new license terms and return the ID of the newly registered license terms.
Method |
---|
register_pil_terms |
Parameters:
- See the Python code example below for all the parameters. They all come from the PIL Terms.
tx_options
: [Optional] Transaction options dictionary.
register_non_com_social_remixing_pil
Convenient function to register a PIL non commercial social remix license to the registry.
No reason to call this function. Non-Commercial Social Remixing terms are already registered with licenseTermdId = 1
in our protocol. There’s no reason to register them again.
Method |
---|
register_non_com_social_remixing_pil |
Parameters:
tx_options
: [Optional] Transaction options dictionary.
register_commercial_use_pil
Convenient function to register a PIL commercial use license to the registry.
Method |
---|
register_commercial_use_pil |
Parameters:
default_minting_fee
: The fee to be paid when minting a license.currency
: The ERC20 token to be used to pay the minting fee and the token must be registered on Story’s protocol.royalty_policy
: [Optional] The address of the royalty policy contract, default value is LAP.tx_options
: [Optional] Transaction options dictionary.
register_commercial_remix_pil
Convenient function to register a PIL commercial Remix license to the registry.
Method |
---|
register_commercial_remix_pil |
Parameters:
default_minting_fee
: The fee to be paid when minting a license.commercial_rev_share
: Percentage of revenue that must be shared with the licensor.currency
: The ERC20 token to be used to pay the minting fee and the token must be registered on Story’s protocol.royalty_policy
: The address of the royalty policy contract, default value is LAP.tx_options
: [Optional] Transaction options dictionary.