1

I am thinking of implementing an API call to compile some source code entered by a user and then return the bytecode for deployment using metamask.

I have tried browser-solc but it had some errors and I want to try and alternative approach.

Did anyone have sample code to compile source on the server using node for example?

  • 1
    If this is about deploying configured-to-order contracts from templates, you could consider a contract factory pattern. While this doesn't have the flexibility of letting users compile arbitrary source code, it avoids the security concerns around accepting arbitrary bytecode. – Rob Hitchens - B9lab Sep 10 '18 at 14:54
  • I have a solution which uses an API call to a node program and then it runs solc. It works but can be slow. – Trevor Lee Oakley Sep 10 '18 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.