From e88b61dec7a27a6999137c793139f746a2c38ca0 Mon Sep 17 00:00:00 2001 From: sanket shevkar Date: Wed, 18 Aug 2021 23:02:53 +0530 Subject: [PATCH] refactor(*): signed slc name and contract instance error Signed-off-by: sanket shevkar --- packages/cicero-cli/lib/commands.js | 3 +-- packages/cicero-core/src/contractinstance.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/cicero-cli/lib/commands.js b/packages/cicero-cli/lib/commands.js index 9a51800c..e465de53 100644 --- a/packages/cicero-cli/lib/commands.js +++ b/packages/cicero-cli/lib/commands.js @@ -694,8 +694,7 @@ class Commands { } else { const instanceName = instance.getIdentifier(); - const version = instance.contractSignatures.length; - file = `${instanceName}.v${version}.slc`; + file = `${instanceName}.slc`; } Logger.info('Creating archive: ' + file); fs.writeFileSync(file, archive); diff --git a/packages/cicero-core/src/contractinstance.js b/packages/cicero-core/src/contractinstance.js index 3a6bb2b7..334bd7f0 100644 --- a/packages/cicero-core/src/contractinstance.js +++ b/packages/cicero-core/src/contractinstance.js @@ -202,7 +202,7 @@ class ContractInstance extends Instance { verify.end(); const result = verify.verify(publicKey, signature, 'hex'); if (!result) { - throw new Error('Template\'s author signature is invalid!'); + throw new Error('Contract signature is invalid!'); } } }