Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Smartcontracts TronBox编译问题 我已经使用npm安装了最新版本(2.7.5) 使用命令tronbox init 在文件tronbox.js中,我已将编译器版本更新为0.4.25(请参阅下面的文件) 使用命令编译时,我得到:_Smartcontracts_Tron_Tronbox - Fatal编程技术网

Smartcontracts TronBox编译问题 我已经使用npm安装了最新版本(2.7.5) 使用命令tronbox init 在文件tronbox.js中,我已将编译器版本更新为0.4.25(请参阅下面的文件) 使用命令编译时,我得到:

Smartcontracts TronBox编译问题 我已经使用npm安装了最新版本(2.7.5) 使用命令tronbox init 在文件tronbox.js中,我已将编译器版本更新为0.4.25(请参阅下面的文件) 使用命令编译时,我得到:,smartcontracts,tron,tronbox,Smartcontracts,Tron,Tronbox,Windows错误: 然后在我的终端中显示以下消息: Error: Error parsing C:/dev/temp/contracts/Migrations.sol: Command failed: tronbox --download-compiler 0.4.25 at checkExecSyncError (child_process.js:575:11) at execSync (child_process.js:612:13) at getWrapper

Windows错误:

然后在我的终端中显示以下消息:

Error: Error parsing C:/dev/temp/contracts/Migrations.sol: Command failed: tronbox --download-compiler 0.4.25
    at checkExecSyncError (child_process.js:575:11)
    at execSync (child_process.js:612:13)
    at getWrapper (C:\Users\***\AppData\Roaming\npm\node_modules\tronbox\build\components\TronSolc.js:1:1717)
    at Object.parseImports (C:\Users\***\AppData\Roaming\npm\node_modules\tronbox\build\components\Compile\parser.js:1:2345)
    at C:\Users\***\AppData\Roaming\npm\node_modules\tronbox\build\components\Compile\profiler.js:1:4981
    at C:\Users\***\AppData\Roaming\npm\node_modules\tronbox\build\components\Resolver\index.js:1:1727
    at C:\Users\***\AppData\Roaming\npm\node_modules\tronbox\node_modules\async\internal\onlyOnce.js:12:16
    at next (C:\Users\***\AppData\Roaming\npm\node_modules\tronbox\node_modules\async\whilst.js:68:18)
    at C:\Users\***\AppData\Roaming\npm\node_modules\tronbox\build\components\Resolver\index.js:1:1495
    at C:\Users\***\AppData\Roaming\npm\node_modules\tronbox\build\components\Resolver\fs.js:1:1685
我将这一行添加到我的
tronbox.js
文件的顶部:
console.log('Running tronbox compile')
; 并注意到,一旦编译,输出将在我的屏幕上写入两次:

我不确定它是否相关,但出于某种原因,它运行了两次

有什么想法吗?这是tronbox问题吗

const port = process.env.HOST_PORT || 9090

module.exports = {
  networks: {
    mainnet: {
      // Don't put your private key here:
      privateKey: process.env.PRIVATE_KEY_MAINNET,
      /*
Create a .env file (it must be gitignored) containing something like

  export PRIVATE_KEY_MAINNET=4E7FECCB71207B867C495B51A9758B104B1D4422088A87F4978BE64636656243

Then, run the migration with:

  source .env && tronbox migrate --network mainnet

*/
      userFeePercentage: 100,
      feeLimit: 1e8,
      fullHost: 'https://api.trongrid.io',
      network_id: '1'
    },
    shasta: {
      privateKey: process.env.PRIVATE_KEY_SHASTA,
      userFeePercentage: 50,
      feeLimit: 1e8,
      fullHost: 'https://api.shasta.trongrid.io',
      network_id: '2'
    },
    nile: {
      privateKey: process.env.PRIVATE_KEY_NILE,
      fullNode: 'https://httpapi.nileex.io/wallet',
      solidityNode: 'https://httpapi.nileex.io/walletsolidity',
      eventServer: 'https://eventtest.nileex.io',
      network_id: '3'
    },
    development: {
      // For trontools/quickstart docker image
      privateKey: 'da146374a75310b9666e834ee4ad0866d6f4035967bfc76217c5a495fff9f0d0',
      userFeePercentage: 0,
      feeLimit: 1e8,
      fullHost: 'http://127.0.0.1:' + port,
      network_id: '9'
    },
    compilers: {
      solc: {
         version: '0.4.25'
      }
    }
  }
}

这似乎是tronbox 2.7.4和2.7.5中的一个回归错误,因为当我使用tronbox 2.5.2时,一切都很顺利。

这似乎是tronbox 2.7.4和2.7.5中的一个回归错误,因为当我使用tronbox 2.5.2时,一切都很顺利