Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content directory smart contracts: Actor-specific methods #1923

Closed
Lezek123 opened this issue Dec 15, 2020 · 0 comments
Closed

Content directory smart contracts: Actor-specific methods #1923

Lezek123 opened this issue Dec 15, 2020 · 0 comments

Comments

@Lezek123
Copy link
Contributor

Lezek123 commented Dec 15, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants