如果有引用合约,run.sh会报错
Closed this issue · 1 comments
Error: Identifier not found or not unique.
contract HelloWorld is Ownable {
^-----^
/Users/tools/contracts/HelloWorld.sol:81:76: Error: Undeclared identifier.
function addBank(string name, address bankAddress, uint credit) public onlyOwner {
^-------^
java.lang.UnsupportedOperationException: No contract found with name 'ownable'. Please specify a valid contract name. Available keys ([/Users/tools/contracts/ownable.sol:Ownable]).
at org.fisco.solc.compiler.CompilationResult.getContract(CompilationResult.java:58)
at com.webank.solc.plugin.compiler.CompileSolToJava.compileSolToBinAndAbi(CompileSolToJava.java:98)
at com.webank.solc.plugin.compiler.CompileSolToJava.compileSolToJava(CompileSolToJava.java:47)
at com.webank.scaffold.compiler.ContractCompiler.compile(ContractCompiler.java:36)
at com.webank.scaffold.artifact.dir.MainResourceDir.doGenerateSubContents(MainResourceDir.java:33)
at com.webank.scaffold.artifact.dir.DirectoryArtifact.generate(DirectoryArtifact.java:28)
at com.webank.scaffold.artifact.dir.MainDir.doGenerateSubContents(MainDir.java:35)
at com.webank.scaffold.artifact.dir.DirectoryArtifact.generate(DirectoryArtifact.java:28)
at com.webank.scaffold.artifact.dir.SrcDir.doGenerateSubContents(SrcDir.java:26)
at com.webank.scaffold.artifact.dir.DirectoryArtifact.generate(DirectoryArtifact.java:28)
at com.webank.scaffold.artifact.dir.RootDir.doGenerateSubContents(RootDir.java:36)
at com.webank.scaffold.artifact.dir.DirectoryArtifact.generate(DirectoryArtifact.java:28)
at com.webank.scaffold.factory.ProjectFactory.createProject(ProjectFactory.java:30)
at com.webank.scaffold.cmd.ScaffoldRunner.run(ScaffoldRunner.java:36)
at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at com.webank.scaffold.Main.main(Main.java:18)
mark