public static <T extends Contract> RemoteCall<T> deployRemoteCall( Class<T> type, Web3j web3j, TransactionManager transactionManager, ContractGasProvider contractGasProvider, String binary, String encodedConstructor, BigInteger value) { return new RemoteCall<>(() -> deploy( type, web3j, transactionManager, contractGasProvider, binary, encodedConstructor, value)); }
public static <T extends Contract> RemoteCall<T> deployRemoteCall( Class<T> type, Web3j web3j, TransactionManager transactionManager, ContractGasProvider contractGasProvider, String binary, String encodedConstructor) { return new RemoteCall<>(() -> deploy( type, web3j, transactionManager, contractGasProvider, binary, encodedConstructor, BigInteger.ZERO)); }
public static <T extends Contract> RemoteCall<T> deployRemoteCall( Class<T> type, Web3j web3j, Credentials credentials, ContractGasProvider contractGasProvider, String binary, String encodedConstructor, BigInteger value) { return new RemoteCall<>(() -> deploy( type, web3j, credentials, contractGasProvider, binary, encodedConstructor, value)); }
public RemoteCall<TransactionReceipt> sendFunds( String toAddress, BigDecimal value, Convert.Unit unit, BigInteger gasPrice, BigInteger gasLimit) { return new RemoteCall<>(() -> send(toAddress, value, unit, gasPrice, gasLimit)); } }
public static <T extends Contract> RemoteCall<T> deployRemoteCall( Class<T> type, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, String binary, String encodedConstructor, BigInteger value) { return new RemoteCall<>(() -> deploy( type, web3j, transactionManager, gasPrice, gasLimit, binary, encodedConstructor, value)); }
public static <T extends Contract> RemoteCall<T> deployRemoteCall( Class<T> type, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, String binary, String encodedConstructor, BigInteger value) { return new RemoteCall<>(() -> deploy( type, web3j, credentials, gasPrice, gasLimit, binary, encodedConstructor, value)); }
public static <T extends Contract> RemoteCall<T> deployRemoteCall( Class<T> type, Web3j web3j, Credentials credentials, ContractGasProvider contractGasProvider, String binary, String encodedConstructor) { return new RemoteCall<>(() -> deploy( type, web3j, credentials, contractGasProvider, binary, encodedConstructor, BigInteger.ZERO)); }
public Flowable<T> flowable() { return new RemoteCall<>(this::send).flowable(); } }
protected RemoteCall<TransactionReceipt> executeRemoteCallTransaction( Function function, BigInteger weiValue) { return new RemoteCall<>(() -> executeTransaction(function, weiValue)); }
protected <T> RemoteCall<T> executeRemoteCallSingleValueReturn( Function function, Class<T> returnType) { return new RemoteCall<>(() -> executeCallSingleValueReturn(function, returnType)); }
protected RemoteCall<List<Type>> executeRemoteCallMultipleValueReturn(Function function) { return new RemoteCall<>(() -> executeCallMultipleValueReturn(function)); }
/** * Execute the provided function as a transaction asynchronously. This is intended for one-off * fund transfers. For multiple, create an instance. * * @param toAddress destination address * @param value amount to send * @param unit of specified send * * @return {@link RemoteCall} containing executing transaction */ public RemoteCall<TransactionReceipt> sendFunds( String toAddress, BigDecimal value, Convert.Unit unit) { return new RemoteCall<>(() -> send(toAddress, value, unit)); }
protected <T extends Type> RemoteCall<T> executeRemoteCallSingleValueReturn(Function function) { return new RemoteCall<>(() -> executeCallSingleValueReturn(function)); }
protected RemoteCall<TransactionReceipt> executeRemoteCallTransaction(Function function) { return new RemoteCall<>(() -> executeTransaction(function)); }
public RemoteCall<Tuple2<byte[], byte[]>> pubkey(byte[] node) { final Function function = new Function(FUNC_PUBKEY, Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(node)), Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}, new TypeReference<Bytes32>() {})); return new RemoteCall<Tuple2<byte[], byte[]>>( new Callable<Tuple2<byte[], byte[]>>() { @Override public Tuple2<byte[], byte[]> call() throws Exception { List<Type> results = executeCallMultipleValueReturn(function); return new Tuple2<byte[], byte[]>( (byte[]) results.get(0).getValue(), (byte[]) results.get(1).getValue()); } }); }
public RemoteCall<List> returnArray() { final Function function = new Function(FUNC_RETURNARRAY, java.util.Arrays.<Type>asList(), java.util.Arrays.<TypeReference<?>>asList(new TypeReference<DynamicArray<Address>>() {})); return new RemoteCall<List>( new Callable<List>() { @Override @SuppressWarnings("unchecked") public List call() throws Exception { List<Type> result = (List<Type>) executeCallSingleValueReturn(function, List.class); return convertToNative(result); } }); }
public static RemoteCall<TransactionReceipt> sendFunds( Web3j web3j, Credentials credentials, String toAddress, BigDecimal value, Convert.Unit unit) throws InterruptedException, IOException, TransactionException { TransactionManager transactionManager = new RawTransactionManager(web3j, credentials); return new RemoteCall<>(() -> new Transfer(web3j, transactionManager).send(toAddress, value, unit)); }
public RemoteCall<List> multiDynamic(List<List<BigInteger>> input) { final Function function = new Function(FUNC_MULTIDYNAMIC, java.util.Arrays.<Type>asList(new org.web3j.abi.datatypes.DynamicArray( org.web3j.abi.Utils.typeMap(input, org.web3j.abi.datatypes.generated.StaticArray2.class, org.web3j.abi.datatypes.generated.Uint256.class))), java.util.Arrays.<TypeReference<?>>asList(new TypeReference<DynamicArray<Uint256>>() {})); return new RemoteCall<List>( new Callable<List>() { @Override @SuppressWarnings("unchecked") public List call() throws Exception { List<Type> result = (List<Type>) executeCallSingleValueReturn(function, List.class); return convertToNative(result); } }); }
public RemoteCall<List> fixedReverse(List<BigInteger> input) { final Function function = new Function(FUNC_FIXEDREVERSE, java.util.Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.StaticArray10<org.web3j.abi.datatypes.generated.Uint256>( org.web3j.abi.Utils.typeMap(input, org.web3j.abi.datatypes.generated.Uint256.class))), java.util.Arrays.<TypeReference<?>>asList(new TypeReference<StaticArray10<Uint256>>() {})); return new RemoteCall<List>( new Callable<List>() { @Override @SuppressWarnings("unchecked") public List call() throws Exception { List<Type> result = (List<Type>) executeCallSingleValueReturn(function, List.class); return convertToNative(result); } }); }
public RemoteCall<List> dynamicReverse(List<BigInteger> input) { final Function function = new Function(FUNC_DYNAMICREVERSE, java.util.Arrays.<Type>asList(new org.web3j.abi.datatypes.DynamicArray<org.web3j.abi.datatypes.generated.Uint256>( org.web3j.abi.Utils.typeMap(input, org.web3j.abi.datatypes.generated.Uint256.class))), java.util.Arrays.<TypeReference<?>>asList(new TypeReference<DynamicArray<Uint256>>() {})); return new RemoteCall<List>( new Callable<List>() { @Override @SuppressWarnings("unchecked") public List call() throws Exception { List<Type> result = (List<Type>) executeCallSingleValueReturn(function, List.class); return convertToNative(result); } }); }