UserProfiles
Users can give as little or as much information about themselves as they wish
Table of Contents
Events
logProfileUpdated
This event is emitted when a user or group profile is updated.
logNewUser
This event is emitted when a new user joins the platform.
hashtagToVerify
This event is emitted when a user address needs verification.
logSaveNFTAvatar
This event is emitted when an NFT avatar is saved for a user.
Public Functions
updateProfile
Updates a user or group profile details. If it's a group profile, only the owner has access to make updates. For new users, it sets up their initial profile.
Parameters
location
string calldata
The user or group's location
avatar
string calldata
A URI for the user or group's avatar picture
_uri
string calldata
A URI to publicly share for the user or group's profile
_bio
string calldata
A bio of the user or group
groupID
uint256
The Group ID to update the profile for. 0 for user profile.
Returns
This function doesn't return a value.
Example
setNFTAsAvatar
Sets an NFT as the profile photo for a user or group. Only the owner of the NFT can set it as an avatar. The function will connect to the contract of the NFT provided and verify ownership of NFT by the wallet of the user calling the function.
Parameters
_nftContract
address
The contract address of the NFT
tokenId
uint256
The token ID of the NFT owned by the caller
groupID
uint256
The Group ID to update the avatar for. 0 for user profile.
Returns
This function doesn't return a value.
Example
follow
Allows a user to follow another user. Users can't follow themselves, and they can't follow more than a maximum number of users (maxFollow).
Parameters
toFollow
address
The address of the user to follow
Returns
This function doesn't return a value.
Example
unfollow
Allows a user to unfollow another user. Users can't unfollow themselves.
Parameters
toUnfollow
address
The address of the user to unfollow
Returns
This function doesn't return a value.
Example
getProfile
Fetches the profile details of a user.
Parameters
_user
address
The address of the user
Returns
This function returns a string for each: URI, Avatar, Location, and Bio of the user.
Example
Last updated