0

The contract deploys on Rinkeby without a hitch, but when it comes to mainnet it is erroring out strangely. Infura's HTTP endpoint was giving me Invalid JSON RPC RESPONSE "", so I decided to switch to WebSocket endpoints, provided by Infura.

       const webSocketProvider = new Web3.providers.WebsocketProvider('wss://mainnet.infura.io/ws/v3/eeb0ee32c0364281afb37982fbbe26fb');     


//network
  live: {
      network_id: 1,
      provider: function() {
        return new HDWalletProvider(
          'mnemonic',
          webSocketProvider
        );
      },

      gasPrice: 27000000000, 
      confirmations: 2,
      skipDryRun: true
    }

Enclosing my code snippet with WS provider and mainnet configuration in Truffle, as well as package.json:

"dependencies": {
    "@0x/subproviders": "^2.1.11",
    "@truffle/hdwallet-provider": "^1.0.35",
    "opensea-js": "latest",
    "openzeppelin-solidity": "^2.5.1",
    "truffle": "^5.1.31",
    "truffle-flattener": "^1.4.4",
    "web3": "1.0.0-beta.34"
  },

Have been messing with this deployment for 3 days now. Please, provide as much intel as you possibly can.

Your Answer

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

Browse other questions tagged or ask your own question.