Skip to content
ClearClear
Docs
Protocol/MembershipRegistry

MembershipRegistry

Source: contracts/peripherals/MembershipRegistry.sol · Guide: credit

1 min readUpdated View source

On this page
Network
Chain id
Address
Base Sepolia
84532

Functions that change state

Function
Who can call
Also
grantRole(bytes32 role, address account)
The role's admin role (DEFAULT_ADMIN_ROLE unless set otherwise)
initialize(address admin)
Once, when the proxy is initialised
linkWallet(uint256 memberId, address wallet)
onlyRole(REGISTRAR_ROLE)
whenNotPaused
pause()
onlyRole(PAUSER_ROLE)
registerMember(address primaryWallet, uint8 tier, uint64 expiresAt, bytes32 metadataHash)
onlyRole(REGISTRAR_ROLE)
whenNotPaused
renewMembership(uint256 memberId, uint64 newExpiresAt)
onlyRole(REGISTRAR_ROLE)
whenNotPaused
renounceRole(bytes32 role, address account)
Only the account renouncing its own role
revokeRole(bytes32 role, address account)
The role's admin role (DEFAULT_ADMIN_ROLE unless set otherwise)
setMemberStatus(uint256 memberId, uint8 status)
onlyRole(REGISTRAR_ROLE)
whenNotPaused
setMemberTier(uint256 memberId, uint8 tier, uint64 expiresAt)
onlyRole(REGISTRAR_ROLE)
whenNotPaused
unlinkWallet(uint256 memberId, address wallet)
onlyRole(REGISTRAR_ROLE)
whenNotPaused
unpause()
onlyRole(PAUSER_ROLE)
updateMemberMetadataHash(uint256 memberId, bytes32 metadataHash)
onlyRole(REGISTRAR_ROLE)
whenNotPaused

Read functions

Anyone can call these; they change nothing.

Function
Returns
DEFAULT_ADMIN_ROLE()
bytes32
getLinkedWallets(uint256 memberId)
address[]
getMember(uint256 memberId)
(uint256,address,uint8,uint8,uint64,uint64,bytes32,uint64)
getMemberByWallet(address wallet)
(uint256,address,uint8,uint8,uint64,uint64,bytes32,uint64)
getRoleAdmin(bytes32 role)
bytes32
hasRole(bytes32 role, address account)
bool
isActiveMember(address wallet)
bool
linkedWallets(uint256, address)
bool
nextMemberId()
uint256
paused()
bool
PAUSER_ROLE()
bytes32
REGISTRAR_ROLE()
bytes32
supportsInterface(bytes4 interfaceId)
bool
walletToMemberId(address)
uint256

Events

Event
Initialized(uint8 version)
MemberMetadataHashUpdated(uint256 memberId indexed, bytes32 metadataHash)
MemberRegistered(uint256 memberId indexed, address primaryWallet indexed, uint8 tier, uint64 expiresAt, bytes32 metadataHash)
MembershipRenewed(uint256 memberId indexed, uint64 expiresAt)
MemberStatusUpdated(uint256 memberId indexed, uint8 status)
MemberTierUpdated(uint256 memberId indexed, uint8 tier, uint64 expiresAt)
Paused(address account)
RoleAdminChanged(bytes32 role indexed, bytes32 previousAdminRole indexed, bytes32 newAdminRole indexed)
RoleGranted(bytes32 role indexed, address account indexed, address sender indexed)
RoleRevoked(bytes32 role indexed, address account indexed, address sender indexed)
Unpaused(address account)
WalletLinked(uint256 memberId indexed, address wallet indexed)
WalletUnlinked(uint256 memberId indexed, address wallet indexed)

Errors

No custom errors; failures revert with a reason string.