Overview

GlueX Blockchain Modules are specialized components designed to streamline the onboarding and integration process of different blockchains into the GlueX Protocol. These modules abstract blockchain level differences, providing a unified interface for interacting with various blockchains. By leveraging these modules, GlueX ensures seamless compatibility and reduces the complexity associated with supporting multiple chains with differing architectures, consensus mechanisms and operational nuances

Integrating a Blockchain Module

Required Interfaces

Blockchain Node Access

  • Requirement: Access to a fully synced blockchain node or a reliable third party RPC endpoint to interact with the target blockchain network
  • Purpose: To enable API calls for querying the blockchain and submitting transactions

Blockchain specific SDK or Libraries

  • Requirement: Include any required SDKs, libraries or APIs specific to the target blockchain (eg: web3 for Ethereum, cosmosSDK for cosmos chains)
  • Purpose: Facilitate low level communication and transaction creation

Chain Configuration

  • Requirement:
    • Chain ID and network details (mainnet/testnet)
    • Native token information (eg: gas currency)
    • Gas fee estimation logic specific to the chain
  • Purpose: Configure the GlueX Protocol to understand chain specific properties

Implementation of Default Functionalities*

  • Requirement:
    • Multicall for efficient batching of read operations
    • Fetching token balances of specific addresses
    • Calculating computation cost and factor to ensure transaction validity
    • Estimating gas (transaction cost) for blockchain operations
    • Signing transactions securely and efficiently
  • Purpose: Abstraction of default functional requirements for Gluex Protocol to interact with different blockchains

Error Handling and Fallbacks

  • Requirement: Implement robust error handling mechanisms to account for chain-specific quirks or downtime (eg: transaction reverts, RPC errors)
  • Purpose: Maintain reliability and uptime in multi chain operations

Abstracting Blockchain Differences

  • Requirement: Develop chain specific logic to abstract differences in:
    • Consensus algorithms (eg: Proof-of-Stake vs Proof-of-Work).
    • Transaction formats and metadata
    • Gas fee structures and dynamic adjustments
  • Purpose: Provide a unified GlueX interface to interact with different blockchains seamlessly
With these steps and requirements met, GlueX Blockchain Modules can provide robust and efficient integration, allowing the GlueX Protocol to operate across various blockchain ecosystems