This project is a demo implementation of ethereum blockchain using web3j java library. Smart contract is written in solidity. We used spring-boot framework and apache-maven build-automation tool.
Set up local environment by following bellow steps.
- Download and execute ganache and a private test network will be created with test accounts.
- Click on the symbolic 'key' button on any account in ganache network and copy the private key.
- Open /src/main/java/com/test/ethereum/services/PetServices.java
- Instantiate credentials in line 18 with the copied private key. (private key will be shifted to properties file soon, sorry folks).
- Update maven dependancies.
- Run TESTEthereumApplication.java .
- Make a POST request to the url https://localhost:8081/deploy to deploy the smart contract.