Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.martintreurnicht:ethereumj:1.3.0'
}
dependencies {
implementation("com.github.martintreurnicht:ethereumj:1.3.0")
}
<dependency>
<groupId>com.github.martintreurnicht</groupId>
<artifactId>ethereumj</artifactId>
<version>1.3.0</version>
</dependency>
libraryDependencies += "com.github.martintreurnicht" % "ethereumj" % "1.3.0"
:dependencies [[com.github.martintreurnicht/ethereumj "1.3.0"]]
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.
<dependency>
<groupId>org.ethereum</groupId>
<artifactId>ethereumj-core</artifactId>
<version>1.6.3-RELEASE</version>
</dependency>
repositories {
mavenCentral()
}
compile "org.ethereum:ethereumj-core:1.6.+"
As a starting point for your own project take a look at https://github.com/ether-camp/ethereumj.starter
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 shadowJar
java -jar ethereumj-core/build/libs/ethereumj-core-*-all.jar
> git clone https://github.com/ethereum/ethereumj
> cd ethereumj
> ./gradlew run [-PmainClass=<sample class>]
./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
> git clone https://github.com/ethereum/ethereumj
> cd ethereumj
> gradlew build
IDEA:
org.ethereum.Start
, one of org.ethereum.samples.*
or create your own main.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:
<working dir>/config/ethereumj.conf
fileuser.conf
to the root of your classpath (as a resource)-Dethereumj.conf.file=<your config>
SystemProperties.CONFIG.override*()
SystemProperties
beanNote that don’t need to put all the options to your custom config, just those you want to override.
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 <a href="https://www.yourkit.com/java/profiler/">YourKit Java Profiler</a> and <a href="https://www.yourkit.com/.net/profiler/">YourKit .NET Profiler</a>, innovative and intelligent tools for profiling Java and .NET applications.
Chat with us via Gitter
ethereumj is released under the LGPL-V3 license.