ackness / many_abis

Get different DEX abis easily for block chain developers.
16 stars 7 forks source link

Idea: use smart contract sanctuary #12

Closed mraniki closed 1 year ago

mraniki commented 1 year ago

Not sure how feasible it is but it will be cool to be able to get data stored here https://github.com/tintinweb/smart-contract-sanctuary so that we can reduce api etherscan type dependency.

ackness commented 1 year ago

Hi, Thanks for your suggestion. tintinweb/smart-contract-sanctuary is a large repo for store smart contract. For this repo, we only store a little useful abis or simple chain info structures for web3 developer using python. But I can try to add some functions to access smart contract codes from that repo.

mraniki commented 1 year ago

yeah, i'm thinking of a function like getabi (XYZ) and if you dont store XYZ contract the only way to get the data is thru etherscan api call or use a generic abi for stablecoin/standardcoin ? so if we could use a separate data source for non critical info such as the sanctuary or something else? btw, the chain structure in https://github.com/ethereum-lists/chains/blob/master/_data/chains/eip155-10.json could be helpful for the chain taxonomy.

ackness commented 1 year ago

Yes, your proposal is excellent, but there are a few minor issues. For instance, when converting the code from the sanctuary library to ABI, we need to use solc. However, for different versions of solidity code, solc requires a corresponding compiler. It is not practical for users to download multiple compilers. Currently, I have not found a satisfactory solution for parsing solidity code. Do you have any suggestions? Additionally, the use of ethereum-lists/chains JSON files will be incorporated into our future update plans.

mraniki commented 1 year ago

Thanks for the feedback. not sure for solc, let me dig that up.

mraniki commented 1 year ago

Maybe another source for Abi that could be use as-is: blob:https://www.codeslaw.app/a4054317-1c3d-4eb6-8a23-0993083d120e

via https://www.codeslaw.app/contracts/ethereum/0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45?tab=abi