GithubHelp home page GithubHelp logo

Comments (3)

kuzdogan avatar kuzdogan commented on June 11, 2024

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?

from solc-js.

Damantino avatar Damantino commented on June 11, 2024

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.

from solc-js.

kuzdogan avatar kuzdogan commented on June 11, 2024

Hmm we don't use the loadRemote method but instead download the compiler versions ourself or just mount a folder with all compiler versions.

https://github.com/ethereum/sourcify/blob/129ba96f13246fb2642e8d79d461adbf9e529ff5/services/server/src/server/services/compiler/local/solidityCompiler.ts#L303-L323

In your case I think you can either use the compiler as we do or maybe intercept the call the solc-js makes to the remote solc repo (if it does) with something like nock. For example here we intercept the call to the Sourcify server and return an already set response. You can return a local compiler with by intercepting the call

https://github.com/ethereum/sourcify/blob/1a620f5d9b13713be3e61b14b6c274c7eacab583/services/monitor/test/Monitor.test.js#L105-L110

from solc-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.