0

good day. I'm new to smart contracts and couldn't figure something out.

I am using the following contract for ERC20 token transfer. Actually, everything works fine, there are transfers, but what I want is a "transaction fee" other than the "gas" deduction. Think of it like this when sending money from your bank account to another bank account. For example, 3% deducts a "processing fee".

Is there a way to do this? For example, my account address will be in the contract.

100USDT will be transferred. A 3% portion? So $3 on the way to my purse address. The remaining $97 will be transferred.

I hope I was able to explain.

interface GeneratedInterface {
  function transfer ( address _to, uint256 _value ) external returns ( bool );
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.