From 650f9044a172ae060c725fa1cfa46b28da36d3b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89lo=C3=AFs?= <c@elo.tf>
Date: Sat, 16 Jul 2022 01:24:02 +0200
Subject: [PATCH] =?UTF-8?q?feat(governance):=C2=A0replace=20smiths=20colle?=
 =?UTF-8?q?ctive=20by=20technical=20committee=20(!92)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* feat(governance):  replace smiths collective by technical committee
---
 end2end-tests/cucumber-genesis/default.json |   3 +-
 end2end-tests/cucumber-genesis/wot.json     |   3 +-
 node/src/chain_spec/gdev.rs                 |  16 +++++++--
 node/src/chain_spec/gen_genesis_data.rs     |  15 ++++++++
 resources/gdev.json                         |   3 +-
 resources/metadata.scale                    | Bin 119706 -> 119720 bytes
 runtime/common/src/pallets_config.rs        |  38 ++++++--------------
 runtime/g1/src/lib.rs                       |   4 +--
 runtime/g1/src/parameters.rs                |   4 +--
 runtime/gdev/src/lib.rs                     |  10 +++---
 runtime/gdev/src/parameters.rs              |   4 +--
 runtime/gtest/src/lib.rs                    |   4 +--
 runtime/gtest/src/parameters.rs             |   4 +--
 xtask/src/gen_calls_doc.rs                  |   2 +-
 14 files changed, 61 insertions(+), 49 deletions(-)

diff --git a/end2end-tests/cucumber-genesis/default.json b/end2end-tests/cucumber-genesis/default.json
index 32abeaa56..7eb7b1392 100644
--- a/end2end-tests/cucumber-genesis/default.json
+++ b/end2end-tests/cucumber-genesis/default.json
@@ -53,5 +53,6 @@
       "certs": ["Alice", "Bob"]
     }
   },
-  "sudo_key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
+  "sudo_key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
+  "technical_committee": ["Alice", "Bob", "Charlie"]
 }
diff --git a/end2end-tests/cucumber-genesis/wot.json b/end2end-tests/cucumber-genesis/wot.json
index 205481324..f4048b0b1 100644
--- a/end2end-tests/cucumber-genesis/wot.json
+++ b/end2end-tests/cucumber-genesis/wot.json
@@ -58,5 +58,6 @@
       "certs": ["Alice", "Bob"]
     }
   },
-  "sudo_key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
+  "sudo_key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
+  "technical_committee": ["Alice", "Bob", "Charlie"]
 }
diff --git a/node/src/chain_spec/gdev.rs b/node/src/chain_spec/gdev.rs
index 93290c01a..780cfb188 100644
--- a/node/src/chain_spec/gdev.rs
+++ b/node/src/chain_spec/gdev.rs
@@ -22,7 +22,7 @@ use gdev_runtime::{
     opaque::SessionKeys, AccountConfig, AccountId, AuthorityMembersConfig, BabeConfig,
     BalancesConfig, CertConfig, GenesisConfig, IdentityConfig, ImOnlineId, MembershipConfig,
     ParametersConfig, SessionConfig, SmithsCertConfig, SmithsMembershipConfig, SudoConfig,
-    SystemConfig, UniversalDividendConfig, WASM_BINARY,
+    SystemConfig, TechnicalCommitteeConfig, UniversalDividendConfig, WASM_BINARY,
 };
 use sc_service::ChainType;
 use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
@@ -355,6 +355,13 @@ fn gen_genesis_for_local_chain(
             // Assign network admin rights.
             key: Some(root_key),
         },
+        technical_committee: TechnicalCommitteeConfig {
+            members: initial_smiths
+                .iter()
+                .map(|x| x.0.clone())
+                .collect::<Vec<_>>(),
+            ..Default::default()
+        },
         identity: IdentityConfig {
             identities: initial_identities
                 .iter()
@@ -391,7 +398,6 @@ fn gen_genesis_for_local_chain(
             apply_cert_period_at_genesis: false,
             certs_by_receiver: clique_wot(initial_smiths_len, smith_cert_validity_period),
         },
-        smiths_collective: Default::default(),
         universal_dividend: UniversalDividendConfig {
             first_reeval: 100,
             first_ud,
@@ -439,6 +445,7 @@ fn genesis_data_to_gdev_genesis_conf(
         smiths_certs_by_receiver,
         smiths_memberships,
         sudo_key,
+        technical_committee_members,
     } = genesis_data;
 
     gdev_runtime::GenesisConfig {
@@ -466,6 +473,10 @@ fn genesis_data_to_gdev_genesis_conf(
                 .collect::<Vec<_>>(),
         },
         sudo: SudoConfig { key: sudo_key },
+        technical_committee: TechnicalCommitteeConfig {
+            members: technical_committee_members,
+            ..Default::default()
+        },
         identity: IdentityConfig {
             identities: identities
                 .into_iter()
@@ -496,7 +507,6 @@ fn genesis_data_to_gdev_genesis_conf(
         smiths_membership: SmithsMembershipConfig {
             memberships: smiths_memberships,
         },
-        smiths_collective: Default::default(),
         universal_dividend: UniversalDividendConfig {
             first_reeval: first_ud_reeval,
             first_ud,
diff --git a/node/src/chain_spec/gen_genesis_data.rs b/node/src/chain_spec/gen_genesis_data.rs
index dd552e9be..5b46cc55f 100644
--- a/node/src/chain_spec/gen_genesis_data.rs
+++ b/node/src/chain_spec/gen_genesis_data.rs
@@ -38,6 +38,7 @@ pub struct GenesisData<Parameters: DeserializeOwned, SessionKeys: Decode> {
     pub smiths_certs_by_receiver: BTreeMap<u32, BTreeMap<u32, u32>>,
     pub smiths_memberships: BTreeMap<u32, MembershipData>,
     pub sudo_key: Option<AccountId>,
+    pub technical_committee_members: Vec<AccountId>,
 }
 
 #[derive(Default)]
@@ -58,6 +59,7 @@ struct GenesisConfig<Parameters> {
     #[serde(rename = "smiths")]
     smith_identities: BTreeMap<String, SmithData>,
     sudo_key: Option<AccountId>,
+    technical_committee: Vec<String>,
     #[serde(default)]
     wallets: BTreeMap<AccountId, u64>,
 }
@@ -134,6 +136,7 @@ where
         parameters,
         identities,
         smith_identities,
+        technical_committee,
         wallets,
     } = genesis_config;
 
@@ -145,6 +148,7 @@ where
     let mut idty_index_of = BTreeMap::new();
     let mut initial_monetary_mass = 0;
     let mut memberships = BTreeMap::new();
+    let mut technical_committee_members = Vec::with_capacity(technical_committee.len());
     //let mut total_dust = 0;
 
     // SIMPLE WALLETS //
@@ -162,6 +166,16 @@ where
         );
     }
 
+    // Technical Comittee //
+
+    for idty_name in technical_committee {
+        if let Some(identity) = identities.get(&idty_name) {
+            technical_committee_members.push(identity.pubkey.clone());
+        } else {
+            return Err(format!("Identity '{}' not exist", idty_name));
+        }
+    }
+
     // IDENTITIES //
 
     for (idty_name, identity) in &identities {
@@ -320,6 +334,7 @@ where
         smiths_certs_by_receiver,
         smiths_memberships,
         sudo_key,
+        technical_committee_members,
     };
 
     Ok(f(genesis_data))
diff --git a/resources/gdev.json b/resources/gdev.json
index 45aa222ba..02be64086 100644
--- a/resources/gdev.json
+++ b/resources/gdev.json
@@ -183,5 +183,6 @@
       "certs": ["Elois","tuxmain","HugoTrentesaux"]
     }
   },
-  "sudo_key": "5Co5AWcBiz4HaAEpu8BxLdghnCob89rFGU5yQ65WP3t2jsyB"
+  "sudo_key": "5Co5AWcBiz4HaAEpu8BxLdghnCob89rFGU5yQ65WP3t2jsyB",
+  "technical_committee": ["Elois", "cgeek", "tuxmain", "HugoTrentesaux"]
 }
diff --git a/resources/metadata.scale b/resources/metadata.scale
index 745d186e552bbd0323d9e2e78cf80fd620892fe9..bfcf355fbb83ffe14485443a7ec787fd343d01f1 100644
GIT binary patch
delta 1732
zcmah}4NOy46u#emkG2RS1rdsXV_K2v7L`cnKcG$^6){%Lj3U<dO`6yiX~`sNHq4AO
z#t6G1H=5zpn4!}R<rSYe2w-B=xoKFk1tuzF#b`vQn=USqZTB%;OfWNfx#yj8&pG$r
z@B4BN)Ekf08&Aa=67p9lu2P@J<=nK;@AZ0uK}C^C7kgk_fJA0CjFEbAl*eQviRBu`
z;SO7Gm@YlUGv+joX7vUe9<zPM#ms87NKgNZPG;MTal+eYw5yq>1F33FRvyr!cH0h0
z#vVc<2<hd~*|4%-C%!W(jFgq`0-syi!aCBknLqs|!fffJJwvOFnKO18!=gqeci5>D
z78c6*2?Oe$H``$x5MfFl^4>h8sMXWvQ9S1R?08+hpXt=kE1Ho5JbhvN*@$iS!R%`y
zGjC3^31QW>&_?6jBM?!KznfqXhql|>A~C=|TA3`I&sH`>CA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5b=1JA
zY0Yp{sZll60b=Lld%OJot9+Re@;zl`lZUH)?TQ9fEUG3{Ej&M)3Q5B|Yye=_e|ujz
zWnQQia(e<!R13V#n#V!abgdvzi1NgpNLh5<cNYxRcrdsm&d8U9Alhxyqh6zbS|2<q
z3|T{rL_g1A6*oGLB1otz&3z^er-ISvt{j6O{ZQr3io-REb?$_Ts2}voK}pUbL?#Uq
z4D%H8)ZAo34oU*ic?<#+*@@XPerX!6poJfwju`>15-~t;F*!}G+>nkp(9ZMHVG8Py
z@M@ODS(@WCIZKKOY31$dNP>q4WMEu;yY#qH&PvZn<*e9DXvNpbI-(~Xe0c_Pf-m~c
z&?yn|30&VHkuG<81}gk;mFH(8n_icMsv_KHvZ0ma8`6M6c<(F}$+zy$gkJpJ^||;H
z^v*-;7o|rqz*CoC0`E;mF!htUoC14z6~!bUC23}}L)`o<OEQ7pZYnLV;$Nm9hWg7w
z7!h2=9qhiCg6-73a~`%)LGhgV_<RU#?v4*IEZnb8Ch}W+xeFtCxC=8yDe^@p!Q<ZZ
z8Ipp;{ErGW28w?7He^ev;&-cIMPGIPb_DPldtnkB?%0b<sN?JQAwm{!%6a#WeF&sD
z#%pUaUR364Ez02KN*#>2$iJ(@%d$donK#y9E4sM39-{?e8|v{1*7BhJD3Dzg-R|=J
z$O5kOrUQt<4c>bIKZsj~9`0#?mD595MQ=&`qeIAi;9W7`Egr3#KJRSse~uvjf$wID
z+dkjUgu7D0(+XAa3}T3$UF2Bd5dWfL5XihzMY*p45qqErB0kxJ1ODRG>nHG+jqW3j
XxFTyjx<N$l;Xj{3nETfzbOrni@e+2R

diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs
index 20dc90e79..148ee661d 100644
--- a/runtime/common/src/pallets_config.rs
+++ b/runtime/common/src/pallets_config.rs
@@ -262,17 +262,17 @@ macro_rules! pallets_config {
 
 		#[cfg(feature = "runtime-benchmarks")]
 		parameter_types! {
-			pub const WorstCaseOrigin: pallet_collective::RawOrigin<AccountId, SmithsInstance> =
-				pallet_collective::RawOrigin::<AccountId, SmithsInstance>::Members(2, 3);
+			pub const WorstCaseOrigin: pallet_collective::RawOrigin<AccountId, TechnicalCommitteeInstance> =
+				pallet_collective::RawOrigin::<AccountId, TechnicalCommitteeInstance>::Members(2, 3);
 		}
 
 		impl pallet_upgrade_origin::Config for Runtime {
 			type Event = Event;
 			type Call = Call;
-			type UpgradableOrigin = pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, SmithsInstance>;
+			type UpgradableOrigin = pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, TechnicalCommitteeInstance>;
 			type WeightInfo = common_runtime::weights::pallet_upgrade_origin::WeightInfo<Runtime>;
 			#[cfg(feature = "runtime-benchmarks")]
-			type WorstCaseOriginType = pallet_collective::RawOrigin<AccountId, SmithsInstance>;
+			type WorstCaseOriginType = pallet_collective::RawOrigin<AccountId, TechnicalCommitteeInstance>;
 			#[cfg(feature = "runtime-benchmarks")]
 			type WorstCaseOrigin = WorstCaseOrigin;
 		}
@@ -499,8 +499,8 @@ macro_rules! pallets_config {
             type ValidityPeriod = SmithValidityPeriod;
         }
 
-        pub struct SmithMembersDefaultVote;
-        impl pallet_collective::DefaultVote for SmithMembersDefaultVote {
+        pub struct TechnicalCommitteeDefaultVote;
+        impl pallet_collective::DefaultVote for TechnicalCommitteeDefaultVote {
             fn default_vote(
                 _prime_vote: Option<bool>,
                 _yes_votes: u32,
@@ -510,34 +510,18 @@ macro_rules! pallets_config {
                 false
             }
         }
-        pub struct SmithMembersStorage;
-        impl sp_runtime::traits::IsMember<AccountId> for SmithMembersStorage {
-            fn is_member(account_id: &AccountId) -> bool {
-                use sp_runtime::traits::Convert as _;
-                if let Some(idty_index) = common_runtime::providers::IdentityIndexOf::<Runtime>::convert(account_id.clone()) {
-                    pallet_membership::Pallet::<Runtime, Instance2>::is_member(&idty_index)
-                } else {
-                    false
-                }
-            }
-        }
-        impl pallet_collective::MembersStorage<AccountId> for SmithMembersStorage {
-            fn members_count() -> u32 {
-                pallet_membership::Membership::<Runtime, Instance2>::count()
-            }
-        }
         parameter_types! {
-            pub const SmithsMotionDuration: BlockNumber = 7 * DAYS;
+            pub const TechnicalCommitteeMotionDuration: BlockNumber = 7 * DAYS;
         }
         impl pallet_collective::Config<Instance2> for Runtime {
             type Origin = Origin;
             type Proposal = Call;
             type Event = Event;
-            type MotionDuration = SmithsMotionDuration;
+            type MotionDuration = TechnicalCommitteeMotionDuration;
             type MaxProposals = frame_support::pallet_prelude::ConstU32<20>;
-            type MaxMembers = frame_support::pallet_prelude::ConstU32<1_000>;
-            type MembersStorage = SmithMembersStorage;
-            type DefaultVote = SmithMembersDefaultVote;
+            type MaxMembers = frame_support::pallet_prelude::ConstU32<100>;
+            type MembersStorage = pallet_collective::InternalMembersStorage<Runtime, Instance2>;
+            type DefaultVote = TechnicalCommitteeDefaultVote;
             type WeightInfo = pallet_collective::weights::SubstrateWeight<Runtime>;
         }
     };
diff --git a/runtime/g1/src/lib.rs b/runtime/g1/src/lib.rs
index 4255e3e6d..da2ddd643 100644
--- a/runtime/g1/src/lib.rs
+++ b/runtime/g1/src/lib.rs
@@ -124,7 +124,7 @@ pub type Executive = frame_executive::Executive<
     AllPalletsWithSystem,
 >;
 
-pub type SmithsInstance = Instance2;
+pub type TechnicalCommitteeInstance = Instance2;
 
 pub struct BaseCallFilter;
 impl Contains<Call> for BaseCallFilter {
@@ -230,6 +230,7 @@ construct_runtime!(
         Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 20,
         UpgradeOrigin: pallet_upgrade_origin::{Pallet, Call, Event} = 21,
         Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 22,
+        TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 23,
 
         // Universal dividend
         UniversalDividend: pallet_universal_dividend::{Pallet, Call, Config<T>, Storage, Event<T>} = 30,
@@ -244,7 +245,6 @@ construct_runtime!(
         SmithsSubWot: pallet_duniter_wot::<Instance2>::{Pallet} = 50,
         SmithsMembership: pallet_membership::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>} = 52,
         SmithsCert: pallet_certification::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>} = 53,
-        SmithsCollective: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 54,
 
         // Utilities
         AtomicSwap: pallet_atomic_swap::{Pallet, Call, Storage, Event<T>} = 60,
diff --git a/runtime/g1/src/parameters.rs b/runtime/g1/src/parameters.rs
index 24a32ac67..88b6cb704 100644
--- a/runtime/g1/src/parameters.rs
+++ b/runtime/g1/src/parameters.rs
@@ -155,6 +155,6 @@ parameter_types! {
 
 // Treasury
 pub type TreasuryApproveOrigin =
-    pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, SmithsInstance>;
+    pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, TechnicalCommitteeInstance>;
 pub type TreasuryRejectOrigin =
-    pallet_collective::EnsureProportionMoreThan<_1, _3, AccountId, SmithsInstance>;
+    pallet_collective::EnsureProportionMoreThan<_1, _3, AccountId, TechnicalCommitteeInstance>;
diff --git a/runtime/gdev/src/lib.rs b/runtime/gdev/src/lib.rs
index 8476ea5e7..84cc9fbd0 100644
--- a/runtime/gdev/src/lib.rs
+++ b/runtime/gdev/src/lib.rs
@@ -129,7 +129,7 @@ pub type Executive = frame_executive::Executive<
     AllPalletsWithSystem,
 >;
 
-pub type SmithsInstance = Instance2;
+pub type TechnicalCommitteeInstance = Instance2;
 
 pub struct BaseCallFilter;
 #[cfg(not(feature = "runtime-benchmarks"))]
@@ -181,7 +181,7 @@ pub enum ProxyType {
     AlmostAny = 0,
     TransferOnly = 1,
     CancelProxy = 2,
-    SmithsCollectivePropose = 3,
+    TechnicalCommitteePropose = 3,
 }
 impl Default for ProxyType {
     fn default() -> Self {
@@ -207,10 +207,10 @@ impl frame_support::traits::InstanceFilter<Call> for ProxyType {
                     Call::Proxy(pallet_proxy::Call::reject_announcement { .. })
                 )
             }
-            ProxyType::SmithsCollectivePropose => {
+            ProxyType::TechnicalCommitteePropose => {
                 matches!(
                     c,
-                    Call::SmithsCollective(pallet_collective::Call::propose { .. })
+                    Call::TechnicalCommittee(pallet_collective::Call::propose { .. })
                 )
             }
         }
@@ -300,6 +300,7 @@ construct_runtime!(
         Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 20,
         UpgradeOrigin: pallet_upgrade_origin::{Pallet, Call, Event} = 21,
         Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 22,
+        TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 23,
 
         // Universal dividend
         UniversalDividend: pallet_universal_dividend::{Pallet, Call, Config<T>, Storage, Event<T>} = 30,
@@ -314,7 +315,6 @@ construct_runtime!(
         SmithsSubWot: pallet_duniter_wot::<Instance2>::{Pallet} = 50,
         SmithsMembership: pallet_membership::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>} = 52,
         SmithsCert: pallet_certification::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>} = 53,
-        SmithsCollective: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 54,
 
         // Utilities
         AtomicSwap: pallet_atomic_swap::{Pallet, Call, Storage, Event<T>} = 60,
diff --git a/runtime/gdev/src/parameters.rs b/runtime/gdev/src/parameters.rs
index a9fe4dbbc..d7687e76f 100644
--- a/runtime/gdev/src/parameters.rs
+++ b/runtime/gdev/src/parameters.rs
@@ -105,6 +105,6 @@ parameter_types! {
 
 // Treasury
 pub type TreasuryApproveOrigin =
-    pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, SmithsInstance>;
+    pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, TechnicalCommitteeInstance>;
 pub type TreasuryRejectOrigin =
-    pallet_collective::EnsureProportionMoreThan<_1, _3, AccountId, SmithsInstance>;
+    pallet_collective::EnsureProportionMoreThan<_1, _3, AccountId, TechnicalCommitteeInstance>;
diff --git a/runtime/gtest/src/lib.rs b/runtime/gtest/src/lib.rs
index 4baa62935..dfe46aac7 100644
--- a/runtime/gtest/src/lib.rs
+++ b/runtime/gtest/src/lib.rs
@@ -125,7 +125,7 @@ pub type Executive = frame_executive::Executive<
     AllPalletsWithSystem,
 >;
 
-pub type SmithsInstance = Instance2;
+pub type TechnicalCommitteeInstance = Instance2;
 
 pub struct BaseCallFilter;
 impl Contains<Call> for BaseCallFilter {
@@ -231,6 +231,7 @@ construct_runtime!(
         Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 20,
         UpgradeOrigin: pallet_upgrade_origin::{Pallet, Call, Event} = 21,
         Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 22,
+        TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 23,
 
         // Universal dividend
         UniversalDividend: pallet_universal_dividend::{Pallet, Call, Config<T>, Storage, Event<T>} = 30,
@@ -245,7 +246,6 @@ construct_runtime!(
         SmithsSubWot: pallet_duniter_wot::<Instance2>::{Pallet} = 50,
         SmithsMembership: pallet_membership::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>} = 52,
         SmithsCert: pallet_certification::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>} = 53,
-        SmithsCollective: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 54,
 
         // Utilities
         AtomicSwap: pallet_atomic_swap::{Pallet, Call, Storage, Event<T>} = 60,
diff --git a/runtime/gtest/src/parameters.rs b/runtime/gtest/src/parameters.rs
index 745786181..fbf009642 100644
--- a/runtime/gtest/src/parameters.rs
+++ b/runtime/gtest/src/parameters.rs
@@ -155,6 +155,6 @@ parameter_types! {
 
 // Treasury
 pub type TreasuryApproveOrigin =
-    pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, SmithsInstance>;
+    pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, TechnicalCommitteeInstance>;
 pub type TreasuryRejectOrigin =
-    pallet_collective::EnsureProportionMoreThan<_1, _3, AccountId, SmithsInstance>;
+    pallet_collective::EnsureProportionMoreThan<_1, _3, AccountId, TechnicalCommitteeInstance>;
diff --git a/xtask/src/gen_calls_doc.rs b/xtask/src/gen_calls_doc.rs
index 5dc50f0cc..5b14ad445 100644
--- a/xtask/src/gen_calls_doc.rs
+++ b/xtask/src/gen_calls_doc.rs
@@ -64,7 +64,7 @@ impl CallCategory {
             ("SmithsCert", "force_add_cert" | "del_cert" | "remove_all_certs_received_by") => {
                 Self::Root
             }
-            ("SmithsCollective", "set_members" | "disapprove_proposal") => Self::Root,
+            ("TechnicalCommittee", "set_members" | "disapprove_proposal") => Self::Root,
             ("Utility", "dispatch_as") => Self::Root,
             ("Treasury", "approve_proposal" | "reject_proposal") => Self::OtherOrigin,
             _ => Self::User,
-- 
GitLab