I've come acrossed an article, Signing and Verifying Messages in Ethereum, where it says that you can pay for other user's gas transactions but so far I haven't seen any implementation or tutorial on how to use it on a Dapp.

My primary use of this smart contract is to pay transaction fees with my address for the user in my Dapp. Is there an example of how to use the smart contract for a dapp?

Example: A simple ethereum dapp that writes a text on the blockchain but the creator of the contract pays for the transaction fees for a user that owns 0 ETH.

I really hope this is possible.

1 Answer 1


You can just write the messages to the blockchain on the backend using your private key.

If you need to be able to prove a given account wrote the message, have the user sign it first with their account's private key.

  • The signed message could be the data that I write to the blockchain right? (A string, uint, array) Also when the user gives me the signed message, do I pay for the gas automatically or I still have to approve it?
    – Aeriel
    Oct 19, 2018 at 3:50
  • The signed message is just a bunch of bytes. You'll pay for gas if/when you make a transaction.
    – user19510
    Oct 19, 2018 at 3:51

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.