Membership

This Solidity smart contract is a standard Membership registration and subscription contract. Let's break down the variables, events, functions, and internal functions present in this contract:

State Variables

Modifiers

onlyRole

Restricts the execution of a function to only accounts that have a specific role assigned.

Functions

constructor

Initializes the Membership contract and sets the deployer as the default admin role.

initialize

Initializes the Membership contract with the provided SABT and foundation contract addresses.

Parameters

setMembership

Sets fees for registration and subscription and token address.

Parameters

setFoundation

Sets the address of the foundation contract.

Parameters

setQuota

Sets the quota for a specific meta ID.

Parameters

setFees

Sets the fees for a specific meta ID.

Parameters

register

Registers as a member.

Parameters

Returns the UID (unique identifier) of the registered member.

subscribe

Subscribes to the membership until a certain block height.

Parameters

offerBonus

Offers a bonus to a specific ABT holder.

Parameters

unsubscribe

Unsubscribes from the membership.

Parameters

balanceOf

Returns the balance of a specific member for an ABT.

Parameters

Returns the balance of the member for the ABT.

getMeta

Returns the meta information of a specific meta ID.

Parameters

Returns the meta information of the token.

isSubscribed

Checks if a specific ABT is subscribed.

Parameters

Returns true if the ABT is subscribed; otherwise, false.

isReportable

Checks if a specific ABT is reportable.

Parameters

Returns true if the ABT is reportable; otherwise, false.

Last updated