dao-contracts icon indicating copy to clipboard operation
dao-contracts copied to clipboard

Add active threshold functionality to CW4 voting module, closes #781

Open theghostmac opened this issue 10 months ago • 3 comments

Changelog

  • Added new custom error message to error.rs, InvalidThreshold
  • Added the query_is_active function and corresponding Query::IsActive
  • Added the execute_update_active_threshold function and corresponding ExecuteMsg::UpdateActiveThreshold
  • Added the new optional Config and updated the instantiate function to make use of it.

Author

GhostMac

theghostmac avatar Apr 06 '24 20:04 theghostmac

Needs a few things:

  • Fix the build
  • Add tests for active_threshold and being able to update it
  • Make sure CI passes
  • Clean up

JakeHartnell avatar Apr 07 '24 12:04 JakeHartnell

Needs a few things:

  • Fix the build
  • Add tests for active_threshold and being able to update it
  • Make sure CI passes
  • Clean up

I have updated the contract with everything you pointed out. Build passes. Moving on to the tests.

theghostmac avatar Apr 07 '24 12:04 theghostmac

Needs a few things:

  • Fix the build
  • Add tests for active_threshold and being able to update it
  • Make sure CI passes
  • Clean up

I have updated the contract with everything you pointed out. Build passes. Moving on to the tests.

Close, but see above comments.

  • Get rid of CONFIG, it's duplicate state for no reason
  • Make sure to save ACTIVE_THRESHOLD on instantiation and validate that it's NOT ACTIVE_THRESHOLD::Percent
  • Get rid of ACTIVE_THRESHOLD::Percent in the IsActive query, it does nothing right now and we should not allow it
  • Fix linting errors and tests, CI should pass

JakeHartnell avatar Apr 07 '24 16:04 JakeHartnell