fix(factory): derive per-campaign salt and expose init params on crea… - #1386
Merged
afurious merged 1 commit intoAug 24, 2026
Conversation
…te_campaign BREAKING CHANGE: create_campaign() now takes min_contribution, platform_config, bonus_goal, and bonus_goal_description in addition to its existing params, and its deployment salt is derived per-creator from a stored campaign counter instead of a constant [0; 32]. Previously every call from a given creator consumed the same (creator, salt) deployed-address pair, so a creator's second campaign always reverted on address collision regardless of whether their first campaign succeeded, failed, or completed. The hardcoded min_contribution and None platform_config/bonus_goal also meant a campaign's launch parameters could never be configured beyond the factory's fixed defaults. Supersedes audits Crowdfunding-DApp#48 (allow updates to campaign metadata) and Crowdfunding-DApp#49 (add a finalize_campaign function), both auto-closed by the stale bot with no PR merged; the underlying defect this issue tracks is unrelated to either of those. Closes #<issue-number>.
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.
closes #1377
…te_campaign
BREAKING CHANGE: create_campaign() now takes min_contribution, platform_config, bonus_goal, and bonus_goal_description in addition to its existing params, and its deployment salt is derived per-creator from a stored campaign counter instead of a constant [0; 32].
Previously every call from a given creator consumed the same (creator, salt) deployed-address pair, so a creator's second campaign always reverted on address collision regardless of whether their first campaign succeeded, failed, or completed. The hardcoded min_contribution and None platform_config/bonus_goal also meant a campaign's launch parameters could never be configured beyond the factory's fixed defaults.
Supersedes audits #48 (allow updates to campaign metadata) and #49 (add a finalize_campaign function), both auto-closed by the stale bot with no PR merged; the underlying defect this issue tracks is unrelated to either of those.
Closes #.
Description
Related Issues
Closes #
Type of Change
Required CI Checks
The following status checks must pass before this PR can be merged:
Frontend CI (
frontend_ci.yml—ci-frontendjob):pnpm --filter @stellar-raise/frontend typecheck)pnpm --filter @stellar-raise/frontend test)pnpm lint)pnpm format:check)Rust CI (
rust_ci.yml—checkjob):cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo build --release --target wasm32-unknown-unknowncargo test --workspaceChecklist
develop, notmaincargo fmt --alland the code is properly formattedcargo clippy --all-targets -- -D warningswith no warningscargo testand all tests passpnpm typecheckwith no type errorspnpm testand all frontend tests passpnpm lintwith no ESLint errorspnpm format:checkwith no formatting violations///doc commentsCHANGELOG.mdif applicableScreenshots / Logs (if applicable)
Additional Notes