Abdullah Ahmed Ghaznavi
Abdullah Ahmed Ghaznavi

Reputation: 2099

How to connect web3 to main ethereum network using python?

I am using web3.py on my private/test network though:

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://private-ip:8545"))

For making connection to my private network i use this method and after performing all the oprations and testing i want to connect my API to main ethereum network.

So, my question is that how can i connect to main ethereum network ?

Upvotes: 2

Views: 1704

Answers (1)

user94559
user94559

Reputation: 60143

Just use the URL of a node in the main Ethereum network. That could be one you run or one someone else makes available publicly.

Infura runs one such public node.

Upvotes: 2

Related Questions