Actions
Add Moderator
The add_moderator_as_owner function has these effects:
Borrows the Moderators table stored on the Channel
Asserts the sender is the owner of the Moderation table
Asserts the payment matches the configuration
Adds the provided address as a new moderator
Emits the "ChannelModerationUpdate" event:
public struct ChannelModerationUpdate has copy, drop { channel_key: String, message: u8, moderator_type: u8, updated_at: u64, user: address }
Collects any payment
Add Moderator (Admin)
The add_moderator_as_admin function has these effects:
Borrows the Moderators table stored on the Channel
Adds the provided address as a new moderator
Emits the "ChannelModerationUpdate" event:
Create
The create function has these effects:
Asserts authentication
Asserts the payment matches the configuration
Creates Membership, Moderation, and Post tables for the Channel
Creates the Channel
Adds the lowercase channel key into the Channel Registry
Collects any payment
Emits the "ChannelCreated", "ChannelMembershipUpdate", and "ChannelModerationUpdate" events:
Returns the Channel address
Join
The join function has these effects:
Asserts authentication
Asserts the payment matches the configuration
Borrows the Membership table stored on the Channel
Adds address as wallet member
Emits the "ChannelMembershipUpdate" event:
Collects any payment
Leave
The leave function has these effects:
Asserts the payment matches the configuration
Borrows the Membership table stored on the Channel
Removes address as a member
Emits the "ChannelMembershipUpdate" event:
Collects any payment
Post
The post function has these effects:
Borrows the Membership table stored on the Channel
Asserts address is member of the Channel
Asserts the payment matches the configuration
Borrows the Posts table stored on the Channel
Creates Post and stores it in the Posts table
Collects any payment
Emits the "ChannelPostCreated" event:
Returns the (post_address, post_timestamp)
Remove Moderator
The remove_moderator_as_owner function has these effects:
Borrows the Moderators table stored on the Channel
Asserts the sender is the owner of the Moderation table
Asserts the payment matches the configuration
Removes the provided address as a moderator
Emits the "ChannelModerationUpdate" event:
Collects any payment
Remove Moderator (Admin)
Theremove_moderator_as_admin function has these effects:
Borrows the Moderators table stored on the Channel
Removes the provided address as a moderator
Emits the "ChannelModerationUpdate" event:
Update
The update_as_owner function has these effects:
Borrows the Moderators table stored on the Channel
Asserts the sender is a moderator of the Moderation table
Asserts the payment matches the configuration
Updates the Channel data
Emits the "ChannelUpdated" event:
Collects any payment
Update (Admin)
The update_as_owner function has these effects:
Borrows the Moderators table stored on the Channel
Asserts the sender is a moderator of the Moderation table
Asserts the payment matches the configuration
Updates the Channel data
Emits the "ChannelUpdated" event:
Collects any payment
Last updated