Closed yuripaoloni closed 2 years ago
Hey @yuripaoloni. We do not support windows os. It is not tested there. But... you can try it:
venv
?ethtx
installed in this environment? Maybe you are running it in the wrong scope (the problem looks like this)?Yeah, I tried with venv
and already checked for ethtx
installed in it.
I didn't notice the package it wasn't supported on Windows, sorry for that. I will use an Ubuntu VM.
Thank you for the fast response.
Np! Let us know if there is anything else we can help with!
Any update on #18? Is archivenode.io the only option to get a full node with debugging on for free?
I need to get the internal execution trace of a set of transactions to run some analytics on top of them.
Hey @yuripaoloni, Sorry for the late reply. To be honest, at this moment I don't see any free other archive nodes for Ethereum. There are some paid alternatives, but I don't know what the cost is: getblock.io or quicknode.com
Regards!
Hey @yuripaoloni, getblock.io provides full node which kept historical state of last 64 blocks. So if you wanna decode latest transaction then getblocks might be helpful .
Thanks @enmohsinali.
I tried with the following code:
from ethtx import EthTx, EthTxConfig
from ethtx.models.decoded_model import DecodedTransaction
ethtx_config = EthTxConfig(
mongo_connection_string="mongomock://localhost/ethtx", ##MongoDB connection string,
etherscan_api_key="<apikey>", ##Etherscan API key,
web3nodes={
"mainnet": {
"hook": "https://eth.getblock.io/mainnet/?api_key=<apykey>", # multiple nodes supported, separate them with comma
"poa": False # represented by bool value
}
},
default_chain="mainnet",
etherscan_urls={"mainnet": "https://api.etherscan.io/api", },
)
ethtx = EthTx.initialize(ethtx_config)
transaction: DecodedTransaction = ethtx.decoders.decode_transaction(
'0x2c2c40743117d5e6fa3ca2931fcfff40dc998c33109fc132a8ca4d640f39b996')
And I'm getting back: ethtx.exceptions.NodeConnectionException: Couldn't connect to node(s)
. It's strange because the getblock.io dashboard shows that the requests are actually sent.
0x2c2c40743117d5e6fa3ca2931fcfff40dc998c33109fc132a8ca4d640f39b996
is the hash of one of the last executed transaction at the time I executed the code.
@yuripaoloni ,
I have tested https://eth.getblock.io/mainnet/?api_key=<my_api_key>
endpoint and looks like it works.
As @enmohsinali said, you can decode only transactions from the last 64 blocks with this endpoint. And it works perfectly!
Screen from decoding (getblock.io):
And tx:
I tried again and now it suddenly started to work 🤣. Maybe the node needed time to get live.
Anyway, thanks @kchojn for the support 🤝
Windows 10. Python version 3.10.4. Latest version for ethtx is installed with
pip install ethtx
.I created a file
test.py
with the following content:Once I try to execute the file with
py test.py
, I get the following error:What's the issue? Thanks for the help.