松露:发件人没有足够的资金发送 tx

Truffle: Sender doesn't have enough funds to send tx

我正在尝试 migrate/test 使用此配置在 ropsten 网络上使用我的智能合约:

  networks: {
    ropsten: {
     provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/${infuraKey}`),
     network_id: 3,       // Ropsten's id
     gas: 3000000,
    }
  },

运行 truffle migrate --network ropsten

但我不断收到此错误:

Error:  *** Deployment Failed ***

"Migrations" could not deploy due to insufficient funds
   * Account:  **address**
   * Balance:  0 wei
   * Message:  sender doesn't have enough funds to send tx. The upfront cost is: 6000000000000000 and the sender's account only has: 0

如何显示truffle我有足够的资金?

您的 Ropsten 帐户需要 have ETH 才能与网络互动。