Skip to content

Instantly share code, notes, and snippets.

View romanman's full-sized avatar

Roman Mandeleil romanman

View GitHub Profile
import org.ethereum.core.Block;
import org.ethereum.core.Genesis;
import org.ethereum.core.Transaction;
import org.ethereum.core.TransactionReceipt;
import org.ethereum.crypto.ECKey;
import org.ethereum.crypto.HashUtil;
import org.ethereum.facade.Ethereum;
import org.ethereum.facade.EthereumFactory;
import org.ethereum.listener.EthereumListenerAdapter;
import org.ethereum.net.p2p.HelloMessage;
<repositories>
<repository>
<id>oss.jfrog.org</id>
<name>Repository from Bintray</name>
<url>http://dl.bintray.com/ethereum/maven</url>
</repository>
</repositories>
<dependency>
git clone https://github.com/ethereum/ethereumj
cd ethereumj
gradlew build
<repositories>
<repository>
<id>oss.jfrog.org</id>
<name>Repository from Bintray</name>
<url>http://dl.bintray.com/ethereum/maven</url>
</repository>
</repositories>
<dependency>
repositories {
maven {
url "http://dl.bintray.com/ethereum/maven"
}
}
compile ("org.ethereum:ethereumj-core:1.2.0-RELEASE")
StandaloneBlockchain bc = new StandaloneBlockchain();
SolidityContract contract =
bc.submitNewContract(
"contract A { uint a; ... }"
);
contract.callFunction("funcName", "arg1",
2, new byte[] {1,2,3}, "arg4");
repositories {
maven {
url "http://dl.bintray.com/ethereum/maven"
}
}
compile ("org.ethereum:ethereumj-core:1.0.0-RC1")
git clone https://github.com/ethereum/ethereumj
cd ethereumj
gradlew run [-PmainClass=<sample class>]
{
"nonce": "0x00006d6f7264656e",
"difficulty": "0x020000",
"mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578",
"coinbase": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x",
"gasLimit": "0x2FEFD8",
"alloc": {