-
Notifications
You must be signed in to change notification settings - Fork 12
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
Proposal to include information about the gas fee #1
Comments
In the case of external messages you need to accept the message in order to make transaction appear in the block (or, more precisely speaking, you need to somehow set gas credit to zero). You can accept message at any time during the TVM execution, even after calling In the case of internal messages the initial gas limit is set equal to the amount of gas that can be bought by message value. |
@akifoq Then perhaps a good practice for internal messages would be to use |
It doesn't help and the gas limit is by default set in such way. Gas fees are the fees on computation only. You can use small amount of gas, but send a message with large amount of coins. You can use |
@akifoq thanks for the detailed answer! |
A lot of users ask how gas fees are charged in TON smart contracts.
That's why I propose to include information about it in this repository.
Logical inference:
There is no point in calling
accept_message()
within the internal message, since the gas fees come with the TONs that came with the transaction.(Suggestion: if
accept_message()
in internal, it will allow to use the balance of the contract)Within external message, the payment for gas only goes for transactions that change something in the blockchain(the rest is free). It need to call
accept_message()
after "all checks", before changing something in blockchain(like contract storage or for examplesend_raw_message()
)The text was updated successfully, but these errors were encountered: