Skip to content

Content directory smart contracts: Actor-specific methods #1923

@Lezek123

Description

@Lezek123

Some actions can be performed by multiple different actors and in multiple different context, which require different method arguments, let's take removeVideo as an example:

  • a curator can remove a video from member/account channel, in which case _curatorId and _reason must be provided
  • a curator can remove a group channel video when having the right permissions, in which case _curatorId must be provided
  • a channel owner can remove a video in which case only _videoId needs to be provided

As suggested in #1752 (comment) the cleanest approach possible in Solidity would be probably to have a separate method for each context, which an adequate name, ie.:

  • removeVideoAsCurator
  • removeVideoAsCuratorGroupMember
  • removeVideoAsOwner
  • updateChannelMetadataAsOwner
  • updateChannelMetadataAsCurator
  • updateChannelMetadataAsCuratorGroupMember
  • addVideoAsOwner
  • addVideoAsCuratorGroupMember

This issue may be also evaluated together with #1922 - we may, for example, split the logic contract into curation logic, group channels logic and standard channel-owner logic, in which case a different contract (instead of different method in the same contract) can be used depending on the context.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions