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
onlyRole
Restricts the execution of a function to only accounts that have a specific role assigned.
Functions
constructor
constructor
Initializes the Membership contract and sets the deployer as the default admin role.
initialize
initialize
Initializes the Membership contract with the provided SABT and foundation contract addresses.
Parameters
setMembership
setMembership
Sets fees for registration and subscription and token address.
Parameters
setFoundation
setFoundation
Sets the address of the foundation contract.
Parameters
setQuota
setQuota
Sets the quota for a specific meta ID.
Parameters
setFees
setFees
Sets the fees for a specific meta ID.
Parameters
register
register
Registers as a member.
Parameters
Returns the UID (unique identifier) of the registered member.
subscribe
subscribe
Subscribes to the membership until a certain block height.
Parameters
offerBonus
offerBonus
Offers a bonus to a specific ABT holder.
Parameters
unsubscribe
unsubscribe
Unsubscribes from the membership.
Parameters
balanceOf
balanceOf
Returns the balance of a specific member for an ABT.
Parameters
Returns the balance of the member for the ABT.
getMeta
getMeta
Returns the meta information of a specific meta ID.
Parameters
Returns the meta information of the token.
isSubscribed
isSubscribed
Checks if a specific ABT is subscribed.
Parameters
Returns true if the ABT is subscribed; otherwise, false.
isReportable
isReportable
Checks if a specific ABT is reportable.
Parameters
Returns true if the ABT is reportable; otherwise, false.
Last updated