hi everyone? how can i calculate fee for transaction in ton blockchhain?
and does ton blockchain has refund?

May 6, 2023, 9:15 AM
Example:

https://github.com/tonkeeper/tonkeeper-web/blob/b22bbd7d7e4bdd852467fd69bbb52b539e509590/packages/core/src/service/transfer/tonService.ts#L92
May 6, 2023, 9:19 AM
Thanks. How about python? :)
And if i set much fee for a transaction will the extra amount come back to my wallet?
May 6, 2023, 9:23 AM
In ton transaction fee amount is fixed, and charge automatically when you send transaction.
You can’t set much fee
In case you would like to handle income amount in target smart contract, you should develop it on a smart contract level, in func or tact languages
For example NFT contract

https://github.com/ton-blockchain/token-contract/blob/991bdb4925653c51b0b53ab212c53143f71f5476/nft/nft-item.fc#L91
May 6, 2023, 9:32 AM
Actually i try to send all the balance of a wallet to another(to empty the wallet). So i should calculate the fee to send the rest of the balance. I mean:
Balance = Fee amount + transfer amount
If i send all the balance the transaction will not be successful and if i don't set the fee truly there will be a small amount remaining in the wallet
In my use case there is no NFT or smart contracts. It is a simple wallet that has toncoin
May 6, 2023, 9:53 AM
use send mode 128 to send all remaining balance
May 6, 2023, 9:55 AM
Thank you. This solved the problem 👍
https://testnet.tonscan.org/address/EQATHECZlczqHatAyjAwZLStuJtdaXnha1rKaYZ72gqAlTV6

Look at this wallet.in the last transaction I got 2 tons as faucet. But the wallet balance is less than 2. What happened?
Before faucet the balance was zero.
May 6, 2023, 11:29 AM
Fee
May 6, 2023, 11:33 AM
It is an incoming transaction. How can it be fee?
May 6, 2023, 11:36 AM
storage fee + gas fee
May 6, 2023, 11:36 AM
How can i get all possible send modes and their meanings ?
May 6, 2023, 6:19 PM
https://docs.ton.org/develop/func/stdlib/#send_raw_message
May 6, 2023, 6:20 PM
Thanks 🥳
May 6, 2023, 6:23 PM

© 2024 Draquery.com All rights reserved.