Function pallet_ip_pallet::pallet::dispatchables::offer_license
source · pub fn offer_license<T: Config>(
nft_id: T::NFTId,
payment_type: PaymentType<T>,
is_exclusive: bool,
duration: BlockNumberFor<T>,
)Expand description
Creates a license offer for an NFT
Allows other accounts to license the NFT under specified terms.
§Arguments
origin- Must be signed by the NFT ownernft_id- ID of the NFT to licensepayment_type- Payment terms (seePaymentType)is_exclusive- Whether this is an exclusive licenseduration- How long the license lasts (in blocks)
§Events
Event::LicenseOffered- When offer is created
§Errors
Error::NftNotFound- If NFT doesn’t existError::NotNftOwner- If caller doesn’t own the NFTError::NftInEscrow- If NFT is in escrowError::ExclusiveLicenseExists- If trying to create offer while exclusive license exists
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::offer_license.