elys-network / elys

Elys Network is the first All-In-One DEFI platform to join the Atom Economic Zone, backed by Informal Systems and the Cosmos Hub. Built on Cosmos and CometBFT, leveraging the latest blockchain technologies to provide a premier user experience. Visit our official site at https://elys.network
https://elys.network
Apache License 2.0
69 stars 53 forks source link

Refactor perpetual test and add more test cases #977

Closed 99adarsh closed 1 week ago

99adarsh commented 1 week ago

Description

What has Changed?

What specific problem were you aiming to address, and how did you successfully resolve it? If tests were not uploaded for this pull request or if coverage decreased, please provide an explanation for the change.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.

I have...

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.

I have...

Deployment Notes

Are there any specific considerations to take into account when deploying these changes? This may include new dependencies, scripts that need to be executed, or any aspects that can only be evaluated in a deployed environment.

Screenshots and Videos

Please provide any relevant before and after screenshots by uploading them here. Additionally, demo videos can be highly beneficial in demonstrating the process.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 42.91%. Comparing base (210d25d) to head (dc90742). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #977 +/- ## ========================================== + Coverage 42.64% 42.91% +0.27% ========================================== Files 924 924 Lines 35506 35506 ========================================== + Hits 15140 15239 +99 + Misses 19059 18962 -97 + Partials 1307 1305 -2 ``` | [Components](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | Coverage Δ | | |---|---|---| | [leveragelp_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `80.06% <ø> (ø)` | | | [leveragelp_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `82.72% <ø> (ø)` | | | [leveragelp_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `85.41% <ø> (ø)` | | | [leveragelp_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `8.94% <ø> (ø)` | | | [accountedpool_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `100.00% <ø> (ø)` | | | [accountedpool_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [accountedpool_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `65.04% <ø> (ø)` | | | [amm_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `68.01% <ø> (ø)` | | | [amm_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `90.66% <ø> (ø)` | | | [amm_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `56.77% <ø> (ø)` | | | [amm_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `44.42% <ø> (ø)` | | | [assetprofile_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `76.85% <ø> (ø)` | | | [assetprofile_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [assetprofile_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `80.00% <ø> (ø)` | | | [assetprofile_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `46.54% <ø> (ø)` | | | [burner_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `0.00% <ø> (ø)` | | | [burner_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [burner_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `100.00% <ø> (ø)` | | | [burner_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `62.01% <ø> (ø)` | | | [clock_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [clock_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [clock_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [clock_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [commitment_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `78.10% <ø> (ø)` | | | [commitment_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [commitment_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `86.17% <ø> (ø)` | | | [commitment_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `32.46% <ø> (ø)` | | | [epochs_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [epochs_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `92.00% <ø> (ø)` | | | [epochs_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `84.61% <ø> (ø)` | | | [epochs_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `26.78% <ø> (ø)` | | | [estaking_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `66.01% <ø> (ø)` | | | [estaking_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `95.49% <ø> (ø)` | | | [estaking_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `72.61% <ø> (ø)` | | | [estaking_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `33.54% <ø> (ø)` | | | [incentive_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [incentive_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [incentive_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [incentive_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [masterchef_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `61.71% <ø> (ø)` | | | [masterchef_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `73.21% <ø> (ø)` | | | [masterchef_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `90.00% <ø> (ø)` | | | [masterchef_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `19.31% <ø> (ø)` | | | [oracle_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `28.44% <ø> (ø)` | | | [oracle_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `30.00% <ø> (ø)` | | | [oracle_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `61.11% <ø> (ø)` | | | [oracle_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `12.73% <ø> (ø)` | | | [parameter_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `18.86% <ø> (ø)` | | | [parameter_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [parameter_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `75.00% <ø> (ø)` | | | [parameter_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `10.25% <ø> (ø)` | | | [stablestake_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `83.20% <ø> (ø)` | | | [stablestake_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `100.00% <ø> (ø)` | | | [stablestake_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `90.47% <ø> (ø)` | | | [stablestake_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `67.46% <ø> (ø)` | | | [perpetual_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `82.43% <ø> (-3.61%)` | :arrow_down: | | [perpetual_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `90.90% <ø> (+18.18%)` | :arrow_up: | | [perpetual_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `61.13% <ø> (+3.79%)` | :arrow_up: | | [perpetual_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `61.39% <ø> (ø)` | | | [tier_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `25.00% <ø> (ø)` | | | [tier_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `100.00% <ø> (ø)` | | | [tier_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `89.47% <ø> (ø)` | | | [tier_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `5.14% <ø> (ø)` | | | [tokenomics_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `71.87% <ø> (ø)` | | | [tokenomics_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [tokenomics_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `80.00% <ø> (ø)` | | | [tokenomics_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `69.60% <ø> (ø)` | | | [transferhook_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [transferhook_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [transferhook_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `100.00% <ø> (ø)` | | | [transferhook_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `11.11% <ø> (ø)` | | | [tradeshield_transactions](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `0.73% <ø> (ø)` | | | [tradeshield_lifecycle](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `∅ <ø> (∅)` | | | [tradeshield_keeper](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `77.27% <ø> (ø)` | | | [tradeshield_queries](https://app.codecov.io/gh/elys-network/elys/pull/977/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elys-network) | `8.33% <ø> (ø)` | |

🚨 Try these New Features: