Closed djm07073 closed 1 month ago
The recent changes to the initia_std
library constitute a significant overhaul designed to enhance modularity, clarity, and functionality across various components. Key updates include the introduction of new data structures, improved error handling, and enhanced functions for mutable and immutable table traversal. The library now focuses on streamlining operator rewards, vesting processes, and voting mechanisms, together reinforcing the system's overall performance and maintainability.
Files | Change Summary |
---|---|
.../table.move |
Introduced walk and walk_mut functions for enhanced table iteration; supports mutable and immutable traversal. |
.../vip/operator.move |
Transitioned from OperatorStore to ModuleStore ; revamped operator management functions and structures. |
.../vip/reward.move |
Renamed RewardStore to ModuleStore ; streamlined reward distribution logic with new functions. |
.../vip/tvl_manager.move |
Shifted focus to stage-based tracking; updated data structures and function parameters for clarity. |
.../vip/vault.move |
Removed claimable_stage ; renamed claim to withdraw ; simplified reward management functions. |
.../vip/vesting.move |
Updated vesting structures; improved caching and error handling; renamed VestingStore to ModuleStore . |
.../vip/vip_test.move |
Added a comprehensive testing framework for VIP functionalities; validated the reward management logic. |
.../vip/weight_vote.move |
Transitioned from an epoch-based to a cycle-based voting system; updated proposals and voting logic accordingly. |
.../vip/zapping.move |
Enhanced code readability; adjusted permissions and parameter handling for testing functions. |
sequenceDiagram
participant User
participant `initia_std::table`
participant `initia_std::vip_operator`
participant `initia_std::vip_reward`
participant `initia_std::vip_vault`
participant `initia_std::vip_vesting`
User->>`initia_std::table`: Call walk_mut()
`initia_std::table`->>User: Iterate with mutable access
User->>`initia_std::vip_operator`: Register operator
`initia_std::vip_operator`->>User: Operator info updated
User->>`initia_std::vip_reward`: Record distributed reward
`initia_std::vip_reward`->>User: Reward recorded successfully
User->>`initia_std::vip_vault`: Withdraw funds
`initia_std::vip_vault`->>User: Funds withdrawn
User->>`initia_std::vip_vesting`: Get user vesting info
`initia_std::vip_vesting`->>User: Vesting details returned
π In the garden where bunnies play,
New functions bloom in a grand array.
With tables to walk, and rewards to claim,
Our code's a dance, never the same!
So hop along, letβs test and cheer,
For every change brings us near! πΌ
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
walk
for immutable andwalk_mut
for mutable access.Refactor
OperatorStore
andRewardStore
withModuleStore
for improved data management across various modules.Style