Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update pallets #15

Merged
merged 6 commits into from
Sep 25, 2023
Merged

update pallets #15

merged 6 commits into from
Sep 25, 2023

Conversation

tlacloc
Copy link
Contributor

@tlacloc tlacloc commented Sep 25, 2023

No description provided.

didiermis and others added 5 commits September 21, 2023 16:31
#10)

* - Updated the Fund Admin Records' list of dependencies in Cargo.toml, bumping versions of 'frame support', 'frame system', 'frame benchmarking', 'sp runtime', 'pallet timestamp', 'sp core' and 'sp io' to be compatible with 'polkadot-v0.9.40' from 'polkadot-v0.9.38', aligning with the latest Substrate version. This ensures our pallets stay up-to-date with the latest turnkey infrastructure enabling efficient blockchain development.
- Amended the weight ranges for three different calls - 'set_signer_account', 'add_record', and 'kill_storage' - within the Fund Admin Records pallet. We've changed the implementation to 'from_parts', explicitly setting the 'compute' part of the weight to 10,000 and 'io' part to 0. This provides a more specific weight range, optimizing on-chain resource use when these calls are processed.

* DEVELOPMENT AND TROUBLESHOOTING
- Updated the `pallet` macro for the Fund Admin Records pallet, specifying `STORAGE_VERSION` for better versioning control of the storage data. This ensures proper migration handling in future updates.
- Commented out certain test function bodies in the Fund Admin Records pallet. This indicates an ongoing refactoring process and tests will be revisited to ensure they align with the new implementation specifics.
- Updated the `pallet_rbac` configuration in the mock file of the Fund Admin pallet, adding `RemoveOrigin` set to `EnsureRoot<Self::AccountId>` to ensure that function calls, specific to the RBAC functionality, are executed by verified roots.
- Carried out codebase clean-up in the Gated Marketplace pallet, removing unneeded imports and fixing an incorrect closing tag on the `Config` implementation block.
- Updated the test suite for the Gated Marketplace pallet. Ensured that the `mint` function placing assets in the marketplace is correctly unwrapped using `assert_ok`. Commented out certain test cases, indicating a significant refactoring process which the tests will be revisited to align with.
- Adjusted the properties order in the pallet-rbac dependency within the Mapped Assets pallet's Cargo.toml for consistency and readability.
- Set up RBAC pallet in the test environment for the Mapped Assets pallet, implementing specific parameter types and configuring RBAC pallet for the test setup.
- Updated the test suite for the RBAC pallet. Several test cases were commented out indicating an ongoing refactoring process which the tests will be revisited to align with.
* 🐛 fix(afloat): modify `kill_storage` function to accept `args` parameter for more granular control over storage deletion
✨ feat(afloat): add `KillStorageArgs` enum to specify different types of storage to be deleted in `kill_storage` function

* 🐛 fix(functions.rs): add authorization check in do_cancel_offer function to ensure only admin or offer creator can cancel the offer
🐛 fix(lib.rs): remove redundant authorization check in cancel_offer function
* 🐛 fix(afloat): modify `kill_storage` function to accept `args` parameter for more granular control over storage deletion
✨ feat(afloat): add `KillStorageArgs` enum to specify different types of storage to be deleted in `kill_storage` function

* 🐛 fix(functions.rs): add authorization check in do_cancel_offer function to ensure only admin or offer creator can cancel the offer
🐛 fix(lib.rs): remove redundant authorization check in cancel_offer function
* 🐛 fix(afloat): modify `kill_storage` function to accept `args` parameter for more granular control over storage deletion
✨ feat(afloat): add `KillStorageArgs` enum to specify different types of storage to be deleted in `kill_storage` function

* 🐛 fix(functions.rs): add authorization check in do_cancel_offer function to ensure only admin or offer creator can cancel the offer
🐛 fix(lib.rs): remove redundant authorization check in cancel_offer function

* update pallets
@@ -0,0 +1,244 @@
//! Various pieces of common functionality.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPT summary of None - c727c0:

  • Added code to migrate from version 0 to version 1 of the Fund Admin pallet.
  • Added code to migrate OldDrawdownData and OldRevenueData to DrawdownData and RevenueData respectively.
  • Added code for pre_upgrade and post_upgrade to ensure the migration is successful.

@@ -3,8 +3,8 @@ use frame_support::parameter_types;
use frame_system as system;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPT summary of d9ec11 - 41724b:
Error: couldn't generate summary

@@ -1,12 +1,11 @@
use super::*;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPT summary of 20a2be - 628f83:
Error: couldn't generate summary

@github-actions
Copy link

GPT summary of a8d1072:

Error: couldn't generate summary

@github-actions
Copy link

GPT summary of 2a16ce2:

  • Added a who parameter to the do_cancel_offer function functions.rs
  • Added a args parameter to the kill_storage function lib.rs
  • Added an Enum for KillStorageArgs types.rs
  • Lowered the weight of the cancel_offer function lib.rs

@github-actions
Copy link

GPT summary of aa5f5ab:

  • No changes.

@github-actions
Copy link

GPT summary of 59f53ac:

Error: couldn't generate summary

@github-actions
Copy link

GPT summary of a18b4b2:

Not generating summary for merge commits

PR summary so far:

  • Added a who parameter to the do_cancel_offer function
  • Added a args parameter to the kill_storage function
  • Added an Enum for KillStorageArgs
  • Lowered the weight of the cancel_offer function
  • Added code to migrate from version 0 to version 1 of the Fund Admin pallet

… for better readability

🔧 chore(rbac/functions.rs): remove unnecessary whitespace in comments for better readability
@@ -7,7 +7,7 @@ use sp_runtime::sp_std::vec::Vec;
use crate::types::*;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPT summary of 711a83 - 84c72e:

  • Updated comment for scope creation
  • Updated comment for helper functions
  • Changed PermissionRemovedFromPallet event to take in a bound instead of an unbound vector of roles
  • Removed unnecessary comment from PermissionRemovedFromPallet event

@github-actions
Copy link

GPT summary of 0a656e3:

  • Changed the formatting of the comment for scope creation functions.rs
  • Removed comma from the PermissionRemovedFromPallet event functions.rs
  • Changed formatting of comment for helper functions functions.rs

PR summary so far:

  • Added a who parameter to the do_cancel_offer function
  • Added a args parameter to the kill_storage function
  • Added an Enum for KillStorageArgs
  • Lowered the weight of the cancel_offer function
  • Migrated from version 0 to version 1 of the Fund Admin pallet
  • Updated comment for scope creation and helper functions
  • Changed PermissionRemovedFromPallet event to take in a bound instead of an unbound vector of roles

@tlacloc tlacloc merged commit a9f61c2 into main Sep 25, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants