DEV Community

Discussion on: Deploy NFTs with Truffle, IPFS OpenSea & Polygon

Collapse
 
hamza33 profile image
hamza33

Hi archie, thanks for the tutorial, i keep on getting this error when i try to 'migrate --network mumbai' or 'matic', my .env is perfect and ive tried both seed phrase and private key. any advice? thanks.

Error: Unknown arguments format passed to new HDWalletProvider. Please check your configuration and try again
at Object.getOptions (C:\Users\zaina\OneDrive\Documents\CryptOud\Truffle-Tutorial-ERC721\node_modules\@truffle\hdwallet-provider\src\constructor\getOptions.ts:143:11)
at new HDWalletProvider (C:\Users\zaina\OneDrive\Documents\CryptOud\Truffle-Tutorial-ERC721\node_modules\@truffle\hdwallet-provider\src\index.ts:71:9)
at Object.provider (C:\Users\zaina\OneDrive\Documents\CryptOud\Truffle-Tutorial-ERC721\truffle-config.js:45:16)
at Object.getProvider (C:\Users\zaina\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\provider\index.js:20:1)
at Object.create (C:\Users\zaina\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\provider\index.js:13:1)
at TruffleConfig.get as provider
at Object.detect (C:\Users\zaina\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\environment\environment.js:19:1)
at Object.module.exports as run
at Command.run (C:\Users\zaina\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\command.js:189:1)

the migrate --network development shows this

Could not connect to your Ethereum client with the following parameters:
- host > localhost
- port > 7545
- network_id > *
Please check that your Ethereum client:
- is running
- is accepting RPC connections (i.e., "--rpc" or "--http" option is used in geth)
- is accessible over the network
- is properly configured in your Truffle configuration file (truffle-config.js)

Collapse
 
yournewempire profile image
Archie Smyth

Hey Hamza.

I can't really pin down what's wrong here. I would suggest double checking the steps in which you spin up truffle. Ensuring you have ran truffle develop, but then, I am sure you have done these steps. If you do find the solution to this, it would be great to learn more amongst us, here in the discussion. I feel my lack of knowledge has perhaps let you down here.

I have just updated the top of this post with the new repositories, which are now using Hardhat. I would suggest trying out the Hardhat repo instead, as Truffle and the HD wallet provider can be intermittent in specific environments. That's not to say Hardhat has its caveats too, but I have preferred the Hardhat suite in a new repo. I will not be removing the Truffle repo from my GH and you are more than welcome to keep hacking away.

Apologies for this late reply and I wish you the best in solving this issue or finding a work around.