1

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.

  • You can deploy the contract using Web3JS and with that, you can automate the deployment of the contract as well. – Sanchit Jul 5 '17 at 7:10
  • But this can be expensive it want any change in git repo to be deployed in the blockchain. – NewTwoEth Jul 5 '17 at 7:19
1

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.

1

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/

  • 1
    thanks for your answer, it would be better if you redact a complete answer instead posting the links – Badr Bellaj Jul 5 '17 at 12:33

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.