Skip to content

fix(factory): derive per-campaign salt and expose init params on crea… - #1386

Merged
afurious merged 1 commit into
Crowdfunding-DApp:mainfrom
spotkorner-dot:fix/factory-per-campaign-salt-and-params
Aug 24, 2026
Merged

fix(factory): derive per-campaign salt and expose init params on crea…#1386
afurious merged 1 commit into
Crowdfunding-DApp:mainfrom
spotkorner-dot:fix/factory-per-campaign-salt-and-params

Conversation

@spotkorner-dot

Copy link
Copy Markdown
Contributor

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

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • CI / Infrastructure

Required CI Checks

The following status checks must pass before this PR can be merged:

Frontend CI (frontend_ci.ymlci-frontend job):

  • TypeScript type-check (pnpm --filter @stellar-raise/frontend typecheck)
  • Vitest test suite (pnpm --filter @stellar-raise/frontend test)
  • ESLint across all workspaces (pnpm lint)
  • Prettier format check (pnpm format:check)

Rust CI (rust_ci.ymlcheck job):

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo build --release --target wasm32-unknown-unknown
  • cargo test --workspace

Checklist

  • My branch is based off develop, not main
  • I have run cargo fmt --all and the code is properly formatted
  • I have run cargo clippy --all-targets -- -D warnings with no warnings
  • I have run cargo test and all tests pass
  • I have run pnpm typecheck with no type errors
  • I have run pnpm test and all frontend tests pass
  • I have run pnpm lint with no ESLint errors
  • I have run pnpm format:check with no formatting violations
  • I have added tests for any new functionality
  • All public functions have /// doc comments
  • I have updated CHANGELOG.md if applicable
  • My commit messages follow the conventional commits format

Screenshots / Logs (if applicable)

Additional Notes

…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>.
@afurious
afurious merged commit c2e44de into Crowdfunding-DApp:main Aug 24, 2026
2 checks passed
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.

[Audit #75] Factory create_campaign() hardcodes salt = [0; 32], capping each creator to one campaign ever

2 participants