Is it possible to automate the deployment of smart contract using git?? As we know it impossible to update existing contract but we can manage the update of contract by using entry level contract, but this whole process is manual, I want to automate the deployment ie. as soon as any thing is updated in contract on git it should be updated on blockchain.
2 Answers
Github offers webhooks so that you can 'do things' when certain events occur.
Both Geth and Parity implement the JSON RPC API so in principle you can interface with the Ethereum blockchain from any programming language.
The API method you want is eth_sendRawTransaction
. You can build a transaction signature and submit it to the chain.
web3.js removes a lot of the complexities (if working with JS).
PHP JsonRPC makes the communication aspect of things easy if working with PHP.
Yes, you can do this using a git post-commit (or post-receive) hook and truffle migrate.
https://git-scm.com/book/gr/v2/Customizing-Git-Git-Hooks http://truffle.readthedocs.io/en/beta/getting_started/migrations/
-
1thanks for your answer, it would be better if you redact a complete answer instead posting the links– Badr Bellaj ♦Jul 5, 2017 at 12:33