const HardMaxMembers
HardMaxMembers bounds MaxMembers regardless of configuration.
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package membership is the Remix Lab membership block: an address-based member set with owner/reviewer/member roles, i...
Package membership is the Remix Lab membership block: an address-based member set with owner/reviewer/member roles, invitation or open joining, and bounded listing.
A host realm constructs a *Set, keeps it in an unexported variable and authenticates every mutation before calling it. The Set enforces its own invariants (limits, last-owner protection, join rules) but not who may administer it: that is the host's policy decision. Never export the *Set or return it from a realm function; any holder of the pointer can call its mutating methods with the host's storage authority.
Membership is address-based. One address is not one human.
HardMaxMembers bounds MaxMembers regardless of configuration.
Config is the block configuration, fixed at construction.
JoinMode controls how a non-member becomes a member through Join.
Set is a membership set. The zero value is not usable; call New.
Add directly adds addr with role. The host must have authorized the actor.
Config returns the set's configuration.
Invite records a pending invitation granting role on Join. Only valid in invitation mode. Pending invitations count against MaxMembers so that accepting every invitation can never exceed the limit.
InviteRole returns the role a pending invitation for addr grants.
Invites returns up to limit pending invitations starting at offset, ordered by address, with the role each one grants.
IsInvited reports whether addr holds a pending invitation.
IsMember reports whether addr holds any role.
Join adds actor as a member. actor must be the authenticated caller.
Leave removes actor. actor must be the authenticated caller. The last owner cannot leave.
List returns up to limit members starting at offset, ordered by address.
Owners returns the number of owners.
PendingInvites returns the number of pending invitations.
Remove removes addr. The host must have authorized the actor. The last owner cannot be removed.
RevokeInvite removes a pending invitation.
RoleOf returns addr's role, RoleNone for non-members.
SetRole changes an existing member's role. Demoting the last owner fails.
Size returns the number of members.
Snapshot implements core.MembershipReader. A negative max or an invalid minRole yields (nil, false).