forked from storyprotocol/protocol-core-v1
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize claiming (storyprotocol#215)
* add event to minting and linking on RoyaltyModule.sol * LAP and LRP draft interface changes
- Loading branch information
Showing
27 changed files
with
1,139 additions
and
836 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
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
34 changes: 34 additions & 0 deletions
34
contracts/interfaces/modules/royalty/policies/IGraphAwareRoyaltyPolicy.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,34 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity 0.8.26; | ||
|
||
import { IRoyaltyPolicy } from "../../../../interfaces/modules/royalty/policies/IRoyaltyPolicy.sol"; | ||
|
||
/// @title IGraphAwareRoyaltyPolicy interface | ||
interface IGraphAwareRoyaltyPolicy is IRoyaltyPolicy { | ||
/// @notice Event emitted when revenue tokens are transferred to a vault from a royalty policy | ||
/// @param ipId The ipId of the IP asset | ||
/// @param ancestorIpId The ancestor ipId of the IP asset whose vault will receive revenue tokens | ||
/// @param token The address of the token that is transferred | ||
/// @param amount The amount of tokens transferred | ||
event RevenueTransferredToVault(address ipId, address ancestorIpId, address token, uint256 amount); | ||
|
||
/// @notice Transfers to vault an amount of revenue tokens | ||
/// @param ipId The ipId of the IP asset | ||
/// @param ancestorIpId The ancestor ipId of the IP asset | ||
/// @param token The token address to transfer | ||
/// @param amount The amount of tokens to transfer | ||
function transferToVault(address ipId, address ancestorIpId, address token, uint256 amount) external; | ||
|
||
/// @notice Returns the royalty percentage between an IP asset and a given ancestor | ||
/// @param ipId The ipId to get the royalty for | ||
/// @param ancestorIpId The ancestor ipId to get the royalty for | ||
/// @return The royalty percentage between an IP asset and a given ancestor | ||
function getPolicyRoyalty(address ipId, address ancestorIpId) external returns (uint32); | ||
|
||
/// @notice Returns the total lifetime revenue tokens transferred to an ancestor's vault from a given IP asset | ||
/// @param ipId The ipId of the IP asset | ||
/// @param ancestorIpId The ancestor ipId of the IP asset | ||
/// @param token The token address to transfer | ||
/// @return The total lifetime revenue tokens transferred to an ancestor's vault from a given IP asset | ||
function getTransferredTokens(address ipId, address ancestorIpId, address token) external view returns (uint256); | ||
} |
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
58 changes: 0 additions & 58 deletions
58
contracts/interfaces/modules/royalty/policies/LAP/IRoyaltyPolicyLAP.sol
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
contracts/interfaces/modules/royalty/policies/LRP/IRoyaltyPolicyLRP.sol
This file was deleted.
Oops, something went wrong.
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.