Skip to main content

Overview

This page provides the complete interfaces for all RektHub contracts. Use these for type-safe integration, ABI generation, and building custom contracts that interact with the protocol.
For TypeScript Users: Generate TypeScript types from these interfaces using TypeChain for full type safety in your frontend.

IRektHubFactory

Interface for the RektHub Factory contract—the main entry point for all protocol interactions.
Key Functions:
  • Token creation (standard and deterministic)
  • Trading (buy, sell, sell percentage)
  • Migration (graduation to DEX)
  • View functions (get curve, get fee)

IBondingCurve

Interface for individual bonding curve contracts—each token has its own isolated curve.
Key Functions:
  • Trading (buy, sell)
  • Creator management (claim fees, transfer)
  • Migration (graduate to DEX)
  • View functions (state, prices, reserves)

IRektHubToken

Interface for RektHub creator tokens, standard ERC20 with metadata.
Key Functions:
  • ERC20 standard (transfer, approve, balanceOf, etc.)
  • Metadata (tokenURI, setTokenURI)
  • View functions (creator, factory, mintingDisabled)

IDEXMigrator

Interface for DEX-specific migration contracts. Implement this to create custom migrators for any DEX.
Use Cases:
  • Create custom migrators for any DEX (Uniswap, PancakeSwap, etc.)
  • Handle chain-specific liquidity provision
  • Support multiple DEX integrations
Example Implementation:

Minimal ABIs for Common Operations

Factory - Create Token

Factory - Trade

Curve - Get Quote

Curve - State


TypeScript Type Generation

Generate TypeScript types for type-safe integration:

Using TypeChain

Then use the generated types:

Integration Checklist

1

Import Interfaces

Copy the interfaces you need or install from npm (when available)
2

Generate ABIs

Extract ABIs from interfaces using Hardhat or Foundry
3

Generate Types

Use TypeChain for TypeScript type generation
4

Create Contract Instances

Instantiate contracts with ethers.js or viem
5

Handle Errors

Implement proper error handling for custom errors

Custom Error Handling

All RektHub contracts use custom errors for gas efficiency. Handle them properly:

Next Steps

Quick Start

Start integrating with examples

Events Reference

Listen to protocol events

Libraries

Bonding curve math utilities

Factory Contract

Learn about the orchestrator