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
Bryant Eisenbach
@fubuloubu
*URL
Looks like a lot of good ethPM features going in? 👀 @njgheorgita
Nick Gheorghita
@njgheorghita
hmm - maybe? haven’t added a whole lot there since migrating the codebase over from the original py-ethpm repo (like v5.0b4-ish) - most of the recent actions been over in the cli
kclowes
@kclowes

P.S. leave a space between the URP and the !

ha oops

Ben Hauser
@iamdefinitelyahuman
does anyone know of a python equivalent to https://github.com/maxme/abi2solidity ?
Mikko Ohtamaa
@miohtama
@iamdefinitelyahuman it is a very specialised piece of code. I would just call it as a subprocess if possible. I guess NPM dependencies are the headache?
Ben Hauser
@iamdefinitelyahuman
yeah i'd rather build my own implementation than have to deal with NPM in a python package hahaha
didn't wanna reinvent the wheel if someone else has already done it tho
Mikko Ohtamaa
@miohtama
@iamdefinitelyahuman I would use Jinja or similar template language and just directly feed ABI file in the template
Ben Hauser
@iamdefinitelyahuman
ahh nice, good idea
Mikko Ohtamaa
@miohtama
Jinja is very easy to adapt, here are some examples: https://github.com/websauna/websauna/blob/master/docs/generate-sitemap.py#L1
kclowes
@kclowes
Muhammad Yasir
@SyedMuhamadYasir
hi
any examples of using etherscan with python ?
i can't find any example code anywhere :/
Noel Maersk
@veox
@SyedMuhamadYasir AFAIK etherscan does not provide web3 APIs. You can try https://github.com/corpetty/py-etherscan-api instead.
Muhammad Yasir
@SyedMuhamadYasir
@veox thanks for the suggestion, but i have already seen that repo
it does not support rinkeby network, which is what i'm operating on right now
i don't think i necessarily need a web3 api
i just need to know how to use the etherscan API in python
back to the basics kinda thing
Ben Hauser
@iamdefinitelyahuman
for basic API calls just use the requests package probably?
Muhammad Yasir
@SyedMuhamadYasir
ok
so... any tutorials relevant to this ?
Ben Hauser
@iamdefinitelyahuman
Mikko Ohtamaa
@miohtama
@iamdefinitelyahuman Somebody has been busy!
that is some hardcore string concatenation :)
Eric
@efalken
I'm running the same python/web3 program on Windows as in Linux. However, in Windows I get an error on my getTransactionReceipt function
signed_txn = w3.eth.account.signTransaction(txn_dict, private_key=cfg.wallet_private_key)
result = w3.eth.sendRawTransaction(signed_txn.rawTransaction)
tx_receipt = w3.eth.getTransactionReceipt(result)

error:
File "C:\Users\Eric\AppData\Local\Programs\Python\Python37\lib\site-packages\web3\eth.py", line 274, in getTransactionReceipt
raise TransactionNotFound(f"Transaction with hash: {transaction_hash} not found.")
web3.exceptions.TransactionNotFound: Transaction with hash: b'\xca\xea`\xb3\xbe.D\xb0\x0c\xfe\xc0\xae\x029\xe5l[e\x038?\xea\x94)7\x1f\x951*\x99\x03O' not found.
It seems my windows Python (3.7) is doing something different with the hash than the Linux version (3.6). Any thoughts?
Eric
@efalken
It is the exact same program, accounts, etc. (running on Ropsten)
Jason Carver
@carver
You probably want waitForTransactionReceipt. If the transaction is not mined right away, you could get that result.
I see that transaction was just added 1hr 10 min ago, which isn't too long before your message: https://ropsten.etherscan.io/tx/0xcaea60b3be2e44b00cfec0ae0239e56c5b6503383fea9429371f95312a99034f
Eric
@efalken
Is this because Windows is slower than Linux?
Eric
@efalken
So I would just do this:
signed_txn = w3.eth.account.signTransaction(txn_dict, private_key=cfg.wallet_private_key)
result = w3.eth.sendRawTransaction(signed_txn.rawTransaction)
w3.eth.waitForTransactionReceipt(signed_txn.rawTransaction) # new line
tx_receipt = w3.eth.getTransactionReceipt(result)
Jason Carver
@carver
Maybe. TransactionNotFound is a normal kind of response to getTransactionReceipt() though, so you need to either catch it explicitly, or switch to waitForTransactionReceipt().
signed_txn = w3.eth.account.signTransaction(txn_dict, private_key=cfg.wallet_private_key)
result = w3.eth.sendRawTransaction(signed_txn.rawTransaction)
tx_receipt = w3.eth.waitForTransactionReceipt(result) # replace line
It takes the transaction hash, and returns the receipt, just like getTransactionReceipt()
Eric
@efalken
oh...it's the same thing, with a built-in wait mechanism. That's cool. I saw some code that had 20 lines to deal with this...
Jason Carver
@carver
:+1:
Eric
@efalken
Thanks
Jason Carver
@carver
Happy to help!
Eric
@efalken
@carver actually, I don't think it's Windows so much as linux was on a server, while Windows was on a desktop in a goofy business network not focusing on latency
Jason Carver
@carver
eth-tester with istanbul support is out: v0.2.0-beta.3
kclowes
@kclowes
:tada:
arjuna sky kok
@arjunaskykok_gitlab
Thanks to @carver 's work, finally I could upgrade Mamba to use Web3.py version 5. Now Mamba version 0.3.0 with Web3.py version 5.2 has been released. pip install black-mamba and BUIDL something cool! https://mamba.black
Jason Carver
@carver
I have only been dabbling in web3 lately. Are you sure you didn't mean someone else like @kclowes ? :)
arjuna sky kok
@arjunaskykok_gitlab
Yeah, actually I should thank everyone. But your specific commit (ethereum/eth-tester@3ffa12b) solved my problem (could not upgrade to web3.py v5). :)
Jason Carver
@carver
Oh haha, glad to hear it :)