Getter Functions
This page elaborates on the getter functions of the various contracts in our ecosystem. NFT standard functions have been omitted.
Last updated
This page elaborates on the getter functions of the various contracts in our ecosystem. NFT standard functions have been omitted.
Last updated
get fun getProfileIdByHandle(handle: Cell): Int?
Parameter Name | Type | Description |
---|---|---|
Returns
Type | Description |
---|---|
It should...
Return Optional containing the profile ID of the Nabi Profile with the input handle if it exists, null otherwise.
get fun isClosedBeta(): Bool
Returns
Type | Description |
---|---|
It should...
Return true
if a Nabi Protocol is in close beta, false
otherwise.
get fun getDispatcherAddress(): Address?
Returns
It should...
Return Optional containing the Nabi Hub Dispatcher contract address if dispatcher is set, null otherwise.
get fun getProfile(): Profile
Returns
It should...
Return a Profile object.
get fun getPublicationAddressByIndex(pubId: Int): Address
Returns
It should...
Return the contract address of the publication at index pubId
.
Note:
If the publication contract has not been deployed, an address would still be returned. However, sending messages to an undeployed contract would lead to the transaction being reverted. It is advised to check the profile's publication count first.
get fun getNextBadgeCollectionIndex(): Int
Returns
It should...
Return the index of the next Nabi Badge Collection to be created.
get fun getNabiBadgeCollectionAddressByIndex(collectionId: Int): Address
Returns
It should...
Return the contract address of the Nabi Badge Collection at index collectionId
.
Note:
If the Nabi Badge Collection contract has not been deployed, an address would still be returned. However, sending messages to an undeployed contract would lead to the transaction being reverted. It is advised to check the profile's next badge collection index first.
get fun isCollectNftInitialized(): Bool
Returns
It should...
Return true
if the Collect NFT collection contract has been initialized false
otherwise.
get fun getPublicationData(): PublicationData
Returns
It should...
Return a PublicationData object.
Type | Description |
---|---|
Type | Description |
---|---|
Profile Object Field | Type | Description |
---|---|---|
Parameter Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Type | Description |
---|---|
Parameter Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Type | Description |
---|---|
Type | Description |
---|---|
PublicationData Object Field | Type | Description |
---|---|---|
handle
Cell
The handle of the target Nabi Profile
Int?
Optional containing profile ID or null
Bool
Whether Nabi Protocol is in close beta
Address?
Optional containing dispatcher address or null
Profile
Object containing profile data
pub_count
Int
The number of publications created by this profile
handle
Cell
The handle of the profile
image_uri
Cell
The URI of the profile image
follow_nft_address
Address
The contract address of the Follow NFT collection (will be the profile contract address if not initialized)
follow_nft_uri
Cell
The URI that contains the metadata of the Follow NFT collection
pubId
Int
The index of the target publication within the Nabi Profile
Address
The contract address of the target publication
Int
The index of the next Nabi Badge Collection
collectionId
Int
The index of the target Nabi Badge Collection within the Nabi Profile
Address
The contract address of the target Nabi Badge Collection
Bool
Whether the Collect NFT collection contract has been initialized
PublicationData
Object containing publication data
pub_address
Address
The contract address of the publication
profile_contract_pointed
Address
The contract address of the profile that created the publication
profile_pub_id
Int
The index of the publication within the profile
pub_contract_pointed
Address
The contract address of the reference publication for mirrors and comments (Will equal pub_address if publication is a post)
content_uri
Cell
The URI containing the publication metadata
collect_nft_address
Address
The contract address of the Collect NFT collection (will equal pub_address if collection not initialized)