Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add NioGovernor contract with OpenZeppelin governance extensions and custom quorum, voting, and proposal handling logic. * Added NioGuardians ERC721 contract with minting and burning functionality, and unit tests for NioGovernor including proposal creation and voting. * Refactored NioGovernor tests to include multiple NioGuardians, added constants for voting delay and period, and implemented helper functions for proposal creation, voting, and execution. * Fix formatting issues and correct logic in NioGovernor.t.sol by adjusting voting delay usage and proposal voting mechanism. * Add execution delay and governor role constants, update accessManager setup, and include proposal execution plan and queueing in NioGovernorTest. * Remove unnecessary newline in NioGovernor.t.sol to improve code readability. * Add NiosElection contract with election management, candidate declaration, voting, and result computation functionalities. * Rename NiosElection to NioElection and add unit tests for NioElection contract. * Refactor NioElection contract, update dependencies, and enhance test setup with new user creation method. * Added BridgedKinto integration to NioElection contract and implemented clock functions in BridgedKinto.sol for timestamp-based voting. * Refactor NioElection contract to introduce election phases, improve voting logic, and add new tests. * Refactor NioElection contract to enhance error handling and improve test coverage with additional test cases and setup. * Refactor NioElection contract and tests: rename candidate-related functions and events, add multiple users in BaseTest, and update unit tests for multi-user scenarios. * Remove Ownable inheritance and disqualifyCandidate functionality from NioElection contract and related tests. * Refactor NioElection contract to rename phases and entities, add nominee structure, update voting logic, and enhance tests. * Refactor NioElection contract to support multiple elections, add electionId to events, and update tests accordingly. * Refactored NioElection contract to simplify getCurrentPhase function and removed redundant view functions and related tests. * Refactor voting logic to allow multiple votes per candidate/nominee and update tests accordingly. * Add KYC check in vote functions and initialize winner loop in finalizeElection function. * Added functions to retrieve detailed election information, candidates, nominees, votes, elected Nios, and voter participation in NioElection contract. * Refactor NioElection.sol to use consistent parameter naming by removing underscores from electionId and related variables. * Implement logic to mint and burn Nio NFTs for election winners based on the number of Nios to elect. * Refactor KintoID.sol, NioElection.sol, NioGuardians.sol, and test files to improve access control, add virtual overrides, enhance logging, and update test setups. * Refactor NioElection contract to use getCurrentElectionId and add public view functions for election details, candidates, nominees, and votes; remove console logs from tests. * Refactor test functions in NioElection.t.sol to use pluralized helper function names and add election start step in testVoteForNominee. * Refactor NioElection contract and tests: fix import quotes, add internal vote amounts, and organize test functions with comments. * Fix return statements and improve test coverage in NioElection and BridgedKinto contracts. * Add test for Nio election sorting and verification of NFT balances for elected and non-elected Nios. * Refactor variable names from 'wallets' to 'users' and 'users' to 'signers' for clarity across multiple test files. * Add setUp function in KintoIDTest to upgrade KintoID and undo the harness. * Add comprehensive documentation and comments to NioElection.sol for better code clarity and maintainability. * Refactor variable names in NioElection.sol for consistency and clarity. * Add tests to ensure voting reverts when KYC is revoked for both candidates and nominees. * Add assertions for election time, candidate and nominee lengths, and used votes in NioElection tests. * Refactor `isElectedNio` function to be public and update unit tests to verify its behavior before and after election. * Refactor `nonces` function parameter name in `BridgedKinto.sol` and add additional assertions in `BridgedKinto.t.sol` unit tests. * Add unit tests for NioGuardians contract including minting, burning, ownership, voting power, and transfer restrictions. * Added detailed documentation and comments to NioGuardians contract functions and errors for better code clarity and maintainability. * Add detailed comments to NioGovernor.sol and new unit tests for proposalNeedsQueuing and cancelProposal in NioGovernor.t.sol. * Remove InsufficientEligibleCandidates error and update election logic to handle fewer winners than required, add unit test for this scenario. * Add duplicate candidate check in NioElection and prevent delegation in NioGuardians. * Remove unused import and redundant constant, update event parameter names in NioElection.sol for clarity. * Refactor candidate eligibility check to use isEligibleForElection and add corresponding unit tests. * Add slither-disable-next-line comment to suppress weak-prng warning in NioElection.sol. * Fix slither warning in NioElection.sol and add delegateBySig revert test in NioGuardians.t.sol. * Add MAX_NOMINEES constant and MaxNomineesReached error to NioElection contract, and implement corresponding test case. * Added upgradeability to NioElection contract with Initializable, UUPSUpgradeable, and OwnableUpgradeable.
- Loading branch information