Quick Start
Get up and running with IU2U Protocol in just a few minutes! This guide combines Gasless Meta Transactions and IU2U Cross-Chain Protocol for seamless blockchain interactions.
Overview
IU2U Protocol is a unified system that enables:
🔥 Gasless Meta Transactions: Execute any contract interaction without holding native gas tokens
🌉 IU2U Cross-Chain Protocol: Seamless token transfers and DEX aggregation across 7+ blockchains
In this quick start, you'll learn how to:
Set up gas credits for gasless transactions
Execute gasless contract calls
Perform cross-chain IU2U transfers
Use DEX aggregation features
Integrate both systems in your dApp
1. Basic Setup
Frontend Integration
Install and initialize the IU2U SDK with both gasless and cross-chain capabilities:
import {
IU2UProvider,
CrossChainAggregator,
GasCreditVault,
MetaTxGateway
} from '@iu2u/sdk';
import { ethers } from 'ethers';
// Initialize Web3 provider
const provider = new ethers.providers.Web3Provider(window.ethereum);
const signer = provider.getSigner();
// Initialize IU2U Protocol (both systems)
const iu2u = new IU2UProvider({
provider: provider,
signer: signer,
network: 'testnet' // Use testnet for development
});
// Initialize components
const aggregator = new CrossChainAggregator({ provider, signer });
const gasVault = new GasCreditVault({ provider, signer });
const metaTxGateway = new MetaTxGateway({ provider, signer });Smart Contract Integration
For direct smart contract integration with both systems:
2. Gas Credits Setup
Deposit Tokens for Gas Credits
First, set up gas credits to enable gasless transactions:
Check Gas Credit Balance
3. Gasless Transactions
Execute Gasless Contract Calls
Execute any contract function without holding native gas tokens:
Batch Gasless Transactions
Execute multiple operations in a single gasless transaction:
4. IU2U Bridge Operations
Cross-Chain IU2U Transfers
Send IU2U tokens across different blockchains:
Cross-Chain Contract Calls
Execute contracts on other chains with IU2U transfers:
6. Error Handling
Implement proper error handling for production applications:
5. Integration Examples
Combined Gasless + Cross-Chain dApp
Build a complete dApp that combines both systems:
Next Steps
Now that you've completed the quick start:
Explore Core Concepts - Understand the integrated IU2U system
Learn Gasless Meta Transactions - Deep dive into gasless transactions
Study Cross-Chain Operations - Master IU2U bridge functionality
Read API Reference - Complete function documentation
Check Configuration - Set up both systems properly
Common Patterns
React Hook Example
Vue.js Integration
Support & Community
📖 Documentation: You're reading it!
💬 Discord: Join our community
🐛 Issues: GitHub Issues
📧 Email: [email protected]
🐦 Twitter: @IU2UProtocol
Ready to dive deeper? Continue with the Core Concepts section!
Last updated

