diff --git a/examples/dpos-mainchain/src/app/modules/hello/hello_module.ts b/examples/dpos-mainchain/src/app/modules/hello/hello_module.ts deleted file mode 100644 index 7c70bf01fd..0000000000 --- a/examples/dpos-mainchain/src/app/modules/hello/hello_module.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* eslint-disable class-methods-use-this */ - -import { - BaseModule, - ModuleInitArgs, - BlockGenerateContext, - BlockVerifyContext, - TransactionVerifyContext, - VerificationResult, - TransactionExecuteContext, - GenesisBlockExecuteContext, - BlockExecuteContext, - BlockAfterExecuteContext, -} from 'lisk-sdk'; -import { HelloModuleEndpoint } from './endpoint'; -import { HelloModuleAPI } from './api'; - -export class HelloModule extends BaseModule { - public endpoint = new HelloModuleEndpoint(); - public api = new HelloModuleAPI(); - public name = 'hello'; - public transactionAssets = []; - public events = [ - // Example below - // 'hello:newBlock', - ]; - public id = 1000; - - // Lifecycle hooks - public async init(_args: ModuleInitArgs): Promise { - // initialize this module when starting a node - } - - public async initBlock(_context: BlockGenerateContext): Promise { - // initialize block generation, add asset - } - - public async verifyAssets(_context: BlockVerifyContext): Promise { - // verify block - } - - // Lifecycle hooks - public async verifyTransaction(_context: TransactionVerifyContext): Promise { - // verify transaction will be called multiple times in the transaction pool - } - - public async beforeCommandExecute(_context: TransactionExecuteContext): Promise {} - - public async afterCommandExecute(_context: TransactionExecuteContext): Promise {} - public async initGenesisState(_context: GenesisBlockExecuteContext): Promise {} - - public async finalizeGenesisState(_context: GenesisBlockExecuteContext): Promise {} - - public async beforeTransactionsExecute(_context: BlockExecuteContext): Promise {} - - public async afterTransactionsExecute(_context: BlockAfterExecuteContext): Promise {} -} diff --git a/examples/dpos-mainchain/test/unit/modules/hello/hello_module.spec.ts b/examples/dpos-mainchain/test/unit/modules/hello/hello_module.spec.ts deleted file mode 100644 index 766ef719d3..0000000000 --- a/examples/dpos-mainchain/test/unit/modules/hello/hello_module.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -// import * as modules from '../../../src/app/modules/hello' - -describe('HelloModuleModule', () => { - describe('constructor', () => { - it.todo('should have valid id'); - it.todo('should have valid name'); - }); - - describe('beforeTransactionsExecute', () => { - it.todo('should execute before block execute'); - }); - describe('afterTransactionsExecute', () => { - it.todo('should execute after block execute'); - }); - describe('beforeCommandExecute', () => { - it.todo('should execute before transaction execute'); - }); - describe('afterCommandExecute', () => { - it.todo('should execute after transaction execute'); - }); - describe('beforeTransactionsExecute', () => { - it.todo('should execute after genesis execute'); - }); - describe('afterTransactionsExecute', () => { - it.todo('should execute after genesis execute'); - }); -});