Skip to content

Feat/sync release 0.2.2 - v1.3.0#30

Open
bangyro wants to merge 9 commits intomainfrom
feat/sync_release_0.2.2
Open

Feat/sync release 0.2.2 - v1.3.0#30
bangyro wants to merge 9 commits intomainfrom
feat/sync_release_0.2.2

Conversation

@bangyro
Copy link
Copy Markdown
Collaborator

@bangyro bangyro commented Apr 19, 2026

Changes

  • Support Zap-In to damm-V2 Compounding Pool Fee Mode.
  • Support Zap-In to single-sided damm-v2 pool. A single-sided pool is a pool that fully contains only one token of the pool pair, either fully token A (sqrt_price at sqrt_min_price) or fully token B (sqrt_price at sqrt_max_price).
  • Rebalance DLMM position with 1 bin. Reference: fix: rebalance single bin dlmm-sdk#286

Tests

Compounding Fee test

Note

For pool's that are near single-sided, zap-in is likely to fail if the amount of tokens to swap is too low. This happens because the jup quote function cannot find any routes to swap a small amount of tokens.

For example, in direct path for a pool composed of 99.9999% token A and 0.0001% token B. We might try to swap 1 lamport of token A to token B which is unlikely to find any swap routes.

bangyro added 2 commits April 14, 2026 14:56
- Support Zap-In to damm-V2 Compounding Pool Fee Mode
- Support Zap-In to single-sided damm-v2 pool
@bangyro
Copy link
Copy Markdown
Collaborator Author

bangyro commented Apr 20, 2026

/bot review

@metoeraag-bot
Copy link
Copy Markdown

metoeraag-bot Bot commented Apr 20, 2026

Bot Agent progress: /bot review

Progress:

  • Repo checks (0 ok, 3 failed)
  • Context build
  • Codex review (1 pass)
  • Parallel review (Claude (API) + Codex merged)
  • Post review

Copy link
Copy Markdown

@metoeraag-bot metoeraag-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

Request changes

Summary

⚠️ Limited-confidence review: setup failed: bun install --frozen-lockfile.

Posted 1 validated inline finding(s) after final filtering.

Findings
  • [P1] package.json:41 These dependency additions/version bumps also need a corresponding bun.lock update. In the current state, bun install --frozen-lockfile fails because Bun wants to rewrite the lockfile, which prevents a clean install and is the direct cause of the downstream typecheck/build failures in this run. Please regenerate and commit the Bun lockfile (or remove Bun from the required workflow if it's no longer supported).
Repo checks

Repo Checks

  • bun install --frozen-lockfile: failed
bun install v1.3.2 (b131639c)

Resolving dependencies
Resolved, downloaded and extracted [309]
error: lockfile had changes, but lockfile is frozen
note: try re-running without --frozen-lockfile and commit the updated lockfile
  • bun run typecheck: failed
error TS2688: Cannot find type definition file for 'chai'.
  The file is in the program because:
    Entry point of type library 'chai' specified in compilerOptions
error TS2688: Cannot find type definition file for 'mocha'.
  The file is in the program because:
    Entry point of type library 'mocha' specified in compilerOptions

$ tsc
  • bun run build: failed
$ rm -rf dist && tsup src/index.ts --format esm,cjs --dts
/usr/bin/bash: line 1: tsup: command not found
error: script "build" exited with code 127

Comment thread package.json
@bangyro
Copy link
Copy Markdown
Collaborator Author

bangyro commented Apr 20, 2026

/bot review

@metoeraag-bot
Copy link
Copy Markdown

metoeraag-bot Bot commented Apr 20, 2026

Bot Agent progress: /bot review

Progress:

  • Repo checks (3 ok, 0 failed)
  • Context build
  • Codex review (1 pass)
  • Parallel review (Claude (API) + Codex merged)
  • Post review

Copy link
Copy Markdown

@metoeraag-bot metoeraag-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

Request changes

Summary

Posted 1 validated inline finding(s) after final filtering.

Findings
  • [P1] package.json:5 The published entrypoints don’t match the actual tsup outputs. Repo-local build logs show ESM at dist/index.mjs and CJS at dist/index.js, but main/exports.require still point to dist/index.cjs, and module/exports.import point to dist/index.js (the CJS artifact). That means require('@meteora-ag/zap-sdk') will resolve to a missing file, and ESM consumers will be pointed at the wrong bundle format. Please either change the tsup output extensions to emit the declared filenames, or update main/module/exports to match the generated files before publishing 1.3.0.
Repo checks

Repo Checks

  • pnpm install --frozen-lockfile: ok
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +371
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 371, reused 87, downloaded 0, added 0
Progress: resolved 371, reused 355, downloaded 12, added 28
Progress: resolved 371, reused 355, downloaded 16, added 371, done

dependencies:
+ @coral-xyz/anchor 0.31.1
+ @meteora-ag/cp-amm-sdk 1.4.1
+ @meteora-ag/dlmm 1.9.0
+ @solana/spl-token 0.4.13
+ @solana/web3.js 1.98.4
+ bn.js 5.2.2
+ decimal.js 10.6.0
+ invariant 2.2.4
+ typescript 5.9.2

devDependencies:
+ @types/bn.js 5.2.0
+ @types/chai 4.3.20
+ @types/invariant 2.2.37
+ @types/mocha 9.1.1
+ bip39 3.1.0
+ chai 4.5.0
+ ed25519-hd-key 1.3.0
+ litesvm 0.6.0
+ mocha 9.2.2
+ prettier 3.8.2
+ ts-mocha 10.1.0
+ tsup 8.5.1
+ tsx 4.20.3

╭ Warning ─────────────────────────────────────────────────────────────────────╮
│                                                                              │
│   Ignored build scripts: bigint-buffer@1.1.5, bufferutil@4.0.9,              │
│   esbuild@0.25.8, esbuild@0.27.7, utf-8-validate@5.0.10.                     │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed     │
│   to run scripts.                                                            │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
Done in 3.1s using pnpm v10.33.0

! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-10.33.0.tgz
  • pnpm run typecheck: ok
> @meteora-ag/zap-sdk@1.3.0 typecheck /data/workdir/2962945/MeteoraAg/zap-sdk
> tsc
  • pnpm run build: ok
> @meteora-ag/zap-sdk@1.3.0 build /data/workdir/2962945/MeteoraAg/zap-sdk
> rm -rf dist && tsup src/index.ts --format esm,cjs --dts

�[34mCLI�[39m Building entry: src/index.ts
�[34mCLI�[39m Using tsconfig: tsconfig.json
�[34mCLI�[39m tsup v8.5.1
�[34mCLI�[39m Target: es6
�[34mESM�[39m Build start
�[34mCJS�[39m Build start
�[32mESM�[39m �[1mdist/index.mjs �[22m�[32m157.41 KB�[39m
�[32mESM�[39m ⚡️ Build success in 63ms
�[32mCJS�[39m �[1mdist/index.js �[22m�[32m165.37 KB�[39m
�[32mCJS�[39m ⚡️ Build success in 64ms
�[34mDTS�[39m Build start
�[32mDTS�[39m ⚡️ Build success in 3247ms
�[32mDTS�[39m �[1mdist/index.d.mts �[22m�[32m114.60 KB�[39m
�[32mDTS�[39m �[1mdist/index.d.ts  �[22m�[32m114.60 KB�[39m

Comment thread package.json Outdated
@bangyro
Copy link
Copy Markdown
Collaborator Author

bangyro commented Apr 20, 2026

/bot review

@metoeraag-bot
Copy link
Copy Markdown

metoeraag-bot Bot commented Apr 20, 2026

Bot Agent progress: /bot review

Progress:

  • Repo checks (3 ok, 0 failed)
  • Context build
  • Codex review (1 pass)
  • Parallel review (Claude (API) + Codex merged)
  • Post review

Copy link
Copy Markdown

@metoeraag-bot metoeraag-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

Request changes

Summary

Posted 1 validated inline finding(s) after final filtering.

Findings
  • [P1] package.json:34 The build now emits dist/index.mjs for ESM and dist/index.js for CJS, but exports["."].import still points to ./dist/index.js (and module above does too). That makes ESM consumers load the CJS artifact after publish, which can break/bypass proper ESM interop and leaves the generated .mjs bundle unused. Please point the ESM entrypoints at ./dist/index.mjs (or change the build output names to match the export map).
Repo checks

Repo Checks

  • pnpm install --frozen-lockfile: ok
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +371
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 371, reused 351, downloaded 20, added 371, done

dependencies:
+ @coral-xyz/anchor 0.31.1
+ @meteora-ag/cp-amm-sdk 1.4.1
+ @meteora-ag/dlmm 1.9.0
+ @solana/spl-token 0.4.13
+ @solana/web3.js 1.98.4
+ bn.js 5.2.2
+ decimal.js 10.6.0
+ invariant 2.2.4
+ typescript 5.9.2

devDependencies:
+ @types/bn.js 5.2.0
+ @types/chai 4.3.20
+ @types/invariant 2.2.37
+ @types/mocha 9.1.1
+ bip39 3.1.0
+ chai 4.5.0
+ ed25519-hd-key 1.3.0
+ litesvm 0.6.0
+ mocha 9.2.2
+ prettier 3.8.2
+ ts-mocha 10.1.0
+ tsup 8.5.1
+ tsx 4.20.3

╭ Warning ─────────────────────────────────────────────────────────────────────╮
│                                                                              │
│   Ignored build scripts: bigint-buffer@1.1.5, bufferutil@4.0.9,              │
│   esbuild@0.25.8, esbuild@0.27.7, utf-8-validate@5.0.10.                     │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed     │
│   to run scripts.                                                            │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
Done in 1.6s using pnpm v10.33.0
  • pnpm run typecheck: ok
> @meteora-ag/zap-sdk@1.3.0 typecheck /data/workdir/2962945/MeteoraAg/zap-sdk
> tsc
  • pnpm run build: ok
> @meteora-ag/zap-sdk@1.3.0 build /data/workdir/2962945/MeteoraAg/zap-sdk
> rm -rf dist && tsup src/index.ts --format esm,cjs --dts

�[34mCLI�[39m Building entry: src/index.ts
�[34mCLI�[39m Using tsconfig: tsconfig.json
�[34mCLI�[39m tsup v8.5.1
�[34mCLI�[39m Target: es6
�[34mESM�[39m Build start
�[34mCJS�[39m Build start
�[32mESM�[39m �[1mdist/index.mjs �[22m�[32m157.34 KB�[39m
�[32mESM�[39m ⚡️ Build success in 59ms
�[32mCJS�[39m �[1mdist/index.js �[22m�[32m165.24 KB�[39m
�[32mCJS�[39m ⚡️ Build success in 59ms
�[34mDTS�[39m Build start
�[32mDTS�[39m ⚡️ Build success in 3353ms
�[32mDTS�[39m �[1mdist/index.d.mts �[22m�[32m114.55 KB�[39m
�[32mDTS�[39m �[1mdist/index.d.ts  �[22m�[32m114.55 KB�[39m

Comment thread package.json
Comment thread examples/helpers.ts
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the first commit is just formatting with prettier, you can safely omit it from the review

Comment thread bun.lock Outdated
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using pnpm instead

@bangyro bangyro force-pushed the feat/sync_release_0.2.2 branch 2 times, most recently from e097b79 to 6585628 Compare April 23, 2026 09:04
@bangyro bangyro force-pushed the feat/sync_release_0.2.2 branch from 6585628 to 327f808 Compare April 23, 2026 09:21
@bangyro bangyro changed the title Feat/sync release 0.2.2 Feat/sync release 0.2.2 - v1.3.0 Apr 24, 2026
Comment thread tests/zapInDammV2.test.ts
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only covering a few test cases for now. Might add more in the future

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.

1 participant