0

This question already has an answer here:

I need to create several contracts on the click of a button. I cannot run a geth node. I am successfully able to do it via metamask but that results on too many transaction pop ups. Is there a way to create contract without running geth and without using metamask.

marked as duplicate by Richard Horrocks, Ismael, Achala Dissanayake, flygoing, eth Feb 22 '18 at 6:26

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.

  • 1
    The first answer to that question includes the use of Metamask, the second does not. – Richard Horrocks Feb 19 '18 at 15:08
0

Yes you can do.

I need to create several contracts on the click of a button. I cannot run a geth node.

Use https://infura.io/ for replacement of geth client. infura is free service.

I am successfully able to do it via metamask but that results on too many transaction pop ups. Is there a way to create contract without running geth and without using metamask.

For every method you need to estimate gas and get the current gas price. Use signTransaction() function to sign your transaction and send to eth network.

Contract address.transfer method gas cost

https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethestimategas

https://stackoverflow.com/questions/46611117/how-to-authenticate-and-send-contract-method-using-web3-js-1-0

  • @Nitika Goel I hope my ans is helped for some direction, If so can you mark as solved. So that new dev's will find ans very quickly. – Jitendra Kumar. Balla Feb 19 '18 at 15:05
  • Do you have any guarantee that Infura lets them actually sign and authenticate transactions without confirmation? I'm pretty sure that's what they want to do, and you haven't provided any documentation or links that imply that this service can actually perform the task. If they can't run a geth node, why do you think they can run some other type of node? – hakusaro Feb 19 '18 at 15:08
  • @hakusaro, If we don't want to run geth client, how will connect eth network? We need to trust sone one. – Jitendra Kumar. Balla Feb 19 '18 at 15:15
  • 1
    Look at Metamask as an example. It's a thin client -- it doesn't need any local node to accomplish contract deployments. From an end user perspective "it just works." Someone can install MM and have it working in 30 seconds to deploy contracts. It requires virtually no setup, compared to any node that requires installation and maintenance. – hakusaro Feb 19 '18 at 15:24
  • 1
    Thanks, I solved it using eth-js-provider-signer which uses a combination of infura and private key. – Nitika Goel Feb 22 '18 at 7:33

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