Moderation
Defines:
public struct Moderation has store {
moderation: Table<address, u8>
}Assert Moderator
The assert_is_moderator function has these effects:
Throws error (371 - EIsNotModerator) if an address is not a moderator.
Assert Ownership
The assert_is_owner function has these effects:
Throws error (372 - EIsNotOwner) if an address is not the owner.
Create
The create function has these effects:
Creates a new Moderation table.
Makes sender the owner of the Moderation table.
Returns (ModerationTable, u8, u8) representations of (ModerationTable, MODERATOR_ADD, OWNER)
Get Length
The get_length function has these effects:
Returns u64 length of the Moderation table
Is Moderator
The is_moderator function has these effects:
Returns boolean if the address exists in the Moderation table
Is Owner
The is_owner function has these effects:
Returns boolean if the address is labeled as the owner in the Moderation table
Add Moderator
The make_moderator function has these effects:
Adds the address as a moderator in the Moderation table.
Returns (u8, u8) representations of (MODERATOR_ADD, MODERATOR)
Add Owner
The make_owner function has these effects:
Adds the address as an owner in the Moderation table.
Returns (u8, u8) representations of (MODERATOR_ADD, OWNER)
Remove Moderator
The remove_moderator function has these effects:
Removes the address as a moderator.
Returns (u8, u8) representations of (MODERATOR_REMOVE, MODERATOR)
Last updated