• Stars
    star
    4,890
  • Rank 8,175 (Top 0.2 %)
  • Language
    Java
  • License
    Other
  • Created over 7 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lightweight Java and Android library for integration with Ethereum clients

Web3j: Web3 Java Ethereum Ðapp API

Documentation Status build status codecov Discord

Web3j is a lightweight, highly modular, reactive, type safe Java and Android library for working with Smart Contracts and integrating with clients (nodes) on the Ethereum network:

image

This allows you to work with the Ethereum blockchain, without the additional overhead of having to write your own integration code for the platform.

The Java and the Blockchain talk provides an overview of blockchain, Ethereum and Web3j.

NEW! Get involved!

Since Web3J moved under Hyperledger we started to do Web3J Contributors calls every 2 weeks! Subscribe to our community page and to see check our call schedule. Your contribution matters!

Features

It has five runtime dependencies:

It also uses JavaPoet for generating smart contract wrappers.

QuickStart

The simplest way to start your journey with Web3j is to create a project. We provide this functionality using the Web3j CLI. This latter can be installed as follows:

For Unix:

curl -L get.web3j.io | sh && source ~/.web3j/source.sh

For Windows, in Powershell:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/web3j/web3j-installer/master/installer.ps1'))

Create a new project by running:

$ web3j new 

Or use our Maven or Gradle plugins to generate java files from Solidity contracts.

Please head to the Web3j Documentation for further instructions on using Web3j.

Maven

Java:

<dependency>
  <groupId>org.web3j</groupId>
  <artifactId>core</artifactId>
  <version>4.11.2</version>
</dependency>

Android:

<dependency>
  <groupId>org.web3j</groupId>
  <artifactId>core</artifactId>
  <version>4.8.7-android</version>
</dependency>

Gradle

Java:

implementation ('org.web3j:core:4.11.2')

Android:

implementation ('org.web3j:core:4.8.7-android')

Build instructions

Web3j includes integration tests for running against a live Ethereum client. If you do not have a client running, you can exclude their execution as per the below instructions.

To run a full build (excluding integration tests):

$ ./gradlew check

To run the integration tests, you will need to set up these variables in order to pull the Docker images from the Docker Hub registry:

  • registry.username
  • registry.password

Then run the following command:

$ ./gradlew -Pintegration-tests=true :integration-tests:test

If you do not want the integration test to run:

$ ./gradlew -Pintegration-tests=false :test

Check the Docker client API for more information on configuration options.

Commercial support and training

Commercial support and training is available from web3labs.com.

License

Apache 2.0

More Repositories

1

sample-project-gradle

Sample web3j project using Gradle
Java
268
star
2

web3j-spring-boot-starter

Spring Boot Starter for web3j
Java
230
star
3

web3j-maven-plugin

web3j Maven plugin
Java
112
star
4

web3j-quorum

web3j integration layer for JP Morgan's Quorum
Java
108
star
5

libp2p

libp2p implementation in Kotlin for JVM platforms
Kotlin
78
star
6

web3j-evm

A library for running an embedded Ethereum EVM in-process on a JVM
Kotlin
61
star
7

web3j-cli

Command-line interface for web3j
Java
53
star
8

svm

Solidity Version Manager. Like nvm or jabba, but for Solidity. Cross platform.
Kotlin
48
star
9

examples

Example code supporting articles
Java
46
star
10

web3j-gradle-plugin

web3j Gradle plugin
Java
38
star
11

web3j-docs

Web3j documentation repository.
35
star
12

sample-project-maven

Sample web3j Maven project
Java
34
star
13

web3j-openapi

OpenAPI compliant service generator for Solidity Smart contracts
Solidity
33
star
14

Intellij-solidity-debugger

Kotlin
27
star
15

web3j-unit

Smart contract testing framework via integrated EVM and various Ethereum clients
Kotlin
22
star
16

solidity-gradle-plugin

Gradle plugin providing tasks to compile Solidity contracts.
Solidity
21
star
17

web3j-corda

Lightweight JVM library for integrating with Corda
Kotlin
14
star
18

web3j-sokt

Kotlin-based wrapper for multiple installations of the solidity compiler (solc)
Kotlin
12
star
19

web3j-eth2

Web3j integrations for Ethereum 2.0 (Eth2) network
Kotlin
10
star
20

web3j-evmexample

Minimal example for getting started with web3j-evm
Java
7
star
21

web3j-aion

web3j integration with the Aion network
Kotlin
5
star
22

web3j.github.io

web3j web site
JavaScript
5
star
23

web3j-unitexample

Minimal example for getting started with web3j-unit
Java
4
star
24

web3j-openapi-gradle-plugin

Kotlin
4
star
25

web3j-workshop-2019

JAX London 2019 Web3j Workshop
Java
4
star
26

ion

Java bindings for the Ion Interoperability Framework
Kotlin
4
star
27

web3j-deployer-demo

Demo usage of web3j-deployer
Java
3
star
28

web3j-deployer

Library to define, configure and run Ethereum contract deployments and transactions
Kotlin
3
star
29

web3j-deployer-plugin

Gradle plugin for web3j-deployer
Kotlin
2
star
30

fabric

Kotlin
2
star
31

solidity-darwin-binaries

Static binaries of the Solidity compiler for macOS
2
star
32

web3j-unit-docker-compose-example

Example to spin up VMWare Concord using docker-compose to test contracts in web3j-unit
Java
2
star
33

homebrew-web3j

web3j homebrew tap
Ruby
2
star
34

aion-samples

web3j Aion integration samples
Java
1
star
35

epirus-gradle-plugin

Gradle Plugin for the Epirus Platform.
Kotlin
1
star
36

.github

Share workflow templates, secrets, and self-hosted runners.
1
star
37

quorum-spring-boot-starter

A Spring Boot starter for working with Quorum
1
star
38

build-tools

Internal build tools for our projects
Java
1
star