Reputation: 1753
The eventual thing that I want to achieve is to migrate/deploy a smart contract using truffle through an API call. I would prefer to do it in NodeJs.
This question is related to deployment of smart contracts on Ethereum and Polygon network. I am able to deploy using command line interface truffle
commands. For example truffle migrate --network matic
. How do I run these commands through code?
Do I need to use chile_proces.exec function to execute the truffle commands? Or is there a different way that devs are already doing it?
Upvotes: 0
Views: 275
Reputation: 129
You can write a script and use docker file to run all these commands or a simple shell script file which fulfils all these details.
Upvotes: 1