From aebe650f47989e3d05e770f092dbeaef554cb019 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 2 Nov 2022 12:33:11 +0100 Subject: [PATCH] fix build: cast from remix-plugin types --- apps/etherscan/src/app/utils/verify.ts | 6 ++++-- .../src/app/plugins/parser/services/code-parser-compiler.ts | 1 + .../app/plugins/parser/services/code-parser-gas-service.ts | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/etherscan/src/app/utils/verify.ts b/apps/etherscan/src/app/utils/verify.ts index 948f808070..19ea022250 100644 --- a/apps/etherscan/src/app/utils/verify.ts +++ b/apps/etherscan/src/app/utils/verify.ts @@ -36,7 +36,8 @@ export const verify = async ( try { const contractMetadata = getContractMetadata( - compilationResultParam.data, + // cast from the remix-plugin interface to the solidity one. Should be fixed when remix-plugin move to the remix-project repository + compilationResultParam.data as unknown as CompilationResult, contractName ) @@ -50,7 +51,8 @@ export const verify = async ( const contractMetadataParsed = JSON.parse(contractMetadata) const fileName = getContractFileName( - compilationResultParam.data, + // cast from the remix-plugin interface to the solidity one. Should be fixed when remix-plugin move to the remix-project repository + compilationResultParam.data as unknown as CompilationResult, contractName ) diff --git a/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts b/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts index c67fc2aa6e..c9c0a6fb61 100644 --- a/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts +++ b/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts @@ -105,6 +105,7 @@ export default class CodeParserCompiler { this.plugin._buildIndex(data, source) + // cast from the remix-plugin interface to the solidity one. Should be fixed when remix-plugin move to the remix-project repository this.plugin.nodeIndex.nodesPerFile[this.plugin.currentFile] = this.plugin._extractFileNodes(this.plugin.currentFile, this.plugin.compilerAbstract as unknown as lastCompilationResult) await this.plugin.gasService.showGasEstimates() this.plugin.emit('astFinished') diff --git a/apps/remix-ide/src/app/plugins/parser/services/code-parser-gas-service.ts b/apps/remix-ide/src/app/plugins/parser/services/code-parser-gas-service.ts index a6b61e5767..879d00f06d 100644 --- a/apps/remix-ide/src/app/plugins/parser/services/code-parser-gas-service.ts +++ b/apps/remix-ide/src/app/plugins/parser/services/code-parser-gas-service.ts @@ -41,6 +41,7 @@ export default class CodeParserGasService { return } this.plugin.currentFile = await this.plugin.call('fileManager', 'file') + // cast from the remix-plugin interface to the solidity one. Should be fixed when remix-plugin move to the remix-project repository this.plugin.nodeIndex.nodesPerFile[this.plugin.currentFile] = await this.plugin._extractFileNodes(this.plugin.currentFile, this.plugin.compilerAbstract as unknown as lastCompilationResult) const gasEstimates = await this.getGasEstimates(this.plugin.currentFile)