0

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.

1
  • 1
    The first answer to that question includes the use of Metamask, the second does not. Commented Feb 19, 2018 at 15:08

1 Answer 1

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

8
  • @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. Commented Feb 19, 2018 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
    Commented Feb 19, 2018 at 15:08
  • @hakusaro, If we don't want to run geth client, how will connect eth network? We need to trust sone one. Commented Feb 19, 2018 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
    Commented Feb 19, 2018 at 15:24
  • 1
    Thanks, I solved it using eth-js-provider-signer which uses a combination of infura and private key. Commented Feb 22, 2018 at 7:33

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