Project Name: Solide - Solidity Database
Project Track: Integration
Team Name: Solide Project
Team Member(s): @SovaSniper
Devpost Project Link:
- Devpost
- Demo Video
- Github - Solidity DB Smart Contract
- Github - Solidity DB Explorer
- Follow us on X
- x.com
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.
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.
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.
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.
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.
- You can select from Metamask or TronLink (the image showing TRONLINK)
- You can select from Metamask or TronLink (the image showing TRONLINK)
-
After signing the contract creation, there should be the contract address
-
Check the contract has been successfully deployed by calling one of its methods.
-
This means that the IDE has deployed the contract and stores its information and metadata in the Solidity DB.
-
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.
- 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:
- Navigate to the Explorer platform.
- Input the
contractAddress
and select the blockchain in the nav bar.
- 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.
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
Updates (Post Hackathon):
(01/06/24)
Update on Solide IDE: As we prepare for the mainnet launch, we are introducing an option to upload contracts to the Solidity Database. By default, this feature will be turned off, but you can enable it in the settings. Note that for other integrations, this behavior may vary depending on how the software is coded.
(15/06/24)
After Hackathon Milestone 1, we will launch a verified mainnet smart contract. This will ensure that developers are using the Solidity Database reliably and genuinely.
Mainnet Contract - TX6Z6uChCQFK32CpRRnvCYUaUfS93ieMbF
So stay tuned, and I hope we make the development of TRON and blockchain more transparent.
(30/06/24)
We have renamed this project to Vaulidity. By giving it a more meaningful name we hope to bring better use for the decentralised Database for smart contracts across all EVM chains. Vaulidity (Vault for Solidity) Explorer has a major UI redesign to provide easier access to smart contracts.