Skip to main content
NFT messages and methods specified in TEPs.

TEP-62

NFT Item

Transfer message layout

FieldTypeDescription
transferuint32tag equal to 0x5fcc3d14
query_iduint64arbitrary request number
new_ownerMsgAddressaddress of the new owner of the NFT item
response_destinationMsgAddressoptional address to receive excess Toncoin, usually the sender’s address
custom_payloadMaybe ^Celloptional custom data
forward_amountVarUInteger 16the amount of Toncoin to be sent to the new owner
forward_payloadEither Cell ^Celloptional data that should be forwarded to the new owner

Forward payload formats

To send a simple comment in the forward_payload, the forward_payload must start with 0x00000000 (32-bit unsigned integer equal to zero); the remainder of the forward_payload contains the comment. If the comment does not begin with the byte 0xff, the comment is a text one; it can be displayed “as is” to the end user of a wallet (after filtering invalid and control characters and checking that it is a valid UTF-8 string). For instance, users may indicate the purpose (“for coffee”) of a simple transfer from their wallet to the wallet of another user in this text field. On the other hand, if the comment begins with the byte 0xff, the remainder is a “binary comment”, which should not be displayed to the end user as text (only as a hex dump if necessary). The intended use of “binary comments” is, e.g., to contain a purchase identifier for payments in a store, to be automatically generated and processed by the store’s software. If the forward_payload contains a binary message for interacting with the destination smart contract (for example, with DEX), then there are no prefixes.

Ownership assigned message layout

FieldTypeDescription
ownership_assigneduint32tag equal to 0x05138d91
query_iduint64should be equal to request’s query_id
prev_ownerMsgAddressaddress of the previous owner of this NFT item
forward_payloadEither Cell ^Cellshould be equal to request’s forward_payload

Excesses message layout

FieldTypeDescription
excessesuint32tag equal to 0xd53276db
query_iduint64should be equal to request’s query_id

Get static data message layout

FieldTypeDescription
get_static_datauint32tag equal to 0x2fcb26a2
query_iduint64arbitrary request number

Report static data message layout

FieldTypeDescription
report_static_datauint32tag equal to 0x8b771735
query_iduint64should be equal to request’s query_id
indexuint256numerical index of this NFT in the collection
collectionMsgAddressaddress of the smart contract of the collection to which this NFT belongs

get_nft_data()

No arguments. Outputs:
FieldTypeDescription
init?intif not zero, then this NFT is fully initialized and ready for interaction
indexintnumerical index of this NFT in the collection
collection_addressMsgAddressaddress of the smart contract of the collection to which this NFT belongs
owner_addressMsgAddressaddress of the current owner of this NFT
individual_contentCellindividual NFT content in any format

NFT Collection

get_collection_data()

No arguments. Outputs:
FieldTypeDescription
next_item_indexintthe count of currently deployed NFT items in collection
collection_contentCellcollection content in a format that complies with TEP-64
owner_addressMsgAddresscollection owner address, zero address if no owner

get_nft_address_by_index()

Argument: index as int. Output: address as MsgAddress.

get_nft_content()

Arguments:
  • index as int
  • individual_content as Cell
Output: full_content as Cell.

TEP-66

Get royalty params message layout

FieldTypeDescription
get_royalty_paramsuint32tag equal to 0x693d3950
query_iduint64arbitrary request number

Report royalty params message layout

FieldTypeDescription
report_royalty_paramsuint32tag equal to 0xa8cb00ad
query_iduint64should be equal to request’s query_id
numeratoruint16royalty numerator
denominatoruint16royalty denominator
destinationMsgAddressaddress to send royalty

royalty_params()

No arguments. Outputs:
FieldTypeDescription
numeratorintroyalty numerator (e.g., 11)
denominatorintroyalty denominator (e.g., 1000)
destinationMsgAddressaddress to send royalty
Royalty share is numerator / denominator. For example, if numerator = 11 and denominator = 1000, then royalty share is 11 / 1000 * 100% = 1.1%.

TEP-85

SBT Item

Prove ownership message layout

FieldTypeDescription
prove_ownershipuint32tag equal to 0x04ded148
query_iduint64arbitrary request number
destinationMsgAddressaddress of the contract to which the ownership should be proven
forward_payload^Cellany data for sending to the destination address from SBT
with_contentBoolif true, SBT’s individual content cell will be included in the message

Request owner message layout

FieldTypeDescription
request_owneruint32tag equal to 0xd0c3bfea
query_iduint64arbitrary request number
destinationMsgAddressaddress of the contract to which the ownership should be proven
forward_payload^Cellany data for sending to the destination address from SBT
with_contentBoolif true, SBT’s individual content cell will be included in the message

Destroy message layout

FieldTypeDescription
destroyuint32tag equal to 0x1f04537a
query_iduint64arbitrary request number

Revoke message layout

FieldTypeDescription
revokeuint32tag equal to 0x6f89f5e3
query_iduint64arbitrary request number

Ownership proof message layout

FieldTypeDescription
ownership_proofuint32tag equal to 0x0524c7ae
query_iduint64should be equal to request’s query_id
item_iduint256ID of an SBT
ownerMsgAddressSBT owner’s address
data^Celldata cell passed in prove_ownership
revoked_atuint64unix time when SBT was revoked, 0 if it was not
individual_contentMaybe ^CellSBT’s individual content if with_content was true, null if not

Owner info message layout

FieldTypeDescription
owner_infouint32tag equal to 0x0dd607e3
query_iduint64should be equal to request’s query_id
item_iduint256ID of an SBT
initiatorMsgAddressaddress of request initiator
ownerMsgAddressSBT owner’s address
data^Celldata cell equal to request’s forward_payload
revoked_atuint64unix time when SBT was revoked, 0 if it was not
contentMaybe ^CellSBT’s content if with_content was true, null if not

get_nft_data()

Same as NFT standard. No arguments. Outputs:
FieldTypeDescription
init?intif not zero, then this SBT is fully initialized and ready for interaction
indexintnumerical index of this SBT in the collection
collection_addressMsgAddressaddress of the smart contract of the collection to which this SBT belongs
owner_addressMsgAddressSBT owner’s address
individual_contentCellindividual SBT content in any format

get_authority_address()

No arguments. Outputs:
FieldTypeDescription
authoritysliceauthority’s address that can revoke SBT, returns addr_none (2 zero bits) if no authority

get_revoked_time()

No arguments. Outputs:
FieldTypeDescription
revoked_atintunix time of when SBT was revoked, 0 when not revoked