From a09c0719e17242e89efc4896e6809f3925d82433 Mon Sep 17 00:00:00 2001 From: Mihajlo Pavlovic Date: Wed, 18 Dec 2024 14:17:38 +0100 Subject: [PATCH] Remove triples number getter --- .../common/validate-assertion-metadata-command.js | 1 + src/modules/blockchain/blockchain-module-manager.js | 6 ------ .../blockchain/implementation/web3-service.js | 13 ------------- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/commands/protocols/common/validate-assertion-metadata-command.js b/src/commands/protocols/common/validate-assertion-metadata-command.js index f9d19976a..9031f860b 100644 --- a/src/commands/protocols/common/validate-assertion-metadata-command.js +++ b/src/commands/protocols/common/validate-assertion-metadata-command.js @@ -4,6 +4,7 @@ class ValidateAssertionMetadataCommand extends Command { constructor(ctx) { super(ctx); this.operationIdService = ctx.operationIdService; + this.blockchainModuleManager = ctx.blockchainModuleManager; } async execute(command) { diff --git a/src/modules/blockchain/blockchain-module-manager.js b/src/modules/blockchain/blockchain-module-manager.js index 044c5421d..057bbd754 100644 --- a/src/modules/blockchain/blockchain-module-manager.js +++ b/src/modules/blockchain/blockchain-module-manager.js @@ -181,12 +181,6 @@ class BlockchainModuleManager extends BaseModuleManager { ]); } - async getKnowledgeCollectionTriplesNumber(blockchain, knowledgeCollectionId) { - return this.callImplementationFunction(blockchain, 'getKnowledgeCollectionTriplesNumber', [ - knowledgeCollectionId, - ]); - } - async getKnowledgeCollectionChunksAmount(blockchain, knowledgeCollectionId) { return this.callImplementationFunction(blockchain, 'getKnowledgeCollectionChunksAmount', [ knowledgeCollectionId, diff --git a/src/modules/blockchain/implementation/web3-service.js b/src/modules/blockchain/implementation/web3-service.js index 164ceac57..5af330e72 100644 --- a/src/modules/blockchain/implementation/web3-service.js +++ b/src/modules/blockchain/implementation/web3-service.js @@ -951,19 +951,6 @@ class Web3Service { return Number(knowledgeCollectionSize); } - async getKnowledgeCollectionTriplesNumber(assetStorageContractAddress, knowledgeCollectionId) { - const assetStorageContractInstance = - this.assetStorageContracts[assetStorageContractAddress.toString().toLowerCase()]; - if (!assetStorageContractInstance) - throw new Error('Unknown asset storage contract address'); - const knowledgeCollectionTriplesNumber = await this.callContractFunction( - assetStorageContractInstance, - 'getTriplesAmount', - [knowledgeCollectionId], - ); - return Number(knowledgeCollectionTriplesNumber); - } - async getKnowledgeCollectionChunksAmount(assetStorageContractAddress, knowledgeCollectionId) { const assetStorageContractInstance = this.assetStorageContracts[assetStorageContractAddress.toString().toLowerCase()];