Membership
Defines:
public struct Membership has store {
membership: Table<address, u8>
}
Assert Membership
The assert_is_member
function has these effects:
Throws error (370 - EIsNotMember) if an address is not a member.
Create
The create
function has these effects:
Creates and returns a new Membership table
Get Length
The get_length
function has these effects:
Returns u64 length of the Membership table
Get Type
The get_type
function has these effects:
Returns u8 representation of the type of member (0 - WALLET, 1 - OBJECT)
Is Member
The is_member
function has these effects:
Returns boolean if the address exists in the Membership table
Object Join
The object_join
function has these effects:
Adds the address as an object member.
Returns (u8, u8) representations of (MEMBER_ADD, OBJECT)
Object Leave
The object_leave
function has these effects:
Removes the address as an object member.
Returns (u8, u8) representations of (MEMBER_REMOVE, OBJECT)
Wallet Join
The wallet_join
function has these effects:
Adds the address as an wallet member.
Returns (u8, u8) representations of (MEMBER_ADD, WALLET)
Wallet Leave
The wallet_leave
function has these effects:
Removes the address as an wallet member.
Returns (u8, u8) representations of (MEMBER_REMOVE, WALLET)
Last updated