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
Showing
6 changed files
with
123 additions
and
10 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
21 changes: 21 additions & 0 deletions
21
contracts/interfaces/modules/royalty/policies/IClaimerLS.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,21 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.23; | ||
|
||
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
|
||
/// @title Liquid split policy claimer interface | ||
interface IClaimerLS { | ||
/// @notice Event emitted when a claim is made | ||
/// @param path The path from the ipId to the claimer | ||
/// @param claimer The claimer ipId address | ||
/// @param withdrawETH Indicates if the claimer wants to withdraw ETH | ||
/// @param tokens The ERC20 tokens to withdraw | ||
event Claimed(address[] path, address claimer, bool withdrawETH, ERC20[] tokens); | ||
|
||
/// @notice Allows an ipId to claim their rnfts and accrued royalties | ||
/// @param path The path of the ipId | ||
/// @param claimerIpId The ipId of the claimer | ||
/// @param withdrawETH Indicates if the claimer wants to withdraw ETH | ||
/// @param tokens The ERC20 tokens to withdraw | ||
function claim(address[] calldata path, address claimerIpId, bool withdrawETH, ERC20[] calldata tokens) external; | ||
} |
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
38 changes: 38 additions & 0 deletions
38
contracts/interfaces/modules/royalty/policies/IRoyaltyPolicyLS.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,38 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.23; | ||
|
||
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
|
||
import { IRoyaltyPolicy } from "contracts/interfaces/modules/royalty/policies/IRoyaltyPolicy.sol"; | ||
|
||
/// @title RoyaltyPolicy interface | ||
interface IRoyaltyPolicyLS is IRoyaltyPolicy { | ||
/// @notice Gets the royalty data | ||
/// @param ipId The ipId | ||
/// @return splitClone The split clone address | ||
/// claimer The claimer address | ||
/// royaltyStack The royalty stack | ||
/// minRoyalty The min royalty | ||
function royaltyData(address ipId) external view returns (address splitClone, address claimer, uint32 royaltyStack, uint32 minRoyalty); | ||
|
||
/// @notice Distributes funds to the accounts in the LiquidSplitClone contract | ||
/// @param ipId The ipId | ||
/// @param token The token to distribute | ||
/// @param accounts The accounts to distribute to | ||
/// @param distributorAddress The distributor address | ||
function distributeFunds( | ||
address ipId, | ||
address token, | ||
address[] calldata accounts, | ||
address distributorAddress | ||
) external; | ||
|
||
/// @notice Claims the available royalties for a given account | ||
/// @param account The account to claim for | ||
/// @param withdrawETH The amount of ETH to withdraw | ||
/// @param tokens The tokens to withdraw | ||
function claimRoyalties(address account, uint256 withdrawETH, ERC20[] calldata tokens) external; | ||
|
||
/// @notice Gets liquid split main address | ||
function LIQUID_SPLIT_MAIN() external view returns (address); | ||
} |