Closed zalam003 closed 2 years ago
Hello
We were able to look into this just now, sorry for the delay.
I was unfortunately not able to verify the contracts. The deployed and recompiled bytecode don't match on both cases. I am giving the source code provided and the metadata for ======= contracts/wnrg.sol:WNRGGovernedERC20Proxy =======
which seems to be the main contract per blockexplorer: https://explorer.test.energi.network/address/0x184F7b12f29d675f34ff816528ADBfd0E0501Ad4/contracts.
I see the evm settings on the blockexplorer are different than in the provided metadata. evmVersion
, optimization
etc. Is this metadata accurately the deployed one or is it generated later? Ideally you should provide the one when deployed or try recompiling and generating the metadata with correct evm settings.
@kuzdogan The metadata provided is for mainnet. https://explorer.energi.network/address/0xA55F26319462355474A9F2c8790860776a329aA4/contracts
If you need testnet data, let me know. I only provided a testnet address per request.
As I said, both mainnet and testnet contracts fail to verify. I.e. the contract provided does not compile to the same bytecode as both 0xA55F26319462355474A9F2c8790860776a329aA4 on mainnet and 0x184F7b12f29d675f34ff816528ADBfd0E0501Ad4 for testnet. The reason is likely the compilation settings are not matching. I can see they differ in the metadata and on the blockexplorer. For instance optimizer marked disabled on metadata and enabled on blockexplorer.
Please either compile the contract with the matching evm settings and provide that metadata, or provide another test contract (for both mainnet and testnet).
@kuzdogan Here are updated files for mainnet. Let me know if these works:
I used solc --metadata --metadata-literal flatten_sc.sol
to generate the metadata.txt
file
Sorry but this doesn't work either. I am getting the same error.
@kuzdogan There is an issue with the token I gave you. I would appreciate if you could try this 🤞
The verification fails + it is not possible to get full matches with flattened source files anyway. Closing. Please follow the instructions in docs https://docs.sourcify.dev/docs/chain-support/
Please add support for:
sourcify-chains.ts
constants.ts
0xA55F26319462355474A9F2c8790860776a329aA4 - Energi mainnet source code for WNRG
metadata.txt
Testnet token address for wnrg: 0x184F7b12f29d675f34ff816528ADBfd0E0501Ad4
View in Huly HI-249