Skip to content

feat: Implement Token Sale#414

Draft
0xNeshi wants to merge 46 commits into
mainfrom
token-presale
Draft

feat: Implement Token Sale#414
0xNeshi wants to merge 46 commits into
mainfrom
token-presale

Conversation

@0xNeshi

@0xNeshi 0xNeshi commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

IMPORTANT: The PR will need minor updating once https://github.com/openZeppelin/contractsSui/pull/417 is merged.
Other than the current use of Coin for the boundary with VestingWallet, the PR is ready for review.

Resolves #319

PR Checklist

  • Tests
  • Documentation
  • Changelog

0xNeshi added 30 commits June 23, 2026 16:33
@0xNeshi 0xNeshi self-assigned this Jun 25, 2026
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 17ff3787-2917-4a88-a90a-c2f99f0c6bb1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch token-presale

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.26%. Comparing base (23af906) to head (efcd351).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #414   +/-   ##
=======================================
  Coverage   83.26%   83.26%           
=======================================
  Files          29       29           
  Lines        2307     2307           
  Branches      732      731    -1     
=======================================
  Hits         1921     1921           
  Misses        348      348           
  Partials       38       38           
Flag Coverage Δ
contracts/access 65.46% <ø> (ø)
contracts/allowance 52.00% <ø> (ø)
contracts/finance 25.57% <ø> (ø)
contracts/utils 44.09% <ø> (ø)
math/fixed_point 60.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@0xNeshi 0xNeshi marked this pull request as ready for review June 26, 2026 12:15
@0xNeshi 0xNeshi marked this pull request as draft June 26, 2026 12:18
@bidzyyys

Copy link
Copy Markdown
Collaborator

Review — sale

  • 🟡 prefunded_sale.move:847 (share_and_activate) — the module doc guarantees "buyer claims and refunds do not depend on admin liveness" (L48), but the paired RefundVault is shared only by a separate integrator step (refund_vault::share) that the library neither performs nor verifies. Activate without sharing the vault and it stays owned by the issuer, so the permissionless cancel_after_close / refund paths (which need &mut vault) become uncallable by buyers — silent in the success path (claim needs no vault), locking buyer funds only on a soft-cap miss → have share_and_activate take the RefundVault<PaymentCoin> by value, assert object::id(vault) == *refund_vault_id.borrow(), and share_object it, so the no-admin-liveness guarantee is structural rather than convention.

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.

[Feature]: Implement Token Sale

2 participants