rkalis / truffle-plugin-verify

✅ Verify your smart contracts on Etherscan from the Truffle CLI
https://kalis.me/verify-truffle-smart-contracts-etherscan/
MIT License
468 stars 130 forks source link

BSC General exception occured when attempting to insert record #89

Closed disruptcapital closed 2 years ago

disruptcapital commented 3 years ago

I've made this contract as simple as possible. The same issue occurs on the mainnet and version 0.5.9

Dependencies:

"dependencies": {
    "@openzeppelin/contracts": "^3.4.0"
  },
  "devDependencies": {
    "@eth-optimism/smock": "^1.1.6",
    "@nomiclabs/buidler": "^1.4.8",
    "@nomiclabs/hardhat-ethers": "^2.0.0",
    "@nomiclabs/hardhat-etherscan": "^2.1.3",
    "@nomiclabs/hardhat-waffle": "^2.0.1",
    "@truffle/hdwallet-provider": "^1.4.0",
    "chai": "^4.3.4",
    "dotenv": "^10.0.0",
    "ethereum-waffle": "^3.2.0",
    "hardhat": "^2.4.1",
    "truffle-plugin-verify": "^0.4.3"
  }
PS C:\Users\me\Documents\projects\ATS\Vaults\Vaults-contracts> truffle run verify GasPrice --network testnet --debug
DEBUG logging is turned ON
Running truffle-plugin-verify v0.4.3
Verifying GasPrice
Reading artifact file at C:\Users\me\Documents\projects\ATS\Vaults\Vaults-contracts\build\contracts\GasPrice.json
Retrieving constructor parameters from https://api-testnet.bscscan.com/api?apiKey=xxxxxxxxxxxxxxxx&module=account&action=txlist&address=0x9aa09962ED1a03e7Df0a16EcCBF984a20DD5feeD&page=1&sort=asc&offset=1
Constructor parameters received: 0x
Flattening source file C:/Users/me/Documents/projects/ATS/Vaults/Vaults-contracts/contracts/GasPrice/GasPrice.sol
Sending verify request with POST arguments:
{
  "apikey": "xxxxxxxxxxxxxxxx",
  "module": "contract",
  "action": "verifysourcecode",
  "contractaddress": "0x9aa09962ED1a03e7Df0a16EcCBF984a20DD5feeD",
  "sourceCode": "pragma solidity ^0.7.0;\n\n\n// SPDX-License-Identifier: MIT\ncontract GasPrice {\r\n\r\n    uint 
public maxGasPrice = 5000000000; // 5 gwei\r\n\r\n    event NewMaxGasPrice(uint oldPrice, uint newPrice);\r\n\r\n  
  function setMaxGasPrice(uint _maxGasPrice) external {\r\n        emit NewMaxGasPrice(maxGasPrice, _maxGasPrice);\r\n        maxGasPrice = _maxGasPrice;\r\n    }\r\n}",
  "codeformat": "solidity-single-file",
  "contractname": "GasPrice",
  "compilerversion": "v0.7.4+commit.3f05b770",
  "optimizationUsed": 1,
  "runs": 200,
  "constructorArguements": ""
}
General exception occured when attempting to insert record
Failed to verify 1 contract(s): GasPrice
rkalis commented 3 years ago

General exception occured when attempting to insert record is a generic error on the Etherscan side, I think the same error showed up when putting emoji in the comments. @Enigmatic331 is it possible that the issue here could be with the \r characters?

rkalis commented 2 years ago

@disruptcapital does this issue still persist?

rkalis commented 2 years ago

Closing this issue due to inactivity. I've also added a new "Bug report" template that asks for some required information that I need to look into an issue. Feel free to open a new issue with that bug report template if the issue persists.