-
Notifications
You must be signed in to change notification settings - Fork 1
sbt-how-it-works #494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
sbt-how-it-works #494
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this 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
To fix the formatting issues:
npx remark -o --quiet --silently-ignore standard/tokens/sbt/how-works.mdx |
There was a problem hiding this 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.
Please fill out PR title and description. |
To fix the formatting issues:
npx remark -o --silent --silently-ignore standard/tokens/sbt/how-works.mdx |
To fix the formatting issues:
npx remark -o --silent --silently-ignore standard/tokens/sbt/how-it-works.mdx |
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 formattingDescription: 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 casingDescription: Suggestion: - | `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:
|
To fix the formatting issues:
npx remark -o --silent --silently-ignore standard/tokens/sbt/how-it-works.mdx standard/tokens/sbt/overview.mdx |
Thanks for the updates to the SBT documentation under Findings (1)High (1)[HIGH] Types in tables lack code formattingDescription: Suggestion: - | `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. |
To fix the formatting issues:
npx remark -o --silent --silently-ignore standard/tokens/sbt/how-it-works.mdx standard/tokens/sbt/overview.mdx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it
There was a problem hiding this 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
There was a problem hiding this comment.
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?
standard/tokens/sbt/how-it-works.mdx
Outdated
|
||
## 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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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`. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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`. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `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`. | |
```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; | ||
``` |
There was a problem hiding this comment.
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
standard/tokens/sbt/how-it-works.mdx
Outdated
end | ||
``` | ||
|
||
### Quick field reference |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have in standard what we should do with vars, for example in
https://github.com/ton-blockchain/TEPs/blob/0d7989fba6f2d9cb08811bf47263a9b314dc5296/text/0085-sbt-standard.md?plain=1#L108
Closes #104