Getting started - adridadou/eth-contract-api GitHub Wiki

To use the project in maven, first add the repository

     <repository>
        <id>bintray</id>
        <url>https://dl.bintray.com/cubefriendly/maven/</url>
    </repository>

and then you can add the dependency

     <dependency>
    <groupId>org.adridadou</groupId>
    <artifactId>eth-contract-api</artifactId>
    <version>0.15</version>
</dependency>

You will also need EthereumJ, so for any question or issue regarding this library, go to their project github page EthereumJ

To start using it in your code, you need to use one of the EthereumFacadeProvider. There are 3 available:

  • Main network
  • Morden network (official test network)
  • Testnet (ether.camp test network)

In order to create an Ethereum instance, you need to give it your identity. This is an ECKey. If you are connecting to Morden or the Main network and you have created your account with Mist, you can use the Keystore reader. A helper function exists in the EthereumFacade. All you need to give is the account id (look in your keystore folder to know the actual name) and the passphrase.

A good example is the test class TestConnectionTest

⚠️ **GitHub.com Fallback** ⚠️