Skip to content
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

readForwardFee misdescription #1869

Open
Shvandre opened this issue Feb 17, 2025 · 1 comment
Open

readForwardFee misdescription #1869

Shvandre opened this issue Feb 17, 2025 · 1 comment
Assignees
Labels
docs: Reference /ref section of the docs: API reference, standard libraries, specification and evolution kind: bug Something isn't working or isn't right kind: docs Documentation for docs.tact-lang.org kept in docs folder
Milestone

Comments

@Shvandre
Copy link
Contributor

https://docs.tact-lang.org/ref/core-advanced/#contextreadforwardfee

It says that it reads forward fee from incoming message. But more accurate description could be
"It reads forwardFee from the incoming message and estimates forward + action fee" or smth like that.
(Because it actually multiplies forwardFee on 3/2 approx.)

@Shvandre Shvandre added the docs: Reference /ref section of the docs: API reference, standard libraries, specification and evolution label Feb 17, 2025
@novusnota novusnota self-assigned this Feb 17, 2025
@novusnota novusnota added the kind: docs Documentation for docs.tact-lang.org kept in docs folder label Feb 17, 2025
@novusnota novusnota added this to the Doc: 2025-02 milestone Feb 17, 2025
@novusnota
Copy link
Member

novusnota commented Feb 19, 2025

I've peeked into TON sources, and the note in code (and in TON Docs) on fwd_fee * 2^16 / first_frac is also incorrect. This happens instead: floor(fwd_fee * 2^16 / (2^16 - first_frac)).

I'll adjust docs of Context.readForwardFee() and getOriginalFwdFee().

@novusnota novusnota added the kind: bug Something isn't working or isn't right label Feb 19, 2025
@novusnota novusnota modified the milestones: Doc: 2025-02, Doc: 2025-03 Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs: Reference /ref section of the docs: API reference, standard libraries, specification and evolution kind: bug Something isn't working or isn't right kind: docs Documentation for docs.tact-lang.org kept in docs folder
Projects
None yet
Development

No branches or pull requests

2 participants