question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autoconfigured web3

See original GitHub issue

What was wrong?

In code examples, and short scripts, it’s a real PITA to show the ramp-up needed to get web3 working. It conveys that things are going to be tedious (an unfair first impression, I hope):

from web3 import Web3, IPCProvider

w3 = Web3(IPCProvider())

How can it be fixed?

Instead, I would love to have an autoconfigured web3, especially for some default cases, like localhost on 8545, and the geth IPC file.

from web3.auto import w3

This could try to connect to IPC in common locations and then localhost:8545

Or if you are running both IPC and HTTP, and want to give it a hint, that might look like:

from web3.auto.http import w3

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
owockicommented, Nov 29, 2017

also @Sebohe i just made an executive decision that you work here is worth more than 0.01 ETH ( we funded the bounty very early in the project, before the real funding came in), so i’m going to tip you more than the bounty amount to close this out.

2reactions
gitcoinbotcommented, Oct 2, 2017

This issue now has a funding of 0.01 ETH (3.02 USDT) attached to it. To view or claim this funding, click here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

carver/web3utils.py: Convenience tools for web3.py - GitHub
Instant access to web3 and eth. Print your primary account balance, denominated in ether: from web3utils import web3, eth wei = eth.getBalance( ...
Read more >
web3utils - PyPI
Convenience tools for web3.py. ... autoset encoding of input value to `web3.sha3(value)`, if `type(value) == bytes` This handful of changes made for quicker ......
Read more >
Resolving Domains in Web Applications | UD Developer Portal
Resolution is a library for interacting with Web3 domain names. It can be used to retrieve ... Autoconfiguration of Blockchain Network.
Read more >
US Patent 07266090 Address autoconfiguration method for home ...
We're building a web3 version of Golden,. learn more at Golden.xyz. ⟶. ‌. US Patent 07266090 Address autoconfiguration method for home network.
Read more >
Building DApps with Ethereum: Creating, Deploying TNS ...
The constructor function is automatically called when a contract is deployed to an Ethereum network, so these values will be auto-configured ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found