You can check out the code here: https://github.com/lopeselio/Chainlink-VH-DynamicNFT


truffle migrate --reset --network rinkeby -f 3

Then response is as follows:

Compiling your contracts...
> Everything is up to date, there is nothing to compile.

Starting migrations...
> Network name:    'rinkeby'
> Network id:      4
> Block gas limit: 10000000 (0x989680)


   Deploying 'NFTSimple'

Error:  *** Deployment Failed ***

"NFTSimple" -- transaction could not be decoded: could not recover secp256k1 key: calculated Rx is larger than curve P.

    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:365:1
    at processTicksAndRejections (node:internal/process/task_queues:93:5)
    at Migration._deploy (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:74:1)
    at Migration._load (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:61:1)
    at Migration.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:212:1)
    at Object.runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
    at Object.runFrom (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
    at runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:258:1)
    at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:228:1)
    at Command.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/command.js:136:1)
Truffle v5.2.5 (core: 5.2.5)
Node v15.5.0

My truffle-config.js:

const HDWalletProvider = require('@truffle/hdwallet-provider');
// require('babel-polyfill');
// require('babel-register');

const mnemonic = process.env.MNEMONIC
const url = process.env.RPC_URL

module.exports = {
  networks: {
    cldev: {
      host: '',
      port: 8545,
      network_id: '*',
    ganache: {
      host: '',
      port: 7545,
      network_id: '*',
    kovan: {
      provider: () => {
        return new HDWalletProvider(mnemonic, url)
      network_id: '42',
      skipDryRun: true
    rinkeby: {
      provider: () => {
        return new HDWalletProvider(mnemonic, url)
      network_id: '4',
      skipDryRun: true,
      networkCheckTimeout: 999999
  compilers: {
    solc: {
      version: "0.6.12",
      optimizer: {
        enabled: true,
        runs: 1
  api_keys: {
    etherscan: process.env.ETHERSCAN_API_KEY
  plugins: [

enter image description here

  • 1
    What version of HDWallet are you using? Newer versions changed the instantiation parameters, check if that is the casehttps://github.com/trufflesuite/truffle/tree/master/packages/hdwallet-provider. The error message is saying the signature is wrong, you might try generating a new mnemonic. – Ismael Mar 21 at 19:50
  • Hey @Ismael thanks for reaching out. I have verified and used the latest version mentioned in the repo v1.2.4 – devELIOper Mar 22 at 9:09
  • @Ismael, I have updated by truffle-config.js according to the latest instantiations in v1.2.4. could you help me check it out.... 1 – devELIOper Mar 22 at 10:07
  • Link to the repo I am using v1.2.4 I have also changed the instantiations to the one listed in the repo. – devELIOper Mar 22 at 10:12
  • It seems to be an issue with hdwallet-provider github.com/trufflesuite/truffle/issues/3940. Downgrading to 1.2.2 seems to work with ganache-cli. – Ismael Mar 22 at 14:39

For everyone who has this problem and the install of HDWallet version 1.2.3 is not working, check the HDWallet version used for the project on package.json file. If the version is different from the installed, you need to install it using the command --save:

npm install @truffle/hdwallet-provider@1.2.3 --save

And be sure that you are doing this command on the root folder of the project:

C://.../your_project > npm install...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.