0

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.

3
  • You need to familiarize yourself with the gas concept in Ethereum. steemit.com/ethereum/@tomshwom/ethereum-gas-how-it-works Commented Apr 4, 2018 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
    Commented Apr 6, 2018 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 Commented Apr 6, 2018 at 7:20

1 Answer 1

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.

4
  • 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
    Commented Apr 6, 2018 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? Commented Apr 6, 2018 at 4:43
  • I m talking about metamask popup and I m using web3.js.
    – Kartikey
    Commented Apr 6, 2018 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. Commented Apr 6, 2018 at 6:48

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