Legacy access request rate exceeded

Hi,

during contract deployment to any testnet using the truffle-hdwallet-provider, I am getting the Error: “legacy access request rate exceeded”
my truffle config is set up like so:

 ropsten: {
      provider: function(){
        return new HDWalletProvider(process.env.MNEMONIC,'https://ropsten.infura.io + process.env.INFURA_PROJECT_ID);
      },
      gas: 8000000,
      gasPrice: 25000000000,
      network_id: 3
    },

Can anyone advise on how to resolve this issue.

thanks

You need to setup an account at infura.io/register and use the Project ID with your request URL in the following format

https://ropsten.infura.io/v3/YOUR-PROJECT-ID

Hi Mike,

Thank you for responding.

I had already done this, just to be sure however I have deleted the project and remade a new project several times and only received the same results I also added the address used to deploy my contract to the addresses white list just in case that was the issue.
I tried “CURL https://ropsten.infura.io/INFURA_PROJECT_ID” but get a 404 error

Curling that URL won’t work that way, needs to be structured as a JSONRPC or WSS request, you are also missing the /v3/ part of the URL, this section of the docs breaks down how to send requests, https://infura.io/docs/gettingStarted/makeRequests

Hi Mike,

Thankyou, the issue was that I wasn’t including the /v3/ within my URL
sorry to bug you over such a stupid mistake

No problem glad you got it working!