Solide - Solidity Database

Project Name: Solide - Solidity Database
Project Track: Integration
Team Name: Solide Project
Team Member(s): @SovaSniper
Devpost Project Link:

Project Goal:

In the age of decentralization and blockchain technology, the aim is to promote transparency and openness in data, independent of any controlling entity. Without this, information would remain siloed and access would be restricted. The systems powering smart contracts for these blockchains face similar challenges with each blockchain having its own storage system for smart contracts, and accessing smart contract sources on one chain may not be accessible on another others, even if they share the same implementation and settings. When smart contracts are deployed on a network, they receive storage for their bytecode, which can be de-siloed and optimized through decentralized source code storage to provide more information for both verified and unverified smart contracts.

The objective of the Solidity Database is to establish an open-source storage layer dedicated to every smart contract. Ultimately, the project aims to become a public good alternative for accessing the source code of smart contracts, utilizing the extensive technology of TRON and BTTC/BTFS to construct a fully decentralized database infrastructure capable of securely storing comprehensive contract information (and de-siloed it). This should not only enhance accessibility and transparency within the developer community but also foster a more inclusive and decentralized ecosystem for smart contract development on all EVM-based blockchains.

Project Value:

The project’s value stems from establishing a robust system for managing smart contract sources, irrespective of their verification status, thereby promoting future interoperability, stimulating innovation, and enhancing user engagement across decentralized networks.

  • :package: Optimized Storage - De-siloing facilitates the distribution of smart contract source code storage across different chains. Currently, verifying the same smart contract on two different chains results in storing different metadata in the explorer service and may require separate storage if using different block explorers. Utilizing the Solidity Database enables efficient use of smart contract metadata storage, which can be managed across multiple chains, thereby reducing redundancy and resource consumption.
  • :earth_africa: Interoperability - Optimizing and de-siloing the contracts metadata means that the project can extend and cater to other EVM-based chains using the TRON network, promoting interoperability across diverse blockchain ecosystems.
  • :zap: Increased Stability and Decentralization - The project utilizes decentralized services such as BTFS, enhancing transparency and accessibility. Leveraging BTFS establishes data availability, ensures data accessibility, and scalability, and strengthens both the BTFS protocol and the Solidity Database service.
  • :mag: Simple and Open Source Querying - In effect to Increased Stability and Decentralization, utilizing services such as TRON and BTTC provides a reliable platform for deconstructing smart contracts (both verified and unverified) in a simple and seamless manner, which can be integrated into IDEs or explorers.

Project Info:

The Solide ecosystem is a smart contract ecosystem, that has support from ESP, Artela and ChainSafe. Every project is integrated with each other such as the Solide IDE, Smart Contract Hub and the Solidity Database on TRON and BTTC. One standout feature is the Solide IDE which has the ability to load a smart contract address into the IDE from chains such as TRON or BitTorrent, empowering users to interact, explore, edit, and deploy copies of those contracts. Additionally, it facilitates the loading of open-source contracts directly from platforms such as GitHub, eliminating the need to install libraries. The purpose of Solide is to foster a collaborative and dynamic development environment by providing a user-friendly plug-and-play service for developers.

However, when it comes to unverified smart contracts, there isn’t much that can be provided in the IDE. Therefore, Solide aims to continue its innovation by integrating a platform (Solidity Database) to access smart contract sources and enable developers to comprehend unknown smart contracts within a contextual framework. This initiative stems from building an open-source and decentralized database, where Solide can cater to unverified smart contracts in their IDE, providing full transparency and access for developers to understand and explore those that may not be verified. This ensures that unverified smart contracts align with their intended functionality and aids users in interacting with the contract by providing essential information. Through its platform (explorer and on the IDE), Solide empowers developers to unravel the intricacies of smart contracts, validate functionality, and ensure alignment with intended purposes, paving the way for a more connected and decentralized world.

Project Website:

Project Test Instructions:

Demo Video: Youtube

These steps do not need to be done in order. However, these steps are to show the full extent of the Solidity Database and its integration with an IDE

1. Storing Smart Contracts on Solidity Database

  • To deploy and contribute to the Solidity DB Registry (on TRON Nile), load a smart contract onto Solidity IDE.

    • For instance, load an ERC1155 Token from GitHub.
  • Set the correct compiler version and compile the smart contract.

  • Add constructor parameters and deploy the contract.

  • After signing the contract creation, there should be the contract address

    • Check the contract has been successfully deployed by calling one of its methods.
      ide-deployment

    • This means that the IDE has deployed the contract and stores its information and metadata in the Solidity DB.
      ide-calling

2. Using Solidity Database with Solide IDE

  • To utilize the loading contracts from the Solidity Database, you can use the contract deployed in step 1 (ensure it’s not verified) by visiting /address/{chainId}/{contractAddress} where:
    • chainId represents the chain on which the contract is deployed.
    • contractAddress is the address of the smart contract.
    • Example: Unverified Contract - ERC1155

  • Notice the warning icon displayed on the sidebar, indicating that the contract is not verified. Additionally, it signifies that the source code was provided by Solide IDE, accompanied by a BTFS CID for reference.
    ide-warn
  • You can interact with the contract just as if it was verified, compile, change and deploy the contract.

3. Using the Solidity DB Explorer

  • An alternative method for accessing and viewing contracts stored on Solidity DB is through an explorer platform.
  • To search for a specific smart contract address:
    1. Navigate to the Explorer platform.
    2. Input the contractAddress and select the blockchain in the nav bar.

explorer-search

  • Alternatively, you can directly search via URL using the format: {chainId}/{contractAddress}.
  • The result typically includes a table presenting information about the contract address, along with a code explorer for its source code is available on the selected blockchain.

Project Details:

Smart Contract: SolidityDatabaseRegistry

The SolidityDatabaseRegistry, currently operational on the TRON Nile testnet, serves as a repository for smart contract information stored on-chain, functioning as an open-source database for contracts. To understand its functionality and application, refer to the project instructions or explore its workings.

Essentially, this registry acts as a reference point for smart contracts, offering insights and details on deployed contracts, regardless of their verification status. Information stored within the smart contract includes the bytecode hash and a BTFS file CID. Such data, typically generated by compilers, proves invaluable for developers and IDEs.

For instance, consider an unverified smart contract with the address TVPaonF8QAWHAi59vcz3a93mQdNSATjnLP. Without accessing the SolidityDatabaseRegistry, users remain unaware of the contract’s specifics. However, by leveraging the SolidityDatabaseRegistry contract and the bytecode associated with TVPaonF8QAWHAi59vcz3a93mQdNSATjnLP, retrievable from the blockchain, one can hash this value (resulting in 0x33e89f56fbc5c341da070b79e70b972efa956825053e24dcb8ef6899a249ea50). Utilizing this hash in the find() method of the smart contract yields crucial data, including a BTFS CID and timestamp linked to the contract’s deployment.

Upon inspecting the CID, you’ll find comprehensive details including the source code and metadata of the contract. This ensures transparency and authenticity, providing assurance regarding the legitimacy and integrity of the contract even if it is unverified.

If this isn’t enough, note that you can compile this contract in an IDE, either loading in Solide or any other IDE and compare the bytecode matches the one with the contract address being checked (provided by the blockchain)

By storing smart contract metadata, Solidity DB facilitates support for all EVM-based chains, ensuring cross-chain interoperability. For instance, the example contract TVPaonF8QAWHAi59vcz3a93mQdNSATjnLP deployed on TRON Nile, and then replicated the deployment on Polygon Mumbai using the same contract source code. This demonstrates the versatility of Solidity DB, allowing seamless deployment across diverse blockchain ecosystems.

The ability to utilize decentralized storage enhances this advantage, extending beyond individual chains like TRON and BTTC to encompass the broader blockchain space. Notably, when comparing the contracts deployed on TRON Nile and Polygon Mumbai, we observe identical contract sources (with the same BTFS CID). This consistency is because both deployments share the same bytecode provided by the Polygon blockchain, and utilise the Solidity DB’s role in promoting cross-chain consistency and interoperability.

Explorer

The Explorer will allow users to explore and interact with the Solidity Database. The need for this will create a user-friendly interface to view various information about the smart contract related to the source code. Whether it is verified on a chain or contains an entry in the Solidity Database, the exploration will make it easy for users to understand what the contract is going on. The potential for this explorer is unlimited, as integration with another service such as security, code analyzation etc (though we won’t be implementing it in the hackathon)

Just like a blockchain explorer, you can search for a contact address and select a chain, or simply pass the chainId and the contract address. Sample of Contract in Explorer. The UI will be as simple to cater for everyone and will contain visual information on whether a contract is verified on a chain or in the Solidity Database. Also, there will be information about the contract about metadata for the contract. While this information is available on the chain explorer, here we are extending it to be for the Soidity Database.

search

For the example provided, if the smart contract was verified, then the information from the blockchain would be shown, however, this isn’t the case, hence this information will not be available anything. But there with the Solidity Database Explorer, we are able to fill in all contracts and help developers get information about the compilation and source code of the smart contract. Of course, we provided external service to the explorer and in the future others to help the user.

And the main source code for the smart contract. A built-in code explorer.

Note: This explorer is for visualizing and providing data to users about verified and unverified smart contracts. Should you wish to interact, deploy, or develop with the smart contract, you can load it into the Solide IDE.

Smart Contract links: SolidityDatabaseRegistry (TVPaonF8QAWHAi59vcz3a93mQdNSATjnLP)

Project Milestones:

Deployment of Solidity DB to Testnet
Integration of Solidity DB as a use case (Integration to Solide IDE)
Integration of Solidity DB Explorer
Testing compatibility with TRON TVM and BTTC EVM

24 Likes

It’s amazing joining us on this season 6 hackathon, we are excited to have your project focusing on an open-source storage layer for smart contracts. Wishing you all the best buddy

5 Likes

Welcome to HackaTRON S6, have no or little knowledge when it comes to these…. Wishing you all the best

7 Likes

I will first start by say welcome, and please the part you put “to-do”, when will you update it

4 Likes

Welcome to Season 6, it’s a Season where you get put on the hot seat very often and hopefully you update the left out parts of your project asap. Now moving forward, I see this aims to establish an open-source storage layer dedicated to smart contracts, sounds totally new to me and a first too so I’d like to ask;

What strategies would you employ to promote adoption and usage of your platform among developers and blockchain enthusiasts?

4 Likes

Hi, I’ll definitely be updating on the information as time goes on. I believe there is still around two months left, which is plenty time for me to properly build the project and update the progress along the way.

To answer your question, Solide can expand beyond just being a smart contract platform; it can also serve as an educational hub for smart contract knowledge. Developers can use Solide to explore and understand smart contracts, and we can provide educational resources directly within our IDE and storage service. Additionally, as mentioned in our project description, the Solide Database is compatible with any EVM chains. With the BTTC/BTFS service, we can leverage bytecode and information to view the same contract on different chains. This means we can reach and engage users from any ecosystem and hopefully foster collaboration in the blockchain space with this feature. In terms of adoption, being open source, we are committed to community engagement through media channels like X or Discord, and of course, participating in hackathons like TRON to showcase the value and innovation using our ecosystem.

10 Likes

Hello, can I ask how you plan to carry out such an equipped project on your own?

  • Advertising section
  • Cyber ​​security
  • Project management

Do you plan to take only role in each those areas or are you planning to bring crewmates during the hackathon?

4 Likes

Welcome to this season 6 hackathon
Though I am not a developer and I don’t have any interest with this topic, but I will like to know how authenticity of smart contract sources will be ensured using the Solidity Database

7 Likes

Currently, I’m fully dedicated to participating in this hackathon, managing both the project development and project management on my own. However, if this project gains momentum in the future, I do have some mates who could provide help.

6 Likes

Each smart contract can be represented by its bytecode, serving as a unique identifier for the smart contract and ensuring the authenticity of its source code. When source code is compiled, it generates bytecode, and both the bytecode and the source code, along with its metadata, can be stored on the TRON blockchain.

If a user suspects that the provided source code is not genuine, they can compile it and compare the resulting bytecode with the bytecode retrieved from the contract address via RPC using .getCode(). This process helps verify whether the provided source code corresponds to the information stored on the blockchain.

8 Likes

Keeping fingers crossed :crossed_fingers:t2: in anticipation of future updates, and like you said, 2 months is such a long time, too little too late. I really like how you piece words and tenses together in your explanation, makes me wonder :thinking:

Can you share any insights on your participation in hackathons like TRON and how it aligns with your project’s goals and vision?

5 Likes

Welcome to hackathon season 6, expecting more from you.

5 Likes

OK. That is a well thought out approach to ensuring that information obtain from the Solidity Database is of high standard and I believe this will be of great help to developers. Good luck on your participation :raised_hands:

1 Like

So we participated in our first hackathon called Artela Buildathon. Leveraging what I’ve built (IDE) which has features such as simplifying contract loading and providing educational content, we extended our IDE functionality to implement support for Artela’s language, Aspect and using their technology to achieve this. The efforts earned us recognition as finalists and support from Artela themselves.

For participation in the TRON hackathon, our aim is to leverage TRON’s technology within the TRON ecosystem while aligning with Solide’s overarching goals as an open-source platform for developers, which is why we chose the Integration Track and are creating the Solidity Database as an extension of the Solide Project. The hackathon aims to gear towards enhancing Solide projects and innovating in ways that simplify smart contract developments and facilitate accessible education. This aligns with our project goals to continually improve Solide IDE and educational content while maintaining open-source, participating in hackathons provides invaluable opportunities to explore innovative solutions that leverage unique technology from the hackathon organizers. Hope this answers your question :slight_smile:

5 Likes

Congratulations on being named one of the Artela Buildathon finalists! Your experiences is quite commendable to me and I’d like to know;
How do you intend to use Artela’s acknowledgement and assistance going forward to develop the Solide project?

2 Likes

We are continue getting communication from their developers and support and guidance the project created and we are contributing to their community. I have plan to contribute with on providing education content such as how to use and deploy their smart contracts and features. During and after the hackathon Artela has also provided valuable feedback and insights, which we plan to incorporate into our project, such as integrating a console into our Solide IDE.

3 Likes

Oh wow, you seem to be working round the clock, it’s fantastic to hear about the ongoing communication and support from Artela’s developers. Moving forward, integrating a console into the Solide IDE sounds like a promising enhancement, what specific functionalities or benefits do you anticipate this integration will bring to developers using the Solide platform?

2 Likes

Buddy you are doing well,you are most highly welcome to hackathon season 6, expecting more interesting project from you.

2 Likes

Welcome to hackathon season 6, giving out an interesting project though after going through your project goal,there are some important area I will like you to enlightened us more which is

(1) Data Storage Limits. How much data can be stored per smart contract in the BTFS network,and are there any concerns about exceeding storage limitations.

(2) Decentralization Trade-offs: While BTFS offers decentralization benefits, does it introduce potential challenges with data availability or retrieval compared to a centralized storage solution.

(3)Security Considerations. How will the integrity and immutability of stored smart contract data be ensured on the BTron network,and are there any potential vulnerabilities for data manipulation.

2 Likes

Very interesting. Looking forward to seeing the User interface as I think that is vital and integration with https://btfs.io/.

4 Likes