eprbell / dali-rp2

DaLI (Data Loader Interface) is a data loader and input generator for RP2 (https://pypi.org/project/rp2), the privacy-focused, free, open-source cryptocurrency tax calculator: DaLI removes the need to manually prepare RP2 input files. Just like RP2, DaLI is also free, open-source and it prioritizes user privacy.
https://pypi.org/project/dali-rp2/
Apache License 2.0
63 stars 42 forks source link

Implement Ethereum blockchain plugin #103

Open macanudo527 opened 1 year ago

macanudo527 commented 1 year ago

This is just something that came up while I was troubleshooting. I had a transfer out to a Metamask wallet and Metamask doesn't have a typical CSV export. You need to read transactions directly from the blockchain. The same is true for BSC blockchain and other similar chains.

The explorers for a lot of the major chains have a CSV export function, but the data can be read directly from the net, which is the preferred option IMHO.

I think we will need to create another package for these. I propose dali.plugin.input.web3 since web3 is the name of the module needed to interact with these chains.

For me personally, this is a low priority. I can manually add the handful of transactions for now. I just thought I would get the ball rolling with feedback/comments etc...

eprbell commented 1 year ago

Sounds like a good idea to me. Is this the library you're referring to: https://pypi.org/project/web3/ ?

topcoderasdf commented 1 year ago

You could also use web3 infrastructure APIs. The followings provide free tier for their API usage.

Moralis: https://docs.moralis.io/reference/getwallettokentransfers

Block Daemon: https://blockdaemon.com/products/universal-api/

Covalent HQ: https://www.covalenthq.com

I actually haven't used them, but their docs seem to indicate that they provide parsed transactions data when provided chain info + wallet address.

There are more like Alchemy, QuickNode, Infura, and so on, but I haven't read their documentations.