AncestorVaultLAP.sol

The ancestors vault allows parents and grandparents to claim their share of
the royalty nfts of their children and grandchildren along with any accrued royalties.

ROYALTY_POLICY_LAP

contract IRoyaltyPolicyLAP ROYALTY_POLICY_LAP

The liquid split royalty policy address

isClaimed

mapping(address => mapping(address => bool)) isClaimed

Indicates if a given ancestor address has already claimed

constructor

constructor(address royaltyPolicyLAP) public

claim

function claim(address ipId, address claimerIpId, address[] ancestors, uint32[] ancestorsRoyalties, bool withdrawETH, contract ERC20[] tokens) external

Claims all available royalty nfts and accrued royalties for an ancestor of a given ipId

Parameters

NameTypeDescription
ipIdaddressThe ipId of the ancestors vault to claim from
claimerIpIdaddressThe claimer ipId is the ancestor address that wants to claim
ancestorsaddress[]The ancestors for the selected ipId
ancestorsRoyaltiesuint32[]The royalties of the ancestors for the selected ipId
withdrawETHboolIndicates if the claimer wants to withdraw ETH
tokenscontract ERC20[]The ERC20 tokens to withdraw

_transferRnftsAndAccruedTokens

function _transferRnftsAndAccruedTokens(address claimerIpId, address splitClone, address[] ancestors, uint32[] ancestorsRoyalties, bool withdrawETH, contract ERC20[] tokens) internal

Transfers the Royalty NFTs and accrued tokens to the claimer

Parameters

NameTypeDescription
claimerIpIdaddressThe claimer ipId
splitCloneaddressThe split clone address
ancestorsaddress[]The ancestors of the IP
ancestorsRoyaltiesuint32[]The royalties of each of the ancestors
withdrawETHboolIndicates if the claimer wants to withdraw ETH
tokenscontract ERC20[]The ERC20 tokens to withdraw

_claimAccruedTokens

function _claimAccruedTokens(uint256 rnftClaimAmount, uint256 totalUnclaimedRnfts, address claimerSplitClone, bool withdrawETH, contract ERC20[] tokens) internal

Claims the accrued tokens (if any)

Parameters

NameTypeDescription
rnftClaimAmountuint256The amount of rnfts to claim
totalUnclaimedRnftsuint256The total unclaimed rnfts
claimerSplitCloneaddressThe claimer's split clone
withdrawETHboolIndicates if the claimer wants to withdraw ETH
tokenscontract ERC20[]The ERC20 tokens to withdraw

_safeTransferETH

function _safeTransferETH(address to, uint256 amount) internal

Allows to transfers ETH

Parameters

NameTypeDescription
toaddressThe address to transfer to
amountuint256The amount to transfer