0

我试图在 Polygon 的孟买测试网中使用 truffle 部署 ERC 721 令牌。我的 metasmask 钱包里有 2.8296 Matic,这是我从他们的水龙头那里得到的。但是当我尝试跑步时

truffle migrate --network matic 

它说

Error:  *** Deployment Failed ***

"Migrations" could not deploy due to insufficient funds
   * Account:  0x12aADAdd301d22c941DACF2cfa7A9e2019972F61
   * Balance:  0 wei
   * Message:  insufficient funds for gas * price + value
   * Try:
      + Using an adequately funded account
      + If you are using a local Geth node, verify that your node is synced.

难道我做错了什么?我应该在 truffle 配置文件中提到的 gas 和 gas 价格是多少。这是我的松露配置文件

module.exports = {
  networks: {
    development: {
      host: "127.0.0.1",     // Localhost (default: none)
      port: 8545,            // Standard Ethereum port (default: none)
      network_id: "*",       // Any network (default: none)
    },
    matic: {
      provider: () => new HDWalletProvider(process.env.MNEMONIC, `https://rpc-mumbai.maticvigil.com/v1/91fdbb5c2f37c699621ss7d2b8b127fc1a123060
      `),
      network_id: 80001,
      confirmations: 2,
      timeoutBlocks: 200,
      skipDryRun: true
    },
  },

  // Set default mocha options here, use special reporters etc.
  mocha: {
    // timeout: 100000
  },
4

1 回答 1

1

在此处输入图像描述

我很确定这个帐户 0x12aADAdd301d22c941DACF2cfa7A9e2019972F61 在 Mumbai-Testnet 中没有余额

于 2021-08-23T05:09:10.010 回答