Quick Start Guide for Developers at XFI Hackathon
Introduction
Welcome to the XFI Hackathon! This guide will help you get started with the XFI Data Warehouse, Block Explorer, XFI Swap and Status providing you with the tools and knowledge needed to build powerful applications on the XFI Chain.
If you are into watching videos more than reading: https://www.loom.com/share/b096b03cf7884312a9bf347a0ee30607
Block Explorer
The Block Explorer provides real-time visibility into transactions, blocks, and wallet addresses, facilitating easy tracking and analysis.
Key Features
Real-Time Tracking: Monitor transactions, blocks, and wallet addresses.
Developer Console: Access data API and verify contracts.
Warehouse Integration: Utilize the warehouse for data queries and dashboard creation.
Exploring Blocks and Transactions
The Block Explorer offers basic features similar to well-known explorer services, such as:
Block Info: View details about individual blocks.
Transaction Info: Track transaction statuses and details.
Chain Info: Get information about the XFI Chain.
Visit the Block Explorer at XFI Block Explorer.
Top ERC-20 Tokens and Transactions
The Block Explorer also provides insights into top ERC-20 tokens and their transactions (TBA).
Contract Verification Interface
Contract verification on XFI Chain is streamlined through the integration with Sourcify, ensuring transparency and trust in smart contracts.
How to Verify Your Contract
Prepare Source Code: Ensure your smart contract source code and related metadata are ready.
Submit to Sourcify:
Via Block Explorer: Follow the instructions on the XFI Block Explorer Contract Verification page.
Via Sourcify Portal: Submit your contract directly on the Sourcify Verification Portal.
Verification Process: Sourcify will match the submitted source code with the on-chain bytecode. If they match, the contract is successfully verified.
Example Verification Command
Accessing Verified Contracts
Once verified, your contract's source code and metadata will be accessible through the XFI Chain Block Explorer, promoting transparency and trust.
Data Warehouse Overview
The XFI Data Warehouse is designed to store large volumes of historical data and enable fast, complex queries across various data types. It provides meaningful business insights, embeddable charts, and a data API.
Key Features
Analysis: Optimized for read access, making it efficient for analytical queries which help in reporting, data mining, and predictive analytics.
Historical Intelligence: Maintains historical data to analyze trends over time, providing a valuable resource for longitudinal studies and forecasting.
Scalability: Designed to scale out to handle terabytes to petabytes of data, accommodating growth seamlessly.
Performance: Built with performance optimization mechanisms such as indexing, partitioning, and caching to ensure quick retrieval of data.
Video Explainer
For a comprehensive overview, watch this video explainer.
Creating Queries and Dashboards
You can create queries, build dashboards by combining queries and visualizations, tag them, and publish them for public usage.
Steps to Create a Dashboard
Create Queries: Define your SQL queries to fetch data.
Create Dashboards: Combine multiple queries and visualizations.
Tag and Publish: Tag your dashboards and publish them for public access.
Example: XFI Pools Activity Dashboard
Query Dashboards: Select the query dashboard from the dropdown.
Global Parameters: Set the global parameters for the dashboard.
Refresh Rate: Define the refresh rate for the dashboard data.
SQL Query: Write your SQL query with necessary parameters.
Visualization: Configure the visualization type and parameters.
SQL Query Example
Visualization Configuration
Visualization Config: Select the chart type and configure the axes and parameters.
Publish: Publish your dashboard to make it available externally.
API Access and Integration
The Data Warehouse API allows you to access and manipulate data programmatically.
Using the API
Example API Request
Warehouse API
The Warehouse API provides developers with a robust and scalable solution for managing warehouse operations efficiently.
Key Benefits
Scalability: Easily handle increasing data volumes and transaction loads.
Efficiency: Automate and optimize warehouse processes.
Real-Time Data: Access up-to-date information on inventory levels, order status, and more.
Integration: Seamlessly connect with other systems for a unified workflow.
Functionalities
Inventory Management: Track and manage stock levels, locations, and movements.
Order Processing: Handle order creation, picking, packing, and shipping.
Real-Time Updates: Receive real-time notifications and updates.
Reporting and Analytics: Generate comprehensive reports and analytics.
Authorization
To start using the Warehouse API, obtain your API key from developers.warehouseapi.com.
Example Authorization
Swap Interface
XFI Swap is a Uniswap V2 fork tailored to support the XFI DeFi ecosystem, designed to enhance liquidity and trading efficiency.
Key Features
Token Swaps: Seamlessly swap between different tokens.
Pair Creation and Liquidity Adding: Create new trading pairs and add liquidity.
Charts and Analytics: Access dedicated charts for trading insights.
Using the Swap Interface
Basic Swap: Perform simple token swaps.
Pair Creation: Create new token pairs and provide liquidity.
Dex.guru Charts: Access charts and analytics for better trading decisions.
Explore the Swap Interface at XFI Swap.
Service Status
Developers can check the status of the XFI services and get fundamental information about the chain at status.xfi.ms.
Key Information
Service Status: Real-time updates on the status of various XFI services.
Chain Fundamentals: Access fundamental information about the XFI Chain.
FAQ and Support
For any questions or support, join our Community Discord Server and head to the #api-questions channel.
Last updated