标签: bsc

Truffle '“迁移”——cb 不是函数'

我在 Solidity 0.6.6 中编写了一个简单的智能合约,并尝试将其部署到 BSC 测试网。

这就是我的 truffle-config.js 文件中的内容(privateKeys 是一个包含 ['0x + privatekey'] 单个条目的数组:

networks: {
   bscTestnet: {
      provider: () => new HDWalletProvider(
        privateKeys,
        'https://data-seed-prebsc-1-s1.binance.org:8545/'
      ),
      network_id: 97,
      skipDryRun: true
   }
}
Run Code Online (Sandbox Code Playgroud)

当我运行命令“truffle migrate --reset --network bscTestnet”时,出现以下错误:

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.



Starting migrations...
======================
> Network name:    'bscTestnet'
> Network id:      97
> Block gas limit: 30000000 (0x1c9c380)


1_initial_migration.js
======================

   Deploying 'Migrations'
   ----------------------

Error:  *** Deployment Failed ***

"Migrations" …
Run Code Online (Sandbox Code Playgroud)

javascript npm blockchain truffle bsc

2
推荐指数
1
解决办法
1210
查看次数

标签 统计

blockchain ×1

bsc ×1

javascript ×1

npm ×1

truffle ×1