Skip to content

[mkdocs] docs: add transfer xem tutorial#883

Open
zero4862 wants to merge 3 commits into
NemProject:new-docsfrom
zero4862:docs-transfer-xem
Open

[mkdocs] docs: add transfer xem tutorial#883
zero4862 wants to merge 3 commits into
NemProject:new-docsfrom
zero4862:docs-transfer-xem

Conversation

@zero4862
Copy link
Copy Markdown

@zero4862 zero4862 commented Jun 3, 2026

Adapts the transfer transaction tutorial to NEM.

Note: We'll have a separate one for transferring mosaics.

Comment thread mkdocs/pages/en/devbook/transactions/transfer-xem.md
Comment thread mkdocs/pages/en/devbook/transactions/transfer-xem.md
@zero4862 zero4862 marked this pull request as ready for review June 3, 2026 09:25
@zero4862 zero4862 requested a review from segfaultxavi June 3, 2026 09:25
[mkdocs] docs: clean code
@zero4862 zero4862 force-pushed the docs-transfer-xem branch from 41c3ab1 to d054e4b Compare June 3, 2026 09:31
Comment thread mkdocs/pages/en/devbook/transactions/transfer-xem.md
Copy link
Copy Markdown
Contributor

@segfaultxavi segfaultxavi left a comment

Choose a reason for hiding this comment

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

Minor changes

Comment thread mkdocs/snippets/devbook/transactions/transfer_xem.mjs
Comment thread mkdocs/pages/en/devbook/transactions/transfer-xem.md

{{ tutorial.code_snippet_tagged('step-2') }}

The snippet defines the transfer amount in the `xem` variable, loaded from the `XEM_AMOUNT` environment variable.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The code assumes that XEM_AMOUNT is an integer, so the text should mention it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good catch. I'm replacing it with a float since that seems like a common use case (e.g. transferring 1.5 XEM).

Instead of floating with network demand, NEM uses a fixed, published schedule, so the fee can be calculated in
advance without contacting a node.

For an XEM transfer, the fee depends only on the amount being sent:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ugh, I had no idea!
We definitely need to explain this in the Textbook, in a section about fees.
You can just move this description there and link it from here. And add the message cost, I guess.

And the regular transactions page in the Textbook also needs a section about fees :(

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agree, and it gets way more complex when transferring non-XEM mosaics. I'm updating the textbook with all those learnings.

Comment thread mkdocs/pages/en/devbook/transactions/transfer-xem.md
Comment thread mkdocs/pages/en/devbook/transactions/transfer-xem.md
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.

2 participants