dojoengine / dojo

Dojo is a toolchain for building provable games and autonomous worlds with Cairo
https://dojoengine.org
Apache License 2.0
390 stars 148 forks source link

Implement contract verification during migration #208

Open tarrencev opened 1 year ago

tarrencev commented 1 year ago

When declaring new contracts, verify them with starkscan.

We should do this in a generic way to support future verification implementations.

Here is the Starkscan API info: JSON def: https://github.com/starkscan/starkscan-verifier/blob/acf3762c3ede91fe22a661e5b74c2e688289ffee/src/types.ts#L5 Endpoint: https://github.com/starkscan/starkscan-verifier/blob/acf3762c3ede91fe22a661e5b74c2e688289ffee/src/api.ts#L78

Here is the Voyager API repo: https://github.com/NethermindEth/voyager-verify

Matth26 commented 1 year ago

I can try this one

ponderingdemocritus commented 1 year ago

foundry has a very clean way of doing this. If you pass in your etherscan api key it will just automatically verify, so perhaps we follow a similar way

Matth26 commented 1 year ago

starkscan-verifier don't support cairo1 verifying yet, but I'll add all the code for the API call and we will enable once it's supported.

Matth26 commented 1 year ago

foundry has a very clean way of doing this. If you pass in your etherscan api key it will just automatically verify, so perhaps we follow a similar way

I'll have a look how it's done in foundry

glihm commented 5 months ago

@Matth26 I removed you from assignee, don't hesitate if you want to take it again. :+1:

Matth26 commented 5 months ago

@Matth26 I removed you from assignee, don't hesitate if you want to take it again. 👍

Sure, I still have my branch with the API call if needed, but the starkscan-verifier API still doesn't support cairo1, and same for voyager-verify repo

ameya-deshmukh commented 4 months ago

@glihm is this open to take up? :)

glihm commented 4 months ago

@glihm is this open to take up? :)

Hey @ameya-deshmukh! Let me check the comment from @Matth26. Because if we don't have vision on support for Cairo 1 from voyager or starkscan this issue is blocked. Keep you posted!

glihm commented 4 months ago

Blocked until we figure out the API to verify cairo 1 programs with the explorers. Waiting some answers from both Starkscan and Voyager team.