Browse Source

Merge branch 'olympia' into olympia-playground

Mokhtar Naamani 3 years ago
parent
commit
ff4e9bb797

+ 5 - 0
query-node/manifest.yml

@@ -926,6 +926,11 @@ mappings:
       handler: bounty_OracleJudgmentSubmitted
     - event: bounty.WorkEntrantFundsWithdrawn
       handler: bounty_WorkEntrantFundsWithdrawn
+    # ExtrinsicSuccess event handler - we're using an empty handler just for the purpose of triggering
+    # preBlock/postBlock hooks for each block (instead of "catching-up" after some event/tx recognized by processor is fired)
+    # ExtrinsicSuccess is emitted at least once per block due to timestamp.set extrinsic
+    - event: system.ExtrinsicSuccess
+      handler: system_ExtrinsicSuccess
   extrinsicHandlers:
     # infer defaults here
     #- extrinsic: Balances.Transfer

+ 1 - 0
query-node/mappings/src/index.ts

@@ -16,3 +16,4 @@ export * from './proposalsDiscussion'
 export * from './forum'
 export * from './bootstrap'
 export * from './scheduler'
+export * from './system'

+ 6 - 0
query-node/mappings/src/system.ts

@@ -0,0 +1,6 @@
+// ExtrinsicSuccess event handler - we're using an empty handler just for the purpose of triggering
+// preBlock/postBlock hooks for each block (instead of "catching-up" after some event/tx recognized by processor is fired)
+// ExtrinsicSuccess is emitted at least once per block due to timestamp.set extrinsic
+export function system_ExtrinsicSuccess(): void {
+  // Do nothing
+}

+ 1 - 1
types/augment/all/defs.json

@@ -619,7 +619,7 @@
         "staking_account_id": "AccountId",
         "submitted_at": "u32",
         "work_submitted": "bool",
-        "oracle_judgment_result": "Option<OracleJudgment>"
+        "oracle_judgment_result": "Option<OracleWorkEntryJudgment>"
     },
     "BountyMilestone_Created": {
         "created_at": "u32",

+ 1 - 1
types/augment/all/types.ts

@@ -499,7 +499,7 @@ export interface Entry extends Struct {
   readonly staking_account_id: AccountId;
   readonly submitted_at: u32;
   readonly work_submitted: bool;
-  readonly oracle_judgment_result: Option<OracleJudgment>;
+  readonly oracle_judgment_result: Option<OracleWorkEntryJudgment>;
 }
 
 /** @name EntryId */

+ 1 - 1
types/src/bounty.ts

@@ -58,7 +58,7 @@ export class Entry extends JoyStructDecorated({
   staking_account_id: AccountId,
   submitted_at: BlockNumber,
   work_submitted: bool,
-  oracle_judgment_result: Option.with(OracleJudgment),
+  oracle_judgment_result: Option.with(OracleWorkEntryJudgment),
 }) {}
 
 export class BountyMilestone_Created extends JoyStructDecorated({