Skip to content

Add pre campaign launch constraint to removeReward#40

Open
adnanhq wants to merge 1 commit intooz-audit-fixesfrom
oz-fix-issue-20
Open

Add pre campaign launch constraint to removeReward#40
adnanhq wants to merge 1 commit intooz-audit-fixesfrom
oz-fix-issue-20

Conversation

@adnanhq
Copy link
Contributor

@adnanhq adnanhq commented Mar 4, 2026

Changes

  • Restrict removeReward in AllOrNothing.sol by adding the currentTimeIsLess(INFO.getLaunchTime()) modifier so rewards can only be removed before campaign launch.
  • Restrict removeReward in KeepWhatsRaised.sol by adding the currentTimeIsLess(INFO.getLaunchTime()) modifier so rewards can only be removed before campaign launch.

@adnanhq adnanhq self-assigned this Mar 4, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bfd8732873

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

function removeReward(bytes32 rewardName)
external
onlyCampaignOwner
currentTimeIsLess(INFO.getLaunchTime())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate reward removal on treasury launch time

removeReward now checks currentTimeIsLess(INFO.getLaunchTime()), but this contract’s runtime schedule is driven by s_campaignData.launchTime (set in configureTreasury) and pledge gating uses getLaunchTime(). Because configureTreasury does not enforce campaignData.launchTime == INFO.getLaunchTime(), these values can diverge, so reward removal can be incorrectly blocked before this treasury’s launch or incorrectly allowed after it, depending on which timestamp is earlier.

Useful? React with 👍 / 👎.

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.

1 participant