sourcify icon indicating copy to clipboard operation
sourcify copied to clipboard

Import contracts from smart-contract-sanctuary

Open kuzdogan opened this issue 1 year ago • 5 comments

There's the smart-contract-sanctuary repo that is no longer maintained:

https://github.com/tintinweb/smart-contract-sanctuary

It contains flattened verified source codes for contracts on different chains.

We should be able to run a script over those contracts to import any missing ones in our repository.

kuzdogan avatar Sep 30 '24 10:09 kuzdogan

Hi @kuzdogan i'd like to tackle this.

mabsattar avatar Oct 02 '24 16:10 mabsattar

Thanks @mabsattar ! I will be assigning this to you. Do you need more instructions or is it clear?

kuzdogan avatar Oct 08 '24 13:10 kuzdogan

hey @kuzdogan thank you for assigning me, if I understand correctly this repo needs to be updated with new contracts, it used to automatically submit contracts to 4byte.directory but the functionality has stopped working. so we have to update with new contracts that have been deployed on diff chains?

mabsattar avatar Oct 10 '24 10:10 mabsattar

No this is a repository of verified contracts and their source codes. The owner stopped updating the contracts there but that's irrelevant.

What we want to do is to go over all of the sources here, format them properly for Sourcify and submit them for verification to the Sourcify server (sourcify.dev). That way we can increase the number of verified contracts on Sourcify

kuzdogan avatar Oct 10 '24 11:10 kuzdogan

@kuzdogan okay, thanks for the clarification, I'll start working on it.

mabsattar avatar Oct 10 '24 11:10 mabsattar

i am interested in solving this can i start ??

Chirag-S-Kotian avatar Oct 22 '24 03:10 Chirag-S-Kotian

@mabsattar could you share your progress on this?

kuzdogan avatar Oct 22 '24 04:10 kuzdogan

hi @kuzdogan i'm working on it, couldn't work last week, I've run the script today and was able to find some contracts missing in the ETH mainnet, lemme validate, i'll keep you updated on this.

mabsattar avatar Oct 22 '24 11:10 mabsattar

@mabsattar Thanks. In that case I'd keep it at @mabsattar to avoid conflicts and double-work @Chirag-S-Kotian

kuzdogan avatar Oct 22 '24 11:10 kuzdogan

Okay if you have any other issues to solve please let me know 😊😁.

Chirag-S-Kotian avatar Oct 23 '24 14:10 Chirag-S-Kotian

@mabsattar any update on this?

manuelwedler avatar Nov 25 '24 04:11 manuelwedler

@manuelwedler hi, I'll get it done soon, sorry was not available last couple of weeks. I've already created a script to find missing Contracts, extract data and format them for sourcify, i'll try to complete it and will update on this soon.

mabsattar avatar Nov 25 '24 12:11 mabsattar

@mabsattar Thanks for the update! Let us know when you are done :)

manuelwedler avatar Nov 26 '24 10:11 manuelwedler

sorry to ping again but do you have any update? @mabsattar

manuelwedler avatar Dec 09 '24 09:12 manuelwedler

hi @manuelwedler , im facing some challenges trying to compile those contracts to extract metadata for verification, these are alot of contracts and im using foundry's native sourcify verification feature and tried automating the task with bash script but unformately facing issues during compilation process hence im struck there.

mabsattar avatar Dec 09 '24 10:12 mabsattar

@mabsattar Also now I realize the dataset does not have compilation settings, right? So it would not actually be possible to verify most of them (except the ones with default settings)

kuzdogan avatar Dec 10 '24 07:12 kuzdogan

@kuzdogan yes, almost all of those contracts are missing compilation settings in the dataset, and also the source code of most contracts have Non-ASCII Chars which is crashing compilation due to unexpected characters.

mabsattar avatar Dec 10 '24 11:12 mabsattar

@mabsattar Ok I guess we can close this then :( it doesn't seem to be feasible. Thank you for your time. If you still want to work on it and try verifying some, you're welcome and I can re-open the issue.

kuzdogan avatar Dec 10 '24 16:12 kuzdogan

@kuzdogan yeah it seems so, but i'll give it a one more try and if I manage to make it work then we will reopen the issue.

mabsattar avatar Dec 10 '24 18:12 mabsattar