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:

  1. Set up gas credits for gasless transactions

  2. Execute gasless contract calls

  3. Perform cross-chain IU2U transfers

  4. Use DEX aggregation features

  5. 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:

  1. Explore Core Concepts - Understand the integrated IU2U system

  2. Learn Gasless Meta Transactions - Deep dive into gasless transactions

  3. Study Cross-Chain Operations - Master IU2U bridge functionality

  4. Read API Reference - Complete function documentation

  5. Check Configuration - Set up both systems properly

Common Patterns

React Hook Example

Vue.js Integration

Support & Community

Ready to dive deeper? Continue with the Core Concepts section!

Last updated