State Changing Messages
State changing messages in the NabiHub.tact contract
This document elaborates on the functions of the implementation, as well as the conditions that need to be met for successful execution of on-chain mutations. All NFT standard messages and internal messages have been omitted from this document.
SetOwner
SetOwner(20f246bd){new_owner:address}
Parameter Name | Type | Description |
---|---|---|
new_owner | address | The address of the new owner to be set |
This message sets a new owner wallet for the Nabi Hub contract.
It should...
Set the owner_address field for the Nabi Hub contract.
Will revert if...
Message sender is not the current owner of the Nabi Hub contract.
SetDispatcher
SetDispatcher(cdf9f40b){dispatcher_address:address}
Parameter Name | Type | Description |
---|---|---|
dispatcher_address | address | The address of the Nabi Hub Dispatcher contract |
This message sets a new dispatcher for the Nabi Hub contract.
It should...
Set the dispatcher_address field for the Nabi Hub contract. State changing messages sent from this Nabi Hub Dispatcher contract are able to bypass ownership and closed beta checks.
Will revert if...
Message sender is not the current owner of the Nabi Hub contract.
InitProfileOfMinted
InitProfileOfMinted(a401f652){item_id:int257,handle:^cell,image_uri:^cell,follow_nft_uri:^cell,individual_content_uri:^cell}
Parameter Name | Type | Description |
---|---|---|
item_id | address | The index of the existing Nabi Profile NFT item |
handle | Cell | The handle to set for the profile |
image_uri | Cell | The URI of the profile image |
follow_nft_uri | Cell | The URI that contains the Follow NFT collection metadata |
individual_content_uri | Cell | The URI that contains the Nabi Profile NFT item metadata |
This message Initializes the profile of an existing (already minted) Nabi Profile NFT item. To be used after sending a "mint" message directly to the NabiHub contract.
It should...
Send input data to the target Nabi Profile contract, to populate fields of the profile.
Set is_profile_initialized field in the target Nabi Profile contract to true.
Will revert if...
Message sender is not the current owner of the Nabi Profile.
Nabi Profile is already initialized.
Handle is not unique.
Message format:
CreateNabi
CreateNabi(1ce34a40){owner_address:Maybe address,handle:^cell,image_uri:^cell,follow_nft_uri:^cell,individual_content_uri:^cell}
Parameter Name | Type | Description |
---|---|---|
handle | Cell | The handle to set for the profile |
image_uri | Cell | The URI of the profile image |
follow_nft_uri | Cell | The URI that contains the Follow NFT collection metadata |
individual_content_uri | Cell | The URI that contains the Nabi Profile NFT item metadata |
This message mints a Nabi Profile NFT item and initializes the profile in a single transaction.
It should...
Deploy a new Nabi Profile NFT contract.
Increment next_item_index field in the Nabi Hub contract.
Send input data to the newly deployed Nabi Profile contract, to populate fields of the profile.
Set is_profile_initialized field in the Nabi Profile contract to true.
Will revert if...
Handle is not unique.
Message format:
Post
Post(29660d2a){sender_profile_address:address,content_uri:^cell}
Parameter Name | Type | Description |
---|---|---|
sender_profile_address | address | The address of the sender's Nabi Profile contract. |
content_uri | Cell | The URI of the post content. |
This message posts a publication for the sender's Nabi Profile.
It should...
Deploy a new Publication contract.
Increment pub_count field in sender's the Nabi Profile contract.
Initialise the newly deployed Publication contract by sending input data to set the content_uri field of the Publication.
Set is_profile_initialized field in the Publication contract to true.
Will revert if...
Sender's Nabi Profile is not initialized.
Sender is not the owner of the input Nabi Profile.
Message format:
Mirror
Mirror(fa7f25a8){sender_profile_address:address,pub_address:address}
Parameter Name | Type | Description |
---|---|---|
sender_profile_address | address | The address of the sender's Nabi Profile contract. |
pub_address | address | The address of the publication to be mirrored. |
This message mirrors a publication for the sender's Nabi Profile.
It should...
Deploy a new Publication contract.
Increment pub_count field in sender's the Nabi Profile contract.
Initialize the newly deployed Publication contract by sending input data to set the content_uri and pub_contract_pointed fields of the Publication.
Set is_profile_initialized field in the Publication contract to true.
Will revert if...
Sender's Nabi Profile is not initialized.
Sender is not the owner of the input Nabi Profile.
Message format:
Comment
Comment(061f5182){sender_profile_address:address,pub_address:address,content_uri:^cell}
Parameter Name | Type | Description |
---|---|---|
sender_profile_address | address | The address of the sender's Nabi Profile contract. |
pub_address | address | The address of the publication to be commented on. |
content_uri | Cell | The URI of the comment content. |
This message comments on a publication for the sender's Nabi Profile.
It should...
Deploy a new Publication contract.
Increment pub_count field in sender's the Nabi Profile contract.
Initialize the newly deployed Publication contract by sending input data to set the content_uri and pub_contract_pointed fields of the Publication.
Set is_profile_initialized field in the Publication contract to true.
Will revert if...
Sender's Nabi Profile is not initialized.
Sender is not the owner of the input Nabi Profile.
Message format:
Follow
Follow(cec05374){sender_profile_address:address,following_profile_address:address}
Parameter Name | Type | Description |
---|---|---|
sender_profile_address | address | The address of the sender's Nabi Profile contract. |
following_profile_address | address | The address of the Nabi Profile to be followed. |
This message follows a profile for the sender's Nabi Profile.
It should...
Send an internal message to the following Nabi Profile contract to deploy a Follow NFT collection contract for the following profile, if contract does not exist.
Mint a Follow NFT item to the sender's profile by sending an internal message to the Follow NFT collection contract.
Will revert if...
Sender's Nabi Profile is not initialized.
Sender is not the owner of the input Nabi Profile.
Following Nabi Profile is not initialized.
Message format:
Collect
Collect(aa063734){sender_profile_address:address,publication_address:address}
Parameter Name | Type | Description |
---|---|---|
sender_profile_address | address | The address of the sender's Nabi Profile contract. |
publication_address | address | The address of the publication to be collected. |
This message collects a publication for the sender's Nabi Profile.
It should...
Send an internal message to the target publication contract to deploy a Collect NFT collection contract, if it does not exist
Mint a Collect NFT item to the sender's profile by sending an internal message to the Collect NFT collection contract.
Will revert if...
Sender's Nabi Profile is not initialized.
Sender is not the owner of the input Nabi Profile.
Target publication is not initialized.
Message format:
CreateNabiBadge
CreateNabiBadge(26445c31){sender_profile_address:address,collection_content_uri:^cell}
Parameter Name | Type | Description |
---|---|---|
sender_profile_address | address | The address of the sender's Nabi Profile contract. |
collection_content_uri | Cell | The URI that contains the Nabi Badge Collection metadata. |
This message creates a Nabi Badge NFT Collection for the sender's Nabi Profile.
It should...
Deploy a Nabi Badge NFT collection contract by sending an internal message to the sender's profile contract.
Send an internal message to the newly deployed Nabi Badge collection to intialize its collection_content and collection_index fields.
Will revert if...
Sender's Nabi Profile is not initialized.
Sender is not the owner of the input Nabi Profile.
Message format:
MintNabiBadge
MintNabiBadge(e772c694){sender_profile_address:address,nabi_badge_collection_address:address}
Parameter Name | Type | Description |
---|---|---|
sender_profile_address | address | The address of the sender's Nabi Profile contract. |
nabi_badge_collection_address | Cell | The address of the Nabi Badge NFT collection contract to mint from. |
This message mints a Nabi Badge NFT item from the target collection, for the sender's Nabi Profile.
It should...
Deploy a new Nabi Badge NFT item contract from the target collection.
Increments next_item_index field in the target Nabi Hub NFT collection contract.
Will revert if...
Sender's Nabi Profile is not initialized.
Sender is not the owner of the input Nabi Profile.
Message format:
MintNabiBadgeToRecipient
MintNabiBadgeToRecipient(3be9d023){owner_profile_address:address,nabi_badge_collection_address:address,recipient_profile_address:address}
Parameter Name | Type | Description |
---|---|---|
owner_profile_address | address | The address of the sender's Nabi Profile contract. |
nabi_badge_collection_address | Cell | The address of the Nabi Badge NFT collection contract to mint from. |
recipient_profile_address | address | The address of the recipient's Nabi Profile contract. |
This message mints a Nabi Badge NFT item to a recipient, for the sender's Nabi Profile.
It should...
Deploy a new Nabi Badge NFT item contract from the target collection.
Increments next_item_index field in the target Nabi Hub NFT collection contract.
Transfers ownership of the newly minted Nabi Badge to the recipient.
Will revert if...
Sender's Nabi Profile is not initialized.
Sender is not the owner of the input Nabi Profile.
Sender is not the owner of the Nabi Badge Collection.
Message format:
URI Standards
Before storing a URI string in a Cell, URIs must be prefixed with 8-bit off-chain content prefix (0x01) to be rendered correctly on TONscan and NFT marketplaces.
Last updated