Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ jobs:
steps.changed-files.conclusion == 'success' &&
github.event_name == 'pull_request' &&
(
github.event.pull_request.head.repo.fork == true ||
github.event.pull_request.head.repo.full_name != github.repository
github.event.pull_request.head.repo.fork == false ||
github.event.pull_request.head.repo.full_name == github.repository
)
)
env:
Expand Down
28 changes: 15 additions & 13 deletions payments/jettons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,18 @@ When a transaction arrives at the deposit wallet:

After validation, extract deposit information:

- **For invoice-based deposits**: Parse the invoice ID from `forward_payload`, match it against the database, and credit the corresponding user account
- **For address-based deposits**: Match the `deposit-wallet` address against the database and credit the user account
- For [invoice-based deposits][inv-dep]: Parse the invoice ID from `forward_payload`, match it against the database, and credit the corresponding user account.
- For [address-based deposits][add-dep]: Match the `deposit-wallet` address against the database and credit the user account.

<Aside type="note">
Not production-ready code, use only for educational purposes
</Aside>
Not production-ready code, use only for educational purposes:

To understand invoice-based deposit approach in greater detail, see the following TypeScript implementation: [Invoice-based Jetton deposits](https://github.com/ton-org/docs-examples/blob/processing/guidebook/payment-processing/src/deposits/jetton-invoices.ts).
- [Invoice-based jetton deposits][inv-dep]
- [Unique address jetton deposits][add-dep]
</Aside>

For unique TypeScript implementation addresses see: [Unique address Toncoin deposit](https://github.com/ton-org/docs-examples/blob/processing/guidebook/payment-processing/src/deposits/jetton-unique-addresses.ts).
[inv-dep]: https://github.com/ton-org/docs-examples/blob/jetton-processing-only/guidebook/jetton-processing/src/deposits/jetton-invoices.ts
[add-dep]: https://github.com/ton-org/docs-examples/blob/jetton-processing-only/guidebook/jetton-processing/src/deposits/jetton-unique-addresses.ts

## Security considerations

Expand Down Expand Up @@ -144,10 +146,10 @@ Before enabling jetton processing in production:

### Testing

- [ ] Deploy and test on testnet with real user scenarios
- [ ] Verify master-wallet relationships for all allowlisted jettons
- [ ] Test with fake jetton wallets to confirm rejection
- [ ] Validate transfer notification parsing with various payload formats
- [ ] Test bounce detection and handling
- [ ] Test invoice ID collision and reuse scenarios
- [ ] Test full flow: deposit → credit → withdrawal → confirmation
1. Deploy and test on testnet with real user scenarios
1. Verify master-wallet relationships for all allowlisted jettons
1. Test with fake jetton wallets to confirm rejection
1. Validate transfer notification parsing with various payload formats
1. Test bounce detection and handling
1. Test invoice ID collision and reuse scenarios
1. Test full flow: deposit → credit → withdrawal → confirmation
12 changes: 2 additions & 10 deletions payments/toncoin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ Transaction comments in TON use the text message format; read more in [How TON w
- Some user wallet applications don't support comments, limiting accessibility
- Single wallet network load [won't be sharded](/foundations/shards)

<Aside type="note">
Not production-ready code, use only for educational purposes
</Aside>

To understand this approach in greater detail, see the following TypeScript implementation: [Invoice-based Toncoin deposits](https://github.com/ton-org/docs-examples/blob/processing/guidebook/payment-processing/src/deposits/invoices.ts).
Use the following TypeScript implementation for educational purposes only: [invoice-based Toncoin deposits](https://github.com/ton-org/docs-examples/blob/processing/guidebook/toncoin-processing/src/deposits/invoices.ts).

## Unique deposit addresses

Expand Down Expand Up @@ -139,11 +135,7 @@ Withdrawal processing must gather funds from multiple wallets. Either maintain a
- Withdrawal processing requires coordination across wallets
- Storage fees apply to each deployed contract (currently \~0.001 TON per year per contract)

<Aside type="note">
Not production-ready code, use only for educational purposes
</Aside>

To understand this approach in greater detail, see the following TypeScript implementation: [Unique address Toncoin deposits](https://github.com/ton-org/docs-examples/blob/processing/guidebook/payment-processing/src/deposits/unique-addresses.ts).
Use the following TypeScript implementation for educational purposes only: [unique address Toncoin deposits](https://github.com/ton-org/docs-examples/blob/processing/guidebook/toncoin-processing/src/deposits/unique-addresses.ts).

## Withdrawal batching

Expand Down
2 changes: 1 addition & 1 deletion standard/wallets/performance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The following benchmarks compare gas consumption and throughput across different
The benchmarks measure the gas consumed by the wallet contract itself, including `fwd_fee` and gas costs. The final transaction fee may vary depending on the destination address and message processing requirements. Each benchmark includes theoretical and real-time measurements: theoretically, messages can be sent every 3-5 seconds when a new block appears, but in practice, messages can be sent every 12-14 seconds due to network conditions and block confirmation times.

<Aside type="note">
The complete benchmark source code and test suite is available on [GitHub repository](https://github.com/ton-org/docs-examples/tree/main/standard/wallets/comparison/)
The complete benchmark source code and test suite are available in the [`docs-examples` GitHub repository](https://github.com/ton-org/docs-examples/tree/9-wallet-bench/standard/wallets/comparison).
</Aside>

<Aside
Expand Down