Browse Source

Rename the ‘curator’ entity to the ‘worker’

Shamil Gadelshin 4 years ago
parent
commit
cc5ceeebf7

+ 83 - 83
runtime-modules/bureaucracy/src/errors.rs

@@ -6,24 +6,24 @@ pub mod bureaucracy_errors {
     pub static MSG_IS_NOT_LEAD_ACCOUNT: &str = "Not a lead account";
     pub static MSG_OPENING_TEXT_TOO_SHORT: &str = "Opening text too short";
     pub static MSG_OPENING_TEXT_TOO_LONG: &str = "Opening text too long";
-    pub static MSG_CURATOR_OPENING_DOES_NOT_EXIST: &str = "Curator opening does not exist";
+    pub static MSG_WORKER_OPENING_DOES_NOT_EXIST: &str = "Worker opening does not exist";
     pub static MSG_INSUFFICIENT_BALANCE_TO_APPLY: &str = "Insufficient balance to apply";
-    pub static MSG_APPLY_ON_CURATOR_OPENING_UNSIGNED_ORIGIN: &str = "Unsigned origin";
-    pub static MSG_APPLY_ON_CURATOR_OPENING_MEMBER_ID_INVALID: &str = "Member id is invalid";
-    pub static MSG_APPLY_ON_CURATOR_OPENING_SIGNER_NOT_CONTROLLER_ACCOUNT: &str =
+    pub static MSG_APPLY_ON_WORKER_OPENING_UNSIGNED_ORIGIN: &str = "Unsigned origin";
+    pub static MSG_APPLY_ON_WORKER_OPENING_MEMBER_ID_INVALID: &str = "Member id is invalid";
+    pub static MSG_APPLY_ON_WORKER_OPENING_SIGNER_NOT_CONTROLLER_ACCOUNT: &str =
         "Signer does not match controller account";
     pub static MSG_ORIGIN_IS_NEITHER_MEMBER_CONTROLLER_OR_ROOT: &str =
         "Origin must be controller or root account of member";
     pub static MSG_MEMBER_HAS_ACTIVE_APPLICATION_ON_OPENING: &str =
         "Member already has an active application on the opening";
-    pub static MSG_CURATOR_APPLICATION_TEXT_TOO_LONG: &str = "Curator application text too long";
-    pub static MSG_CURATOR_APPLICATION_TEXT_TOO_SHORT: &str = "Curator application text too short";
+    pub static MSG_WORKER_APPLICATION_TEXT_TOO_LONG: &str = "Worker application text too long";
+    pub static MSG_WORKER_APPLICATION_TEXT_TOO_SHORT: &str = "Worker application text too short";
     pub static MSG_INSUFFICIENT_BALANCE_TO_COVER_STAKE: &str =
         "Insuffieicnt balance to cover stake";
     pub static MSG_ORIGIN_IS_NOT_APPLICANT: &str = "Origin is not applicant";
-    pub static MSG_CURATOR_APPLICATION_DOES_NOT_EXIST: &str = "Curator application does not exist";
-    pub static MSG_SUCCESSFUL_CURATOR_APPLICATION_DOES_NOT_EXIST: &str =
-        "Successful curator application does not exist";
+    pub static MSG_WORKER_APPLICATION_DOES_NOT_EXIST: &str = "Worker application does not exist";
+    pub static MSG_SUCCESSFUL_WORKER_APPLICATION_DOES_NOT_EXIST: &str =
+        "Successful worker application does not exist";
 }
 /*
  * The errors below, while in many cases encoding similar outcomes,
@@ -33,50 +33,50 @@ pub mod bureaucracy_errors {
  * later versions of Substrate.
  */
 
-// Errors for `accept_curator_applications`
-pub static MSG_ACCEPT_CURATOR_APPLICATIONS_OPENING_DOES_NOT_EXIST: &str = "Opening does not exist";
-pub static MSG_ACCEPT_CURATOR_APPLICATIONS_OPENING_IS_NOT_WAITING_TO_BEGIN: &str =
+// Errors for `accept_worker_applications`
+pub static MSG_ACCEPT_WORKER_APPLICATIONS_OPENING_DOES_NOT_EXIST: &str = "Opening does not exist";
+pub static MSG_ACCEPT_WORKER_APPLICATIONS_OPENING_IS_NOT_WAITING_TO_BEGIN: &str =
     "Opening Is Not in Waiting to begin";
 
-// Errors for `begin_curator_applicant_review`
-pub static MSG_BEGIN_CURATOR_APPLICANT_REVIEW_OPENING_DOES_NOT_EXIST: &str =
+// Errors for `begin_worker_applicant_review`
+pub static MSG_BEGIN_WORKER_APPLICANT_REVIEW_OPENING_DOES_NOT_EXIST: &str =
     "Opening does not exist";
-pub static MSG_BEGIN_CURATOR_APPLICANT_REVIEW_OPENING_OPENING_IS_NOT_WAITING_TO_BEGIN: &str =
+pub static MSG_BEGIN_WORKER_APPLICANT_REVIEW_OPENING_OPENING_IS_NOT_WAITING_TO_BEGIN: &str =
     "Opening Is Not in Waiting";
 
-// Errors for `fill_curator_opening`
-pub static MSG_FULL_CURATOR_OPENING_OPENING_DOES_NOT_EXIST: &str = "OpeningDoesNotExist";
-pub static MSG_FULL_CURATOR_OPENING_OPENING_NOT_IN_REVIEW_PERIOD_STAGE: &str =
+// Errors for `fill_worker_opening`
+pub static MSG_FULL_WORKER_OPENING_OPENING_DOES_NOT_EXIST: &str = "OpeningDoesNotExist";
+pub static MSG_FULL_WORKER_OPENING_OPENING_NOT_IN_REVIEW_PERIOD_STAGE: &str =
     "OpeningNotInReviewPeriodStage";
-pub static MSG_FULL_CURATOR_OPENING_UNSUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_TOO_SHORT:
-    &str = "Application stake unstaking period for successful applicants too short";
-pub static MSG_FULL_CURATOR_OPENING_SUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_TOO_SHORT: &str =
+pub static MSG_FULL_WORKER_OPENING_UNSUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_TOO_SHORT: &str =
+    "Application stake unstaking period for successful applicants too short";
+pub static MSG_FULL_WORKER_OPENING_SUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_TOO_SHORT: &str =
     "Application stake unstaking period for failed applicants too short";
-pub static MSG_FULL_CURATOR_OPENING_SUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_TOO_SHORT: &str =
+pub static MSG_FULL_WORKER_OPENING_SUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_TOO_SHORT: &str =
     "Role stake unstaking period for successful applicants too short";
-pub static MSG_FULL_CURATOR_OPENING_UNSUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_TOO_SHORT: &str =
+pub static MSG_FULL_WORKER_OPENING_UNSUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_TOO_SHORT: &str =
     "Role stake unstaking period for failed applicants too short";
-pub static MSG_FULL_CURATOR_OPENING_SUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_REDUNDANT: &str =
+pub static MSG_FULL_WORKER_OPENING_SUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_REDUNDANT: &str =
     "Application stake unstaking period for successful applicants redundant";
-pub static MSG_FULL_CURATOR_OPENING_UNSUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_REDUNDANT:
-    &str = "Application stake unstaking period for failed applicants redundant";
-pub static MSG_FULL_CURATOR_OPENING_SUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_REDUNDANT: &str =
+pub static MSG_FULL_WORKER_OPENING_UNSUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_REDUNDANT: &str =
+    "Application stake unstaking period for failed applicants redundant";
+pub static MSG_FULL_WORKER_OPENING_SUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_REDUNDANT: &str =
     "Role stake unstaking period for successful applicants redundant";
-pub static MSG_FULL_CURATOR_OPENING_UNSUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_REDUNDANT: &str =
+pub static MSG_FULL_WORKER_OPENING_UNSUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_REDUNDANT: &str =
     "Role stake unstaking period for failed applicants redundant";
-pub static MSG_FULL_CURATOR_OPENING_APPLICATION_DOES_NOT_EXIST: &str = "ApplicationDoesNotExist";
-pub static MSG_FULL_CURATOR_OPENING_APPLICATION_NOT_ACTIVE: &str = "ApplicationNotInActiveStage";
-pub static MSG_FILL_CURATOR_OPENING_APPLICATION_FOR_WRONG_OPENING: &str =
+pub static MSG_FULL_WORKER_OPENING_APPLICATION_DOES_NOT_EXIST: &str = "ApplicationDoesNotExist";
+pub static MSG_FULL_WORKER_OPENING_APPLICATION_NOT_ACTIVE: &str = "ApplicationNotInActiveStage";
+pub static MSG_FILL_WORKER_OPENING_APPLICATION_FOR_WRONG_OPENING: &str =
     "Applications not for opening";
-// Errors for `withdraw_curator_application`
-pub static MSG_WITHDRAW_CURATOR_APPLICATION_APPLICATION_DOES_NOT_EXIST: &str =
+// Errors for `withdraw_worker_application`
+pub static MSG_WITHDRAW_WORKER_APPLICATION_APPLICATION_DOES_NOT_EXIST: &str =
     "ApplicationDoesNotExist";
-pub static MSG_WITHDRAW_CURATOR_APPLICATION_APPLICATION_NOT_ACTIVE: &str = "ApplicationNotActive";
-pub static MSG_WITHDRAW_CURATOR_APPLICATION_OPENING_NOT_ACCEPTING_APPLICATIONS: &str =
+pub static MSG_WITHDRAW_WORKER_APPLICATION_APPLICATION_NOT_ACTIVE: &str = "ApplicationNotActive";
+pub static MSG_WITHDRAW_WORKER_APPLICATION_OPENING_NOT_ACCEPTING_APPLICATIONS: &str =
     "OpeningNotAcceptingApplications";
-pub static MSG_WITHDRAW_CURATOR_APPLICATION_UNSTAKING_PERIOD_TOO_SHORT: &str =
+pub static MSG_WITHDRAW_WORKER_APPLICATION_UNSTAKING_PERIOD_TOO_SHORT: &str =
     "UnstakingPeriodTooShort ..."; // <== SHOULD REALLY BE TWO SEPARATE, ONE FOR EACH STAKING PURPOSE
-pub static MSG_WITHDRAW_CURATOR_APPLICATION_REDUNDANT_UNSTAKING_PERIOD: &str =
+pub static MSG_WITHDRAW_WORKER_APPLICATION_REDUNDANT_UNSTAKING_PERIOD: &str =
     "RedundantUnstakingPeriodProvided ...";
 
 // Errors for `create_channel`
@@ -84,24 +84,24 @@ pub static MSG_CREATE_CHANNEL_IS_NOT_MEMBER: &str = "Is not a member";
 pub static MSG_CREATE_CHANNEL_NOT_CONTROLLER_ACCOUNT: &str =
     "Account is not controller account of member";
 
-// Errors for `add_curator_opening`
-pub static MSG_ADD_CURATOR_OPENING_ACTIVATES_IN_THE_PAST: &str =
+// Errors for `add_worker_opening`
+pub static MSG_ADD_WORKER_OPENING_ACTIVATES_IN_THE_PAST: &str =
     "Opening does not activate in the future";
-pub static MSG_ADD_CURATOR_OPENING_ROLE_STAKE_LESS_THAN_MINIMUM: &str =
+pub static MSG_ADD_WORKER_OPENING_ROLE_STAKE_LESS_THAN_MINIMUM: &str =
     "Role stake amount less than minimum currency balance";
-pub static MSG_ADD_CURATOR_OPENING_APPLIICATION_STAKE_LESS_THAN_MINIMUM: &str =
+pub static MSG_ADD_WORKER_OPENING_APPLIICATION_STAKE_LESS_THAN_MINIMUM: &str =
     "Application stake amount less than minimum currency balance";
-pub static MSG_ADD_CURATOR_OPENING_OPENING_DOES_NOT_EXIST: &str = "OpeningDoesNotExist";
-pub static MSG_ADD_CURATOR_OPENING_STAKE_PROVIDED_WHEN_REDUNDANT: &str =
+pub static MSG_ADD_WORKER_OPENING_OPENING_DOES_NOT_EXIST: &str = "OpeningDoesNotExist";
+pub static MSG_ADD_WORKER_OPENING_STAKE_PROVIDED_WHEN_REDUNDANT: &str =
     "StakeProvidedWhenRedundant ..."; // <== SHOULD REALLY BE TWO SEPARATE, ONE FOR EACH STAKING PURPOSE
-pub static MSG_ADD_CURATOR_OPENING_STAKE_MISSING_WHEN_REQUIRED: &str =
+pub static MSG_ADD_WORKER_OPENING_STAKE_MISSING_WHEN_REQUIRED: &str =
     "StakeMissingWhenRequired ..."; // <== SHOULD REALLY BE TWO SEPARATE, ONE FOR EACH STAKING PURPOSE
-pub static MSG_ADD_CURATOR_OPENING_STAKE_AMOUNT_TOO_LOW: &str = "StakeAmountTooLow ..."; // <== SHOULD REALLY BE TWO SEPARATE, ONE FOR EACH STAKING PURPOSE
-pub static MSG_ADD_CURATOR_OPENING_OPENING_NOT_IN_ACCEPTING_APPLICATION_STAGE: &str =
+pub static MSG_ADD_WORKER_OPENING_STAKE_AMOUNT_TOO_LOW: &str = "StakeAmountTooLow ..."; // <== SHOULD REALLY BE TWO SEPARATE, ONE FOR EACH STAKING PURPOSE
+pub static MSG_ADD_WORKER_OPENING_OPENING_NOT_IN_ACCEPTING_APPLICATION_STAGE: &str =
     "OpeningNotInAcceptingApplicationsStage";
-pub static MSG_ADD_CURATOR_OPENING_NEW_APPLICATION_WAS_CROWDED_OUT: &str =
+pub static MSG_ADD_WORKER_OPENING_NEW_APPLICATION_WAS_CROWDED_OUT: &str =
     "NewApplicationWasCrowdedOut";
-pub static MSG_ADD_CURATOR_OPENING_ZERO_MAX_APPLICANT_COUNT: &str =
+pub static MSG_ADD_WORKER_OPENING_ZERO_MAX_APPLICANT_COUNT: &str =
     "Application rationing has zero max active applicants";
 
 /// Error wrapper for external module error conversions
@@ -125,10 +125,10 @@ impl rstd::convert::From<WrappedError<hiring::BeginAcceptingApplicationsError>>
     fn from(wrapper: WrappedError<hiring::BeginAcceptingApplicationsError>) -> Self {
         match wrapper.error {
             hiring::BeginAcceptingApplicationsError::OpeningDoesNotExist => {
-                MSG_ACCEPT_CURATOR_APPLICATIONS_OPENING_DOES_NOT_EXIST
+                MSG_ACCEPT_WORKER_APPLICATIONS_OPENING_DOES_NOT_EXIST
             }
             hiring::BeginAcceptingApplicationsError::OpeningIsNotInWaitingToBeginStage => {
-                MSG_ACCEPT_CURATOR_APPLICATIONS_OPENING_IS_NOT_WAITING_TO_BEGIN
+                MSG_ACCEPT_WORKER_APPLICATIONS_OPENING_IS_NOT_WAITING_TO_BEGIN
             }
         }
     }
@@ -138,20 +138,20 @@ impl rstd::convert::From<WrappedError<hiring::AddOpeningError>> for &str {
     fn from(wrapper: WrappedError<hiring::AddOpeningError>) -> Self {
         match wrapper.error {
             hiring::AddOpeningError::OpeningMustActivateInTheFuture => {
-                MSG_ADD_CURATOR_OPENING_ACTIVATES_IN_THE_PAST
+                MSG_ADD_WORKER_OPENING_ACTIVATES_IN_THE_PAST
             }
             hiring::AddOpeningError::StakeAmountLessThanMinimumCurrencyBalance(purpose) => {
                 match purpose {
                     hiring::StakePurpose::Role => {
-                        MSG_ADD_CURATOR_OPENING_ROLE_STAKE_LESS_THAN_MINIMUM
+                        MSG_ADD_WORKER_OPENING_ROLE_STAKE_LESS_THAN_MINIMUM
                     }
                     hiring::StakePurpose::Application => {
-                        MSG_ADD_CURATOR_OPENING_APPLIICATION_STAKE_LESS_THAN_MINIMUM
+                        MSG_ADD_WORKER_OPENING_APPLIICATION_STAKE_LESS_THAN_MINIMUM
                     }
                 }
             }
             hiring::AddOpeningError::ApplicationRationingZeroMaxApplicants => {
-                MSG_ADD_CURATOR_OPENING_ZERO_MAX_APPLICANT_COUNT
+                MSG_ADD_WORKER_OPENING_ZERO_MAX_APPLICANT_COUNT
             }
         }
     }
@@ -161,10 +161,10 @@ impl rstd::convert::From<WrappedError<hiring::BeginReviewError>> for &str {
     fn from(wrapper: WrappedError<hiring::BeginReviewError>) -> Self {
         match wrapper.error {
             hiring::BeginReviewError::OpeningDoesNotExist => {
-                MSG_BEGIN_CURATOR_APPLICANT_REVIEW_OPENING_DOES_NOT_EXIST
+                MSG_BEGIN_WORKER_APPLICANT_REVIEW_OPENING_DOES_NOT_EXIST
             }
             hiring::BeginReviewError::OpeningNotInAcceptingApplicationsStage => {
-                MSG_BEGIN_CURATOR_APPLICANT_REVIEW_OPENING_OPENING_IS_NOT_WAITING_TO_BEGIN
+                MSG_BEGIN_WORKER_APPLICANT_REVIEW_OPENING_OPENING_IS_NOT_WAITING_TO_BEGIN
             }
         }
     }
@@ -173,19 +173,19 @@ impl rstd::convert::From<WrappedError<hiring::BeginReviewError>> for &str {
 impl<T: hiring::Trait> rstd::convert::From<WrappedError<hiring::FillOpeningError<T>>> for &str {
     fn from(wrapper: WrappedError<hiring::FillOpeningError<T>>) -> Self {
         match wrapper.error {
-			hiring::FillOpeningError::<T>::OpeningDoesNotExist => MSG_FULL_CURATOR_OPENING_OPENING_DOES_NOT_EXIST,
-			hiring::FillOpeningError::<T>::OpeningNotInReviewPeriodStage => MSG_FULL_CURATOR_OPENING_OPENING_NOT_IN_REVIEW_PERIOD_STAGE,
+			hiring::FillOpeningError::<T>::OpeningDoesNotExist => MSG_FULL_WORKER_OPENING_OPENING_DOES_NOT_EXIST,
+			hiring::FillOpeningError::<T>::OpeningNotInReviewPeriodStage => MSG_FULL_WORKER_OPENING_OPENING_NOT_IN_REVIEW_PERIOD_STAGE,
 			hiring::FillOpeningError::<T>::UnstakingPeriodTooShort(
 				stake_purpose,
 				outcome_in_filled_opening,
 			) => match stake_purpose {
 				hiring::StakePurpose::Application => match outcome_in_filled_opening {
-					hiring::ApplicationOutcomeInFilledOpening::Success => MSG_FULL_CURATOR_OPENING_UNSUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_TOO_SHORT,
-					hiring::ApplicationOutcomeInFilledOpening::Failure => MSG_FULL_CURATOR_OPENING_SUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_TOO_SHORT
+					hiring::ApplicationOutcomeInFilledOpening::Success => MSG_FULL_WORKER_OPENING_UNSUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_TOO_SHORT,
+					hiring::ApplicationOutcomeInFilledOpening::Failure => MSG_FULL_WORKER_OPENING_SUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_TOO_SHORT
 				},
 				hiring::StakePurpose::Role => match outcome_in_filled_opening {
-					hiring::ApplicationOutcomeInFilledOpening::Success => MSG_FULL_CURATOR_OPENING_SUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_TOO_SHORT,
-					hiring::ApplicationOutcomeInFilledOpening::Failure => MSG_FULL_CURATOR_OPENING_UNSUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_TOO_SHORT
+					hiring::ApplicationOutcomeInFilledOpening::Success => MSG_FULL_WORKER_OPENING_SUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_TOO_SHORT,
+					hiring::ApplicationOutcomeInFilledOpening::Failure => MSG_FULL_WORKER_OPENING_UNSUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_TOO_SHORT
 				},
 			},
 			hiring::FillOpeningError::<T>::RedundantUnstakingPeriodProvided(
@@ -193,17 +193,17 @@ impl<T: hiring::Trait> rstd::convert::From<WrappedError<hiring::FillOpeningError
 				outcome_in_filled_opening,
 			) => match stake_purpose {
 				hiring::StakePurpose::Application => match outcome_in_filled_opening {
-					hiring::ApplicationOutcomeInFilledOpening::Success => MSG_FULL_CURATOR_OPENING_SUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_REDUNDANT,
-					hiring::ApplicationOutcomeInFilledOpening::Failure => MSG_FULL_CURATOR_OPENING_UNSUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_REDUNDANT
+					hiring::ApplicationOutcomeInFilledOpening::Success => MSG_FULL_WORKER_OPENING_SUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_REDUNDANT,
+					hiring::ApplicationOutcomeInFilledOpening::Failure => MSG_FULL_WORKER_OPENING_UNSUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_REDUNDANT
 				},
 				hiring::StakePurpose::Role => match outcome_in_filled_opening {
-					hiring::ApplicationOutcomeInFilledOpening::Success => MSG_FULL_CURATOR_OPENING_SUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_REDUNDANT,
-					hiring::ApplicationOutcomeInFilledOpening::Failure => MSG_FULL_CURATOR_OPENING_UNSUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_REDUNDANT
+					hiring::ApplicationOutcomeInFilledOpening::Success => MSG_FULL_WORKER_OPENING_SUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_REDUNDANT,
+					hiring::ApplicationOutcomeInFilledOpening::Failure => MSG_FULL_WORKER_OPENING_UNSUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_REDUNDANT
 				},
 			},
-			hiring::FillOpeningError::<T>::ApplicationDoesNotExist(_application_id) => MSG_FULL_CURATOR_OPENING_APPLICATION_DOES_NOT_EXIST,
-			hiring::FillOpeningError::<T>::ApplicationNotInActiveStage(_application_id) => MSG_FULL_CURATOR_OPENING_APPLICATION_NOT_ACTIVE,
-			hiring::FillOpeningError::<T>::ApplicationForWrongOpening(_application_id) => MSG_FILL_CURATOR_OPENING_APPLICATION_FOR_WRONG_OPENING,
+			hiring::FillOpeningError::<T>::ApplicationDoesNotExist(_application_id) => MSG_FULL_WORKER_OPENING_APPLICATION_DOES_NOT_EXIST,
+			hiring::FillOpeningError::<T>::ApplicationNotInActiveStage(_application_id) => MSG_FULL_WORKER_OPENING_APPLICATION_NOT_ACTIVE,
+			hiring::FillOpeningError::<T>::ApplicationForWrongOpening(_application_id) => MSG_FILL_WORKER_OPENING_APPLICATION_FOR_WRONG_OPENING,
 		}
     }
 }
@@ -212,20 +212,20 @@ impl rstd::convert::From<WrappedError<hiring::DeactivateApplicationError>> for &
     fn from(wrapper: WrappedError<hiring::DeactivateApplicationError>) -> Self {
         match wrapper.error {
             hiring::DeactivateApplicationError::ApplicationDoesNotExist => {
-                MSG_WITHDRAW_CURATOR_APPLICATION_APPLICATION_DOES_NOT_EXIST
+                MSG_WITHDRAW_WORKER_APPLICATION_APPLICATION_DOES_NOT_EXIST
             }
             hiring::DeactivateApplicationError::ApplicationNotActive => {
-                MSG_WITHDRAW_CURATOR_APPLICATION_APPLICATION_NOT_ACTIVE
+                MSG_WITHDRAW_WORKER_APPLICATION_APPLICATION_NOT_ACTIVE
             }
             hiring::DeactivateApplicationError::OpeningNotAcceptingApplications => {
-                MSG_WITHDRAW_CURATOR_APPLICATION_OPENING_NOT_ACCEPTING_APPLICATIONS
+                MSG_WITHDRAW_WORKER_APPLICATION_OPENING_NOT_ACCEPTING_APPLICATIONS
             }
             hiring::DeactivateApplicationError::UnstakingPeriodTooShort(_stake_purpose) => {
-                MSG_WITHDRAW_CURATOR_APPLICATION_UNSTAKING_PERIOD_TOO_SHORT
+                MSG_WITHDRAW_WORKER_APPLICATION_UNSTAKING_PERIOD_TOO_SHORT
             }
             hiring::DeactivateApplicationError::RedundantUnstakingPeriodProvided(
                 _stake_purpose,
-            ) => MSG_WITHDRAW_CURATOR_APPLICATION_REDUNDANT_UNSTAKING_PERIOD,
+            ) => MSG_WITHDRAW_WORKER_APPLICATION_REDUNDANT_UNSTAKING_PERIOD,
         }
     }
 }
@@ -247,22 +247,22 @@ impl rstd::convert::From<WrappedError<hiring::AddApplicationError>> for &str {
     fn from(wrapper: WrappedError<hiring::AddApplicationError>) -> Self {
         match wrapper.error {
             hiring::AddApplicationError::OpeningDoesNotExist => {
-                MSG_ADD_CURATOR_OPENING_OPENING_DOES_NOT_EXIST
+                MSG_ADD_WORKER_OPENING_OPENING_DOES_NOT_EXIST
             }
             hiring::AddApplicationError::StakeProvidedWhenRedundant(_stake_purpose) => {
-                MSG_ADD_CURATOR_OPENING_STAKE_PROVIDED_WHEN_REDUNDANT
+                MSG_ADD_WORKER_OPENING_STAKE_PROVIDED_WHEN_REDUNDANT
             }
             hiring::AddApplicationError::StakeMissingWhenRequired(_stake_purpose) => {
-                MSG_ADD_CURATOR_OPENING_STAKE_MISSING_WHEN_REQUIRED
+                MSG_ADD_WORKER_OPENING_STAKE_MISSING_WHEN_REQUIRED
             }
             hiring::AddApplicationError::StakeAmountTooLow(_stake_purpose) => {
-                MSG_ADD_CURATOR_OPENING_STAKE_AMOUNT_TOO_LOW
+                MSG_ADD_WORKER_OPENING_STAKE_AMOUNT_TOO_LOW
             }
             hiring::AddApplicationError::OpeningNotInAcceptingApplicationsStage => {
-                MSG_ADD_CURATOR_OPENING_OPENING_NOT_IN_ACCEPTING_APPLICATION_STAGE
+                MSG_ADD_WORKER_OPENING_OPENING_NOT_IN_ACCEPTING_APPLICATION_STAGE
             }
             hiring::AddApplicationError::NewApplicationWasCrowdedOut => {
-                MSG_ADD_CURATOR_OPENING_NEW_APPLICATION_WAS_CROWDED_OUT
+                MSG_ADD_WORKER_OPENING_NEW_APPLICATION_WAS_CROWDED_OUT
             }
         }
     }
@@ -272,13 +272,13 @@ impl rstd::convert::From<WrappedError<members::MemberControllerAccountDidNotSign
     fn from(wrapper: WrappedError<members::MemberControllerAccountDidNotSign>) -> Self {
         match wrapper.error {
             members::MemberControllerAccountDidNotSign::UnsignedOrigin => {
-                bureaucracy_errors::MSG_APPLY_ON_CURATOR_OPENING_UNSIGNED_ORIGIN
+                bureaucracy_errors::MSG_APPLY_ON_WORKER_OPENING_UNSIGNED_ORIGIN
             }
             members::MemberControllerAccountDidNotSign::MemberIdInvalid => {
-                bureaucracy_errors::MSG_APPLY_ON_CURATOR_OPENING_MEMBER_ID_INVALID
+                bureaucracy_errors::MSG_APPLY_ON_WORKER_OPENING_MEMBER_ID_INVALID
             }
             members::MemberControllerAccountDidNotSign::SignerControllerAccountMismatch => {
-                bureaucracy_errors::MSG_APPLY_ON_CURATOR_OPENING_SIGNER_NOT_CONTROLLER_ACCOUNT
+                bureaucracy_errors::MSG_APPLY_ON_WORKER_OPENING_SIGNER_NOT_CONTROLLER_ACCOUNT
             }
         }
     }

+ 196 - 220
runtime-modules/bureaucracy/src/lib.rs

@@ -21,8 +21,7 @@ use constraints::InputValidationLengthConstraint;
 use errors::bureaucracy_errors::*;
 use errors::WrappedError;
 use types::{
-    Curator, CuratorApplication, CuratorOpening, CuratorRoleStakeProfile, Lead,
-    OpeningPolicyCommitment,
+    Lead, OpeningPolicyCommitment, Worker, WorkerApplication, WorkerOpening, WorkerRoleStakeProfile,
 };
 
 //TODO: docs
@@ -33,23 +32,23 @@ pub type LeadOf<T> =
     Lead<<T as membership::members::Trait>::MemberId, <T as system::Trait>::AccountId>;
 
 /*
-+ add_curator_opening
-+ accept_curator_applications
-+ begin_curator_applicant_review
-+ fill_curator_opening
-+ withdraw_curator_application
-+ terminate_curator_application
-+ apply_on_curator_opening
++ add_worker_opening
++ accept_worker_applications
++ begin_worker_applicant_review
++ fill_worker_opening
++ withdraw_worker_application
++ terminate_worker_application
++ apply_on_worker_opening
 */
 
 /// Workaround for BTreeSet type
-pub type CuratorApplicationIdSet<T> = BTreeSet<CuratorApplicationId<T>>;
+pub type WorkerApplicationIdSet<T> = BTreeSet<WorkerApplicationId<T>>;
 
-/// Type for the identifier for an opening for a curator.
-pub type CuratorOpeningId<T> = <T as hiring::Trait>::OpeningId;
+/// Type for the identifier for an opening for a worker.
+pub type WorkerOpeningId<T> = <T as hiring::Trait>::OpeningId;
 
-/// Type for the identifier for an application as a curator.
-pub type CuratorApplicationId<T> = <T as hiring::Trait>::ApplicationId;
+/// Type for the identifier for an application as a worker.
+pub type WorkerApplicationId<T> = <T as hiring::Trait>::ApplicationId;
 
 /// Balance type of runtime
 pub type BalanceOf<T> =
@@ -62,19 +61,19 @@ pub type CurrencyOf<T> = <T as stake::Trait>::Currency;
 pub type NegativeImbalance<T> =
     <<T as stake::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::NegativeImbalance;
 
-/// Alias for the curator application id to the curator id dictionary
-pub type CuratorApplicationIdToCuratorIdMap<T> = BTreeMap<CuratorApplicationId<T>, CuratorId<T>>;
+/// Alias for the worker application id to the worker id dictionary
+pub type WorkerApplicationIdToWorkerIdMap<T> = BTreeMap<WorkerApplicationId<T>, WorkerId<T>>;
 
-/// Type identifier for curator role, which must be same as membership actor identifier
-pub type CuratorId<T> = <T as membership::members::Trait>::ActorId;
+/// Type identifier for worker role, which must be same as membership actor identifier
+pub type WorkerId<T> = <T as membership::members::Trait>::ActorId;
 
 // Type simplification
-type CuratorOpeningInfo<T> = (
-    CuratorOpening<
+type WorkerOpeningInfo<T> = (
+    WorkerOpening<
         <T as hiring::Trait>::OpeningId,
         <T as system::Trait>::BlockNumber,
         BalanceOf<T>,
-        CuratorApplicationId<T>,
+        WorkerApplicationId<T>,
     >,
     hiring::Opening<
         BalanceOf<T>,
@@ -84,29 +83,29 @@ type CuratorOpeningInfo<T> = (
 );
 
 // Type simplification
-type CuratorApplicationInfo<T> = (
-    CuratorApplication<
+type WorkerApplicationInfo<T> = (
+    WorkerApplication<
         <T as system::Trait>::AccountId,
-        CuratorOpeningId<T>,
+        WorkerOpeningId<T>,
         <T as membership::members::Trait>::MemberId,
         <T as hiring::Trait>::ApplicationId,
     >,
-    CuratorApplicationId<T>,
-    CuratorOpening<
+    WorkerApplicationId<T>,
+    WorkerOpening<
         <T as hiring::Trait>::OpeningId,
         <T as system::Trait>::BlockNumber,
         BalanceOf<T>,
-        CuratorApplicationId<T>,
+        WorkerApplicationId<T>,
     >,
 );
 
-type CuratorOf<T> = Curator<
+type WorkerOf<T> = Worker<
     <T as system::Trait>::AccountId,
     //    T::RewardRelationshipId,
     //    T::StakeId,
     //    <T as system::Trait>::BlockNumber,
     //    LeadId<T>,
-    //    CuratorApplicationId<T>,
+    //    WorkerApplicationId<T>,
     //    PrincipalId<T>,
 >;
 
@@ -122,45 +121,45 @@ decl_event!(
     where
         <T as membership::members::Trait>::MemberId,
         <T as system::Trait>::AccountId,
-        CuratorOpeningId = CuratorOpeningId<T>,
-        CuratorApplicationId = CuratorApplicationId<T>,
-        CuratorApplicationIdToCuratorIdMap = CuratorApplicationIdToCuratorIdMap<T>,
+        WorkerOpeningId = WorkerOpeningId<T>,
+        WorkerApplicationId = WorkerApplicationId<T>,
+        WorkerApplicationIdToWorkerIdMap = WorkerApplicationIdToWorkerIdMap<T>,
     {
         /// Emits on setting the leader.
         /// Params:
         /// - Member id of the leader.
         /// - Role account id of the leader.
         LeaderSet(MemberId, AccountId),
-        /// Emits on adding new curator opening.
+        /// Emits on adding new worker opening.
         /// Params:
-        /// - Curator opening id
-        CuratorOpeningAdded(CuratorOpeningId),
-        /// Emits on accepting application for the curator opening.
+        /// - Worker opening id
+        WorkerOpeningAdded(WorkerOpeningId),
+        /// Emits on accepting application for the worker opening.
         /// Params:
-        /// - Curator opening id
-        AcceptedCuratorApplications(CuratorOpeningId),
-        /// Emits on adding the application for the curator opening.
+        /// - Worker opening id
+        AcceptedWorkerApplications(WorkerOpeningId),
+        /// Emits on adding the application for the worker opening.
         /// Params:
-        /// - Curator opening id
-        /// - Curator application id
-        AppliedOnCuratorOpening(CuratorOpeningId, CuratorApplicationId),
-        /// Emits on withdrawing the application for the curator opening.
+        /// - Worker opening id
+        /// - Worker application id
+        AppliedOnWorkerOpening(WorkerOpeningId, WorkerApplicationId),
+        /// Emits on withdrawing the application for the worker opening.
         /// Params:
-        /// - Curator application id
-        CuratorApplicationWithdrawn(CuratorApplicationId),
-        /// Emits on terminating the application for the curator opening.
+        /// - Worker application id
+        WorkerApplicationWithdrawn(WorkerApplicationId),
+        /// Emits on terminating the application for the worker opening.
         /// Params:
-        /// - Curator application id
-        CuratorApplicationTerminated(CuratorApplicationId),
-        /// Emits on beginning the application review for the curator opening.
+        /// - Worker application id
+        WorkerApplicationTerminated(WorkerApplicationId),
+        /// Emits on beginning the application review for the worker opening.
         /// Params:
-        /// - Curator opening id
-        BeganCuratorApplicationReview(CuratorOpeningId),
-        /// Emits on filling the curator opening.
+        /// - Worker opening id
+        BeganWorkerApplicationReview(WorkerOpeningId),
+        /// Emits on filling the worker opening.
         /// Params:
-        /// - Curator opening id
-        /// - Curator application id to the curator id dictionary
-        CuratorOpeningFilled(CuratorOpeningId, CuratorApplicationIdToCuratorIdMap),
+        /// - Worker opening id
+        /// - Worker application id to the worker id dictionary
+        WorkerOpeningFilled(WorkerOpeningId, WorkerApplicationIdToWorkerIdMap),
     }
 );
 
@@ -169,29 +168,29 @@ decl_storage! {
         /// The current lead.
         pub CurrentLead get(current_lead) : Option<LeadOf<T>>;
 
-        /// Next identifier value for new curator opening.
-        pub NextCuratorOpeningId get(next_curator_opening_id): CuratorOpeningId<T>;
+        /// Next identifier value for new worker opening.
+        pub NextWorkerOpeningId get(next_worker_opening_id): WorkerOpeningId<T>;
 
-        /// Maps identifier to curator opening.
-        pub CuratorOpeningById get(curator_opening_by_id): linked_map CuratorOpeningId<T> => CuratorOpening<T::OpeningId, T::BlockNumber, BalanceOf<T>, CuratorApplicationId<T>>;
+        /// Maps identifier to worker opening.
+        pub WorkerOpeningById get(worker_opening_by_id): linked_map WorkerOpeningId<T> => WorkerOpening<T::OpeningId, T::BlockNumber, BalanceOf<T>, WorkerApplicationId<T>>;
 
         /// Opening human readable text length limits
         pub OpeningHumanReadableText get(opening_human_readable_text): InputValidationLengthConstraint;
 
-        /// Maps identifier to curator application on opening.
-        pub CuratorApplicationById get(curator_application_by_id) : linked_map CuratorApplicationId<T> => CuratorApplication<T::AccountId, CuratorOpeningId<T>, T::MemberId, T::ApplicationId>;
+        /// Maps identifier to worker application on opening.
+        pub WorkerApplicationById get(worker_application_by_id) : linked_map WorkerApplicationId<T> => WorkerApplication<T::AccountId, WorkerOpeningId<T>, T::MemberId, T::ApplicationId>;
 
-        /// Next identifier value for new curator application.
-        pub NextCuratorApplicationId get(next_curator_application_id) : CuratorApplicationId<T>;
+        /// Next identifier value for new worker application.
+        pub NextWorkerApplicationId get(next_worker_application_id) : WorkerApplicationId<T>;
 
-        /// Curator application human readable text length limits
-        pub CuratorApplicationHumanReadableText get(curator_application_human_readable_text) : InputValidationLengthConstraint;
+        /// Worker application human readable text length limits
+        pub WorkerApplicationHumanReadableText get(worker_application_human_readable_text) : InputValidationLengthConstraint;
 
-        /// Maps identifier to corresponding curator.
-        pub CuratorById get(curator_by_id) : linked_map CuratorId<T> => CuratorOf<T>;
+        /// Maps identifier to corresponding worker.
+        pub WorkerById get(worker_by_id) : linked_map WorkerId<T> => WorkerOf<T>;
 
-        /// Next identifier for new curator.
-        pub NextCuratorId get(next_curator_id) : CuratorId<T>;
+        /// Next identifier for new worker.
+        pub NextWorkerId get(next_worker_id) : WorkerId<T>;
     }
 }
 
@@ -221,8 +220,8 @@ decl_module! {
             Ok(())
         }
 
-         /// Add an opening for a curator role.
-        pub fn add_curator_opening(
+         /// Add an opening for a worker role.
+        pub fn add_worker_opening(
             origin,
             activate_at: hiring::ActivateOpeningAt<T::BlockNumber>,
             commitment: OpeningPolicyCommitment<T::BlockNumber,
@@ -252,26 +251,26 @@ decl_module! {
                     human_readable_text,
             ))?;
 
-            let new_curator_opening_id = NextCuratorOpeningId::<T, I>::get();
+            let new_worker_opening_id = NextWorkerOpeningId::<T, I>::get();
 
-            // Create and add curator opening.
-            let new_opening_by_id = CuratorOpening::<CuratorOpeningId<T>, T::BlockNumber, BalanceOf<T>, CuratorApplicationId<T>> {
+            // Create and add worker opening.
+            let new_opening_by_id = WorkerOpening::<WorkerOpeningId<T>, T::BlockNumber, BalanceOf<T>, WorkerApplicationId<T>> {
                 opening_id : opening_id,
-                curator_applications: BTreeSet::new(),
+                worker_applications: BTreeSet::new(),
                 policy_commitment: policy_commitment
             };
 
-            CuratorOpeningById::<T, I>::insert(new_curator_opening_id, new_opening_by_id);
+            WorkerOpeningById::<T, I>::insert(new_worker_opening_id, new_opening_by_id);
 
-            // Update NextCuratorOpeningId
-            NextCuratorOpeningId::<T, I>::mutate(|id| *id += <CuratorOpeningId<T> as One>::one());
+            // Update NextWorkerOpeningId
+            NextWorkerOpeningId::<T, I>::mutate(|id| *id += <WorkerOpeningId<T> as One>::one());
 
             // Trigger event
-            Self::deposit_event(RawEvent::CuratorOpeningAdded(new_curator_opening_id));
+            Self::deposit_event(RawEvent::WorkerOpeningAdded(new_worker_opening_id));
         }
 
-            /// Begin accepting curator applications to an opening that is active.
-        pub fn accept_curator_applications(origin, curator_opening_id: CuratorOpeningId<T>)  {
+            /// Begin accepting worker applications to an opening that is active.
+        pub fn accept_worker_applications(origin, worker_opening_id: WorkerOpeningId<T>)  {
 
             // Ensure lead is set and is origin signer
             Self::ensure_origin_is_set_lead(origin)?;
@@ -280,7 +279,7 @@ decl_module! {
             // NB: Even though call to hiring module will have implicit check for
             // existence of opening as well, this check is to make sure that the opening is for
             // this working group, not something else.
-            let (curator_opening, _opening) = Self::ensure_curator_opening_exists(&curator_opening_id)?;
+            let (worker_opening, _opening) = Self::ensure_worker_opening_exists(&worker_opening_id)?;
 
             // Attempt to begin accepting applications
             // NB: Combined ensure check and mutation in hiring module
@@ -288,19 +287,19 @@ decl_module! {
             // mutation
 
             ensure_on_wrapped_error!(
-                hiring::Module::<T>::begin_accepting_applications(curator_opening.opening_id)
+                hiring::Module::<T>::begin_accepting_applications(worker_opening.opening_id)
             )?;
 
 
             // Trigger event
-            Self::deposit_event(RawEvent::AcceptedCuratorApplications(curator_opening_id));
+            Self::deposit_event(RawEvent::AcceptedWorkerApplications(worker_opening_id));
         }
 
-        /// Apply on a curator opening.
-        pub fn apply_on_curator_opening(
+        /// Apply on a worker opening.
+        pub fn apply_on_worker_opening(
             origin,
             member_id: T::MemberId,
-            curator_opening_id: CuratorOpeningId<T>,
+            worker_opening_id: WorkerOpeningId<T>,
             role_account: T::AccountId,
             opt_role_stake_balance: Option<BalanceOf<T>>,
             opt_application_stake_balance: Option<BalanceOf<T>>,
@@ -319,12 +318,8 @@ decl_module! {
                 MSG_ORIGIN_IS_NEITHER_MEMBER_CONTROLLER_OR_ROOT
             );
 
-            // Ensure curator opening exists
-            let (curator_opening, _opening) = Self::ensure_curator_opening_exists(&curator_opening_id)?;
-
-            //TODO do we need this?
-            // Ensure new owner can actually become a curator
-            //let (_member_as_curator, _new_curator_id) = Self::ensure_can_register_curator_role_on_member(&member_id)?;
+            // Ensure worker opening exists
+            let (worker_opening, _opening) = Self::ensure_worker_opening_exists(&worker_opening_id)?;
 
             // Ensure that there is sufficient balance to cover stake proposed
             Self::ensure_can_make_stake_imbalance(
@@ -333,16 +328,16 @@ decl_module! {
                 .map_err(|_err| MSG_INSUFFICIENT_BALANCE_TO_APPLY)?;
 
             // Ensure application text is valid
-            Self::ensure_curator_application_text_is_valid(&human_readable_text)?;
+            Self::ensure_worker_application_text_is_valid(&human_readable_text)?;
 
             // Ensure application can actually be added
             ensure_on_wrapped_error!(
-                hiring::Module::<T>::ensure_can_add_application(curator_opening.opening_id, opt_role_stake_balance, opt_application_stake_balance)
+                hiring::Module::<T>::ensure_can_add_application(worker_opening.opening_id, opt_role_stake_balance, opt_application_stake_balance)
             )?;
 
             // Ensure member does not have an active application to this opening
             Self::ensure_member_has_no_active_application_on_opening(
-                curator_opening.curator_applications,
+                worker_opening.worker_applications,
                 member_id
             )?;
 
@@ -354,7 +349,7 @@ decl_module! {
 
             // Call hiring module to add application
             let add_application_result = hiring::Module::<T>::add_application(
-                curator_opening.opening_id,
+                worker_opening.opening_id,
                 opt_role_stake_imbalance,
                 opt_application_stake_imbalance,
                 human_readable_text
@@ -365,40 +360,40 @@ decl_module! {
 
             let application_id = add_application_result.unwrap().application_id_added;
 
-            // Get id of new curator application
-            let new_curator_application_id = NextCuratorApplicationId::<T, I>::get();
+            // Get id of new worker application
+            let new_worker_application_id = NextWorkerApplicationId::<T, I>::get();
 
-            // Make curator application
-            let curator_application = CuratorApplication::new(&role_account, &curator_opening_id, &member_id, &application_id);
+            // Make worker application
+            let worker_application = WorkerApplication::new(&role_account, &worker_opening_id, &member_id, &application_id);
 
             // Store application
-            CuratorApplicationById::<T, I>::insert(new_curator_application_id, curator_application);
+            WorkerApplicationById::<T, I>::insert(new_worker_application_id, worker_application);
 
-            // Update next curator application identifier value
-            NextCuratorApplicationId::<T, I>::mutate(|id| *id += <CuratorApplicationId<T> as One>::one());
+            // Update next worker application identifier value
+            NextWorkerApplicationId::<T, I>::mutate(|id| *id += <WorkerApplicationId<T> as One>::one());
 
-            // Add application to set of application in curator opening
-            CuratorOpeningById::<T, I>::mutate(curator_opening_id, |curator_opening| {
-                curator_opening.curator_applications.insert(new_curator_application_id);
+            // Add application to set of application in worker opening
+            WorkerOpeningById::<T, I>::mutate(worker_opening_id, |worker_opening| {
+                worker_opening.worker_applications.insert(new_worker_application_id);
             });
 
             // Trigger event
-            Self::deposit_event(RawEvent::AppliedOnCuratorOpening(curator_opening_id, new_curator_application_id));
+            Self::deposit_event(RawEvent::AppliedOnWorkerOpening(worker_opening_id, new_worker_application_id));
         }
 
-        pub fn withdraw_curator_application(
+        pub fn withdraw_worker_application(
             origin,
-            curator_application_id: CuratorApplicationId<T>
+            worker_application_id: WorkerApplicationId<T>
         ) {
-            // Ensuring curator application actually exists
-            let (curator_application, _, curator_opening) = Self::ensure_curator_application_exists(&curator_application_id)?;
+            // Ensuring worker application actually exists
+            let (worker_application, _, worker_opening) = Self::ensure_worker_application_exists(&worker_application_id)?;
 
             // Ensure that it is signed
             let signer_account = ensure_signed(origin)?;
 
             // Ensure that signer is applicant role account
             ensure!(
-                signer_account == curator_application.role_account,
+                signer_account == worker_application.role_account,
                 MSG_ORIGIN_IS_NOT_APPLICANT
             );
 
@@ -406,47 +401,47 @@ decl_module! {
             // NB: Combined ensure check and mutation in hiring module
             ensure_on_wrapped_error!(
                 hiring::Module::<T>::deactive_application(
-                    curator_application.application_id,
-                    curator_opening.policy_commitment.exit_curator_role_application_stake_unstaking_period,
-                    curator_opening.policy_commitment.exit_curator_role_stake_unstaking_period
+                    worker_application.application_id,
+                    worker_opening.policy_commitment.exit_worker_role_application_stake_unstaking_period,
+                    worker_opening.policy_commitment.exit_worker_role_stake_unstaking_period
                 )
             )?;
 
             // mutation
 
             // Trigger event
-            Self::deposit_event(RawEvent::CuratorApplicationWithdrawn(curator_application_id));
+            Self::deposit_event(RawEvent::WorkerApplicationWithdrawn(worker_application_id));
         }
 
-        pub fn terminate_curator_application(
+        pub fn terminate_worker_application(
             origin,
-            curator_application_id: CuratorApplicationId<T>
+            worker_application_id: WorkerApplicationId<T>
         ) {
 
             // Ensure lead is set and is origin signer
             Self::ensure_origin_is_set_lead(origin)?;
 
-            // Ensuring curator application actually exists
-            let (curator_application, _, curator_opening) = Self::ensure_curator_application_exists(&curator_application_id)?;
+            // Ensuring worker application actually exists
+            let (worker_application, _, worker_opening) = Self::ensure_worker_application_exists(&worker_application_id)?;
 
             // Attempt to deactivate application
             // NB: Combined ensure check and mutation in hiring module
             ensure_on_wrapped_error!(
                 hiring::Module::<T>::deactive_application(
-                    curator_application.application_id,
-                    curator_opening.policy_commitment.terminate_curator_application_stake_unstaking_period,
-                    curator_opening.policy_commitment.terminate_curator_role_stake_unstaking_period
+                    worker_application.application_id,
+                    worker_opening.policy_commitment.terminate_worker_application_stake_unstaking_period,
+                    worker_opening.policy_commitment.terminate_worker_role_stake_unstaking_period
                 )
             )?;
 
             // mutation
 
             // Trigger event
-            Self::deposit_event(RawEvent::CuratorApplicationTerminated(curator_application_id));
+            Self::deposit_event(RawEvent::WorkerApplicationTerminated(worker_application_id));
         }
 
         /// Begin reviewing, and therefore not accepting new applications.
-        pub fn begin_curator_applicant_review(origin, curator_opening_id: CuratorOpeningId<T>) {
+        pub fn begin_worker_applicant_review(origin, worker_opening_id: WorkerOpeningId<T>) {
 
             // Ensure lead is set and is origin signer
             Self::ensure_origin_is_set_lead(origin)?;
@@ -455,82 +450,68 @@ decl_module! {
             // NB: Even though call to hiring modul will have implicit check for
             // existence of opening as well, this check is to make sure that the opening is for
             // this working group, not something else.
-            let (curator_opening, _opening) = Self::ensure_curator_opening_exists(&curator_opening_id)?;
+            let (worker_opening, _opening) = Self::ensure_worker_opening_exists(&worker_opening_id)?;
 
             // Attempt to begin review of applications
             // NB: Combined ensure check and mutation in hiring module
             ensure_on_wrapped_error!(
-                hiring::Module::<T>::begin_review(curator_opening.opening_id)
+                hiring::Module::<T>::begin_review(worker_opening.opening_id)
                 )?;
 
             // mutation
 
             // Trigger event
-            Self::deposit_event(RawEvent::BeganCuratorApplicationReview(curator_opening_id));
+            Self::deposit_event(RawEvent::BeganWorkerApplicationReview(worker_opening_id));
         }
 
-                /// Fill opening for curator
-        pub fn fill_curator_opening(
+                /// Fill opening for worker
+        pub fn fill_worker_opening(
             origin,
-            curator_opening_id: CuratorOpeningId<T>,
-            successful_curator_application_ids: CuratorApplicationIdSet<T>,
+            worker_opening_id: WorkerOpeningId<T>,
+            successful_worker_application_ids: WorkerApplicationIdSet<T>,
 //            reward_policy: Option<RewardPolicy<minting::BalanceOf<T>, T::BlockNumber>>
         ) {
-            // successful_curator_application_ids.len() == zero check?
-
             // Ensure lead is set and is origin signer
             Self::ensure_origin_is_set_lead(origin)?;
 
-            // Ensure curator opening exists
-            let (curator_opening, _) = Self::ensure_curator_opening_exists(&curator_opening_id)?;
+            // Ensure worker opening exists
+            let (worker_opening, _) = Self::ensure_worker_opening_exists(&worker_opening_id)?;
 
-            // Make iterator over successful curator application
-            let successful_iter = successful_curator_application_ids
+            // Make iterator over successful worker application
+            let successful_iter = successful_worker_application_ids
                                     .iter()
-                                    // recover curator application from id
-                                    .map(|curator_application_id| { Self::ensure_curator_application_exists(curator_application_id)})
+                                    // recover worker application from id
+                                    .map(|worker_application_id| { Self::ensure_worker_application_exists(worker_application_id)})
                                     // remove Err cases, i.e. non-existing applications
                                     .filter_map(|result| result.ok());
 
-            // Count number of successful curators provided
-            let num_provided_successful_curator_application_ids = successful_curator_application_ids.len();
+            // Count number of successful workers provided
+            let num_provided_successful_worker_application_ids = successful_worker_application_ids.len();
 
-            // Ensure all curator applications exist
+            // Ensure all worker applications exist
             let number_of_successful_applications = successful_iter
                                                     .clone()
                                                     .count();
 
             ensure!(
-                number_of_successful_applications == num_provided_successful_curator_application_ids,
-                MSG_SUCCESSFUL_CURATOR_APPLICATION_DOES_NOT_EXIST
+                number_of_successful_applications == num_provided_successful_worker_application_ids,
+                MSG_SUCCESSFUL_WORKER_APPLICATION_DOES_NOT_EXIST
             );
 
             // Attempt to fill opening
             let successful_application_ids = successful_iter
                                             .clone()
-                                            .map(|(successful_curator_application, _, _)| successful_curator_application.application_id)
+                                            .map(|(successful_worker_application, _, _)| successful_worker_application.application_id)
                                             .collect::<BTreeSet<_>>();
-            // TODO: should we implement this?
-            // // Ensure all applications are from members that _still_ can step into the given role
-            // let num_successful_applications_that_can_register_as_curator = successful_iter
-            //                                                             .clone()
-            //                                                             .map(|(successful_curator_application, _, _)| successful_curator_application.member_id)
-            //                                                             .filter_map(|successful_member_id| Self::ensure_can_register_curator_role_on_member(&successful_member_id).ok() )
-            //                                                             .count();
-
-            // ensure!(
-            //     num_successful_applications_that_can_register_as_curator == num_provided_successful_curator_application_ids,
-            //     MSG_MEMBER_NO_LONGER_REGISTRABLE_AS_CURATOR
-            // );
 
             // NB: Combined ensure check and mutation in hiring module
             ensure_on_wrapped_error!(
                 hiring::Module::<T>::fill_opening(
-                    curator_opening.opening_id,
+                    worker_opening.opening_id,
                     successful_application_ids,
-                    curator_opening.policy_commitment.fill_opening_successful_applicant_application_stake_unstaking_period,
-                    curator_opening.policy_commitment.fill_opening_failed_applicant_application_stake_unstaking_period,
-                    curator_opening.policy_commitment.fill_opening_failed_applicant_role_stake_unstaking_period
+                    worker_opening.policy_commitment.fill_opening_successful_applicant_application_stake_unstaking_period,
+                    worker_opening.policy_commitment.fill_opening_failed_applicant_application_stake_unstaking_period,
+                    worker_opening.policy_commitment.fill_opening_failed_applicant_role_stake_unstaking_period
                 )
             )?;
 
@@ -539,10 +520,10 @@ decl_module! {
             //     // A reward will need to be created so ensure our configured mint exists
             //     let mint_id = Self::mint();
             //
-            //     ensure!(<minting::Mints<T>>::exists(mint_id), MSG_FILL_CURATOR_OPENING_MINT_DOES_NOT_EXIST);
+            //     ensure!(<minting::Mints<T>>::exists(mint_id), MSG_FILL_WORKER_OPENING_MINT_DOES_NOT_EXIST);
             //
             //     // Make sure valid parameters are selected for next payment at block number
-            //     ensure!(policy.next_payment_at_block > <system::Module<T>>::block_number(), MSG_FILL_CURATOR_OPENING_INVALID_NEXT_PAYMENT_BLOCK);
+            //     ensure!(policy.next_payment_at_block > <system::Module<T>>::block_number(), MSG_FILL_WORKER_OPENING_INVALID_NEXT_PAYMENT_BLOCK);
             //
             //     // The verified reward settings to use
             //     Some((mint_id, policy))
@@ -557,14 +538,14 @@ decl_module! {
             let _current_block = <system::Module<T>>::block_number();
 
             // For each successful application
-            // - create and hold on to curator
+            // - create and hold on to worker
             // - register role with membership module
 
-            let mut curator_application_id_to_curator_id = BTreeMap::new();
+            let mut worker_application_id_to_worker_id = BTreeMap::new();
 
             successful_iter
             .clone()
-            .for_each(|(successful_curator_application, id, _)| {
+            .for_each(|(successful_worker_application, id, _)| {
                 // TODO: should we implement this?
                 // // Create a reward relationship
                 // let reward_relationship = if let Some((mint_id, checked_policy)) = create_reward_settings.clone() {
@@ -573,7 +554,7 @@ decl_module! {
                 //     let recipient = <recurringrewards::Module<T>>::add_recipient();
                 //
                 //     // member must exist, since it was checked that it can enter the role
-                //     let member_profile = <members::Module<T>>::member_profile(successful_curator_application.member_id).unwrap();
+                //     let member_profile = <members::Module<T>>::member_profile(successful_worker_application.member_id).unwrap();
                 //
                 //     // rewards are deposited in the member's root account
                 //     let reward_destination_account = member_profile.root_account;
@@ -594,60 +575,60 @@ decl_module! {
                 // };
 
                 // Get possible stake for role
-                let application = hiring::ApplicationById::<T>::get(successful_curator_application.application_id);
+                let application = hiring::ApplicationById::<T>::get(successful_worker_application.application_id);
 
-                // Staking profile for curator
+                // Staking profile for worker
                 let _stake_profile =
                     if let Some(ref stake_id) = application.active_role_staking_id {
 
                         Some(
-                            CuratorRoleStakeProfile::new(
+                            WorkerRoleStakeProfile::new(
                                 stake_id,
-                                &curator_opening.policy_commitment.terminate_curator_role_stake_unstaking_period,
-                                &curator_opening.policy_commitment.exit_curator_role_stake_unstaking_period
+                                &worker_opening.policy_commitment.terminate_worker_role_stake_unstaking_period,
+                                &worker_opening.policy_commitment.exit_worker_role_stake_unstaking_period
                             )
                         )
                     } else {
                         None
                     };
 
-                // Get curator id
-                let new_curator_id = <NextCuratorId<T, I>>::get();
+                // Get worker id
+                let new_worker_id = <NextWorkerId<T, I>>::get();
 
                 // Make and add new principal
- //               let principal_id = Self::add_new_principal(&Principal::Curator(new_curator_id));
+ //               let principal_id = Self::add_new_principal(&Principal::Worker(new_worker_id));
 
                 // TODO: should we implement this?
-                // Construct curator
-                let curator = Curator::new(
-                    &(successful_curator_application.role_account),
+                // Construct worker
+                let worker = Worker::new(
+                    &(successful_worker_application.role_account),
 //                    &reward_relationship,
 //                    &stake_profile,
-//                    &CuratorRoleStage::Active,
-//                    &CuratorInduction::new(&lead_id, &id, &current_block),
+//                    &WorkerRoleStage::Active,
+//                    &WorkerInduction::new(&lead_id, &id, &current_block),
 //                    &principal_id
                 );
 
-                // Store curator
-                <CuratorById<T, I>>::insert(new_curator_id, curator);
+                // Store worker
+                <WorkerById<T, I>>::insert(new_worker_id, worker);
 
                 // TODO: should we implement this?
                 // // Register role on member
                 // let registered_role = members::Module::<T>::register_role_on_member(
-                //     successful_curator_application.member_id,
-                //     &role_types::ActorInRole::new(role_types::Role::Curator, new_curator_id)
+                //     successful_worker_application.member_id,
+                //     &role_types::ActorInRole::new(role_types::Role::Worker, new_worker_id)
                 // ).is_ok();
 
                 //assert!(registered_role);
 
-                // Update next curator id
-                <NextCuratorId<T, I>>::mutate(|id| *id += <CuratorId<T> as One>::one());
+                // Update next worker id
+                <NextWorkerId<T, I>>::mutate(|id| *id += <WorkerId<T> as One>::one());
 
-                curator_application_id_to_curator_id.insert(id, new_curator_id);
+                worker_application_id_to_worker_id.insert(id, new_worker_id);
             });
 
             // Trigger event
-            Self::deposit_event(RawEvent::CuratorOpeningFilled(curator_opening_id, curator_application_id_to_curator_id));
+            Self::deposit_event(RawEvent::WorkerOpeningFilled(worker_opening_id, worker_application_id_to_worker_id));
         }
     }
 }
@@ -701,19 +682,19 @@ impl<T: Trait<I>, I: Instance> Module<T, I> {
         Self::ensure_is_lead_account(signer)
     }
 
-    fn ensure_curator_opening_exists(
-        curator_opening_id: &CuratorOpeningId<T>,
-    ) -> Result<CuratorOpeningInfo<T>, &'static str> {
+    fn ensure_worker_opening_exists(
+        worker_opening_id: &WorkerOpeningId<T>,
+    ) -> Result<WorkerOpeningInfo<T>, &'static str> {
         ensure!(
-            CuratorOpeningById::<T, I>::exists(curator_opening_id),
-            MSG_CURATOR_OPENING_DOES_NOT_EXIST
+            WorkerOpeningById::<T, I>::exists(worker_opening_id),
+            MSG_WORKER_OPENING_DOES_NOT_EXIST
         );
 
-        let curator_opening = CuratorOpeningById::<T, I>::get(curator_opening_id);
+        let worker_opening = WorkerOpeningById::<T, I>::get(worker_opening_id);
 
-        let opening = hiring::OpeningById::<T>::get(curator_opening.opening_id);
+        let opening = hiring::OpeningById::<T>::get(worker_opening.opening_id);
 
-        Ok((curator_opening, opening))
+        Ok((worker_opening, opening))
     }
 
     fn make_stake_opt_imbalance(
@@ -737,17 +718,17 @@ impl<T: Trait<I>, I: Instance> Module<T, I> {
     }
 
     fn ensure_member_has_no_active_application_on_opening(
-        curator_applications: CuratorApplicationIdSet<T>,
+        worker_applications: WorkerApplicationIdSet<T>,
         member_id: T::MemberId,
     ) -> Result<(), &'static str> {
-        for curator_application_id in curator_applications {
-            let curator_application = CuratorApplicationById::<T, I>::get(curator_application_id);
+        for worker_application_id in worker_applications {
+            let worker_application = WorkerApplicationById::<T, I>::get(worker_application_id);
             // Look for application by the member for the opening
-            if curator_application.member_id != member_id {
+            if worker_application.member_id != member_id {
                 continue;
             }
             // Get application details
-            let application = <hiring::ApplicationById<T>>::get(curator_application.application_id);
+            let application = <hiring::ApplicationById<T>>::get(worker_application.application_id);
             // Return error if application is in active stage
             if application.stage == hiring::ApplicationStage::Active {
                 return Err(MSG_MEMBER_HAS_ACTIVE_APPLICATION_ON_OPENING);
@@ -757,11 +738,11 @@ impl<T: Trait<I>, I: Instance> Module<T, I> {
         Ok(())
     }
 
-    fn ensure_curator_application_text_is_valid(text: &[u8]) -> dispatch::Result {
-        <CuratorApplicationHumanReadableText<I>>::get().ensure_valid(
+    fn ensure_worker_application_text_is_valid(text: &[u8]) -> dispatch::Result {
+        <WorkerApplicationHumanReadableText<I>>::get().ensure_valid(
             text.len(),
-            MSG_CURATOR_APPLICATION_TEXT_TOO_SHORT,
-            MSG_CURATOR_APPLICATION_TEXT_TOO_LONG,
+            MSG_WORKER_APPLICATION_TEXT_TOO_SHORT,
+            MSG_WORKER_APPLICATION_TEXT_TOO_LONG,
         )
     }
 
@@ -806,23 +787,18 @@ impl<T: Trait<I>, I: Instance> Module<T, I> {
         }
     }
 
-    fn ensure_curator_application_exists(
-        curator_application_id: &CuratorApplicationId<T>,
-    ) -> Result<CuratorApplicationInfo<T>, &'static str> {
+    fn ensure_worker_application_exists(
+        worker_application_id: &WorkerApplicationId<T>,
+    ) -> Result<WorkerApplicationInfo<T>, &'static str> {
         ensure!(
-            CuratorApplicationById::<T, I>::exists(curator_application_id),
-            MSG_CURATOR_APPLICATION_DOES_NOT_EXIST
+            WorkerApplicationById::<T, I>::exists(worker_application_id),
+            MSG_WORKER_APPLICATION_DOES_NOT_EXIST
         );
 
-        let curator_application = CuratorApplicationById::<T, I>::get(curator_application_id);
+        let worker_application = WorkerApplicationById::<T, I>::get(worker_application_id);
 
-        let curator_opening =
-            CuratorOpeningById::<T, I>::get(curator_application.curator_opening_id);
+        let worker_opening = WorkerOpeningById::<T, I>::get(worker_application.worker_opening_id);
 
-        Ok((
-            curator_application,
-            *curator_application_id,
-            curator_opening,
-        ))
+        Ok((worker_application, *worker_application_id, worker_opening))
     }
 }

File diff suppressed because it is too large
+ 212 - 214
runtime-modules/bureaucracy/src/tests/mod.rs


+ 44 - 44
runtime-modules/bureaucracy/src/types.rs

@@ -63,34 +63,34 @@ pub struct OpeningPolicyCommitment<BlockNumber, Balance> {
     /// When filling an opening:
     pub fill_opening_failed_applicant_role_stake_unstaking_period: Option<BlockNumber>,
 
-    /// When terminating a curator:
-    pub terminate_curator_application_stake_unstaking_period: Option<BlockNumber>,
+    /// When terminating a worker:
+    pub terminate_worker_application_stake_unstaking_period: Option<BlockNumber>,
 
-    /// When terminating a curator:
-    pub terminate_curator_role_stake_unstaking_period: Option<BlockNumber>,
+    /// When terminating a worker:
+    pub terminate_worker_role_stake_unstaking_period: Option<BlockNumber>,
 
-    /// When a curator exists: ..
-    pub exit_curator_role_application_stake_unstaking_period: Option<BlockNumber>,
+    /// When a worker exists: ..
+    pub exit_worker_role_application_stake_unstaking_period: Option<BlockNumber>,
 
-    /// When a curator exists: ..
-    pub exit_curator_role_stake_unstaking_period: Option<BlockNumber>,
+    /// When a worker exists: ..
+    pub exit_worker_role_stake_unstaking_period: Option<BlockNumber>,
 }
 
-/// An opening for a curator role.
+/// An opening for a worker role.
 #[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
 #[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
-pub struct CuratorOpening<OpeningId, BlockNumber, Balance, CuratorApplicationId: core::cmp::Ord> {
+pub struct WorkerOpening<OpeningId, BlockNumber, Balance, WorkerApplicationId: core::cmp::Ord> {
     /// Identifer for underlying opening in the hiring module.
     pub opening_id: OpeningId,
 
-    /// Set of identifiers for all curator applications ever added
-    pub curator_applications: BTreeSet<CuratorApplicationId>,
+    /// Set of identifiers for all worker applications ever added
+    pub worker_applications: BTreeSet<WorkerApplicationId>,
 
     /// Commitment to policies in opening.
     pub policy_commitment: OpeningPolicyCommitment<BlockNumber, Balance>,
 }
 
-/// Working group lead: curator lead
+/// Working group lead: worker lead
 #[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
 #[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
 pub struct Lead<MemberId, AccountId> {
@@ -101,15 +101,15 @@ pub struct Lead<MemberId, AccountId> {
     pub role_account_id: AccountId,
 }
 
-/// An application for the curator role.
+/// An application for the worker role.
 #[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
 #[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
-pub struct CuratorApplication<AccountId, CuratorOpeningId, MemberId, ApplicationId> {
+pub struct WorkerApplication<AccountId, WorkerOpeningId, MemberId, ApplicationId> {
     /// Account used to authenticate in this role,
     pub role_account: AccountId,
 
     /// Opening on which this application applies
-    pub curator_opening_id: CuratorOpeningId,
+    pub worker_opening_id: WorkerOpeningId,
 
     /// Member applying
     pub member_id: MemberId,
@@ -118,28 +118,28 @@ pub struct CuratorApplication<AccountId, CuratorOpeningId, MemberId, Application
     pub application_id: ApplicationId,
 }
 
-impl<AccountId: Clone, CuratorOpeningId: Clone, MemberId: Clone, ApplicationId: Clone>
-    CuratorApplication<AccountId, CuratorOpeningId, MemberId, ApplicationId>
+impl<AccountId: Clone, WorkerOpeningId: Clone, MemberId: Clone, ApplicationId: Clone>
+    WorkerApplication<AccountId, WorkerOpeningId, MemberId, ApplicationId>
 {
     pub fn new(
         role_account: &AccountId,
-        curator_opening_id: &CuratorOpeningId,
+        worker_opening_id: &WorkerOpeningId,
         member_id: &MemberId,
         application_id: &ApplicationId,
     ) -> Self {
-        CuratorApplication {
+        WorkerApplication {
             role_account: (*role_account).clone(),
-            curator_opening_id: (*curator_opening_id).clone(),
+            worker_opening_id: (*worker_opening_id).clone(),
             member_id: (*member_id).clone(),
             application_id: (*application_id).clone(),
         }
     }
 }
 
-/// Role stake information for a curator.
+/// Role stake information for a worker.
 #[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
 #[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
-pub struct CuratorRoleStakeProfile<StakeId, BlockNumber> {
+pub struct WorkerRoleStakeProfile<StakeId, BlockNumber> {
     /// Whether participant is staked, and if so, the identifier for this staking in the staking module.
     pub stake_id: StakeId,
 
@@ -150,7 +150,7 @@ pub struct CuratorRoleStakeProfile<StakeId, BlockNumber> {
     pub exit_unstaking_period: Option<BlockNumber>,
 }
 
-impl<StakeId: Clone, BlockNumber: Clone> CuratorRoleStakeProfile<StakeId, BlockNumber> {
+impl<StakeId: Clone, BlockNumber: Clone> WorkerRoleStakeProfile<StakeId, BlockNumber> {
     pub fn new(
         stake_id: &StakeId,
         termination_unstaking_period: &Option<BlockNumber>,
@@ -164,33 +164,33 @@ impl<StakeId: Clone, BlockNumber: Clone> CuratorRoleStakeProfile<StakeId, BlockN
     }
 }
 
-/// Working group participant: curator
+/// Working group participant: worker
 /// This role can be staked, have reward and be inducted through the hiring module.
 #[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
 #[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
-pub struct Curator<
+pub struct Worker<
     AccountId,
     //    RewardRelationshipId,
     //    StakeId,
     //    BlockNumber,
     //    LeadId,
-    //    CuratorApplicationId,
+    //    WorkerApplicationId,
     //    PrincipalId,
 > {
     /// Account used to authenticate in this role,
     pub role_account: AccountId,
-    //    /// Whether the role has recurring reward, and if so an identifier for this.
-    //    pub reward_relationship: Option<RewardRelationshipId>,
-    //    /// When set, describes role stake of curator.
-    //    pub role_stake_profile: Option<CuratorRoleStakeProfile<StakeId, BlockNumber>>,
-    //    /// The stage of this curator in the working group.
-    //    pub stage: CuratorRoleStage<BlockNumber>,
-
-    //    /// How the curator was inducted into the working group.
-    //    pub induction: CuratorInduction<LeadId, CuratorApplicationId, BlockNumber>,
-
-    //    /// Permissions module principal id
-    //    pub principal_id: PrincipalId,
+    // /// Whether the role has recurring reward, and if so an identifier for this.
+    // pub reward_relationship: Option<RewardRelationshipId>,
+    // /// When set, describes role stake of worker.
+    // pub role_stake_profile: Option<WorkerRoleStakeProfile<StakeId, BlockNumber>>,
+    // /// The stage of this worker in the working group.
+    // pub stage: WorkerRoleStage<BlockNumber>,
+    //
+    // /// How the worker was inducted into the working group.
+    // pub induction: WorkerInduction<LeadId, WorkerApplicationId, BlockNumber>,
+    //
+    // /// Permissions module principal id
+    // pub principal_id: PrincipalId,
 }
 
 impl<
@@ -202,7 +202,7 @@ impl<
         //    ApplicationId: Clone,
         //    PrincipalId: Clone,
     >
-    Curator<
+    Worker<
         AccountId,
         //    RewardRelationshipId,
         //        StakeId,
@@ -215,12 +215,12 @@ impl<
     pub fn new(
         role_account: &AccountId,
         //        reward_relationship: &Option<RewardRelationshipId>,
-        //        role_stake_profile: &Option<CuratorRoleStakeProfile<StakeId, BlockNumber>>,
-        //        stage: &CuratorRoleStage<BlockNumber>,
-        //        induction: &CuratorInduction<LeadId, ApplicationId, BlockNumber>,
+        //        role_stake_profile: &Option<WorkerRoleStakeProfile<StakeId, BlockNumber>>,
+        //        stage: &WorkerRoleStage<BlockNumber>,
+        //        induction: &WorkerInduction<LeadId, ApplicationId, BlockNumber>,
         //        principal_id: &PrincipalId,
     ) -> Self {
-        Curator {
+        Worker {
             role_account: (*role_account).clone(),
             //            reward_relationship: (*reward_relationship).clone(),
             //            role_stake_profile: (*role_stake_profile).clone(),

Some files were not shown because too many files changed in this diff