Tag Archives: Ethereum

[Solved] hardhat Failed to Verificate Error: Failed to send contract verification request

My workaround

Just like you, my first suspicion was on the GFW and I set up my hosts file like you did.
ping success with and without VPN, which means there is NO connection issue between our computers and the domain.

Since there was almost no waiting time when my console emit the error messages,
it really didn’t feel like a timeout error.

secure TLS connection in the error message got my attention.
Is there a way we could modify the endpoint URL to http protocol?

Luckily yes:
hardhat-etherscan | Ethereum development environment for professionals by Nomic Foundation

I tried the following:

etherscan: {
  apiKey: {
    rinkeby: ""
  },
  customChains: [
    {
      network: "rinkeby",
      chainId: 4,
      urls: {
        apiURL: "http://api-rinkeby.etherscan.io/api",  // https => http
        browserURL: "https://rinkeby.etherscan.io"
      }
    }
  ]
}

Then everything works with and without VPN.

Source From: Lesson 6: Verify contract fails behind China Great Firewall / GFW with ECONNRESET · Discussion #2247 · smartcontractkit/full-blockchain-solidity-course-js · GitHub

Built on Ethereum, puppeth cannot be used to create the initial block, and an error is reported Fatal: Failed to write genesis block: unsupported fork ordering: eip15

I’m gonna go ahead and create a new genesis. Json in my genesis folder,
Writing:

{
  "config": {
    "chainId": 666,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "ethash": {}
  },
  "nonce": "0x0",
  "timestamp": "0x5ddf8f3e",
  "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "gasLimit": "0x47b760",
  "difficulty": "0x00002",
  "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coinbase": "0x0000000000000000000000000000000000000000",
  "alloc": { },
  "number": "0x0",
  "gasUsed": "0x0",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

Save, run, geth Genesis init Genesis. Json
If I write the initial block with a short negative code, I get an error:

Fatal: Failed to write genesis block: unsupported fork ordering: eip150Block not enabled, but eip155Block enabled at 0

 

【ipfs-api】npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

Reasons for this problem:
I used NPM install –save-dev IPFS-API to download IPFS-API first. When using this command to download, IPFS-API is listed in devDependencies separately. Later, when using NPM install –save IPFS-API to reinstall, one comma is missing in removing devDependencies.

npm ERR! code EJSONPARSE
npm ERR! file D:\contract\ipfs\go-ipfs\ipfs-http-demo\package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token } in JSON at position 749 while parsing near '...version"
npm ERR! JSON.parse     ]
npm ERR! JSON.parse   },
npm ERR! JSON.parse }
npm ERR! JSON.parse '
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lenovo\AppData\Roaming\npm-cache\_logs\2020-08-17T11_01_41_124Z-debug.log

The package. Json figure is as follows:

Just delete the bottom comma.