Socket
Book a DemoInstallSign in
Socket

@ethereum-sourcify/compilers

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethereum-sourcify/compilers

Wrapper around multiple compilers to download the right version and invoke the compilation with a common interface.

1.0.9
latest
Source
npmnpm
Version published
Weekly downloads
76
1420%
Maintainers
2
Weekly downloads
 
Created
Source

compilers

Wrapper around multiple compilers to download the right version and invoke the compilation with a common interface.

Install

npm i @ethereum-sourcify/compilers

Usage

import {
  SolidityOutput,
  ISolidityCompiler,
  JsonInput,
} from '@ethereum-sourcify/lib-sourcify';
import { useSolidityCompiler } from '@ethereum-sourcify/compilers';

class SolcLocal implements ISolidityCompiler {
  constructor(
    private solcRepoPath: string,
    private solJsonRepoPath: string,
  ) {}

  async compile(
    version: string,
    solcJsonInput: JsonInput,
    forceEmscripten: boolean = false,
  ): Promise<SolidityOutput> {
    return await useSolidityCompiler(
      this.solcRepoPath,
      this.solJsonRepoPath,
      version,
      solcJsonInput,
      forceEmscripten,
    );
  }
}

The SolcLocal class can then be used as the solidityCompiler argument of the constructor of SolidityCheckedContract. Vyper follows the same pattern.

Keywords

sourcify

FAQs

Package last updated on 25 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.