GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - hyperledger/fabric-chaincode-java: Hyperledger Fabric Contract and Chaincode implementation for Java

BranchesTags
Open more actions menu

Latest commit

 

History

769 Commits
769 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docs
docs
 
 
examples
examples
 
 
fabric-chaincode-docker
fabric-chaincode-docker
 
 
fabric-chaincode-integration-test
fabric-chaincode-integration-test
 
 
fabric-chaincode-shim
fabric-chaincode-shim
 
 
gradle
gradle
 
 
release_notes
release_notes
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODEOWNERS
CODEOWNERS
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
COMPATIBILITY.md
COMPATIBILITY.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
MAINTAINERS.md
MAINTAINERS.md
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
RELEASING.md
RELEASING.md
 
 
build.gradle
build.gradle
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
pmd-ruleset.xml
pmd-ruleset.xml
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

Hyperledger Fabric Chaincode Java

Build Status Maven Central Discord

This is a Java based implementation of Hyperledger Fabric chaincode shim APIs, which enables development of smart contracts using the Java language.

This project creates fabric-chaincode-shim jar files for developers' consumption and the hyperledger/fabric-javaenv docker image to run Java chaincode.

Getting Started

Application developers interested in developing Java smart contracts for Hyperledger Fabric should read the JavaDoc which includes download information, and links to documentation and samples.

Project structure

fabric-chaincode-shim

Contains the java shim classes that define Java chaincode API and way to communicate with Fabric peers.

fabric-chaincode-docker

Contains instructions to build the hyperledger/fabric-javaenv docker image.

fabric-chaincode-integration-test

Contains higher level tests for Java chaincode.

Note: in the future these should be replaced with a separate suite of Cucumber tests which run against all chaincode implementations.

examples

The following technical examples are in this repository. Please see the tutorials in the documentation

  • fabric-contract-example-gradle - Contains an example Java contract built using gradle
  • fabric-contract-example-maven - Contains an example Java contract built using maven
  • fabric-contract-example-gradle-kotlin - Contains an example Kotlin contract build using gradle (Kotlin gradle files)
  • fabric-chaincode-example-sacc - Contains an example java chaincode gradle project that includes sample chaincode and basic gradle build instructions.
  • fabric-chaincode-example-sbe - Contains an example java chaincode gradle project that includes state based endorsement

'dev' main branch builds

These 'dev' drivers are built from the main branch only, and have a version format including the date for example 2.3.1.dev.20210303. They are published to Artifactory. These can be accessed via the repository at

    maven {
        url "https://hyperledger.jfrog.io/hyperledger/fabric-maven"
    }

They can be accessed in a build file like this

dependencies {
    compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.3.1.dev.+'
 }

Building and testing

Make sure you have the following prereqs installed:

  • Docker
  • Docker Compose
  • JDK 11

Note: Java can be installed using sdkman.

Clone the repository if you haven't already.

git clone https://github.com/hyperledger/fabric-chaincode-java.git

Build java shim jars (proto and shim jars) and install them to local maven repository.

cd fabric-chaincode-java
./gradlew clean build install

Note: ./gradlew clean build classes can be used instead to reduce the binaries that are built. This should be sufficient for using the local repository.

Build javaenv docker image, to have it locally.

./gradlew buildImage

Compatibility

For details on what Java runtime and versions of Hyperledger Fabric can be used please see the compatibility document.


Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License

About

Hyperledger Fabric Contract and Chaincode implementation for Java

hyperledger.github.io/fabric-chaincode-java/

Topics

hacktoberfesthyperledgerhyperledger-fabricjavasmart-contracts

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

323 stars

Watchers

23 watching

Forks

211 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.