View Modules
balanceOf()
Find out follow or not through the method balanceOf
, it represents being followed or following if return value is larger than 0.
account
is the address trigger the follow action, id
is the serializations of the address being followed.
eg: uint256(uint160("$(address)")) or hexadecimal to 10 interpretations.
Query if is being followed:
Like if A is being followed by B -> balanceOf(B, uint256(uint160(A)))
Query if is following:
Like if A is following B -> balanceOf(A, uint256(uint160(B)))
baseInfo()
Query base info of Profile NFT, return name and image.
Parameter Name | Type | Description |
---|---|---|
account | address | which Profile NFT query |
name | string | name of Profile NFT |
image | string | avatar of Profile NFT |
relation()
Query Profile NFT followings and followers.
Parameter Name | Type | Description |
---|---|---|
account | address | which Profile NFT query |
tokenSupply | uint256 | followers of Profile NFT |
totalBalance | uint256 | followings of Profile NFT |
uri()
Query Profile NFT Metadata.
Parameter Name | Type | Description |
---|---|---|
tokenId | uint256 | Profile NFT ID |
tokenId: Use the t address uint256, that is, hexadecimal to 10 interpretations.
eg: uint256(uint160("$(address)"))
Return metadata format as below:
the JSON metadata to use base64 encode.
Parameter Name | Type | Description |
---|---|---|
name | string | name of Profile NFT |
image | string | avatar of Profile NFT |
maxSupply | uint256 | Follower limitation |
tokenSupply | uint256 | followers of Profile NFT |
totalBalance | uint256 | followings of Profile NFT |
properties | string | extension data of Profile NFT |
Last updated