I would like to send some tokens (ERC20) and I was wondering is there some kind of way (command line, programmable way?) so that the receiver of tokens pays the gas in ETH? If not do you think that something like would be possible in the future?

Thanks very, very much.

  • I know this question is old - but curious if you ever solved this question? - tryin to implement this currently
    – James Daly
    Commented Sep 29, 2021 at 20:32

2 Answers 2


Short answer is no.

Detailed answer here: Ethereum gas explained

I am not aware of your idea, but you can calculate gas and request it back from the contract.

  • Thanks but how do I request gas price back from the contract?
    – Tomesupp
    Commented Jan 22, 2018 at 17:25
  • Hello @Tomesupp. Sorry, I meant to calculate estimated gas (no reason to calculate gas price.) So, you can: 1. calculate estimated gas - gas estimation 2. send tx -> get tx receipt -> get gas spent -> send tx with gas request
    – Vanja Dev
    Commented Jan 24, 2018 at 9:45

Or, alternatively what you can do is to have a withdraw function that can be called by the recipient. By this, the Gas will be consumed by the recipient, and the token distribution also will be done accordingly.


The high-level steps are outlined as below.

  1. Create Contract that has the state variable of address => value mapping.
  2. Assign values of which address to receive how many tokens.
  3. Create a function in which you validate the sender address is present in the mapped variable.
  4. If the person is assigned already (eligible), then call the token.transfer function to transfer the tokens from the token owner to the message sender.
  5. You will have to create a page which may use web3 service provider (preferably metamask) to execute the function call. When metamask used, the gas required to execute the transaction can be modified by the person that calls it and the transaction price will be of them.
  • Thanks for the answer, but how do I do that? What kind of withdraw function has to be called by recipient?
    – Tomesupp
    Commented Jan 22, 2018 at 17:24
  • Have edited the answer with outline steps. Check and let me know if you need further info.
    – Rajesh
    Commented Jan 23, 2018 at 5:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.