Skip to content

A wrapper of solc so that you can compile contracts in the browser

Notifications You must be signed in to change notification settings

jimwjl666/browser-solc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

browser-solc-tron

tron solidity compiler

About the fork

Forked from https://github.com/ericxtang/browser-solc to wrap it into a npm package so that it can be easily imported into a Webpack (or another bundler) web app.

Installation

npm install --save browser-solc-tron

Usage:

import browserSolc from 'browser-solc-tron';
const getCompiler = function(){
    return new Promise((resolve,reject)=>{
        setTimeout(()=>{
            window.BrowserSolc.loadSolcJson('',(compiler)=>{
                if(compiler){
                    resolve(compiler.compile)
                }else{
                    reject('it is an error')
                }
            })

        })

    })
}

export default getCompiler;

Development

To build index.js, run npm run build.

Note: browser-solc-tron does NOT implement the whole interface of solc-js.

About

A wrapper of solc so that you can compile contracts in the browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.5%
  • HTML 0.5%