Public-sale distributor (tokenomics §2)#17
Merged
Conversation
Fixed-price sale of the 15% public allocation. Immutable terms — no owner, no upgrade path, all actions (buy/finalize/claim/refund) permissionless. - Buyers pay a stablecoin at a fixed price for $CSIG during [start, end], up to a hard cap and per-wallet cap; the contract must hold >= hardCap CSIG. - finalize() (after end, or early on hard cap): soft cap met -> proceeds to treasury, unsold CSIG burned to 0xdead (§2), buyers claim(). Soft cap missed -> buyers refund() their stablecoin and the allocation returns to treasury. - Claim-based delivery so a failed sale refunds cleanly; SafeERC20 + nonReentrant + CEI throughout; ceil-rounded pricing. CountersigPublicSale.t.sol: 17 tests (success/burn/claim, failure/refund, caps, funding, early finalize, guards). DeployPublicSale.s.sol deploys the immutable sale. Full suite 149. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
The last token-side launch contract: sells the 15% / 150M public allocation.
CountersigPublicSale— immutable, trustlessfinalize()(after end, or early on hard cap):0xdead(§2 "unsold … permanently burned"), buyersclaim().refund()their stablecoin, allocation returns to treasury (a sale that never happened doesn't destroy the allocation).SafeERC20+nonReentrant+ CEI, ceil-rounded pricing. Funds directly when set as the token'spublicSalerecipient at TGE.Tests & deploy
17 tests (success/burn/claim, failure/refund, hard/wallet caps, funding guard, early finalize, double-claim/refund guards).
DeployPublicSale.s.soldeploys the immutable sale. Full suite 149, slither clean, deploy dry-run clean.Note: this is the plain-fixed-price design. If you want vested delivery of purchased tokens (my earlier recommendation to soften day-1 float/optics), that's a deliberate follow-on — say so and I'll layer it in.
🤖 Generated with Claude Code