I've already deployed many smart contracts to Ropsten testnet and successfully verified them in Etherscan, but today I encountered one contract which doesn't get verified through all my attempts. This is a simplified version of a bigger contract the code of which I was trying to verify.
- Smart contract with the similar code and optimization enabled was successfully verified.
- Smart contract with the below code and same compiler setting does not get verified on Etherscan for some reason.
- Etherscan's Verify Contract Code (version 2.0) doesn't help either.
- I've tried to deploy the contract both with Truffle and Remix IDE, with optimization enabled (runs = 200) using compiler version
v0.4.23+commit.124ca40d
. - I've provided expanded description on the issue in this GitHub gist.
I appreciate any help or hints regarding this issue. Big thank you.
Code which doesn't get verified in Etherscan:
pragma solidity 0.4.23;
contract TEST {
string public someVal;
string public someVal2;
bytes32 public signature1 = keccak256(
"address TEST TEST TEST TEST",
"address TEST TEST TEST TEST TEST TEST",
"address TEST TEST TEST TEST TEST TEST",
"uint256 TEST TEST TEST TEST TEST TEST TEST TEST",
"bytes TEST TEST TEST TEST",
"uint256 TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST",
"uint256 TEST TEST TEST TEST TEST TEST TEST TEST"
);
bytes32 public signature2 = keccak256(
"address TEST TEST TEST TEST",
"address TEST TEST TEST TEST TEST TEST",
"address TEST TEST TEST TEST TEST TEST",
"uint256 TEST TEST TEST TEST TEST TEST TEST TEST",
"bytes TEST TEST TEST TEST",
"uint256 TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST",
"uint256 TEST TEST TEST TEST TEST TEST TEST TEST"
);
bytes32 public signature3 = keccak256(
"address TEST TEST TEST TEST",
"address TEST TEST TEST TEST TEST TEST",
"address TEST TEST TEST TEST TEST TEST",
"uint256 TEST TEST TEST TEST TEST TEST TEST TEST",
"bytes TEST TEST TEST TEST",
"uint256 TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST",
"uint256 TEST TEST TEST TEST TEST TEST TEST TEST",
"uint256 TEST TEST TEST TEST"
);
constructor (string val, string val2) public {
someVal = val;
someVal2 = val2;
}
}