Skip to content

Commit

Permalink
change license to rights
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahannan committed Aug 28, 2023
1 parent b977347 commit 28c3836
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions contracts/MetadataViews.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ pub contract MetadataViews {
///
pub struct NFTLicense {
/// Array of the specific license identifiers
pub let licenses: [String]
pub let rights: [String]

/// Link to a badge image that can be displayed alongside
/// the asset on a webpage for a visual representation of the license
Expand All @@ -771,7 +771,7 @@ pub contract MetadataViews {
pub var description: String?

init() {
self.licenses = []
self.rights = []
self.badgeLink = nil
self.descriptionLink = nil
self.description = nil
Expand All @@ -790,32 +790,32 @@ pub contract MetadataViews {
}

access(contract) fun personalUse(): NFTLicense {
self.licenses.append("NLP-PER")
self.rights.append("NLP-PER")
return self
}

access(contract) fun votingRights(): NFTLicense {
self.licenses.append("NFL-VOTE")
self.rights.append("NFL-VOTE")
return self
}

access(contract) fun commercialRights(): NFTLicense {
self.licenses.append("NFL-COM")
self.rights.append("NFL-COM")
return self
}

access(contract) fun additionalContentExperienceRights(): NFTLicense {
self.licenses.append("NLP-ALP")
self.rights.append("NLP-ALP")
return self
}

access(contract) fun merchandisingRights(): NFTLicense {
self.licenses.append("NLP-MERCH")
self.rights.append("NLP-MERCH")
return self
}

access(all) fun equals(_ otherLicense: NFTLicense): Bool {
if self.licenses == otherLicense.licenses {
if self.rights == otherLicense.rights {
return true
}
return false
Expand Down
Loading

0 comments on commit 28c3836

Please sign in to comment.