To onboard users to a project quickly, I want to build my own little Rinkeby-faucet where users with new accounts (0 ETH) can get a bit of ETH by clicking a button.

However, just calling the requestDrip() function causes upfront costs and a 0-ETH user can't call it:

pragma solidity ^0.5.0;

contract MyFaucet {
  function () external payable {}

  function requestDrip() public {
    msg.sender.transfer(0.01 * 1000000000000000000);

Is there a way I can let the smart contract pay for this users transaction costs? Or is there any other strategy to let 0-ETH users request funds on a smart contract directly?

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.