Unable to Verify Contract on Snowtrace

Hi, I deployed a contract to Avalanche mainnet using Remix, and I am unable to verify the contract on Snowtrace.io. I was able to get a perfect verification on Sourcify by using their UI and uploading the contract and metadata.

Sourcify verification:
repo.sourcify.dev/contracts/full_match/43114/0x327F9b9a7312d5F59227B33037D1a6363715F70D/

Here is the token contract:

Using hardhat-verify in VS Code results in a generic error message and the HardHat team has provided no support whatsoever:
"The API responded with an unexpected message.
Please report this issue to the Hardhat team.
Contract verification may have succeeded and should be checked manually.
Message:"

Here are my solidity compilation settings:
solidity: {
version: "0.8.23",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
evmVersion: "london"
}

Any ideas how to get this verified on Snowtrace?

As far as I'm aware of, starting from solc v0.8.20, you must switch to the shanghai EVM.

1 Like