set-protocol-v2 icon indicating copy to clipboard operation
set-protocol-v2 copied to clipboard

Unknown type: ICErc20 when been compiled

Open franklili3 opened this issue 3 years ago • 1 comments

I have installed hardhat and solidity, when I run yarn compile, there is error,

Creating Typechain artifacts in directory typechain for target ethers-v5 Error: Unknown type: ICErc20 at Object.parseEvmType (/Users/linda/myprojects/set-protocol-v2/node_modules/typechain/src/parser/parseEvmType.ts:96:9) at parseRawAbiParameterType (/Users/linda/myprojects/set-protocol-v2/node_modules/typechain/src/parser/abiParser.ts:284:10) at parseRawAbiParameter (/Users/linda/myprojects/set-protocol-v2/node_modules/typechain/src/parser/abiParser.ts:273:11) at Array.map () at parseFunctionDeclaration (/Users/linda/myprojects/set-protocol-v2/node_modules/typechain/src/parser/abiParser.ts:263:29) at /Users/linda/myprojects/set-protocol-v2/node_modules/typechain/src/parser/abiParser.ts:157:22 at Array.forEach () at Object.parse (/Users/linda/myprojects/set-protocol-v2/node_modules/typechain/src/parser/abiParser.ts:138:7) at Ethers.transformAbiOrFullJsonFile (/Users/linda/myprojects/set-protocol-v2/node_modules/@typechain/ethers-v5/src/index.ts:86:22) at Ethers.transformFile (/Users/linda/myprojects/set-protocol-v2/node_modules/@typechain/ethers-v5/src/index.ts:56:17) error Command failed with exit code 1.

How can I do? MacOS Mojave 10.14.6 solidity@6 Hardhat 2.2.1

franklili3 avatar Apr 24 '21 03:04 franklili3

I got the reason, because I have not run yarn install. But when I run 'yarn install', there was error:

$ tsc -p tsconfig.dist.json typechain/Erc20Factory.ts:9:15 - error TS2724: Module '"./Erc20"' has no exported member 'Erc20'. Did you mean 'ERC20'? 9 import type { Erc20 } from "./Erc20"; ~~~~~ typechain/Erc20.ts:104:22 104 export declare class ERC20 extends Contract { ~~~~~ 'ERC20' is declared here. typechain/Erc20ViewerFactory.ts:9:15 - error TS2724: Module '"./Erc20Viewer"' has no exported member 'Erc20Viewer'. Did you mean 'ERC20Viewer'? 9 import type { Erc20Viewer } from "./Erc20Viewer"; ~~~~~~~~~~~ typechain/Erc20Viewer.ts:49:22 49 export declare class ERC20Viewer extends Contract { ~~~~~~~~~~~ 'ERC20Viewer' is declared here. typechain/ExplicitErc20MockFactory.ts:9:15 - error TS2724: Module '"./ExplicitERC20Mock"' has no exported member 'ExplicitErc20Mock'. Did you mean 'ExplicitERC20Mock'? 9 import type { ExplicitErc20Mock } from "./ExplicitErc20Mock"; ~~~~~~~~~~~~~~~~~ typechain/ExplicitERC20Mock.ts:41:22 41 export declare class ExplicitERC20Mock extends Contract { ~~~~~~~~~~~~~~~~~ 'ExplicitERC20Mock' is declared here. typechain/NavIssuanceCallerFactory.ts:9:15 - error TS2724: Module '"./NAVIssuanceCaller"' has no exported member 'NavIssuanceCaller'. Did you mean 'NAVIssuanceCaller'? 9 import type { NavIssuanceCaller } from "./NavIssuanceCaller"; ~~~~~~~~~~~~~~~~~ typechain/NAVIssuanceCaller.ts:53:22 53 export declare class NAVIssuanceCaller extends Contract { ~~~~~~~~~~~~~~~~~ 'NAVIssuanceCaller' is declared here. typechain/NavIssuanceHookMockFactory.ts:9:15 - error TS2724: Module '"./NAVIssuanceHookMock"' has no exported member 'NavIssuanceHookMock'. Did you mean 'NAVIssuanceHookMock'? 9 import type { NavIssuanceHookMock } from "./NavIssuanceHookMock"; ~~~~~~~~~~~~~~~~~~~ typechain/NAVIssuanceHookMock.ts:104:22 104 export declare class NAVIssuanceHookMock extends Contract { ~~~~~~~~~~~~~~~~~~~ 'NAVIssuanceHookMock' is declared here. Found 5 errors. error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

How can I do? MacOS Mojave 10.14.6 [email protected] Hardhat 2.2.1

franklili3 avatar May 03 '21 23:05 franklili3