This repository has been archived by the owner on Apr 30, 2024. It is now read-only.
generated from storyprotocol/solidity-template
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Raul
committed
Jan 29, 2024
1 parent
305abc5
commit 73e45f9
Showing
21 changed files
with
290 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,5 +185,4 @@ contract IPAccountImpl is IERC165, IIPAccount { | |
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
contracts/interfaces/licensing/IUMLPolicyFrameworkManager.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
|
||
pragma solidity ^0.8.23; | ||
|
||
import { Licensing } from "contracts/lib/Licensing.sol"; | ||
import { IPolicyFrameworkManager } from "contracts/interfaces/licensing/IPolicyFrameworkManager.sol"; | ||
|
||
/// @notice Licensing parameters for the UML standard | ||
/// @param attribution Whether or not attribution is required when reproducing the work | ||
/// @param transferable Whether or not the license is transferable | ||
/// @param commercialUse Whether or not the work can be used commercially | ||
/// @param commercialAttribution Whether or not attribution is required when reproducing the work commercially | ||
/// @param commercializers List of commericializers that are allowed to commercially exploit the work. If empty | ||
/// then no restrictions. | ||
/// @param commercialRevShare Percentage of revenue that must be shared with the licensor | ||
/// @param derivativesAllowed Whether or not the licensee can create derivatives of his work | ||
/// @param derivativesAttribution Whether or not attribution is required for derivatives of the work | ||
/// @param derivativesApproval Whether or not the licensor must approve derivatives of the work before they can be | ||
/// linked to the licensor IP ID | ||
/// @param derivativesReciprocal Whether or not the licensee must license derivatives of the work under the same terms. | ||
/// @param derivativesRevShare Percentage of revenue that must be shared with the licensor for derivatives of the work | ||
/// @param territories List of territories where the license is valid. If empty, global. | ||
/// @param distributionChannels List of distribution channels where the license is valid. Empty if no restrictions. | ||
struct UMLPolicy { | ||
bool attribution; | ||
bool transferable; | ||
bool commercialUse; | ||
bool commercialAttribution; | ||
string[] commercializers; | ||
uint256 commercialRevShare; | ||
bool derivativesAllowed; | ||
bool derivativesAttribution; | ||
bool derivativesApproval; | ||
bool derivativesReciprocal; | ||
uint256 derivativesRevShare; | ||
string[] territories; | ||
string[] distributionChannels; | ||
} | ||
|
||
|
||
/// @title IUMLPolicyFrameworkManager | ||
/// @notice Defines the interface for a Policy Framework Manager compliant with the UML standard | ||
interface IUMLPolicyFrameworkManager is IPolicyFrameworkManager { | ||
|
||
/// @notice Emitted when a new policy is added to the registry | ||
event UMLPolicyAdded(uint256 indexed policyId, UMLPolicy policy); | ||
|
||
/// @notice Adds a new policy to the registry | ||
/// @dev Must encode the policy into bytes to be stored in the LicenseRegistry | ||
/// @param umlPolicy UMLPolicy compliant licensing term values | ||
function addPolicy(UMLPolicy calldata umlPolicy) external returns (uint256 policyId); | ||
/// @notice Fetchs a policy from the registry, decoding the raw bytes into a UMLPolicy struct | ||
/// @param policyId The ID of the policy to fetch | ||
/// @return policy The UMLPolicy struct | ||
function getPolicy(uint256 policyId) external view returns (UMLPolicy memory policy); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.