Bigbrotheriswatchingu
Bigbrotheriswatchingu

Reputation: 11

Everscale blockchain. difference between tvm.rawReserve and tvm.accept

I can't find in any way what is the difference between tvm.rawReserve(address(this).balance, 0) и tvm.accept()?

Upvotes: 0

Views: 145

Answers (1)

ilyar
ilyar

Reputation: 1401

Before executing a smart contract:

  • the total amount of ever on the contract address and those who came with message is considered (for external message 0, for internal how many were sent)
  • storage fee is deducted from this amount
  • execution of the smart contract begins

For payment for the execution of a smart contract, it is always debited from the account balance.

if it is an external message (and 0 coins were transferred with it) that is, a small credit for which you can check the require and, if something is wrong, cancel the transaction. in this case, nothing will be removed from the account balance.

If the checks were successful and it is necessary to execute the rest of the function code, payment for the execution of the transaction is made from the balance of the contract:

Upvotes: -1

Related Questions