Issue
please am a newbie in solidity I have been trying to make the transfer not to work if the wallet holding the token does not transfer ether to an address i will specify in my code thanks in advance.
Solution
- Smart contract cannot ask users to get tokens or eth, you should program your DApp or Front End for asking transaction fee.
- you can set something like require(msg.value==transactionFee) followed by payable(AddressToCollectFees).transfer(msg.value) in the function of smart contract
Answered By - 8nite Answer Checked By - Gilberto Lyons (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.