Questions tagged [web3py]

Web3.py is a library for interacting with EVM based blockchains and smart contracts in Python.

For more information see Web3.py documentation.

Web3.py is maintained by Ethereum Foundation.

578 questions
2
votes
1 answer

Web3.py transactions are not broadcast on Ethereum Rinkby testnet

I am using the web.py code below to try and send a transaction with 1 ETH on the Rinkeby testnet via a local geth node. I can see the transactions as submitted in live local ethereum node log stream, but they don't ever seem to be broadcast to the…
Initial Commit
  • 497
  • 3
  • 14
2
votes
1 answer

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…
Abdullah Ahmed Ghaznavi
  • 1,978
  • 3
  • 17
  • 27
2
votes
1 answer

How to transfer tokens between wallets using geth

I've been struggling for the last couple of days trying to make a transfer of a customized token between 2 ethereum wallets. I am using populus (python) and It seems to be quite easy to make an ETH transfer but I couldn't understand how to do the…
Pedro Lobito
  • 94,083
  • 31
  • 258
  • 268
2
votes
1 answer

Unable to unlock account with Parity and Web3 on the testnet

I'm running a local Parity node for the testnet (Ropsten) on Debian (Jessie). I'm using web3.py to connect to this node and create transactions. I've created a new account: parity account new --chain ropsten I'm running my parity node with the…
Timon
  • 2,682
  • 1
  • 20
  • 33
1
vote
1 answer

Connecting 3rd party nodes to Bitcoinlib

I have this node endpoint that requires JSON-RPC payload: https://btc.getblock.io/my_api_key/testnet/ I have not been able to connect this node to the Bitcoinlib Python module. I have tried to connect this node to the Bitcoinlib module. I however…
Fluxx
  • 15
  • 4
1
vote
1 answer

How to get web3py transaction complete

Where is a mistake? while True: balance = w3.eth.get_balance(pubadd) gasPrice = w3.to_wei('55', 'gwei') gasLimit = 2000000 nonce = w3.eth.get_transaction_count(pubadd) tx = { 'nonce': nonce, …
areza
  • 11
  • 1
1
vote
1 answer

Getting DNS data from ENS using `web3.py`

I am trying to get the DNS records for an ETH domain name, e.g. get the IPv4 addresses for james.eth I have web3.py installed & working & have an RPC account with Alchemy set up & working. I can get the block address of a ETH name, but I can't find…
James Stevens
  • 374
  • 2
  • 8
1
vote
1 answer

Create an account on polygon pos blockchain using python

I want to get the mnemonics to create the phrase key; the private key from the mnemonics and the address. I tried using web3.py and it was creating a node in Ethereum blockchain which was accessible in the polygon testnet but wanted to do that in…
1
vote
1 answer

AsyncEventFilterBuilder.deploy raises "Invalid web3 argument" when provided with AsyncWeb3 instance

Providing an instance of AsyncWeb3 to async event builder AsyncEventFilterBuilder.deploy(AsyncWeb3) raises ValueError: Invalid web3 argument: got:
adam
  • 159
  • 9
1
vote
0 answers

Python web3 OneSplit (1inch) contract SWAP error: Fail with error 'SafeERC20: low-level call failed'

I'm trying to execute a swap by Onesplit contract at: 0xC586BeF4a0992C495Cf22e1aeEE4E446CECDee0E Here is my Python (web3) code: transaction = onesplit_abi_contract.functions.swap( '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', #WETH…
1
vote
0 answers

ContextualVersionConflict error message when using "web3" on google colab

pip install protobuf==4.21.6 Successfully installed protobuf-4.21.6 pip install web3 Successfully installed pip freeze | grep protobuf protobuf==4.21.6 from web3 import…
1
vote
1 answer

Web3.py contract owner address return null address

I am trying to get the owner's address of a contract, but the address is always coming back with a 0x0000000000000000000000000000000000000000 address. Can someone validate if I am missing something in my code to be able to parse the address? The API…
Geo
  • 3,160
  • 6
  • 41
  • 82
1
vote
1 answer

How to decode transaction log data

With Python, how can I decode the topics from an Ethereum transaction log? rec = w3.eth.getTransactionReceipt('0x034...').logs #reading the logs of a transaction rec[4]["topics"] Getting HexBytes, how to convert that into a human readable…
Peter
  • 11
  • 2
1
vote
1 answer

web3.py function get_block tranactions is not in the current block

I want to synchronize all transactions with the database, so I use get_ Block method. The code is as follows: cur_block_num = web3.eth.get_block_number() if cur_block_num <= last_block_num: return res =…
zl zero
  • 13
  • 2
1
vote
1 answer

Can enum be extended in upgradeable contract?

Can enum be extended in upgradeable contract, adding new value into the enum? If it can be extended, what are the consideration I should do before extending the enum?