dipdup-io / dipdup

Modular framework for creating selective indexers and featureful backends for dapps
https://dipdup.io
MIT License
93 stars 52 forks source link

Fetch Cairo ABIs from node #1108

Open droserasprout opened 1 month ago

droserasprout commented 1 month ago

Currently Starknet indexes require adding ABI JSON manually. Starkscan has ABIs too, but API access is expensive af (we could parse them from webpage like in #1102). In Starknet you can acquire Cairo ABI from Node

CollinsC1O commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

can I work on this please

georgegoldman commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have a strong background in software engineering, particularly in blockchain development, backend systems, and decentralized platforms. With over 5 years of experience working on various projects using technologies like Ethereum, Lisk, and smart contract platforms, I’ve gained a deep understanding of how decentralized systems operate. I’ve worked extensively with smart contract development on both Ethereum and Lisk, implementing ERC-721 and ERC-1155 standards and integrating IPFS for decentralized storage. My experience with blockchain indexing and API design also makes me well-suited to working on automating ABI fetching, as I’ve had to solve similar problems in past projects where data needed to be fetched and processed dynamically from nodes or external sources. With my hands-on experience in blockchain systems and API automation, I’m confident that I can streamline the process of acquiring and integrating Starknet ABIs into the project. I can also contribute to improving performance and cost-efficiency by leveraging my experience with decentralized nodes, allowing the project to avoid expensive API dependencies. I’m excited about the opportunity to bring my experience to this project and help build a more efficient solution for Starknet ABI indexing. I believe my background uniquely positions me to tackle the challenges ahead and drive the project forward.

How I plan on tackling this issue

I would use starknet-py, a Python library that simplifies interaction with Starknet nodes, to connect to the node and issue queries for the contract ABI. The starknet_getClass RPC method, for example, retrieves information about a given class (contract), including the ABI. I would write a function that sends a request to the Starknet node, using a contract address to fetch its associated ABI. This would allow the system to automatically retrieve ABIs whenever required, eliminating manual uploads. To ensure scalability and performance, I would implement caching mechanisms (using Redis or a similar store) so that previously fetched ABIs don’t require repeated requests to the node.

Ndifreke000 commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

With experience in fullstack development with python libraries and blockchain langage like solidity, with experience in Python and blockchain development, I can automate ABI extraction, saving time and reducing costs.

How I plan on tackling this issue

To fetch Cairo ABIs from StarkNet nodes, I would create a Python script using requests to query node endpoints for ABI details. The script would parse the response and save the ABIs automatically, avoiding the need for expensive external APIs and keeping the data updated

saimeunt commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have experience building an EVM explorer / indexer so I have a good understanding of what needs to be done. https://github.com/walnuthq/op-scan I also have experience in the Starknet ecosystem.

How I plan on tackling this issue

I will use starknet-py to fetch the contract ABI from the RPC full node and use it instead of adding it manually.

MPSxDev commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello, I am Manuel, a process engineer and web3 developer. I have participated in Starknet Bootcamps, ETHGlobal and am an Elite winner of Speedrunstark. I have a high capacity to solve problems. I am a member of the DojoCoding community. I hope this issue is assigned to me. I am available to work immediately to achieve what is required in the shortest time possible.

How I plan on tackling this issue

To address the requirements of the issue, I will:

  1. Implement a solution to acquire Cairo ABIs directly from the Starknet Node instead of manually adding ABI JSON files.
  2. Investigate the most efficient way to request and fetch the ABI data from the Node, ensuring compatibility with the existing indexing process.
  3. Optimize the retrieval to avoid unnecessary external API calls, minimizing costs and dependencies on services like Starkscan.
  4. Test the ABI retrieval functionality to ensure accuracy and proper integration with current Starknet indexers.
tosoham commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a python dev. A new-comer here, ready to solve the issue with my expertise.

JoE11-y commented 5 days ago

Hi @droserasprout is this open, would love to complete it.

droserasprout commented 3 days ago

@JoE11-y We do not participate in any bounty programs at the moment of writing. But carefully crafted pull requests are always welcome.

JoE11-y commented 3 days ago

Alright sounds good though.

On Wed, Oct 23, 2024, 1:05 PM Lev Gorodetskii @.***> wrote:

@JoE11-y https://github.com/JoE11-y We do not participate in any bounty programs at the moment of writing. But carefully crafted pull requests are always welcome.

— Reply to this email directly, view it on GitHub https://github.com/dipdup-io/dipdup/issues/1108#issuecomment-2431905892, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANGCG5WCJXZRSGJYF65RL5DZ46GITAVCNFSM6AAAAABOQPL3Q2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZRHEYDKOBZGI . You are receiving this because you were mentioned.Message ID: @.***>