Skip to content

feat: integrate public SUN SDK into sun-cli v2.0.0 - #89

Open
felix-tron wants to merge 12 commits into
mainfrom
release_v1.2.3
Open

felix-tron wants to merge 12 commits into
mainfrom
release_v1.2.3

Conversation

@felix-tron

@felix-tron felix-tron commented Oct 23, 2026 •

Copy link
Copy Markdown

Objective

Prepare sun-cli 2.0.0 by replacing @sun-protocol/sun-kit and local protocol implementations with the public modular SUN SDK packages. Preserve the existing command interface and transaction parameter semantics while moving the underlying execution to SUN SDK.

Changes

  • Add a unified SDK/runtime integration layer, Agent Wallet adapter, network configuration, and compatible error/transaction-result mapping.
  • Migrate Swap, V2/V3/V4 liquidity and position operations, contract read/write, wallet balance queries, and SunPump integration to SUN SDK.
  • Preserve minimum-amount and slippage parameter semantics, the existing txid result structure, wallet output fields, and SunPump's Mainnet-only restriction.
  • Restore the pre-migration V4 mint defaults: fee 500 and an automatic tick range derived from the current pool tick, extending 100 tick spacings in each direction. Preserve explicit fee and tick inputs, including tick 0.
  • Extract named V3/V4 default fee constants and use the same defaults in execution parameters and command summaries.
  • Replace the sun-kit dependency and local SunPump implementation with public SUN SDK packages.
  • Require Node.js ^22.23.4 || ^24.22.1; run CI on the latest Node 22.x and 24.x patches and add lint checks.
  • Add SDK adapter, command compatibility, liquidity parameter, dependency-boundary, and output contract tests.
  • Remove the Dependabot configuration.
  • Set the next test-package version to 2.0.0-beta.0. The target stable release is 2.0.0.

Validation

Current review fixes

  • All 158 automated tests passed locally on both Node.js 22.23.4 and 24.22.1; build and lint passed on both versions.
  • Six additional scenarios constructed transaction plans using the actual public SDK with mocked pool reads. These cover fee tiers 500/3000 and zero/positive/negative current ticks; no transactions were signed or broadcast.
  • CLI dry-run checks confirmed the default fee display and preservation of explicit fee/tick inputs.
  • GitHub CI passed for the Node/V4 fixes in c4f2072 (Node 22.x, Node 24.x, and lint).

Historical published-package regression

  • Read-only and dry-run regression: 26/26 cases passed on the previously published test package.
  • 1.2.2 and 1.2.3-beta.0 each completed 11 successful Nile transactions, for 22 successful transactions in total.
  • 1.2.3-beta.1 completed two additional successful Nile Swap transactions, with quotes, calldata, transfer events, and received amounts verified.
  • Independent QA accepted the historical beta regression. These results do not represent a published 2.0.0-beta.0 test or on-chain validation of the subsequent V4 default-parameter fixes.

Remaining release steps

  • SUN SDK dependencies are still pinned to 0.1.1-beta.0; stable 0.1.1 is not yet published. Update all direct SDK dependencies and the lockfile after the approved stable SDK release is available.
  • Publish and validate the next sun-cli beta, including focused regression of the V4 default-parameter fixes.
  • Complete CI and final review before merging and publishing stable sun-cli 2.0.0.

Comment thread .github/workflows/ci.yml Resolved
Comment thread package.json Resolved
Comment thread src/commands/liquidity.ts Resolved
Comment thread src/commands/liquidity.ts Resolved
@felix-tron felix-tron changed the title Release v1.2.3 feat: integrate public SUN SDK into sun-cli v2.0.0 Oct 26, 2026
- restore ABI discovery, Shasta generic calls and custom ABI support

- preserve SunPump min-out, API endpoint and transaction output

- align V3/V4 liquidity behavior with pre-migration implementation

- upgrade SUN SDK dependencies to 0.1.1-beta.1

- add compatibility regression tests
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.

3 participants