sourcify icon indicating copy to clipboard operation
sourcify copied to clipboard

Feature Request: Enable Direct Smart Contract Interaction in Sourcify Explorer

Open mshakeg opened this issue 1 year ago • 1 comments

Issue: Enhancing User Interaction with Verified Smart Contracts

Problem Description:

Sourcify plays a crucial role in the Ethereum and broader EVM ecosystem by verifying and storing source codes of smart contracts. However, it currently lacks a feature that would significantly enhance its usability: direct interaction with verified smart contracts. Users and developers currently cannot interact with smart contracts directly through the Sourcify interface, a feature that is available on other platforms like Etherscan. This limitation impacts the efficiency and ease of engaging with smart contracts, especially for those that have been verified on Sourcify.

User Impact:

  • Developers seeking to test or interact with their smart contracts in a streamlined manner.
  • General users needing an intuitive interface for engaging with smart contracts.

Proposed Solution:

I propose the following enhancements to the Sourcify explorer:

  1. Direct Read and Write Access: Implement a feature allowing users to perform read (querying contract state, calling view functions) and write (sending transactions to change contract state) operations on verified smart contracts. Develop a user-friendly interface on contract pages for easy interaction. This interface would allow users to select functions, input parameters, and send transactions seamlessly.
  2. Wallet Connection Integration: Support wallet connection. This would enable the explorer to facilitate write operations directly, allowing users to interact with smart contracts within the Sourcify interface. For read operations consider using the wallet provider over the default json rpc provider for a given chain which may for whatever reason be failing.
  3. Allow Users to Specify Block Number: the eth_call method supports specifying a block number, to read state at that block.

View in Huly HI-496

mshakeg avatar Jan 18 '24 15:01 mshakeg

Hey @mshakeg, maybe we'll implement this feature later. Thanks for sharing this idea.

marcocastignoli avatar Jan 23 '24 08:01 marcocastignoli

Routescan is a good example of how the option to allow users to query state at a specific block number(as stated in point 3) could be implemented.

mshakeg avatar Aug 19 '24 12:08 mshakeg

We would love to see someone build this using Sourcify but at this stage we can't really prioritize this feature. This is actually a simple wrapper around contract ABIs and there are other tools allowing this such as https://abi.ninja/. It would be more useful IMO if these tools start using Sourcify as their data source instead of us developing something like this. It is out of scope of our main goals right now.

In a very improbable future if we don't have much to do, we can build this :D Until then I'm closing this, unfortunately. Let me know if you have other thoughts

kuzdogan avatar Aug 19 '24 13:08 kuzdogan