-
Notifications
You must be signed in to change notification settings - Fork 116
Closed
Description
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
_curatorIdand_reasonmust be provided - a curator can remove a group channel video when having the right permissions, in which case
_curatorIdmust be provided - a channel owner can remove a video in which case only
_videoIdneeds 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.:
removeVideoAsCuratorremoveVideoAsCuratorGroupMemberremoveVideoAsOwnerupdateChannelMetadataAsOwnerupdateChannelMetadataAsCuratorupdateChannelMetadataAsCuratorGroupMemberaddVideoAsOwneraddVideoAsCuratorGroupMember
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.