diff --git a/plugins/ethereum-adapter/eth-adapter.js b/plugins/ethereum-adapter/eth-adapter.js index d95e1ef..12303cd 100644 --- a/plugins/ethereum-adapter/eth-adapter.js +++ b/plugins/ethereum-adapter/eth-adapter.js @@ -8,11 +8,12 @@ async function dlFilesAndWriteJsonFile(config, outputPath) { const smartContractAbiPath = path.join(sharedRepoPath, "smartContractAbi.json"); const smartContractAddressPath = path.join(sharedRepoPath, "smartContractAddress.json"); const smartContractAbi = fs.readFileSync(smartContractAbiPath, "utf-8") - const smartContractAddress = fs.readFileSync(smartContractAddressPath, "utf-8") + let smartContractAddress = fs.readFileSync(smartContractAddressPath, "utf-8") + smartContractAddress = JSON.parse(smartContractAddress); const ethAdapterInfoPath = path.join(path.resolve(outputPath), constants.PATHS.ETH_ADAPTER_OUTPUT); const smartContractInfo = { abi: JSON.parse(smartContractAbi), - address: JSON.parse(smartContractAddress) + address: smartContractAddress.contractAddress } const orgAcc = utils.createOrgAccount(); diff --git a/plugins/smart-contract/deploySmartContracts.js b/plugins/smart-contract/deploySmartContracts.js index 0cd259a..385314e 100755 --- a/plugins/smart-contract/deploySmartContracts.js +++ b/plugins/smart-contract/deploySmartContracts.js @@ -156,7 +156,7 @@ function storeSmartContractsInfo(outputPath, contractsInfo, config) { } fs.writeFileSync(smartContractAbiPath, JSON.stringify(contractsInfo[contract].abi, null, "\t")); - fs.writeFileSync(smartContractAddressPath, JSON.stringify(contractsInfo[contract].address, null, "\t")); + fs.writeFileSync(smartContractAddressPath, JSON.stringify({contractAddress: contractsInfo[contract].address})); } } diff --git a/plugins/upload-info/index.js b/plugins/upload-info/index.js index ecfbe24..975e44a 100644 --- a/plugins/upload-info/index.js +++ b/plugins/upload-info/index.js @@ -58,7 +58,7 @@ function uploadQuorumNodeInfo(config) { try { fs.accessSync(commonPath); } catch (e) { - fs.mkdirSync(commonPath); + fs.mkdirSync(commonPath, {recursive: true}); } fs.writeFileSync(enodePath, enode); fs.writeFileSync(validatorPath, validator);