BlockDAG Dashboard

logout

Notifications

0
logout

Connect Wallet

Dev Release 133

Greeting BlockDAG Community,

As we wrap up the current sprint, let's take a moment to review the week’s achievements before diving into today’s update.
 

Sprint Planning: Contract Listing and Detailing Module
We began the week by outlining the development roadmap for the Contract Listing and Detailing Module. This feature is critical as it will allow users to explore deployed contracts on our network with a clear and organized interface.

  • Progress Update: By the end of the week, the development phase was successfully completed, and we’ve now transitioned into the testing phase. This will ensure stability and accuracy before its final release.

 

Standard Contract Module Designs
Simultaneously, our design team has been hard at work on the Standard Contract Modules, including industry-standard contracts like ERC-20 and other token standards. These contracts are the backbone for various decentralized applications (dApps) and tokens, and our goal is to make deploying them on our platform seamless.

  • Next Steps: Once the designs are finalized, we’ll move into the development phase to integrate these contracts into the platform.

 

Contract Platform: Reflection and Lottery Contracts
We’ve also made significant progress on the Contract Platform. This week, we focused on designing specialized contracts, specifically Reflection Contracts and Lottery Contracts. These contracts represent unique use cases that demonstrate the versatility of our blockchain.

  • Sneak Peek: As part of this work, we provided sneak peeks into the designs of this platform, showing its potential to serve as an example dApp built on top of our blockchain. The platform showcases the ease with which developers can create and deploy such applications.

 

What’s Next?

  • Testing Phase: As we continue testing the Contract Listing and Detailing Module, our aim is to ensure its robustness for a smooth user experience.
  • Development on Standard Contracts: Once designs for ERC-20 and other standard tokens are finalized, development will commence.

We’re excited about the strides we’ve made this week and look forward to sharing more updates in the coming days as these new features take shape.

Today's update

Now let's get into today's update:

 

Feature Implementation: EVM Smart Contract Verification in BlockDAG Explorer
The implementation of the EVM Smart Contract Verification feature in the BlockDAG Explorer is a multi-phase process that involves several key architectural and design considerations. Below is a detailed breakdown of how this feature will be integrated into our explorer, providing developers with a seamless experience for verifying and interacting with smart contracts on BlockDAG networks.

 

1. User Interface (UI) and User Experience (UX) Design

  • New Contract Verification Page: A dedicated verification page will be added to the BlockDAG Explorer where users can submit their smart contract’s source code, compiler settings, and other necessary metadata.
  • Fields for contract address, source code, ABI, compiler version, optimization settings, and other related details will be clearly laid out.
  • Users will also be able to provide libraries or multiple source files through an intuitive drag-and-drop interface.
  • A status indicator (e.g., “Verifying,” “Verified,” “Failed”) will be implemented to keep developers informed about the progress of the verification.
  • Verified Contract Display: Once verified, the contract page will dynamically update to display a "Verified" badge and will provide additional sections showing:
  • Source Code: A scrollable, syntax-highlighted view of the contract’s source code.
  • ABI & Bytecode: Detailed breakdown of the contract’s Application Binary Interface and deployed bytecode.
  • Contract Metadata: Information like constructor parameters, optimization flags, and compiler versions.
  • Read/Write Interaction Tab: Interface for interacting with the verified contract directly from the explorer, with calls linked to on-chain actions.
  • Error Logging for Failed Verifications: If the verification fails (due to a bytecode mismatch, incorrect settings, etc.), the page will show an error log detailing the cause of failure, making it easier for developers to troubleshoot.

 

2. Backend Infrastructure and Logic

  • Bytecode Matching Algorithm:
  • The core of the verification process relies on matching the deployed bytecode on the blockchain with the compiled bytecode from the submitted source code. A powerful matching engine will be built into the explorer backend.
  • The system will recompile the submitted source code using the provided compiler version and flags (optimization settings, etc.) and then compare it with the on-chain bytecode.
  • This bytecode-matching process will account for variations due to constructor arguments or initialization data, ensuring accurate verifications.
  • Compiler Integration:
  • The backend will integrate Solidity compilers (and other EVM-compatible languages such as Vyper and Yul) to recompile the source code submitted by developers.
  • Multiple compiler versions will be supported to ensure compatibility with both legacy contracts and the latest deployed contracts.
  • For advanced users, the system will allow developers to choose specific compiler versions and configuration flags (such as enabling/disabling optimizations).
  • Handling Multi-File Contracts and Libraries:
  • A robust backend system will be developed to support contracts with multiple source files and external libraries.
  • For multi-file contracts, the explorer will allow users to upload a zip or tarball file containing all relevant sources, which will be compiled and verified as a complete package.
  • The backend will handle dependency resolution for external libraries (like OpenZeppelin), ensuring the verification works for complex projects.
  • Proxy and Upgradable Contracts Support:
  • The system will be able to detect if a submitted contract is a proxy contract and link it to the correct implementation contract.
  • Special verification routines will be implemented to handle upgradable contracts, allowing the user to verify both the proxy and implementation contracts.

 

3. Interaction and Analytics

  • Read and Write Contract Features:
  • After verification, users will be able to interact with the smart contract directly from the explorer via a "Read Contract" and "Write Contract" tab.
  • These interactions will be supported by integration with the Web3 library, allowing users to query the blockchain and interact with the verified contract without needing to leave the explorer.
  • Read Contract: Displays all available read-only functions (view and pure functions), allowing users to easily fetch on-chain data related to the contract.
  • Write Contract: Provides an interface for executing write functions (transactions) on the smart contract. This will include connecting to wallets (e.g., MetaMask) for authenticated transaction submissions.
  • Gas Analytics and Transaction History:
  • Verified contracts will display additional analytics, including gas consumption insights, historical transaction data, and event logs.
  • Developers and users will be able to view gas costs associated with specific contract functions, helping them optimize their contracts for cost-efficiency.
  • The explorer will integrate event logs that show emitted events from the contract, with easy-to-read logs that display the emitted data alongside transaction details.

 

4. Security Features

  • Immutable Verification Logs: Once a contract is verified, the explorer will maintain an immutable log of the verified source code, ABI, and metadata, ensuring that any changes to the on-chain bytecode would automatically invalidate the verification.
  • Source Code Integrity Checks: To prevent any tampering with the submitted source code, the system will utilize cryptographic hashing to compare the submitted source files with their on-chain equivalents. These hashes will be stored to ensure integrity and provide transparency.
  • Automated Unit Testing (Future Enhancement):
  • As a future extension, we plan to integrate automated unit testing for verified contracts. Developers will be able to submit test cases along with their source code, and the explorer will run these tests to further validate the correctness of the contract.

 

5. API Support for Developers

  • We will provide a REST API that developers can use to programmatically verify their contracts, retrieve verification status, and interact with verified contracts.
  • This API will allow for automated workflows where developers can continuously verify contracts as part of their CI/CD pipeline during development and deployment.
  • The API will also provide methods for fetching the ABI and interacting with the contract programmatically via the explorer.

 

6. Scalability and Performance Optimizations

  • The explorer’s backend will be optimized for fast processing, ensuring that verification requests are handled quickly, even for large and complex contracts.
  • Efficient caching mechanisms will be implemented to ensure that once a contract is verified, any subsequent requests to view the contract's source code, ABI, and other metadata are served without delay.

 

7. Future Integrations

  • Support for Other EVM-Compatible Languages: In addition to Solidity, we plan to add support for other EVM-compatible languages like Vyper and Yul. This will be part of our long-term roadmap.
  • Cross-Chain Verification Support: Since BlockDAG Explorer is designed to support multiple chains, we are considering extending contract verification to cross-chain contracts deployed on various EVM-compatible networks (e.g., Binance Smart Chain, Polygon).

Jira Tickets and Project Timeline

Our development team has already initiated the R&D process, and Jira tickets will be created to track the progress of individual tasks. The feature will be developed in stages:
 

Phase 1: Basic Verification Flow

  • Create contract submission forms (UI)
  • Integrate with Solidity compilers (backend)
  • Implement bytecode matching logic
  • Create the verified contract display page

    Phase 2: Interaction Features
  • Implement Read/Write Contract UI
  • Integrate Web3 for contract interaction

    Phase 3: Advanced Features
  • Multi-file contract and proxy contract support
  • Add analytics and gas consumption data
  • Integration with external sources like GitHub for automated contract verification

    Phase 4: Testing and Beta Release
  • Internal testing for different use cases (simple vs complex contracts)
  • Open beta for selected developers

    Phase 5: Official Release
  • Full release and open access to all developers


To speed up the process, we are adding more engineers to the BlockDAG Explorer team. The development cycle will be closely monitored and resources will be allocated efficiently to ensure timely delivery of this feature.We are excited to see how this feature empowers developers to build more secure and transparent applications on BlockDAG. Stay tuned for further updates as we continue to enhance the explorer and roll out new functionality! 

BlockDAG LogoBlockDAG Logo