0

How using Web3 in geth client to conect to the private blockchain when i use

var web3 = new Web3(new Web3.providers.HttpProvider(" http://alexyy73n.northeurope.cloudapp.azure.com:8545"));

enter image description here

So how can i connect to the chain and interact with contracts? With metamask all works fine. But need to do client part. And connect it with azure blockchain.

1 Answer 1

2

Are you trying to connect with code or with a Geth node?

If you just want to connect use:

$ geth attach http://[ipaddress]:8545

If you want to add a node to the Azure based blockchain you will have to use the same Genesis JSON file which can be found here:

This is the default Genesis block used by Azure to provision the Ethereum blockchain.

2
  • I have a scenario where I wanted to connect from code. So how would I do it?
    – Adheep
    Jul 10, 2017 at 14:25
  • How did you solve this ?
    – NaN
    Feb 22, 2018 at 4:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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