简体   繁体   English

Truffle deploy 编译合约但不迁移到网络

[英]Truffle deploy compiles contracts but doesnt migrate to network

As shown below, when running truffle deploy contracts are being compiled in /build directory, but they are never migrated to the specified network.如下图所示,运行 truffle 时,deploy 合约会在 /build 目录下编译,但不会迁移到指定网络。

There are NO LOGS at all for truffle deploy to allow debugging of the issue.松露部署根本没有日志以允许调试问题。 even while running --versbose-rpc, it shows nothing that makes sense.即使在运行 --versbose-rpc 时,它也没有显示任何有意义的内容。

I have enough Eth and blockchain is running fine.我有足够的 Eth,区块链运行良好。

Truffle.js config Truffle.js 配置松露配置

Eth Amount以太币数量以太币数量

Truffle Deploy --network NetworkName Result Truffle Deploy --network NetworkName 结果部署结果

I found out what the issue is. 我发现了问题所在。 I was deploying to a previous backup of geth blockchain, which is not possible in this case. 我正在部署到geth区块链的先前备份,在这种情况下这是不可能的。

This has been solved by creating a fresh new blockchain directory and then deploying all the solidity files there. 通过创建一个新的新区块链目录,然后在其中部署所有实体文件,可以解决此问题。

What bothers here is why truffle doesnt log these issues. 这里困扰的是松露为什么不记录这些问题的原因。 I hope they add more and more logging on the next release. 我希望他们在下一个版本中添加越来越多的日志记录。

Please verify the folder structure:请验证文件夹结构:

truffle's folder structure truffle 的文件夹结构

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM