java ethereum_EthereumJ

Welcome to ethereumj

Join%20Chat.svg

ethereumj.svg?branch=master

badge.png?branch=master

About

EthereumJ is a pure-Java implementation of the Ethereum protocol. For high-level information about Ethereum and its goals, visit ethereum.org. The ethereum white paper provides a complete conceptual overview, and the yellow paper provides a formal definition of the protocol.

We keep EthereumJ as thin as possible. For JSON-RPC support and other client features check Ethereum Harmony.

Running EthereumJ

Adding as a dependency to your Maven project:

org.ethereum

ethereumj-core

1.11.0-RELEASE

or your Gradle project:

repositories {

mavenCentral()

jcenter()

maven { url "https://dl.bintray.com/ethereum/maven/" }

}

implementation "org.ethereum:ethereumj-core:1.9.+"

As a starting point for your own project take a look at https://github.com/ether-camp/ethereumj.starter

Building an executable JAR

git clone https://github.com/ethereum/ethereumj

cd ethereumj

cp ethereumj-core/src/main/resources/ethereumj.conf ethereumj-core/src/main/resources/user.conf

vim ethereumj-core/src/main/resources/user.conf # adjust user.conf to your needs

./gradlew clean fatJar

java -jar ethereumj-core/build/libs/ethereumj-core-*-all.jar

Running from command line:

> git clone https://github.com/ethereum/ethereumj

> cd ethereumj

> ./gradlew run [-PmainClass=]

Optional samples to try:

./gradlew run -PmainClass=org.ethereum.samples.BasicSample

./gradlew run -PmainClass=org.ethereum.samples.FollowAccount

./gradlew run -PmainClass=org.ethereum.samples.PendingStateSample

./gradlew run -PmainClass=org.ethereum.samples.PriceFeedSample

./gradlew run -PmainClass=org.ethereum.samples.PrivateMinerSample

./gradlew run -PmainClass=org.ethereum.samples.TestNetSample

./gradlew run -PmainClass=org.ethereum.samples.TransactionBomb

For snapshot builds:

Please, note, snapshots are not stable and are currently in development! If you still want to try it:

Add https://oss.jfrog.org/libs-snapshot/ as a repository to your build script

Add a dependency on org.ethereum:ethereumj-core:${VERSION}, where ${VERSION} is of the form 1.11.0-SNAPSHOT.

Example:

jfrog-snapshots

oss.jfrog.org

https://oss.jfrog.org/libs-snapshot/

true

org.ethereum

ethereumj-core

1.11.0-SNAPSHOT

Importing project to IntelliJ IDEA:

> git clone https://github.com/ethereum/ethereumj

> cd ethereumj

> gradlew build

IDEA:

File -> New -> Project from existing sources…

Select ethereumj/build.gradle

Dialog “Import Project from gradle”: press “OK”

After building run either org.ethereum.Start, one of org.ethereum.samples.* or create your own main.

Configuring EthereumJ

For reference on all existing options, their description and defaults you may refer to the default config ethereumj.conf (you may find it in either the library jar or in the source tree ethereum-core/src/main/resources)

To override needed options you may use one of the following ways:

put your options to the /config/ethereumj.conf file

put user.conf to the root of your classpath (as a resource)

put your options to any file and supply it via -Dethereumj.conf.file=, accepts several configs, separated by comma applied in provided order: -Dethereumj.conf.file=,

programmatically by using SystemProperties.CONFIG.override*()

programmatically using by overriding Spring SystemProperties bean

Note that don’t need to put all the options to your custom config, just those you want to override.

Special thanks

YourKit for providing us with their nice profiler absolutely for free.

YourKit supports open source projects with its full-featured Java Profiler.

YourKit, LLC is the creator of YourKit Java Profiler

and YourKit .NET Profiler,

innovative and intelligent tools for profiling Java and .NET applications.

a2ccd6fb5dcc4abcf6c6e7cdab372ae9.png

Contact

Chat with us via Gitter

License

ethereumj is released under the LGPL-V3 license.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值