This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nonce": "0x00006d6f7264656e", | |
"difficulty": "0x020000", | |
"mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578", | |
"coinbase": "0x0000000000000000000000000000000000000000", | |
"timestamp": "0x00", | |
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | |
"extraData": "0x", | |
"gasLimit": "0x2FEFD8", | |
"alloc": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/ethereum/ethereumj | |
cd ethereumj | |
gradlew run [-PmainClass=<sample class>] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repositories { | |
maven { | |
url "http://dl.bintray.com/ethereum/maven" | |
} | |
} | |
compile ("org.ethereum:ethereumj-core:1.0.0-RC1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StandaloneBlockchain bc = new StandaloneBlockchain(); | |
SolidityContract contract = | |
bc.submitNewContract( | |
"contract A { uint a; ... }" | |
); | |
contract.callFunction("funcName", "arg1", | |
2, new byte[] {1,2,3}, "arg4"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repositories { | |
maven { | |
url "http://dl.bintray.com/ethereum/maven" | |
} | |
} | |
compile ("org.ethereum:ethereumj-core:1.2.0-RELEASE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<repositories> | |
<repository> | |
<id>oss.jfrog.org</id> | |
<name>Repository from Bintray</name> | |
<url>http://dl.bintray.com/ethereum/maven</url> | |
</repository> | |
</repositories> | |
<dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/ethereum/ethereumj | |
cd ethereumj | |
gradlew build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<repositories> | |
<repository> | |
<id>oss.jfrog.org</id> | |
<name>Repository from Bintray</name> | |
<url>http://dl.bintray.com/ethereum/maven</url> | |
</repository> | |
</repositories> | |
<dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static byte[] decrypt(byte[] data, byte[] key) | |
{ | |
// 16 bytes is the IV size for AES256 | |
try | |
{ | |
PaddedBufferedBlockCipher cipher = new PaddedBufferedBlockCipher(new CBCBlockCipher(new AESFastEngine())); | |
byte[] ivBytes = new byte[16]; | |
System.arraycopy(data, 0, ivBytes, 0, ivBytes.length); // Get iv from data | |
byte[] dataonly = new byte[data.length - ivBytes.length]; | |
System.arraycopy(data, ivBytes.length, dataonly, 0, data.length - ivBytes.length); |
NewerOlder