Linked Questions

24
votes
5answers
17k views

Paying a transaction fee with an ERC20 token

As far as I understand, one of the ERC20 token's features is that you can pay a transaction fee with it. In other words, you can send them without having Ether. I transferred REP tokens to the ...
10
votes
4answers
3k views

How to make someone else pay for Gas?

My understanding is that msg.sender pays the gas fee. Can a smart contract be written in such a way that it's always the contract owner who pay the fees? As an example, in an ERC20 token when someone ...
13
votes
3answers
4k views

Do users of ERC20 coins need to hold Ether?

Suppose there exists Fancycoin, an ERC20 altcoin which has some functionality implemented by the EVM. It does some nontrivial things that take up gas. According to my understanding, I can receive ...
7
votes
2answers
4k views

How to manipulate data in a Solidity smart contract?

I have a smart contract with some members which should get modified on certain events. For simplicity, let's imagine we have a greeter contract. If I call greeter.greet() in the JavaScript console, ...
2
votes
2answers
1k views

How do I pay gas on behalf of users?

I have a mobile app that has users who generate transactions. Basically if a user wants to turn on their TV, they press a button in the app, and that should 1) Run code in a smart contract to verify ...
0
votes
2answers
49 views

Ho can a server act for third party?

I will try to explain my idea. Our server receive data to save from different servers, we call it S1, S2 and S3. Our server uses a node script with web3.js to call function over a contract. Actually ...
3
votes
1answer
78 views

Is there any case where a contract will use gas?

I was wondering, why and when is it important to fund your contract with ether? Is this really only ever if you want to send ether from your contract? Does a contract ever need to pay gas for ...
3
votes
1answer
95 views

Can I buy the gas within the contract code? [duplicate]

The contract contains ether. Can I buy the gas within the contract code?
2
votes
1answer
161 views

If a smart contract automatic transfer its ether to it's benificiary accounts then who will pay gas price (transaction cost) for this transfer?

I am writing a smart contract of a charity.It pay all the money to it's subscribers in every week. I am puzzled in such point that who will pay the transaction cost of transfer? When I am ...
2
votes
1answer
287 views

Possible to use gas from the balance of a contract?

When calling an external contract function from within a contract, does the gas come from the originating transaction? If so, is there a way to use gas from the contract's balance? example call: ...
2
votes
1answer
961 views

Can transaction fee be paid by 3rd account? [duplicate]

I have a scenario like that: I have a "Main" account with ethereum client: And there are other two accounts, lets call them: "A" and "B" "A" account will send to "B" account some token (ecr20 token)...
1
vote
1answer
19 views

Is it possible that the contract pays to store data coming from an address with no eth?

So the ideia is like this: contract MyContract { uint mydata; function setData1(uint _data) public { mydata = _data; //normal way (msg.sender pays to store _data in mydata (msg....

15 30 50 per page
1
2