14 Star 33 Fork 19

Gitee 极速下载 / web3j

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/web3j/web3j
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

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

空文件

简介

web3j 是一个轻量级、高度模块化、响应式、类型安全的 Java 和 Android 库,用于与智能合约以及与以太坊网络上的客户端(节点)进行集成: 可以通过它进行以太坊区块链的 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Shell
1
https://gitee.com/mirrors/web3j.git
git@gitee.com:mirrors/web3j.git
mirrors
web3j
web3j
main

搜索帮助