Skip to content

Add missing require_current_state guards - #465

Closed
abayomicornelius wants to merge 1 commit into
mainfrom
fix/require-current-state-guard-gaps
Closed

Add missing require_current_state guards#465
abayomicornelius wants to merge 1 commit into
mainfrom
fix/require-current-state-guard-gaps

Conversation

@abayomicornelius

Copy link
Copy Markdown
Contributor

Adds the require_current_state guard to six functions that were missing it while every sibling state-mutating function in the same contract enforces it:

  • investment_vault::set_wormhole_core
  • investment_vault::fund_project_internal (the vault's primary capital-deployment path, reached via fund_project, fund_project_with_approvals, batch_fund_projects)
  • investment_vault::receive_yield_internal
  • investment_vault::claim_insurance_internal
  • investment_vault::calculate_carbon_credits
  • project_registry::certify_project

Fast, minimal fix — just adds the missing guard call at the top of each function to match the existing pattern used everywhere else in these contracts.

Closes #460
Closes #461
Closes #462
Closes #463

set_wormhole_core, fund_project_internal, receive_yield_internal,
claim_insurance_internal, calculate_carbon_credits (investment_vault)
and certify_project (project_registry) were missing the
require_current_state guard that all their sibling state-mutating
functions already enforce.

Closes #460
Closes #461
Closes #462
Closes #463
@abayomicornelius

Copy link
Copy Markdown
Contributor Author

Superseded by #466, raised from the account the issues were assigned to. Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment