Skip to content

MeteoraAg/meteora-invent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Meteora Invent

A toolkit consisting of everything you need to invent innovative token launches on Meteora.

πŸ—οΈ Structure

meteora-invent/
β”œβ”€β”€ packages/          # Shared packages
β”‚   └── config/
β”‚       β”œβ”€β”€ eslint/
β”‚       β”œβ”€β”€ prettier/
β”‚       └── typescript/
β”œβ”€β”€ scaffolds/         # Scaffolds - production-ready frontend application templates
β”‚   └── fun-launch/
└── studio/            # Studio - a collection of scripts for you to innovate and create
    β”œβ”€β”€ config
    β”‚   β”œβ”€β”€ damm_v1_config.jsonc
    β”‚   β”œβ”€β”€ damm_v2_config.jsonc
    β”‚   β”œβ”€β”€ dbc_config.jsonc
    β”‚   └── dlmm_config.jsonc
    β”œβ”€β”€ data
    β”‚   β”œβ”€β”€ kv_proof.json
    β”‚   └── whitelist_wallet.csv
    β”œβ”€β”€ LLM.txt
    β”œβ”€β”€ package.json
    β”œβ”€β”€ README.md
    β”œβ”€β”€ src
    β”‚   β”œβ”€β”€ helpers
    β”‚   β”‚   β”œβ”€β”€ accounts.ts
    β”‚   β”‚   β”œβ”€β”€ cli.ts
    β”‚   β”‚   β”œβ”€β”€ common.ts
    β”‚   β”‚   β”œβ”€β”€ config.ts
    β”‚   β”‚   β”œβ”€β”€ index.ts
    β”‚   β”‚   β”œβ”€β”€ token.ts
    β”‚   β”‚   β”œβ”€β”€ transaction.ts
    β”‚   β”‚   β”œβ”€β”€ utils.ts
    β”‚   β”‚   └── validation.ts
    β”‚   β”œβ”€β”€ lib
    β”‚   β”‚   β”œβ”€β”€ alpha_vault
    β”‚   β”‚   β”‚   β”œβ”€β”€ index.ts
    β”‚   β”‚   β”‚   β”œβ”€β”€ merkle_tree
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ balance_tree.ts
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ index.ts
    β”‚   β”‚   β”‚   β”‚   └── merkle_tree.ts
    β”‚   β”‚   β”‚   └── utils.ts
    β”‚   β”‚   β”œβ”€β”€ damm_v1
    β”‚   β”‚   β”‚   β”œβ”€β”€ index.ts
    β”‚   β”‚   β”‚   └── stake2earn.ts
    β”‚   β”‚   β”œβ”€β”€ damm_v2
    β”‚   β”‚   β”‚   └── index.ts
    β”‚   β”‚   β”œβ”€β”€ dbc
    β”‚   β”‚   β”‚   └── index.ts
    β”‚   β”‚   └── dlmm
    β”‚   β”‚       └── index.ts
    β”‚   β”œβ”€β”€ scripts
    β”‚   β”‚   β”œβ”€β”€ alpha_vault
    β”‚   β”‚   β”‚   └── create_alpha_vault.ts
    β”‚   β”‚   β”œβ”€β”€ damm_v1
    β”‚   β”‚   β”‚   β”œβ”€β”€ create_pool.ts
    β”‚   β”‚   β”‚   β”œβ”€β”€ create_stake2earn_farm.ts
    β”‚   β”‚   β”‚   β”œβ”€β”€ lock_liquidity_stake2earn.ts
    β”‚   β”‚   β”‚   └── lock_liquidity.ts
    β”‚   β”‚   β”œβ”€β”€ damm_v2
    β”‚   β”‚   β”‚   β”œβ”€β”€ create_balanced_pool.ts
    β”‚   β”‚   β”‚   └── create_one_sided_pool.ts
    β”‚   β”‚   β”œβ”€β”€ dbc
    β”‚   β”‚   β”‚   β”œβ”€β”€ claim_trading_fee.ts
    β”‚   β”‚   β”‚   β”œβ”€β”€ create_config.ts
    β”‚   β”‚   β”‚   β”œβ”€β”€ create_pool.ts
    β”‚   β”‚   β”‚   β”œβ”€β”€ migrate_damm_v1.ts
    β”‚   β”‚   β”‚   β”œβ”€β”€ migrate_damm_v2.ts
    β”‚   β”‚   β”‚   └── swap.ts
    β”‚   β”‚   β”œβ”€β”€ dlmm
    β”‚   β”‚   β”‚   β”œβ”€β”€ create_pool.ts
    β”‚   β”‚   β”‚   β”œβ”€β”€ seed_liquidity_lfg.ts
    β”‚   β”‚   β”‚   β”œβ”€β”€ seed_liquidity_single_bin.ts
    β”‚   β”‚   β”‚   └── set_pool_status.ts
    β”‚   β”‚   └── settings
    β”‚   β”‚       └── generate_keypair.ts
    β”‚   β”œβ”€β”€ tests
    β”‚   β”‚   β”œβ”€β”€ artifacts
    β”‚   β”‚   β”‚   β”œβ”€β”€ accounts
    β”‚   β”‚   β”‚   β”‚   └── 3ifhD4Ywaa8aBZAaQSqYgN4Q1kaFArioLU8uumJMaqkE.json
    β”‚   β”‚   β”‚   β”œβ”€β”€ alpha_vault.so
    β”‚   β”‚   β”‚   β”œβ”€β”€ cp_amm.so
    β”‚   β”‚   β”‚   β”œβ”€β”€ dynamic_amm.so
    β”‚   β”‚   β”‚   β”œβ”€β”€ dynamic_bonding_curve.so
    β”‚   β”‚   β”‚   β”œβ”€β”€ dynamic_fee_sharing.so
    β”‚   β”‚   β”‚   β”œβ”€β”€ dynamic_vault.so
    β”‚   β”‚   β”‚   β”œβ”€β”€ lb_clmm.so
    β”‚   β”‚   β”‚   β”œβ”€β”€ locker.so
    β”‚   β”‚   β”‚   └── metaplex.so
    β”‚   β”‚   └── keys
    β”‚   β”‚       └── localnet
    β”‚   β”‚           └── admin-bossj3JvwiNK7pvjr149DqdtJxf2gdygbcmEPTkb2F1.json
    β”‚   └── utils
    β”‚       β”œβ”€β”€ constants.ts
    β”‚       └── types.ts

πŸš€ Getting Started

Prerequisites

  • Node.js >= 18.0.0
  • pnpm >= 10.0.0

Clone the repository

git clone https://github.com/MeteoraAg/meteora-invent.git

Installation

# Install pnpm if you haven't already
npm install -g pnpm

# Install all dependencies
pnpm install

πŸ“¦ Workspaces

Studio (@meteora-invent/studio)

The studio workspace contains all the scripts for interacting with Meteora's programs.

Getting Started

  1. Copy the .env.example file to .env and configure the environment variables.
cp studio/.env.example studio/.env
  1. Generate a keypair from your private key to launch pools.
pnpm studio generate-keypair
  1. Configure the config files in the studio/config directory.

Note: You can use the provided example configurations as a starting point. Make sure to replace the placeholders with your actual values.

  1. Run the studio scripts.

Optional: You can also run the studio scripts on localnet - http://localhost:8899 with the following command

pnpm studio start-test-validator

DLMM Scripts


Create a Customizable Permissionless DLMM Pool

pnpm studio dlmm-create-pool --config ./studio/config/dlmm_config.jsonc

Seed Liquidity (LFG)

pnpm studio dlmm-seed-liquidity-lfg --config ./studio/config/dlmm_config.jsonc

Seed Liquidity (Single Bin)

pnpm studio dlmm-seed-liquidity-single-bin --config ./studio/config/dlmm_config.jsonc

Set DLMM Pool Status

pnpm studio dlmm-set-pool-status --config ./studio/config/dlmm_config.jsonc

DAMM v2 Scripts


Create a Balanced Constant Product Pool

pnpm studio damm-v2-create-balanced-pool --config ./studio/config/damm_v2_config.jsonc

Create a One-Sided Pool

pnpm studio damm-v2-create-one-sided-pool --config ./studio/config/damm_v2_config.jsonc

DAMM v1 Scripts


Create a Constant Product Pool

pnpm studio damm-v1-create-pool --config ./studio/config/damm_v1_config.jsonc

Lock Liquidity

pnpm studio damm-v1-lock-liquidity --config ./studio/config/damm_v1_config.jsonc

Create a Stake2Earn Farm

pnpm studio damm-v1-create-stake2earn-farm --config ./studio/config/damm_v1_config.jsonc

Lock Liquidity (Stake2Earn)

pnpm studio damm-v1-lock-liquidity-stake2earn --config ./studio/config/damm_v1_config.jsonc

DBC Scripts


Create a DBC Config

pnpm studio dbc-create-config --config ./studio/config/dbc_config.jsonc

Create a DBC Pool

pnpm studio dbc-create-pool --config ./studio/config/dbc_config.jsonc

Claim Trading Fees

pnpm studio dbc-claim-trading-fee --config ./studio/config/dbc_config.jsonc

Migrate to DAMM v1

pnpm studio dbc-migrate-to-damm-v1 --config ./studio/config/dbc_config.jsonc

Migrate to DAMM v2

pnpm studio dbc-migrate-to-damm-v2 --config ./studio/config/dbc_config.jsonc

Swap (Buy/Sell)

pnpm studio dbc-swap --config ./studio/config/dbc_config.jsonc

Scaffolds

Fun Launch (@meteora-invent/scaffold-fun-launch)

A Next.js application template for creating a launchpad.

Getting Started

Copy the .env.example file to .env and configure the environment variables.

cp scaffolds/fun-launch/.env.example scaffolds/fun-launch/.env

Install Dependencies

pnpm install

Running the Scaffold

# Run the fun-launch scaffold in development
pnpm --filter @meteora-invent/scaffold/fun-launch dev

# Build the fun-launch scaffold
pnpm --filter @meteora-invent/scaffold/fun-launch build

🀝 Contributing

  1. Create a feature branch
  2. Make your changes
  3. Run pnpm format and pnpm lint
  4. Submit a pull request

πŸ“„ License

ISC