public class TestBlockchain
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static org.web3j.crypto.Credentials |
CREDENTIAL_0 |
static org.web3j.crypto.Credentials |
CREDENTIAL_1 |
static org.web3j.crypto.Credentials |
CREDENTIAL_2 |
static org.web3j.crypto.Credentials |
CREDENTIAL_3 |
static org.web3j.crypto.Credentials |
CREDENTIAL_4 |
static org.web3j.crypto.Credentials |
CREDENTIAL_5 |
static org.web3j.crypto.Credentials |
CREDENTIAL_6 |
static org.web3j.crypto.Credentials |
CREDENTIAL_7 |
static org.web3j.crypto.Credentials |
CREDENTIAL_8 |
static org.web3j.crypto.Credentials |
CREDENTIAL_9 |
static java.lang.String |
DEFAULT_PATH |
static java.lang.Integer |
DEFAULT_PORT |
| Constructor and Description |
|---|
TestBlockchain() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addCredentials(java.util.List<org.web3j.crypto.Credentials> credentials2) |
java.math.BigInteger |
balance(org.web3j.crypto.Credentials credential) |
java.math.BigInteger |
balance(java.lang.String address) |
int |
blockWaitTimeoutSeconds() |
TestBlockchain |
blockWaitTimeoutSeconds(int blockWaitTimeoutSeconds) |
java.util.List<Event> |
call(org.web3j.crypto.Credentials credential,
DeployedContract contract,
java.math.BigInteger weiValue) |
java.util.List<Event> |
call(org.web3j.crypto.Credentials credential,
DeployedContract contract,
java.math.BigInteger weiValue,
org.web3j.abi.datatypes.Function function) |
java.util.List<Event> |
call(org.web3j.crypto.Credentials credential,
DeployedContract contract,
java.math.BigInteger weiValue,
FunctionBuilder functionBuilder) |
java.util.List<Event> |
call(org.web3j.crypto.Credentials credential,
DeployedContract contract,
java.math.BigInteger weiValue,
java.lang.String name,
java.lang.Object... parameters) |
java.util.List<Event> |
call(org.web3j.crypto.Credentials credential,
DeployedContract contract,
FunctionBuilder functionBuilder) |
java.util.List<Event> |
call(org.web3j.crypto.Credentials credential,
DeployedContract contract,
java.lang.String name,
java.lang.Object... parameters) |
java.util.List<Event> |
call(org.web3j.crypto.Credentials credential,
java.lang.String contractAddress,
java.math.BigInteger weiValue,
FunctionBuilder functionBuilder) |
java.util.List<Event> |
call(org.web3j.crypto.Credentials credential,
java.lang.String contractAddress,
FunctionBuilder functionBuilder) |
java.util.List<Event> |
call(org.web3j.crypto.Credentials credential,
java.lang.String contractAddress,
java.util.List<Contract> contracts,
java.math.BigInteger weiValue,
org.web3j.abi.datatypes.Function function) |
java.util.List<Event> |
call(org.web3j.crypto.Credentials credential,
java.lang.String contractAddress,
java.util.List<Contract> contracts,
java.math.BigInteger weiValue,
FunctionBuilder functionBuilder) |
java.util.List<Event> |
call(DeployedContract contract,
FunctionBuilder functionBuilder) |
java.util.List<Event> |
call(DeployedContract contract,
java.lang.String name,
java.lang.Object... parameters) |
java.util.List<org.web3j.abi.datatypes.Type> |
callConstant(org.web3j.crypto.Credentials credential,
java.lang.String contractAddress,
org.web3j.abi.datatypes.Function function) |
java.util.List<org.web3j.abi.datatypes.Type> |
callConstant(org.web3j.crypto.Credentials credential,
java.lang.String contractAddress,
FunctionBuilder functionBuilder) |
java.util.List<org.web3j.abi.datatypes.Type> |
callConstant(DeployedContract contract,
FunctionBuilder functionBuilder) |
java.util.List<org.web3j.abi.datatypes.Type> |
callConstant(DeployedContract contract,
java.lang.String name,
java.lang.Object... parameters) |
static void |
clearCredentials() |
static java.util.Map<java.lang.String,Contract> |
compile(java.io.File... contracts) |
static java.util.Map<java.lang.String,Contract> |
compile(java.io.File source) |
static java.util.Map<java.lang.String,Contract> |
compile(java.lang.String contractSrc) |
static java.util.Map<java.lang.String,Contract> |
compile(java.lang.String contractSrc,
java.util.Map<java.lang.String,java.lang.String> dependencies) |
static org.web3j.crypto.Credentials |
create(org.ethereum.crypto.ECKey ecKey)
Deprecated.
|
static java.util.List<org.web3j.crypto.Credentials> |
credentials() |
DeployedContract |
deploy(org.web3j.crypto.Credentials credential,
Contract contract) |
DeployedContract |
deploy(org.web3j.crypto.Credentials credential,
Contract contract,
java.math.BigInteger value) |
java.util.List<DeployedContract> |
deploy(org.web3j.crypto.Credentials credential,
Contract contract,
java.math.BigInteger value,
java.util.Map<java.lang.String,Contract> contracts) |
java.util.List<DeployedContract> |
deploy(org.web3j.crypto.Credentials credential,
Contract contract,
java.math.BigInteger value,
java.util.Map<java.lang.String,Contract> contracts,
java.util.List<DeployedContract> retVal) |
DeployedContract |
deploy(org.web3j.crypto.Credentials credential,
Contract contract,
java.util.Map<java.lang.String,Contract> contracts) |
DeployedContract |
deploy(org.web3j.crypto.Credentials credential,
java.lang.String contractName,
java.util.Map<java.lang.String,Contract> contracts) |
static org.web3j.crypto.Credentials |
fromECKey(org.ethereum.crypto.ECKey ecKey) |
static org.web3j.crypto.Credentials |
fromECPrivateKey(java.lang.String privateKey) |
java.math.BigInteger |
gasLimit() |
TestBlockchain |
gasLimit(java.math.BigInteger gasLimit) |
java.math.BigInteger |
gasPrice() |
TestBlockchain |
gasPrice(java.math.BigInteger gasPrice) |
static void |
main(java.lang.String[] args) |
java.math.BigInteger |
nonce(org.web3j.crypto.Credentials credentials) |
void |
reset() |
static TestBlockchain |
run()
Deprecated.
|
static TestBlockchain |
run(int port,
java.lang.String path)
Deprecated.
|
static TestBlockchain |
runLocal() |
static TestBlockchain |
runLocal(int port,
java.lang.String path) |
static TestBlockchain |
runRemote(java.lang.String url) |
void |
setTime(int timeSeconds) |
void |
shutdown() |
TestBlockchain |
start()
Deprecated.
|
TestBlockchain |
start(int port)
Deprecated.
|
TestBlockchain |
start(int port,
java.lang.String path)
Deprecated.
|
TestBlockchain |
start(int port,
org.web3j.protocol.Web3j web3j,
java.lang.String path)
Deprecated.
|
TestBlockchain |
startLocal() |
TestBlockchain |
startLocal(int port) |
TestBlockchain |
startLocal(int port,
java.lang.String path) |
TestBlockchain |
startLocal(int port,
org.web3j.protocol.Web3j web3j,
java.lang.String path) |
TestBlockchain |
startRemote(java.lang.String url) |
TestBlockchain |
stop() |
org.web3j.protocol.Web3j |
web3j() |
public static final org.web3j.crypto.Credentials CREDENTIAL_0
public static final org.web3j.crypto.Credentials CREDENTIAL_1
public static final org.web3j.crypto.Credentials CREDENTIAL_2
public static final org.web3j.crypto.Credentials CREDENTIAL_3
public static final org.web3j.crypto.Credentials CREDENTIAL_4
public static final org.web3j.crypto.Credentials CREDENTIAL_5
public static final org.web3j.crypto.Credentials CREDENTIAL_6
public static final org.web3j.crypto.Credentials CREDENTIAL_7
public static final org.web3j.crypto.Credentials CREDENTIAL_8
public static final org.web3j.crypto.Credentials CREDENTIAL_9
public static final java.lang.Integer DEFAULT_PORT
public static final java.lang.String DEFAULT_PATH
public static java.util.List<org.web3j.crypto.Credentials> credentials()
public static void clearCredentials()
public static void addCredentials(java.util.List<org.web3j.crypto.Credentials> credentials2)
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionpublic TestBlockchain gasPrice(java.math.BigInteger gasPrice)
public java.math.BigInteger gasPrice()
public TestBlockchain gasLimit(java.math.BigInteger gasLimit)
public java.math.BigInteger gasLimit()
public TestBlockchain blockWaitTimeoutSeconds(int blockWaitTimeoutSeconds)
public int blockWaitTimeoutSeconds()
@Deprecated public static TestBlockchain run() throws java.lang.Exception
java.lang.Exception@Deprecated public static TestBlockchain run(int port, java.lang.String path) throws java.lang.Exception
java.lang.Exceptionpublic static TestBlockchain runLocal() throws java.lang.Exception
java.lang.Exceptionpublic static TestBlockchain runLocal(int port, java.lang.String path) throws java.lang.Exception
java.lang.Exceptionpublic static TestBlockchain runRemote(java.lang.String url) throws java.lang.Exception
java.lang.Exception@Deprecated public TestBlockchain start() throws java.lang.Exception
java.lang.Exception@Deprecated public TestBlockchain start(int port) throws java.lang.Exception
java.lang.Exception@Deprecated public TestBlockchain start(int port, java.lang.String path) throws java.lang.Exception
java.lang.Exception@Deprecated public TestBlockchain start(int port, org.web3j.protocol.Web3j web3j, java.lang.String path) throws java.lang.Exception
java.lang.Exceptionpublic TestBlockchain startLocal() throws java.lang.Exception
java.lang.Exceptionpublic TestBlockchain startLocal(int port) throws java.lang.Exception
java.lang.Exceptionpublic TestBlockchain startLocal(int port, java.lang.String path) throws java.lang.Exception
java.lang.Exceptionpublic TestBlockchain startRemote(java.lang.String url) throws java.lang.Exception
java.lang.Exceptionpublic TestBlockchain startLocal(int port, org.web3j.protocol.Web3j web3j, java.lang.String path) throws java.lang.Exception
java.lang.Exceptionpublic void shutdown()
throws java.lang.Exception
java.lang.Exceptionpublic void reset()
public TestBlockchain stop() throws java.lang.Exception
java.lang.Exceptionpublic org.web3j.protocol.Web3j web3j()
public java.math.BigInteger balance(org.web3j.crypto.Credentials credential)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic java.math.BigInteger balance(java.lang.String address)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic java.math.BigInteger nonce(org.web3j.crypto.Credentials credentials)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic static org.web3j.crypto.Credentials fromECKey(org.ethereum.crypto.ECKey ecKey)
public static org.web3j.crypto.Credentials fromECPrivateKey(java.lang.String privateKey)
privateKey - Private key, in the format: ea8f71fc4690e0733f3478c3d8e53790988b9e51deabd10185364bc59c58fdba@Deprecated public static org.web3j.crypto.Credentials create(org.ethereum.crypto.ECKey ecKey)
public java.util.List<org.web3j.abi.datatypes.Type> callConstant(DeployedContract contract, java.lang.String name, java.lang.Object... parameters) throws java.io.IOException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.util.concurrent.ExecutionException, java.lang.InterruptedException, ConvertException
java.io.IOExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.NoSuchMethodExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionConvertExceptionpublic java.util.List<org.web3j.abi.datatypes.Type> callConstant(org.web3j.crypto.Credentials credential,
java.lang.String contractAddress,
FunctionBuilder functionBuilder)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.io.IOException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOExceptionpublic java.util.List<org.web3j.abi.datatypes.Type> callConstant(DeployedContract contract, FunctionBuilder functionBuilder) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOExceptionpublic java.util.List<org.web3j.abi.datatypes.Type> callConstant(org.web3j.crypto.Credentials credential,
java.lang.String contractAddress,
org.web3j.abi.datatypes.Function function)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic java.util.List<Event> call(DeployedContract contract, java.lang.String name, java.lang.Object... parameters) throws java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException, ConvertException
java.lang.reflect.InvocationTargetExceptionjava.lang.NoSuchMethodExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionConvertExceptionpublic java.util.List<Event> call(org.web3j.crypto.Credentials credential, DeployedContract contract, java.lang.String name, java.lang.Object... parameters) throws java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException, ConvertException
java.lang.reflect.InvocationTargetExceptionjava.lang.NoSuchMethodExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionConvertExceptionpublic java.util.List<Event> call(org.web3j.crypto.Credentials credential, DeployedContract contract, java.math.BigInteger weiValue, java.lang.String name, java.lang.Object... parameters) throws java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException, ConvertException
java.lang.reflect.InvocationTargetExceptionjava.lang.NoSuchMethodExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionConvertExceptionpublic java.util.List<Event> call(org.web3j.crypto.Credentials credential, DeployedContract contract, java.math.BigInteger weiValue) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic java.util.List<Event> call(org.web3j.crypto.Credentials credential, DeployedContract contract, java.math.BigInteger weiValue, FunctionBuilder functionBuilder) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic java.util.List<Event> call(org.web3j.crypto.Credentials credential, DeployedContract contract, FunctionBuilder functionBuilder) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic java.util.List<Event> call(DeployedContract contract, FunctionBuilder functionBuilder) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic java.util.List<Event> call(org.web3j.crypto.Credentials credential, DeployedContract contract, java.math.BigInteger weiValue, org.web3j.abi.datatypes.Function function) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic java.util.List<Event> call(org.web3j.crypto.Credentials credential, java.lang.String contractAddress, FunctionBuilder functionBuilder) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic java.util.List<Event> call(org.web3j.crypto.Credentials credential, java.lang.String contractAddress, java.math.BigInteger weiValue, FunctionBuilder functionBuilder) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic java.util.List<Event> call(org.web3j.crypto.Credentials credential, java.lang.String contractAddress, java.util.List<Contract> contracts, java.math.BigInteger weiValue, FunctionBuilder functionBuilder) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic void setTime(int timeSeconds)
public java.util.List<Event> call(org.web3j.crypto.Credentials credential, java.lang.String contractAddress, java.util.List<Contract> contracts, java.math.BigInteger weiValue, org.web3j.abi.datatypes.Function function) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic DeployedContract deploy(org.web3j.crypto.Credentials credential, Contract contract) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic DeployedContract deploy(org.web3j.crypto.Credentials credential, java.lang.String contractName, java.util.Map<java.lang.String,Contract> contracts) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOExceptionpublic DeployedContract deploy(org.web3j.crypto.Credentials credential, Contract contract, java.util.Map<java.lang.String,Contract> contracts) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic java.util.List<DeployedContract> deploy(org.web3j.crypto.Credentials credential, Contract contract, java.math.BigInteger value, java.util.Map<java.lang.String,Contract> contracts) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic java.util.List<DeployedContract> deploy(org.web3j.crypto.Credentials credential, Contract contract, java.math.BigInteger value, java.util.Map<java.lang.String,Contract> contracts, java.util.List<DeployedContract> retVal) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic DeployedContract deploy(org.web3j.crypto.Credentials credential, Contract contract, java.math.BigInteger value) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic static java.util.Map<java.lang.String,Contract> compile(java.io.File source) throws java.io.IOException
java.io.IOExceptionpublic static java.util.Map<java.lang.String,Contract> compile(java.io.File... contracts) throws java.io.IOException
java.io.IOExceptionpublic static java.util.Map<java.lang.String,Contract> compile(java.lang.String contractSrc, java.util.Map<java.lang.String,java.lang.String> dependencies) throws java.io.IOException
java.io.IOExceptionpublic static java.util.Map<java.lang.String,Contract> compile(java.lang.String contractSrc) throws java.io.IOException
java.io.IOException