Error: Cannot create property 'gasLimit'

Hi ,

I am getting error

Cannot create property ‘gasLimit’ on string ‘0x8123aa’

when I run,

truffle migrate --config=truffle-config.polygon.js --network=amoy

truffle-config.polygon.js

amoy: {
provider: () => new HDWalletProvider({
mnemonic: {
phrase: mnemonic
},
providerOrUrl: “wss://polygon-amoy.infura.io/ws/v3/0fd5ce75384948ec80a2ea63dac60519”,
numberOfAddresses: 1,
shareNonce: true,
websockets:true
}),

Deploy Script:

const FlashLoan = artifacts.require(“FlashLoan”);

FlashLoan.setProvider(new Web3.providers.WebsocketProvider(“wss://polygon-amoy.infura.io/ws/v3/0fd5ce75384948ec80a2ea63dac60519”));

module.exports = function (deployer) {
deployer.deploy(FlashLoan);
};

Other places where HDWallet provider is used:

let web3 = new web3(new HDWalletProvider({
mnemonic: {
phrase: mnemonic
},
providerOrUrl: “wss://polygon-amoy.infura.io/ws/v3/0fd5ce75384948ec80a2ea63dac60519”,
numberOfAddresses: 1,
shareNonce: true,
websockets:true
}));

thanks
Uday

regards
Uday

This topic was automatically closed after 30 days. New replies are no longer allowed.