Skip to content

Commit fab4d90

Browse files
committed
added forward_payload format to NFT and Jettons
1 parent afb3b96 commit fab4d90

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

text/0062-nft-standard.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,20 @@ TL-B schema of inbound message:
107107
TL-B schema: `excesses#d53276db query_id:uint64 = InternalMsgBody;`
108108
`query_id` should be equal with request's `query_id`.
109109

110+
### `forward_payload` format
111+
112+
If you want to send a simple comment in the `forward_payload` then the `forward_payload` must starts with `0x00000000` (32-bits unsigned integer equals to zero) and the comment is contained in the remainder of the `forward_payload`.
113+
114+
If 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).
115+
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.
116+
117+
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 hex dump if necessary).
118+
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.
119+
120+
If the `forward_payload` contains a binary message for interacting with the destination smart contract (for example, with DEX), then there are no prefixes.
121+
122+
These rules are the same with the payload format when simply sending Toncoins from a regular wallet ([Smart Contract Guidelines: Internal Messages, 3](https://ton.org/docs/#/howto/smart-contract-guidelines?id=internal-messages)).
123+
110124
### 2 `get_static_data`
111125
**Request**
112126

@@ -276,3 +290,4 @@ We are grateful to the [Tonwhales](https://github.com/tonwhales) developers for
276290

277291
[30 Jul 2022](https://github.com/ton-blockchain/TIPs/issues/62#issuecomment-1200095572)
278292

293+
31 Aug 2022 - Added `forward_payload` format.

text/0074-jettons-standard.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ If `forward_amount` is equal to zero, notification message should not be sent.
102102
TL-B schema: `excesses#d53276db query_id:uint64 = InternalMsgBody;`
103103
`query_id` should be equal with request's `query_id`.
104104

105+
#### `forward_payload` format
106+
107+
If you want to send a simple comment in the `forward_payload` then the `forward_payload` must starts with `0x00000000` (32-bits unsigned integer equals to zero) and the comment is contained in the remainder of the `forward_payload`.
108+
109+
If 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).
110+
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.
111+
112+
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 hex dump if necessary).
113+
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.
114+
115+
If the `forward_payload` contains a binary message for interacting with the destination smart contract (for example, with DEX), then there are no prefixes.
116+
117+
These rules are the same with the payload format when simply sending Toncoins from a regular wallet ([Smart Contract Guidelines: Internal Messages, 3](https://ton.org/docs/#/howto/smart-contract-guidelines?id=internal-messages)).
118+
105119
#### 2. `burn`
106120
**Request**
107121

@@ -233,3 +247,7 @@ Distributed architecture "One wallet - one contract" well described in the [NFT
233247
# Future possibilities
234248

235249
There was an idea to implement [external message tokens](https://t.me/ton_overview/35) (by [EmelyanenkoK](https://github.com/EmelyanenkoK)).
250+
251+
# Changelog
252+
253+
31 Aug 2022 - Added `forward_payload` format.

0 commit comments

Comments
 (0)