Skip to content

Conversation

skywardboundd
Copy link
Collaborator

@skywardboundd skywardboundd commented Sep 26, 2025

Closes #104

@skywardboundd skywardboundd linked an issue Sep 26, 2025 that may be closed by this pull request
@skywardboundd skywardboundd marked this pull request as ready for review September 26, 2025 19:06
Copy link
Collaborator

@Shvandre Shvandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Collaborator

@Shvandre Shvandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add some code examples from SBT implementation

Copy link

github-actions bot commented Oct 7, 2025

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --quiet --silently-ignore standard/tokens/sbt/how-works.mdx 

Copy link
Collaborator

@verytactical verytactical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the time article explains how to "prove ownership", I still have no idea what am I proving ownership of. The article is supposed to explain how SBTs work.

Code samples requested above can actually be separated into "how to" articles.

@verytactical
Copy link
Collaborator

Please fill out PR title and description.

@verytactical verytactical marked this pull request as draft October 10, 2025 15:38
Copy link

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --silent --silently-ignore standard/tokens/sbt/how-works.mdx 

Copy link

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --silent --silently-ignore standard/tokens/sbt/how-it-works.mdx 

Copy link

Thanks for the updates to the SBT docs. I found a couple of high‑severity formatting/terminology issues that should be addressed before merge.

Findings (2)

High (2)

[HIGH] Code identifier uses incorrect name and formatting

Location: https://github.com/tact-lang/mintlify-ton-docs/blob/536670015910fb5e95a7322b681c88828f5b769f/standard/tokens/sbt/how-it-works.mdx?plain=1#L16-L17

Description:
The note refers to the field as query id (with a space), while the TL‑B schema on this page and typical usage elsewhere use query_id (underscore). Code identifiers and field names should appear in code font with exact spelling to avoid confusion and ensure copy/grep fidelity. The mismatch is visible alongside the TL‑B block that uses query_id.

Suggestion:

- **Nota bene: in all schemes below you will see the `query id` field. Nowadays the field is almost deprecated, and protocols itself doesn't need it.
+ **Nota bene: in all schemes below you will see the `query_id` field. Nowadays the field is almost deprecated, and protocols itself doesn't need it.

[HIGH] Types/identifiers in tables lack code font and incorrect casing

Location: https://github.com/tact-lang/mintlify-ton-docs/blob/536670015910fb5e95a7322b681c88828f5b769f/standard/tokens/sbt/how-it-works.mdx?plain=1#L48-L55

Description:
In the “Ownership proof” table, type names appear as plain text (e.g., uint64, MsgAddress, Cell, Bool), and one occurrence uses the wrong case and form (“maybe Cell”). Types and identifiers should use code formatting with exact case; the corresponding TL‑B shows content:(Maybe ^Cell). Inconsistent formatting and casing reduce clarity and hinder copy/scan workflows.

Suggestion:
Wrap type names in backticks and fix casing to match TL‑B terminology (e.g., uint64, MsgAddress, Cell, Bool, uint256, Maybe Cell). Example for the incorrect row:

- | `content`    | maybe Cell | SBT content if it was requested with `with_content=true`. 
+ | `content`    | `Maybe Cell` | SBT content if it was requested with `with_content=true`.

Notes:

  • Apply backticks consistently to Type cells in this table for uint64, MsgAddress, Cell, Bool, and uint256.

Copy link

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --silent --silently-ignore standard/tokens/sbt/how-it-works.mdx standard/tokens/sbt/overview.mdx 

Copy link

Thanks for the updates to the SBT documentation under standard/tokens/sbt. One style fix is needed before merge.

Findings (1)

High (1)

[HIGH] Types in tables lack code formatting

Location: https://github.com/tact-lang/mintlify-ton-docs/blob/ee9d8c7e890eed1fca3396a4cdb303391a40e452/standard/tokens/sbt/how-it-works.mdx?plain=1#L41-L44

Description:
In the “Type” column of multiple tables, code identifiers (e.g., uint64, MsgAddress, Cell, Bool, and “maybe Cell”) appear as plain text. Per style guide 6.3, code, filenames, paths, API endpoints, flags, and literals must use code formatting, which is a HIGH requirement (see https://github.com/tact-lang/mintlify-ton-docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L270). The same issue appears in other tables at L48–L55, L89–L106, L132–L141, and L169–L171.

Suggestion:
Wrap type identifiers in backticks. Example for the first table:

- | `query_id`        | uint64     | Links the request `prove_ownership` and the response `ownership_proof` to each other. To ensure this process works correctly, always use a unique query ID. |
- | `dest`            | MsgAddress | Address of the target contract to receive the proof.                                                                                                        |
- | `forward_payload` | Cell       | Arbitrary data forwarded to the target contract.                                                                                                            |
- | `with_content`    | Bool       | If `true`, attach SBT `content`.                                                                                                                            |
+ | `query_id`        | `uint64`   | Links the request `prove_ownership` and the response `ownership_proof` to each other. To ensure this process works correctly, always use a unique query ID. |
+ | `dest`            | `MsgAddress` | Address of the target contract to receive the proof.                                                                                                      |
+ | `forward_payload` | `Cell`     | Arbitrary data forwarded to the target contract.                                                                                                            |
+ | `with_content`    | `Bool`     | If `true`, attach SBT `content`.                                                                                                                            |

Apply the same backtick formatting to all “Type” cells in the tables at L48–L55, L89–L106, L132–L141, and L169–L171.

Copy link

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --silent --silently-ignore standard/tokens/sbt/how-it-works.mdx standard/tokens/sbt/overview.mdx 

Shvandre
Shvandre previously approved these changes Oct 13, 2025
Copy link
Collaborator

@Shvandre Shvandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it

Copy link
Collaborator

@anton-trunov anton-trunov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's fix the overview page too

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why empty and not deleted?


## Prove ownership

Allows the `owner` to ask the SBT to send a proof to a target contract confirming that they own this SBT. You may include arbitrary `forward_payload` and optionally attach `content`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Allows the `owner` to ask the SBT to send a proof to a target contract confirming that they own this SBT. You may include arbitrary `forward_payload` and optionally attach `content`.
Allows the owner to ask the SBT to send a proof to a target contract confirming that they own this SBT. You may include arbitrary `forward_payload` and optionally attach `content`.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

who allows?


The `owner` is set at mint time and never changes. Below is a simple explanation of the key operations and their message flows.

## Prove ownership
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this should go into "Internal messages" subsection

| `owner` | `MsgAddress` | Current owner address. |
| `data` | `Cell` | Custom data forwarded to the target contract, equal to `forward_payload`. |
| `revoked_at` | `uint64` | Revoke time if SBT is revoked, `0` otherwise. |
| `content` | `maybe Cell` | SBT content if it was requested with `with_content=true`. |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `content` | `maybe Cell` | SBT content if it was requested with `with_content=true`. |
| `content` | `Maybe Cell` | SBT content if it was requested with `with_content=true`. |

Comment on lines 122 to 128
```tlb title="TL-B"
;; Internal message to SBT
destroy#1f04537a query_id:uint64 = InternalMsgBody;
;; Excess returned to the sender
excesses#d53276db query_id:uint64 = InternalMsgBody;
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split onto two schemas and describe separately

end
```

### Quick field reference
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaiu, the contract storage is not part of the TEP

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skywardboundd skywardboundd marked this pull request as draft October 14, 2025 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Tokens > SBT]

4 participants