Skip to content
This repository was archived by the owner on Apr 30, 2024. It is now read-only.
This repository was archived by the owner on Apr 30, 2024. It is now read-only.

Commercializers contract #64

@Ramarti

Description

@Ramarti

There is a term in UML called commercializers, that dictates people can set an address that will determine if the minter/linker/receiver of an LNFT must be part of a known list of addresses.

The methods of determining this list could be varied. Basically, it's a synch hook from alpha, but with a less rigid structure.

  • We need an interface such as:
interface ICommercializersChecker {
    function isAllowedCommercializer(address candidate, bytes memory data) external view returns (bool);
}
  • We need to change UMLPolicy, substituting commercializers as a string array for:
commercializerChecker: address, // the address of ICommercializersChecker
commercializerData: bytes // abi.encoded data that will be set in the policy

UMLPolicyFrameworkManager must, on verifyMint() and verifyLink(), check that the IPAccount passes isAllowedCommercializer(policy.commercializerChecker, policy,.commercializerData), and uses the value to return true or false

  • We can support a ERC721GatedCommercializersChecker.
    -- Singleton contract
function isAllowedCommercializer(address candidate, bytes memory data) external view returns (bool) {
    address tokenAddress = abi.decode(data, (address));
    return IERC721(tokenAddress).balanceOf(candidate) > 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions