There're custom jetton token which my contract is the owner, and I need to send jetton to other wallet, so I need to calculate the jetton_wallet_address on the fly, but the jetton's implementation is agnostic for my contract.

Nov 25, 2023, 7:01 AM
My previous (wrong) assumption is there's standrard & unified implementation for jettons, but it turns about to be wrong as @pcrafter suggested, so I need to change the architecture design to handle the uncertainty.
Nov 25, 2023, 7:03 AM
You don’t need recipient Jetton address to send jettons to him. Read TEP 74 - you need address of new owner (his main wallet), not his Jetton
https://t.me/tondev_eng/34329 or check this quick summary
Nov 25, 2023, 7:07 AM
Sorry, I might not be clear enought, I mean calculate the jetton_wallet_address owned by my_contract, not the receivers.
Nov 25, 2023, 7:09 AM
On chain (in contract) or off-chain (backend/server/…)?
Nov 25, 2023, 7:11 AM
Onchain
Nov 25, 2023, 7:11 AM
Do you need one project-specific Jetton or all jettons you own?
Nov 25, 2023, 7:12 AM
I could deploy my contract with jetton_wallt_address be null, then send jetton X to my contract, which would generate a new address and set the address to contract or generate the contract on the fly with jetton_master_address and jetton_wallet_code.

The jetton with each instance of my contract could be different.
Nov 25, 2023, 7:14 AM
I think making admin-transaction with correct address after initial deployment is the easiest way…
Nov 25, 2023, 7:21 AM
wallet contract doesn't handle bounced messages, so If Toncoin transfers out to some contract, the refund would only be possible if the receiver contract has the logic for sending it back when error happens, right?

https://github.com/ton-blockchain/wallet-contract/blob/main/func/wallet-v4-code.fc#L12
Nov 25, 2023, 8:49 AM

© 2024 Draquery.com All rights reserved.