Skip to content

Sample Counter Quorum Smart Contract Web3j API With Private/Public Transactions

License

Notifications You must be signed in to change notification settings

eliafengar/quorum-counter-web3j-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quorum-counter-web3j-sample

Sample Counter Quorum Smart Contract Web3j API

Purpose and Motivation

The purpose of this project is to enable a Java server side REST API to interact with Quorum Transaction node.
The project demonstrates a Counter Smart Contract which has the following methods: increment, decrement and counts.
The application enables to deploy "Public" and "Private" Smart Contracts and interact with them. <br/ > The REST API exposes the above Smart Contract methods and also the following methods: deployContract and loadContract.

Build

Fill in the values in application.properties
In Case of Existing Smart Contracts - Update the Contract Addresses


mvn clean
mvn package - this will start the embedded Apache Tomcat server.


Deploy Contract using: http://localhost:8080/network/deployContract?private=<true|false>
Load Existing Contract using: http://localhost:8080/network/loadContract?private=<true|false>


Interact with the Ethereum Smart Contract using:
http://localhost:8080/counter/increment
http://localhost:8080/counter/decrement
http://localhost:8080/counter/counts