Open
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.