Skip to content

Claude/create token sol pool q bk mu#104

Open
eldenop wants to merge 5 commits intoMeteoraAg:mainfrom
eldenop:claude/create-token-sol-pool-QBkMu
Open

Claude/create token sol pool q bk mu#104
eldenop wants to merge 5 commits intoMeteoraAg:mainfrom
eldenop:claude/create-token-sol-pool-QBkMu

Conversation

@eldenop
Copy link
Copy Markdown

@eldenop eldenop commented Apr 17, 2026

No description provided.

claude added 5 commits April 17, 2026 07:08
… minimal SOL

Creates a Meteora DLMM pool using SpotImbalanced strategy:
- 10M Token spread across bins above active price (huge sell-side depth)
- 0.01 SOL at active bin (minimal buy-side floor)
- Calculates activeBinId from human-readable price + decimals
- Auto-selects PresetParameter matching requested binStep
- Handles multi-tx addLiquidity returned by SDK

Add @meteora-ag/dlmm dependency.

https://claude.ai/code/session_01DWuvJutZWHyLz1kf3QQXAb
Two functions:
- addLiquidityToExistingPosition: uses addLiquidityByStrategy to top up an
  existing position, reusing its stored minBinId/maxBinId
- addLiquidityNewPosition: calls initializePositionAndAddLiquidityByStrategy
  to open a fresh position centred on the current activeBin

Plus getDlmmPositions helper to inspect all positions before acting.

https://claude.ai/code/session_01DWuvJutZWHyLz1kf3QQXAb
Replace function-export skeleton with a self-contained executable:
- CONFIG block at top (rpcUrl, privateKey, poolAddress, amounts)
- printPositions() to inspect current positions before acting
- addLiquidityToExistingPosition() using addLiquidityByStrategy
- addLiquidityNewPosition() using initializePositionAndAddLiquidityByStrategy
- main() IIFE that runs immediately via npx tsx

https://claude.ai/code/session_01DWuvJutZWHyLz1kf3QQXAb
scripts/package.json   — "type":"module", deps: @meteora-ag/dlmm, bn.js, decimal.js
scripts/createPool.js  — create lbPair + initialize position + add liquidity
scripts/addLiquidity.js — scene A (top up existing) / scene B (new position in pool)

All files use import syntax, run directly with:
  cd scripts && npm install && node createPool.js

Also remove scripts/ from .gitignore.

https://claude.ai/code/session_01DWuvJutZWHyLz1kf3QQXAb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants