Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 01:07

    pacrob on master

    correct misspellings and update… (compare)

  • 01:07
    pacrob closed #2326
  • 01:07
    mrshu opened #2327
  • Jan 28 22:27

    kclowes on master

    Try out new py-evm requirements… Remove xfails for newly passing… Upgrade eth-account requirement and 2 more (compare)

  • Jan 28 22:27
    kclowes closed #2320
  • Jan 28 22:27
    kclowes closed #2295
  • Jan 28 22:22
    kclowes synchronize #2324
  • Jan 28 22:15
    kclowes edited #2324
  • Jan 28 22:03
    kclowes commented #1416
  • Jan 28 22:01
    kclowes synchronize #2320
  • Jan 28 21:49
    Shoelacez commented #557
  • Jan 28 21:48
    Shoelacez commented #557
  • Jan 28 21:48
    Shoelacez commented #557
  • Jan 28 21:38
    kclowes commented #2275
  • Jan 28 21:23
    abcdabcd987 commented #2275
  • Jan 28 20:04
    pacrob edited #2326
  • Jan 28 20:03
    pacrob review_requested #2326
  • Jan 28 20:03
    pacrob review_requested #2326
  • Jan 28 19:41
    pacrob edited #2326
  • Jan 28 19:40
    pacrob synchronize #2326
brschkv
@brschkv

maybe there is a difference how web3.py and web3.js construct the query

I hope I can make some time to look into that later.

brschkv
@brschkv
There's also an open issue for this already: ethereum/web3.py#1523
Nick Mudge
@mudgen
Mikko Ohtamaa
@miohtama
@mudgen The standard seems to propose a more complicate upgrade proxy. I read through quickly, but not really understand what's the unique selling point here.
good to know, thank you!
Ed Noepel
@EdNoepel
Nick/Piper: I believe I resolved concerns with ethereum/web3.py#1620 three weeks back. What's the process for getting this merged and into a release? Thanks in advance.
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver> @Piper I don't have any context on this, is this good to go? ^
Nick Mudge
@mudgen
@miohtama Thanks for taking a look. @miohtama One of the big selling points is that it solves the 24KB max size contract limit. Another thing it does is provide a simpler way to handle complex contract interaction.
@miohtama The Diamond Standard is a more complicated upgrade proxy but it is a simpler way to handle larger sets of contracts that need to interact with each other.
A new Python tool was released today for automating the upgrade process of Ethereum Diamonds: http://joeyzacherl.com/2020/06/diamond-setter-ethereum-smart-contract-manager/
Mikko Ohtamaa
@miohtama
Nice!
Though in practice it cannot be a single command, as most of the critical contracts are managed by multisigs or DAOs :)
Manuel Montenegro
@manumonti

Hi, I have a problem sending a raw transaction. I'm following the example in documentation, but Python returns an error. I'm not sure if it's a bug or just I'm doing it in the wrong way.

I have deployed a Hyperledger Besu network. So I'm using Web3 middleware. And I want to send a transaction using local keys. I can make the transaction using Metamask, so I think Besu network is not the problem.

Well, I first sign the transaction using the key of an account, after i send the signed transaction and by last I wait for transaction receipt. Here is the code:

w3 = Web3(Web3.HTTPProvider("http://192.168.43.125:10101"))
w3.middleware_onion.inject(geth_poa_middleware, layer=0)
accountKey = '0x...'
transaction = {
    'to': '0x...',
    'value': w3.toWei(0, 'ether'),
    'gas': 2000000,
    'gasPrice': 100,
    'nonce': 0,
    'chainId': 5403
}
signed = w3.eth.account.sign_transaction(transaction, accountKey)
txHash = w3.eth.sendRawTransaction(signed.rawTransaction)
txReceipt = w3.eth.waitForTransactionReceipt(txHash)

And here is the weird thing: I can run this python3 script once! (and it works as expected). But the second time I run, I get this error:

Manuel Montenegro
@manumonti
Ok, forget it. This is the answer if someone has a similar problem: I forgot to manage the nonce number of the transaction... I always send a nonce = 0
Mikko Ohtamaa
@miohtama
@manumonti the most efficient way to share information like this is to open a question on ethereum.stackexchange.com and then answer your question yourself.
ethereum.stackexchange.com is very searcahble and answers also rank high in Google
francocoin1701
@francocoin1701
hello everyone I am a developer a long time ago but I started this year with all this block-chain I would like to learn more about web 3 but I cannot install the library with pip this is my mistake:
Building wheels for collected packages: lru-dict, cytoolz, bitarray
Building wheel for lru-dict (setup.py): started
Building wheel for lru-dict (setup.py): finished with status 'error'
Running setup.py clean for lru-dict
Building wheel for cytoolz (setup.py): started
Building wheel for cytoolz (setup.py): finished with status 'error'
Running setup.py clean for cytoolz
Building wheel for bitarray (setup.py): started
Building wheel for bitarray (setup.py): finished with status 'error'
Running setup.py clean for bitarray
Failed to build lru-dict cytoolz bitarray
Installing collected packages: lru-dict, cytoolz, eth-utils, eth-keys, eth-keyfile, bitarray, rlp, parsimonious, eth-abi, eth-rlp, eth-account, websockets, web3
Running setup.py install for lru-dict: started
Running setup.py install for lru-dict: finished with status 'error'
someone that want help me please..
Marc Garreau
@marcgarreau
@francocoin1701 there is some documentation for getting a clean environment set up: https://web3py.readthedocs.io/en/stable/troubleshooting.html#setup-environment
Ajmal Hassan
@iamajmalhassan
Hello Everyone,
how do you find the account number given the private key in web.py?
arjuna sky kok
@arjunaskykok_gitlab
from eth_keys.backends.native.ecdsa import private_key_to_public_key
from eth_keys.utils.address import public_key_bytes_to_address
from eth_utils import to_normalized_address

public_key = private_key_to_public_key(private_key)
address = public_key_bytes_to_address(public_key)
normalized_address = to_normalized_address(address)
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<Piper> I just realized we should look into extending our integration tests to cover ganache
<carver> To get an address from a private key in two lines ^
Voith Mascarenhas
@voith

I just realized we should look into extending our integration tests to cover ganache

Been a while since I contributed to web3.py. I’d like to take this up. I’m quite familiar with the integration test-suite and I have some free time this weekend.
@marcgarreau Is there an issue for this?

Marc Garreau
@marcgarreau
@voith thanks for jumping back in! no issue yet, feel free to create one if you want to solicit more thoughts from the team.
Marc Garreau
@marcgarreau

web3.py 5.11.1 released :rocket:

This includes a ton of type annotation fixes and some beefing up of the intro docs. Thanks to @Uxio0 and @MatthiasLohr for contributions this round :clap:

https://web3py.readthedocs.io/en/stable/releases.html#v5-11-1-2020-06-17

Mikko Ohtamaa
@miohtama
@marcgarreau @MatthiasLohr excellent work, thank you sirs
Marc Garreau
@marcgarreau
and thank you @miohtama for helping to answer questions around here :smile:
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<Christoph> @iamajmalhassan what in particular? You sign a transaction before you propagate it through the network.
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver> @iamajmalhassan are you using a node with hosted keys, or do you have local private keys? If you're using hosted keys, you don't have to worry about signing a transaction at all. Some more background: https://web3py.readthedocs.io/en/stable/web3.eth.account.html#local-vs-hosted-nodes
Voith Mascarenhas
@voith

thanks for jumping back in! no issue yet, feel free to create one if you want to solicit more thoughts from the team.

I have some working code, I’ll create a PR tomorrow. However, the are some issues with ganache and its best to show these through code rather than creating an issue.

Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<Marc Garreau (wolovim)> Thats great! Look forward to it.
LIZHOUYI
@LIZHOUYI
taiyi
manuthema-rodriguez
@manuthema-rodriguez
Hello!! thanks @marcgarreau !
mintblock
@mintblock
hi - can someone point me in the right direction. I am coding in python and web3. does anyone know of any examples to swap tokens on kyber or uniswap?
thanks
Marc Garreau
@marcgarreau
I dont know if they have python tooling, but I would start by going to the kyber or uniswap documenation, @mintblock. All you need to interact with the contracts in web3.py is the contract address and ABI, though.
mintblock
@mintblock
thank you
I am using the abi and contract address but looking for an example to reference
Raphael Lullis
@lullis
Hello! I am wondering if there is any way that I can get the value of a transfer using only the information provided by a transaction receipt, or at least if there is any rule besides gasUsed == 21000 to indicate that a transaction is a ETH transfer?
Mikko Ohtamaa
@miohtama
@lullis no. Only for very simple cases. The receipt does not have any information about ETH or token transfers then happen between the smart contracts, on contract to contract calls. For these you need a full transaction trace. Ben Hauser, author of Brownie, can give tips on this one.
Ben Hauser
@iamdefinitelyahuman
thanks @miohtama :)
@lullis Brownie provides an object TransactionReceipt that can show you the return value from a broadcasted transaction.. it's available as TransactionReceipt.return_value - https://eth-brownie.readthedocs.io/en/stable/api-network.html#TransactionReceipt.return_value
for a more general overview of what you can do with TransactionReceipt - https://eth-brownie.readthedocs.io/en/stable/core-transactions.html
Raphael Lullis
@lullis
Thank you. It looks interesting, but it might be too much for what my immediate needs. I am building a a web app to work as a payment gateway, so at the moment all I care about is keeping track of ETH and ERC20 transfers.
Raphael Lullis
@lullis
I do have access to the transaction data along with the receipt already. I was just wondering if I could have my function that tracks transfers relying only on the receipt, but if I have to reconcile data from tx_data and tx_receipt, it's okay...