2

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
   }
}

コマンド「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" -- cb is not a function.

    at /Users/admin/.nvm/versions/node/v17.4.0/lib/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:365:1
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Migration._deploy (/Users/admin/.nvm/versions/node/v17.4.0/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:70:1)
    at Migration._load (/Users/admin/.nvm/versions/node/v17.4.0/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:56:1)
    at Migration.run (/Users/admin/.nvm/versions/node/v17.4.0/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:217:1)
    at Object.runMigrations (/Users/admin/.nvm/versions/node/v17.4.0/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
    at Object.runFrom (/Users/admin/.nvm/versions/node/v17.4.0/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
    at Object.runAll (/Users/admin/.nvm/versions/node/v17.4.0/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:114:1)
    at Object.run (/Users/admin/.nvm/versions/node/v17.4.0/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:79:1)
    at runMigrations (/Users/admin/.nvm/versions/node/v17.4.0/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate/run.js:80:1)
    at Object.module.exports [as run] (/Users/admin/.nvm/versions/node/v17.4.0/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate/run.js:44:1)
    at Command.run (/Users/admin/.nvm/versions/node/v17.4.0/lib/node_modules/truffle/build/webpack:/packages/core/lib/command.js:189:1)
Truffle v5.4.31 (core: 5.4.31)
Node v17.4.0
4

2 に答える 2