Browse Source

contentDirectoryWorkingGroup => contentWorkingGroup

Leszek Wiesner 3 năm trước cách đây
mục cha
commit
59ca0cb63c

+ 1 - 1
cli/scripts/content-test.sh

@@ -9,7 +9,7 @@ echo "{}" > ~/tmp/empty.json
 export AUTO_CONFIRM=true
 
 # Init content lead
-GROUP=contentDirectoryWorkingGroup yarn workspace api-scripts initialize-lead
+GROUP=contentWorkingGroup yarn workspace api-scripts initialize-lead
 # Test create/update/remove category
 yarn joystream-cli content:createVideoCategory -i ./examples/content/CreateCategory.json
 yarn joystream-cli content:createVideoCategory -i ./examples/content/CreateCategory.json

+ 1 - 1
cli/src/Api.ts

@@ -45,7 +45,7 @@ export const DEFAULT_API_URI = 'ws://localhost:9944/'
 // Mapping of working group to api module
 export const apiModuleByGroup = {
   [WorkingGroups.StorageProviders]: 'storageWorkingGroup',
-  [WorkingGroups.Curators]: 'contentDirectoryWorkingGroup',
+  [WorkingGroups.Curators]: 'contentWorkingGroup',
   [WorkingGroups.Forum]: 'forumWorkingGroup',
   [WorkingGroups.Membership]: 'membershipWorkingGroup',
   [WorkingGroups.Gateway]: 'gatewayWorkingGroup',

+ 22 - 22
query-node/manifest.yml

@@ -348,49 +348,49 @@ mappings:
     - event: membershipWorkingGroup.WorkerStartedLeaving
       handler: workingGroups_WorkerStartedLeaving
     # Content directory working group
-    - event: contentDirectoryWorkingGroup.OpeningAdded
+    - event: contentWorkingGroup.OpeningAdded
       handler: workingGroups_OpeningAdded
-    - event: contentDirectoryWorkingGroup.AppliedOnOpening
+    - event: contentWorkingGroup.AppliedOnOpening
       handler: workingGroups_AppliedOnOpening
-    - event: contentDirectoryWorkingGroup.OpeningFilled
+    - event: contentWorkingGroup.OpeningFilled
       handler: workingGroups_OpeningFilled
-    - event: contentDirectoryWorkingGroup.LeaderSet
+    - event: contentWorkingGroup.LeaderSet
       handler: workingGroups_LeaderSet
-    - event: contentDirectoryWorkingGroup.WorkerRoleAccountUpdated
+    - event: contentWorkingGroup.WorkerRoleAccountUpdated
       handler: workingGroups_WorkerRoleAccountUpdated
-    - event: contentDirectoryWorkingGroup.LeaderUnset
+    - event: contentWorkingGroup.LeaderUnset
       handler: workingGroups_LeaderUnset
-    - event: contentDirectoryWorkingGroup.WorkerExited
+    - event: contentWorkingGroup.WorkerExited
       handler: workingGroups_WorkerExited
-    - event: contentDirectoryWorkingGroup.TerminatedWorker
+    - event: contentWorkingGroup.TerminatedWorker
       handler: workingGroups_TerminatedWorker
-    - event: contentDirectoryWorkingGroup.TerminatedLeader
+    - event: contentWorkingGroup.TerminatedLeader
       handler: workingGroups_TerminatedLeader
-    - event: contentDirectoryWorkingGroup.StakeSlashed
+    - event: contentWorkingGroup.StakeSlashed
       handler: workingGroups_StakeSlashed
-    - event: contentDirectoryWorkingGroup.StakeDecreased
+    - event: contentWorkingGroup.StakeDecreased
       handler: workingGroups_StakeDecreased
-    - event: contentDirectoryWorkingGroup.StakeIncreased
+    - event: contentWorkingGroup.StakeIncreased
       handler: workingGroups_StakeIncreased
-    - event: contentDirectoryWorkingGroup.ApplicationWithdrawn
+    - event: contentWorkingGroup.ApplicationWithdrawn
       handler: workingGroups_ApplicationWithdrawn
-    - event: contentDirectoryWorkingGroup.OpeningCanceled
+    - event: contentWorkingGroup.OpeningCanceled
       handler: workingGroups_OpeningCanceled
-    - event: contentDirectoryWorkingGroup.BudgetSet
+    - event: contentWorkingGroup.BudgetSet
       handler: workingGroups_BudgetSet
-    - event: contentDirectoryWorkingGroup.WorkerRewardAccountUpdated
+    - event: contentWorkingGroup.WorkerRewardAccountUpdated
       handler: workingGroups_WorkerRewardAccountUpdated
-    - event: contentDirectoryWorkingGroup.WorkerRewardAmountUpdated
+    - event: contentWorkingGroup.WorkerRewardAmountUpdated
       handler: workingGroups_WorkerRewardAmountUpdated
-    - event: contentDirectoryWorkingGroup.StatusTextChanged
+    - event: contentWorkingGroup.StatusTextChanged
       handler: workingGroups_StatusTextChanged
-    - event: contentDirectoryWorkingGroup.BudgetSpending
+    - event: contentWorkingGroup.BudgetSpending
       handler: workingGroups_BudgetSpending
-    - event: contentDirectoryWorkingGroup.RewardPaid
+    - event: contentWorkingGroup.RewardPaid
       handler: workingGroups_RewardPaid
-    - event: contentDirectoryWorkingGroup.NewMissedRewardLevelReached
+    - event: contentWorkingGroup.NewMissedRewardLevelReached
       handler: workingGroups_NewMissedRewardLevelReached
-    - event: contentDirectoryWorkingGroup.WorkerStartedLeaving
+    - event: contentWorkingGroup.WorkerStartedLeaving
       handler: workingGroups_WorkerStartedLeaving
     # Operations working group
     - event: operationsWorkingGroup.OpeningAdded

+ 1 - 1
query-node/mappings/src/bootstrap-data/data/workingGroups.json

@@ -8,7 +8,7 @@
     "budget": 0
   },
   {
-    "name": "contentDirectoryWorkingGroup",
+    "name": "contentWorkingGroup",
     "budget": 0
   },
   {

+ 2 - 2
query-node/mappings/src/common.ts

@@ -223,7 +223,7 @@ export function hasValuesForProperties<
 
 export type WorkingGroupModuleName =
   | 'storageWorkingGroup'
-  | 'contentDirectoryWorkingGroup'
+  | 'contentWorkingGroup'
   | 'forumWorkingGroup'
   | 'membershipWorkingGroup'
   | 'operationsWorkingGroupAlpha'
@@ -234,7 +234,7 @@ export type WorkingGroupModuleName =
 
 export function getWorkingGroupModuleName(group: WorkingGroup): WorkingGroupModuleName {
   if (group.isContent) {
-    return 'contentDirectoryWorkingGroup'
+    return 'contentWorkingGroup'
   } else if (group.isMembership) {
     return 'membershipWorkingGroup'
   } else if (group.isForum) {

+ 3 - 3
tests/integration-tests/src/consts.ts

@@ -20,7 +20,7 @@ export const ALL_BYTES = '0x' + Array.from({ length: 256 }, (v, i) => Buffer.fro
 
 export const lockIdByWorkingGroup: { [K in WorkingGroupModuleName]: string } = {
   storageWorkingGroup: '0x0606060606060606',
-  contentDirectoryWorkingGroup: '0x0707070707070707',
+  contentWorkingGroup: '0x0707070707070707',
   forumWorkingGroup: '0x0808080808080808',
   membershipWorkingGroup: '0x0909090909090909',
   operationsWorkingGroup: '0x0d0d0d0d0d0d0d0d',
@@ -29,7 +29,7 @@ export const lockIdByWorkingGroup: { [K in WorkingGroupModuleName]: string } = {
 
 export const workingGroups: WorkingGroupModuleName[] = [
   'storageWorkingGroup',
-  'contentDirectoryWorkingGroup',
+  'contentWorkingGroup',
   'forumWorkingGroup',
   'membershipWorkingGroup',
   'operationsWorkingGroup',
@@ -38,7 +38,7 @@ export const workingGroups: WorkingGroupModuleName[] = [
 
 export function getWorkingGroupModuleName(group: WorkingGroup): WorkingGroupModuleName {
   if (group.isOfType('Content')) {
-    return 'contentDirectoryWorkingGroup'
+    return 'contentWorkingGroup'
   } else if (group.isOfType('Membership')) {
     return 'membershipWorkingGroup'
   } else if (group.isOfType('Forum')) {

+ 1 - 1
tests/integration-tests/src/types.ts

@@ -96,7 +96,7 @@ export type WorkingGroupsEventName =
 
 export type WorkingGroupModuleName =
   | 'storageWorkingGroup'
-  | 'contentDirectoryWorkingGroup'
+  | 'contentWorkingGroup'
   | 'forumWorkingGroup'
   | 'membershipWorkingGroup'
   | 'operationsWorkingGroup'

+ 2 - 2
utils/api-scripts/src/initialize-lead.ts

@@ -9,7 +9,7 @@ import { BTreeSet } from '@polkadot/types'
 
 const workingGroupModules = [
   'storageWorkingGroup',
-  'contentDirectoryWorkingGroup',
+  'contentWorkingGroup',
   'forumWorkingGroup',
   'membershipWorkingGroup',
   'operationsWorkingGroup',
@@ -28,7 +28,7 @@ async function main() {
   const provider = new WsProvider(WS_URI)
   const api = await ApiPromise.create({ provider, types })
 
-  const Group = process.env.GROUP || 'contentDirectoryWorkingGroup'
+  const Group = process.env.GROUP || 'contentWorkingGroup'
   const LeadKeyPair = process.env.LEAD_URI ? getKeyFromSuri(process.env.LEAD_URI) : getAlicePair()
   const SudoKeyPair = process.env.SUDO_URI ? getKeyFromSuri(process.env.SUDO_URI) : getAlicePair()
   const StakeKeyPair = LeadKeyPair.derive(`//stake${Date.now()}`)

+ 2 - 2
utils/api-scripts/src/initialize-worker.ts

@@ -8,7 +8,7 @@ import { BTreeSet } from '@polkadot/types'
 
 const workingGroupModules = [
   'storageWorkingGroup',
-  'contentDirectoryWorkingGroup',
+  'contentWorkingGroup',
   'forumWorkingGroup',
   'membershipWorkingGroup',
   'operationsWorkingGroup',
@@ -29,7 +29,7 @@ async function main() {
   const api = await ApiPromise.create({ provider, types })
 
   // Input data
-  const Group = process.env.GROUP || 'contentDirectoryWorkingGroup'
+  const Group = process.env.GROUP || 'contentWorkingGroup'
   const LeadRoleKeyPair = process.env.LEAD_URI ? getKeyFromSuri(process.env.LEAD_URI) : getAlicePair()
   const WorkerMemberKeyPair = process.env.WORKER_MEMBER_URI
     ? getKeyFromSuri(process.env.WORKER_MEMBER_URI)