-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
loadRemoteVersion is not working with jest test #724
Comments
Hey just came across this. Sourcify is also an open-source verification service. We specifically have a plug-and-play package for that called lib-sourcify https://github.com/ethereum/sourcify/tree/staging/packages/lib-sourcify It's a bit difficult to understand from your excerpt but maybe our code would help, or even you can use the package as a whole. Right now the standard usage assumes you have a metadata.json file for your contracts but you should be able to use the functions there or just look at the code and infer things. It's not browser compatible yet. Happy to help if you want to use the package or help as much as I can. If your repo is public, can you please share? |
Hey @kuzdogan . yeah I first reach out to you guys (to you specifically), but I've been trying to verify without the need of uploading metadata. What I'm trying to do is: I have a set of folders inside contracts/ folder. Each folder has all the solidity files for a smart contract and a settings.json. I call the endpoint with the files and the settings. Because it's still in development I must be sure that new changes don't break contracts that I was already verifying. I would like to automatise the process therefore I need to test my endpoint, If you have any clue on how to test loadRemoteVersion on js/typescript or more specifically on a nestjs project I would be very grateful. |
Hmm we don't use the In your case I think you can either use the compiler as we do or maybe intercept the call the |
Hi I faced a same issue when testing with jest. It returns a |
I have made a verification service which verifies smart contracts. I have and endpoint that I'm trying to test. It receives all the solidity files and a few settings and outputs if it matches with code on mainnet.
While doing tests everything was fine until I could not load the remote version, I cannot mock that, it need to be the snapshot.
Here is the code for the test:
This works until I arrive to my service, I have a function to load asynchronously the solc snaphot.
This is used then on the compile:
It keeps on loadSolC forever.
Any help would be appreciated.
PD: I have on package json:
EDIT: md format
The text was updated successfully, but these errors were encountered: