blockscout / blockscout

Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
http://docs.blockscout.com
GNU General Public License v3.0
3.51k stars 2.37k forks source link

Verify Contract error on Canto #5971

Closed robor2b102 closed 1 year ago

robor2b102 commented 2 years ago

Hi there, we don't seem to be able to verify any contracts on the Canto Mainnet. Not sure if you're aware of any issues? TIA

vbaranov commented 2 years ago

Blockscout doesn't manage Canto instance. What type of issue do you experience? Which way of contract verification: through web interface or api? What is the response from verification?

robor2b102 commented 2 years ago

Hey Victor,

Thanks for coming back with an update! The issue seems to be that when trying to verify through the web interface, the process just gets stuck and never resolves…just keeps ‘processing’ forever. Is there a Canto API that can be used?

Thank you!

On 23 Aug 2022, at 20:20, Victor Baranov @.***> wrote:

 Blockscout doesn't manage Canto instance. What type of issue do you experience? Which way of contract verification: through web interface or api? What is the response from verification?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

vbaranov commented 2 years ago

Blockscout provides API endpoint to verify contracts by default. Take a look at /api-docs page on Canto instance.

This is how contract verify API endpoint looks like on Sokol instance:

curl -d '{"addressHash":"0xc63BB6555C90846afACaC08A0F0Aa5caFCB382a1","compilerVersion":"v0.5.4+commit.9549d8ff", "contractSourceCode":"pragma solidity ^0.5.4; contract Test { }","name":"Test","optimization":false}' -H "Content-Type: application/json" -X POST "https://blockscout.com/poa/sokol/api?module=contract&action=verify"

tster commented 2 years ago

Blockscout provides API endpoint to verify contracts by default. Take a look at /api-docs page on Canto instance.

Hey. I am not OP but also unable to verify contracts on the Canto explorer. Verifying through the frontend results in a hanging "Loading..." caption, and verifying through the API is returning an Internal server error.

Any idea what might be some common pitfalls here? I've asked the explorer admin to take a look at the logs to see if there's any more information there.

vbaranov commented 1 year ago

We provide a new smart-contract verification microservice written in Rust https://docs.blockscout.com/for-developers/information-and-settings/smart-contract-verification. It allows users to verify smart contracts much faster and contains fixes for known bugs. Please advise the Canto team to enable integration with this microservice.