dethcrypto / dethcode

View source of deployed Ethereum contracts in VSCode
https://etherscan.deth.net/address/0xa3a7b6f88361f48403514059f1f16c8e78d60eec#code
1.36k stars 108 forks source link

Ability to download locally? #72

Open ajb opened 1 year ago

ajb commented 1 year ago

deth.net is a lifesaver - does anyone know if there is the ability to automatically download the files and open them in your local VS Code instance? can't seem to figure this out, any advice is appreciated :)

ksin751119 commented 1 year ago

I have the same issue...

abmisx0 commented 1 year ago

same here, what's the easiest way to do this? Right now I have to manually create the file directories and then download each file. Can we get a clone repo feature please.

edit: I found the MetaDock extension lets you download contracts as a zip. https://blocksec.com/metadock

Elyx0 commented 5 months ago

Been waiting a long time for dethcode to solve this, @abmisx0 i use blockscan instead now when I want to download the whole folders https://vscode.blockscan.com/ethereum/0xba12222222228d8ba445958a75a0704d566bf2c8

in dethcode doing the same as blockscan you get a console error of cross origin

 WARN DOMException: Failed to execute 'showDirectoryPicker' on 'Window': Cross origin sub frames aren't allowed to show a file picker.
    at B.i (https://code.deth.net/out/vs/workbench/workbench.web.main.js:2551:118413)
    at async B.h (https://code.deth.net/out/vs/workbench/workbench.web.main.js:2551:118137)
Mouradif commented 1 month ago

This is because when you access some-explorer.deth.net/address/<address>, it opens a web page with an iframe that points to the correct URL: code.deth.net/address/<address>?explorer=some-explorer. Since the iframe is technically showing a different domain, the browser refuses to show the picker that lets you give access to some folder of your file system to the webpage.

Interestingly enough, I tried going directly to the url from the iframe, I selected "Download", it showed the native file system dialog to select a folder, but then it just kept loading forever