Murphy Logo Murphy
Meteora DBC

Create Config Form

A DBC-SDK configuration component with shadcn UI

Create Config Form

Create Config
Create a new DBC configuration

Loading...

Installation

Install dependencies

Start by installing the necessary Solana dependencies

pnpm add @solana/web3.js @solana/wallet-adapter-react bn.js

Add Wallet Provider

Ensure you have added the Wallet Provider to your application. If not, follow the steps in the Connect Wallet Button guide first.

Add Create Config Form

pnpm dlx shadcn@canary add https://www.murphyai.dev/r/createConfig-form.json

Base Usage

import { CreateConfigForm } from "@/components/ui/murphy/createConfig-form";
export default function MyPage() {
  return (
    <div>
      <h1 className="text-xl font-bold mb-2">Create config DBC</h1>
      <CreateConfigForm className="max-w-md" />
    </div>
  );
}

Features

  • Connect with Solana wallet
  • Create a new configuration for DBC-SDK
  • Customize fee receiver and leftover token receiver addresses
  • Choose quote token (SOL, USDC, USDT)
  • Configure cliff fee and important parameters
  • Distribute LP with percentage allocation for stakeholders
  • Real-time network detection (devnet/mainnet)
  • Multi-stage interface (input, confirmation, success, error)
  • Display transaction signatures with links to blockchain explorers
  • Error handling with automatic retry mechanism

Advanced Usage

export default function MyPage() {
  const handleConfigCreated = (configAddress: string) => {
    console.log(`New configuration created: ${configAddress}`);
  };
 
  return (
    <div>
      <h1 className="text-xl font-bold mb-2">Create Config DBC</h1>
      <CreateConfigForm
        className="max-w-md"
        onConfigCreated={handleConfigCreated}
      />
    </div>
  );
}

Configuration Parameters

When creating a DBC configuration, you need to understand the following important parameters:

Fee Claimer

The address that will receive fees from the pool. This is usually your main wallet.

Leftover Receiver

The address that will receive leftover tokens after transactions are executed.

Quote Mint

The token used as the quote token in the pool.

LP Distribution

Distribute liquidity tokens among stakeholders:

  • Partner LP: Percentage for partners (non-locked)
  • Creator LP: Percentage for creators (non-locked)
  • Partner Locked LP: Percentage locked for partners
  • Creator Locked LP: Percentage locked for creators

Note: The total of the LP percentages must equal 100%.

On this page