2

I am new to ethereum. I have a few questions.

  1. Should I pre-buy gas to effect ethereum transactions? Or can I just set what is the gas price I am willing to pay so that at the time of transaction the gas will be purchased automatically and deducated from the original transaction amount?

  2. When I am doing an ERC20 token transaction, should I still have enough GAS in my account or can I use ERC20 token to buy the gas live at the time of transaction? Can you help?

3

Gas is not an asset like Ether and you can't pre-buy it. It will only be "bought" when you issue a transaction. Furthermore, you can't "buy" gas with tokens - only with Ether.

You can't think of gas as an asset that is held in your wallet or something like that. It's only a means to pay for transactions.

You should read more about gas for example here: What is meant by the term "gas"?

  • Is there a way, I can collectively address small amounts of ethereum/erc20 tokens stored in 100s of accounts together? My purpose is that I may have 1000 different address storing .0001 value ETH, can I transfer all these ETHs together with a single transaction? – Jab2Tech Sep 4 '18 at 9:41
  • The problem I face, for a project, I may need to create multiple addresses, which may accept eth or erc20 tokens. But the tranasctions(Trasnfer IN) to those multiple addresses are expected to be very small. And some of the addresses even need not have ETH transferred in. So I can't easily transfer OUT the token, without adding gas to the account. Which means, even more gas. Is there a way, in ethereum, I can have have all these multiple addresses tagged to a single private key, so that I can transfer with the gas stored from the common private key? – Jab2Tech Sep 4 '18 at 9:43
  • No you can't combine accounts in any way. This is a common question around here - just search around a bit and you'll find plenty of answers. If they don't fit your needs, please submit a new question. Asking new questions in comment section is discouraged. – Lauri Peltonen Sep 4 '18 at 9:47
  • thanks Lauri, for letting me know. I am new to this site! – Jab2Tech Sep 4 '18 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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