Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Create Base classes required for Interoperability Module #7015

Closed
Tracked by #6915
ishantiw opened this issue Feb 18, 2022 · 0 comments · Fixed by #7061
Closed
Tracked by #6915

Create Base classes required for Interoperability Module #7015

ishantiw opened this issue Feb 18, 2022 · 0 comments · Fixed by #7061
Assignees
Labels
framework/module/interoperability Interoperability module
Milestone

Comments

@ishantiw
Copy link
Contributor

ishantiw commented Feb 18, 2022

Description

Create BaseInteroperabilityModule, BaseInteroperableModule, BaseCrossChainCMD and BaseInteroperableModuleAPI abstract class under /framework/src/modules

export abstract class BaseInteroperabilityModule extends BaseModule {
    public id = 64; // Common id for both interoperability module
    public name = 'interoperability'; // Common name for both interoperability module
    public abstract registerInterOpMod: Map<number, BaseInteroperableModule>;
}

export abstract class BaseInteroperableModuleAPI {
   protected abstract moduleID(): number;
   public abstract beforeApplyCCM(ctx: APIContext, ccm: CCM, ccu: CCU): Promise<void>;
   public abstract beforeSendCCM(ctx: APIContext, ccm: CCM, payFromAddress: Buffer): Promise<void>;
   public abstract beforeRecoverCCM(ctx: APIContext, ccm: CCM, trsSender: Buffer): Promise<void>;
   public abstract recover(ctx: APIContext, terminatedChainID: number, moduleID: number, storePrefix: number, storeKey: number, storeValue: Buffer): Promise<void>;
}

export abstract class BaseCrossChainCommand {
    public abstract ID: number;
    public abstract name: string;
    public abstract schema: object;// Schema type
    public abstract execute(): Promise<void>;
}
    
export abstract class BaseInteroperableModule {
    public abstract crossChainCommands: CrossChainCommands[]; // cross chain command
    public abstract crossChainAPI: BaseInteroperableModuleAPI; // cross chain API
}

Acceptance Criteria

  • BaseInteroperabilityModule, BaseInteroperableModule and BaseInteroperableModuleAPI abstract class under /framework/src/modules should exist with given properties and definitions.
@ishantiw ishantiw moved this to Backlog in Lisk SDK Version 6.0.0 Feb 18, 2022
@ishantiw ishantiw added framework/module/interoperability Interoperability module and removed framework labels Feb 23, 2022
@milenagojkovic milenagojkovic added this to the Sprint 64 milestone Feb 28, 2022
@milenagojkovic milenagojkovic moved this from Backlog to ToDo in Lisk SDK Version 6.0.0 Feb 28, 2022
@milenagojkovic milenagojkovic moved this from ToDo to Pending Review in Lisk SDK Version 6.0.0 Mar 2, 2022
ishantiw added a commit that referenced this issue Mar 3, 2022
…erability

Bootstrap interoperability module - Closes #7015,#7016,#7017
@milenagojkovic milenagojkovic moved this from Pending Review to Done in Lisk SDK Version 6.0.0 Mar 4, 2022
@ishantiw ishantiw closed this as completed Mar 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
framework/module/interoperability Interoperability module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants