Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 21:14
    pipermerriam commented #1204
  • Jan 31 18:44

    davesque on master

    Add docstring for `merge_args_a… Add/update comments in `merge_a… Minor lint/whitespace and 2 more (compare)

  • Jan 31 18:44
    davesque closed #1228
  • Jan 31 18:30
    kclowes commented #1204
  • Jan 31 16:44
    fubuloubu opened #1229
  • Jan 31 15:57
    fubuloubu commented #1022
  • Jan 31 15:56
    fubuloubu commented #1210
  • Jan 31 06:05
    davesque review_request_removed #1228
  • Jan 31 06:04
    davesque commented #1228
  • Jan 31 02:27
    davesque review_requested #1228
  • Jan 31 02:13
    pipermerriam review_requested #1228
  • Jan 31 00:35
    davesque synchronize #1228
  • Jan 31 00:34
    davesque opened #1228
  • Jan 31 00:30

    davesque on master

    Remove unnecessary use of list Add some helpful whitespace Merge pull request #1226 from d… (compare)

  • Jan 31 00:29
    davesque closed #1226
  • Jan 31 00:29
    davesque commented #1226
  • Jan 30 23:20
    kclowes commented #1157
  • Jan 30 23:04
    pipermerriam commented #1157
  • Jan 30 22:53
    kclowes edited #1227
  • Jan 30 22:49
    kclowes closed #1157
F. Eugene Aumson
@feuGeneA
if event logs are processed via ContractEvents.myEvent().processReceipt(...), what happens my receipt contains multiple different events? I'm processing a transaction receipt that contains multiple different events, but of course i'm using a particular myEvent() that matches one of them, and seeing this message in the console: web3/contract.py:1029: UserWarning: The log with transaction hash: b... and logIndex: 1 encountered the following error during processing: MismatchedABI(The event signature did not match the provided ABI). It has been discarded.. is there any API to supply multiple ABI's so that i can decode ALL of the logs for a given transaction?
Mikko Ohtamaa
@miohtama
@feuGeneA I think you can do it on a lower level - manually grab raw "logs" instead of trying to use web3.py event ABI - and then construct Event objects by hand after you have matched the ABI
It's very advanced use case, so there might not be ready made examples available
Ben Hauser
@iamdefinitelyahuman
@feuGeneA i built a small library for handling events that might be useful for you - https://github.com/iamdefinitelyahuman/eth-event
you should be able to decode the raw event log with your custom abi using eth_event.decode_logs
Mikko Ohtamaa
@miohtama
@iamdefinitelyahuman you are the man :)
Eric
@efalken
Suggestion: have a built-in function to translate bools from Python to Solidity. Python uses capital letters, Solidity does not. This causes problems when sending 'True' as an argument to a contract.
Jason Carver
@carver
AFAIK python bools are translated correctly to bools needed by the ABI. Are you saying you have a Solidity function like takeAction(bool emitLog) and it's not working as expected when you call the contract in python like contract.functions.takeAction(True).transact()?
Eric
@efalken
yeah...I'm in python version control hell. I thought that was my problem, but it seems its not. :(
kclowes
@kclowes
@efalken will you raise an issue with some reproduceable code when you get a chance and I can take a look?
shuishangmusheng
@shuishangmusheng
def reveal(_numBids: int128, _values: wei_value[128], _fakes: bool[128], _secrets: bytes32[128]):
How to transfer parameters when using web3.py Prompt parameter type mismatch!
raise ValidationError(message)
E web3.exceptions.ValidationError:
E Could not identify the intended function with name reveal, positional argument(s) of type (<class 'int'>, <class 'list'>, <class 'list'>, <class 'list'>) and keyword argument(s) of type {}.
E Found 1 function(s) with the name reveal: ['reveal(int128,uint256[128],bool[128],bytes32[128])']
E Function invocation failed due to no matching argument types.
Bryant Eisenbach
@fubuloubu
I think the list has to be exactly sized to match
Arend [Vendit Team]
@ArendVendit_twitter
Hi guys! I have a question, we have an internal accounting system and we want to include Ethereum and Erc20. With BTC based blockchains there is the possibility to "move" funds locally, without sending a fee. Is there such possibility with the ETH blockchain (or with for example Web3PY, Geth etc.). I searched for a long time, going through a lot of resources, but haven't found the answer yet. If not, are there other ways of performing such actions?
Jason Carver
@carver

I think the list has to be exactly sized to match

ooh, good eye @fubuloubu -- that should be added to the validation error msg

cc @kclowes

With BTC based blockchains there is the possibility to "move" funds locally, without sending a fee.

Why is "move" in quotes? Is it staying at the same address? I don't understand what you're trying to do.

@ArendVendit_twitter
Arend [Vendit Team]
@ArendVendit_twitter
@carver Yeah had to type it in a hurry haha. I want to transfer funda between accounts residing in the same wallet. With BTC you can move funds from one internal address to another. This saves fees and helps with organization internally
Arend [Vendit Team]
@ArendVendit_twitter
Funds*
Jason Carver
@carver
Yeah, the account concepts between bitcoin and Ethereum are quite different: UTXO vs account balance and storage. I can't think of what the equivalent would be, partially because I don't understand bitcoin's model that well, and partly because Ethereum doesn't really have such a thing as multiple accounts in the same wallet. I guess that would be like an HD derived accounts, but moving funds between those accounts is like any other transfer: it needs to be on-chain. Other than that, maybe there is some layer-2 thing, but I couldn't tell you any more.
Arend [Vendit Team]
@ArendVendit_twitter
Okay! I mostly work with BTC based blockchains, so I’m used with that kind of model. Thank you for your explanation!
Bryant Eisenbach
@fubuloubu
I don't think there's any fundamental difference that the UTXO structure gives you which allows "free internal transfers", it's just more that a wallet can store and use keys from multiple derived accounts as one "wallet", which is an abstraction of convenience. Moving funds between diff keys still needs to happen on chain, but there's more options for how to aggregate funds from multiple UTXOs. I guess there is also a minimum transfer size to consider, I don't fully understand how that works tbh.
Jason Carver
@carver
Yeah, my comment was based on the assumption that it is even possible in bitcoin, and that it's not just the UI lying to you, which is a distinct possibility
luolixuan
@luolixuan
@voith Hi, I have the transaction hash of a transaction, and I pass it into web3.eth.getTransactionReceipt(tx_hash) to get the receipt. In the recipe, there is log topics. And I want decode these log topics. Then, how can I do? Thanks!
kclowes
@kclowes
@luolixuan check out the docs on processReceipt https://web3py.readthedocs.io/en/stable/contracts.html#web3.contract.ContractEvents.myEvent there is an example there you can follow
luolixuan
@luolixuan
@kclowes hi, in the documentation, rich_logs = contract.events.myEvent().processReceipt(tx_receipt), I don't know what I should pass in as contract, events and myEvent()
kclowes
@kclowes
@luolixuan the contract is the contract instance deployed by you, and myEvent is the name of the event you're looking at. events just stays as-is. Maybe the code block under this section helps? https://web3py.readthedocs.io/en/stable/contracts.html#web3.contract.ContractEvents
kclowes
@kclowes
Hey all! 5.3.0 is out! Hidden in the Misc section is python 3.8 support for those of you wanting to upgrade :tada: https://web3py.readthedocs.io/en/stable/releases.html
Voith Mascarenhas
@voith
:tada:
Ben Hauser
@iamdefinitelyahuman
awesome work guys
robrobbins
@robrobbins
hey @fubuloubu I'm running some async celery tasks that wait for tx mining and then do some stuff. just noticed that using getTransactionReceipt(0xF00) throws TransactionNotFound if 0xF00 is well, not found. The docs say than None would be returned if not mined yet. I am confuse... Also I am intentionally not using waitForTransactionReceipt because we have observed it going nips-up with light nodes
robrobbins
@robrobbins
or @kclowes ?
kclowes
@kclowes
@robrobbins None was returned in v4, but we changed it to throw the TransactionNotFound error in v5. Could definitely be clearer in the docs though.
kclowes
@kclowes
Ha sorry, didn't see that the docs were plain wrong, like you said. Adding an issue now
Jason Carver
@carver

we have observed it going nips-up with light nodes

You might want to tune down the rate that waitForTransactionReceipt polls the node for the transaction to appear. The default is chosen with full nodes in mind.

robrobbins
@robrobbins
@carver interesting, thats the what, poll_latency? we ended up spinning up full nodes, sure would be nice if they could be light nodes tho
i will continue that experiment by trying the polling tho, the problem we had was it just timing out tho. @kclowes thx (definitely 'clearer' lol)
kclowes
@kclowes
:laughing:
Jason Carver
@carver
yup, poll_latency is the one. I suppose you might need to increase the timeout length, too. Your setup may just be running into fundamental challenges with light nodes, though.
mert-oezkaraman
@mert-oezkaraman

Hey guys,
hope your fine! Actually, I'm working for a few weeks with web3py, ens, infura and all this stuff. My Code can show me addresses of ens names and vise versa (cheers to Jason Carver!).

At this point I have the problem that in the case when I want to set a subdomain for my top-level domain there comes an error because I can't proof that I am the owner of the top-level domain. I tried to edit my code with my infura private key but it didn't work.

So, does anybody know how I can solve this problem??

best wishes
Mert

Jason Carver
@carver
Ah, you are trying to set a subdomain using web3.ens, but with a local private key? I'm not sure that's been tested, ens is kind of special, and was built before local private keys existed in web3.py. If I understand what you're trying to do, it's worth searching for an issue to add your story, and creating one of it doesn't exist. @mert-oezkaraman
mert-oezkaraman
@mert-oezkaraman
Hey Jason, thank you for fast response! The main problem is that I try to built a subdomain to my (in ENS created) top-level domain. But when I try to add a subdomain by using web3.py I get a error in bash. I have to proof that I'm the owner of the top-level domain, even tough I am the owner. @carver
Jason Carver
@carver
Gotcha. If you open an issue that includes the commands you are running, and the output you're seeing, someone will try to help you out
mert-oezkaraman
@mert-oezkaraman
In addition there is an other problem which is maybe more important. Everything (easiest case: Lookup) is running with the Ethereum Main net without any problems. In fact I have to do Lookups with the Ropsten testnet. Do you have a guess how to solve this? @carver
kclowes
@kclowes
@mert-oezkaraman have you tried passing the provider to your ens instance, like in the example here: https://web3py.readthedocs.io/en/stable/ens_overview.html#setup ?
robrobbins
@robrobbins
So I have an API which does some aggregation for me around some smart contract events. Imagine and endpoint that looks, from a given block to a given block, for a contract Foo's emitted event Bar. There's an entry in the Web3.py docs thats of interest to me, https://web3py.readthedocs.io/en/stable/filters.html#web3.utils.filters.Filter.format_entry. Alas, however, zero examples and the one-sentence description isn't enough for my low intellect to go on
I'll go dig into the repo specs now, see if something is there, but if anyone knows how to use this, speak up por favor
k so, just muck about with the entry and return what i want, what could possibly go wrong