0

This question already has an answer here:

I am trying to make a D'app. But I don't know how to fix this issue of paying gas every time. Do the user or owner need to pay everytime they use the application ? can we make it default gas by some API or code? Please give me a simple example how to make it for the end user.

marked as duplicate by Richard Horrocks, mirg, Eli Drion, Crissi Mariam Robert, Achala Dissanayake Apr 4 '18 at 14:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • You need to familiarize yourself with the gas concept in Ethereum. steemit.com/ethereum/@tomshwom/ethereum-gas-how-it-works – cleanunicorn Apr 4 '18 at 6:36
  • let's say if I have my own private key.And then i want to customize my application for myself Then how can I remove the popup. I mean the transaction should happen just in one click. where can I pass my private key and customized gas? – Kartikey Apr 6 '18 at 4:31
  • You can make your Dapp ask for your private key and it should be able to sign any transactions for you. But it's not a good idea because the Dapp will have complete control over your account – cleanunicorn Apr 6 '18 at 7:20
0

Every time a function on a smart contract is called which modifies data on the blockchain in some way, it uses Gas which the person calling that function must pay.

  • let's say if I have my own private key.And then i want to customize my application for myself Then how can I remove the popup. I mean the transaction should happen just in one click. where can I pass my private key and customized gas? blockcypher.com/dev/ethereum/#decode-raw-transaction-endpoint – Kartikey Apr 6 '18 at 4:32
  • this is probably too broad of a question. you need to provide more information. For example, what popup are you talking about? are you using web3? – AnAllergyToAnalogy Apr 6 '18 at 4:43
  • I m talking about metamask popup and I m using web3.js. – Kartikey Apr 6 '18 at 6:32
  • as far as I'm aware, there's no way to bypass the metamask popup from your web3.js code. This would be terribly insecure because it would allow malicious actors to authorise transactions from your account without you knowing! I don't even think there's a setting on metamask that allows you to disable it. – AnAllergyToAnalogy Apr 6 '18 at 6:48

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