D
D
drveb12020-05-23 14:35:59
blockchain
drveb1, 2020-05-23 14:35:59

How to find out the amount of commission in a smart contract BEFORE a transaction?

Hello!
Tell me, is it possible to find out the size of the commission in a smart contract before making a transaction? For example, a user requests a certain amount from a smart contract to his wallet. The smart contract checks what the commission is now and subtracts this commission from the amount. Only after that the money is transferred to the Client's Wallet. The client receives his amount minus the commission.

If this is not possible, then it turns out that in the future there is always a risk of an error. For example, we are embedded in the contract that the commission is $ 3. But it may be that in fact the commission at some point in time will not be $3, but $10. An error will occur because $3 is written in the contract.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-05-23
@dimonchik2013

see the answer here
Who pays the fee in the smart contract?
so that there are no errors and the loot does not freeze - write the contract correctly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question