Skip to content

Conversation

@tlacloc
Copy link
Contributor

@tlacloc tlacloc commented Sep 29, 2023

PR summary so far:

  • Added functions to add a user to an AfloatRole or FruniqueRole
  • Added AddAfloatRole and AddFruniqueRole variants to the InitialSetupArgs enum
  • Changed the parameter type for AddFruniqueRole from AfloatRole to FruniqueRole
  • Remove unused extrinsic spam_spawning

… ensure consistency with admin role assignment

✨ feat(lib.rs): add support for adding afloat and frunique roles during initial setup
🔧 chore(types.rs): add AddAfloatRole and AddFruniqueRole variants to InitialSetupArgs enum for role assignment
…at_frunique function call

🔧 chore(types): import FruniqueRole from pallet_fruniques to fix type error in InitialSetupArgs
@tlacloc tlacloc self-assigned this Sep 29, 2023
) -> DispatchResult {
//ensure user is registered
ensure!(UserInfo::<T>::contains_key(user_address.clone()), Error::<T>::UserNotFound);

Choose a reason for hiding this comment

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

GPT summary of ee955a - 4c39a1:

  • Added a give_role_to_user() function to give a user an AfloatRole of Admin
  • Added a do_add_account_to_afloat_frunique() function to add an account to AfloatFrunique with a FruniqueRole of Admin
  • Added an event to deposit an AdminAdded event with the authority and user address

Ok(())
},
InitialSetupArgs::Roles { creator, admin } => {
Self::do_setup_roles(creator, admin)?;

Choose a reason for hiding this comment

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

GPT summary of 6a74f5 - 23cf5d:

  • Added functionality for adding a user to an Afloat role
  • Added functionality for adding a user to a Frunique role
  • Added functionality for setting up roles for a creator and admin

@@ -1,5 +1,6 @@
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 d96b85 - 8eb5d8:

  • Added use pallet_fruniques::types::FruniqueRole
  • Added AddAfloatRole and AddFruniqueRole to InitialSetupArgs enum

@github-actions
Copy link

GPT summary of e04677f:

  • Added the do_add_account_to_afloat_frunique function functions.rs
  • Added the give_role_to_user function lib.rs
  • Added the AddAfloatRole and AddFruniqueRole variants to the InitialSetupArgs enum types.rs

@github-actions
Copy link

GPT summary of a6d2855:

  • Changed the parameter type for AddFruniqueRole from AfloatRole to FruniqueRole lib.rs
  • Imported FruniqueRole in types.rs types.rs

PR summary so far:

  • Added functions to add a user to an AfloatRole or FruniqueRole
  • Added AddAfloatRole and AddFruniqueRole variants to the InitialSetupArgs enum
  • Changed the parameter type for AddFruniqueRole from AfloatRole to FruniqueRole

…pallet` module

The `spam_spawning` function was commented out and not being used. Removing it to improve code cleanliness and readability.
let _ = <FruniqueRedeemed<T>>::clear(1000, None);
let _ = <FruniqueInfo<T>>::clear(1000, None);

T::Rbac::remove_pallet_storage(Self::pallet_id())?;

Choose a reason for hiding this comment

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

GPT summary of 8444d0 - b862cf:

  • Removed the spam_spawning call index
  • Removed associated weight calculation for spam_spawning call index

@github-actions
Copy link

GPT summary of ecf1dad:

  • Removed the spam_spawning call index lib.rs

PR summary so far:

  • Added functions to add users to Afloat and Frunique roles
  • Changed parameter type for AddFruniqueRole from AfloatRole to FruniqueRole
  • Removed spam_spawning call index

@tlacloc tlacloc merged commit fcaab50 into main Sep 29, 2023
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