org.web3j.protocol.core.RemoteFunctionCall Java Examples
The following examples show how to use
org.web3j.protocol.core.RemoteFunctionCall.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OnChainPrivacyGroupManagementProxy.java From besu with Apache License 2.0 | 6 votes |
public RemoteFunctionCall<List> getParticipants(byte[] enclaveKey) { final Function function = new Function( FUNC_GETPARTICIPANTS, Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(enclaveKey)), Arrays.<TypeReference<?>>asList(new TypeReference<DynamicArray<Bytes32>>() {})); return new RemoteFunctionCall<List>( function, new Callable<List>() { @Override @SuppressWarnings("unchecked") public List call() throws Exception { List<Type> result = (List<Type>) executeCallSingleValueReturn(function, List.class); return convertToNative(result); } }); }
Example #2
Source File: Arrays.java From web3j with Apache License 2.0 | 6 votes |
public RemoteFunctionCall<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.datatypes.generated.Uint256.class, org.web3j.abi.Utils.typeMap(input, org.web3j.abi.datatypes.generated.Uint256.class))), java.util.Arrays.<TypeReference<?>>asList(new TypeReference<StaticArray10<Uint256>>() {})); return new RemoteFunctionCall<List>(function, new Callable<List>() { @Override @SuppressWarnings("unchecked") public List call() throws Exception { List<Type> result = (List<Type>) executeCallSingleValueReturn(function, List.class); return convertToNative(result); } }); }
Example #3
Source File: Arrays.java From web3j with Apache License 2.0 | 6 votes |
public RemoteFunctionCall<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.datatypes.generated.Uint256.class, org.web3j.abi.Utils.typeMap(input, org.web3j.abi.datatypes.generated.Uint256.class))), java.util.Arrays.<TypeReference<?>>asList(new TypeReference<DynamicArray<Uint256>>() {})); return new RemoteFunctionCall<List>(function, new Callable<List>() { @Override @SuppressWarnings("unchecked") public List call() throws Exception { List<Type> result = (List<Type>) executeCallSingleValueReturn(function, List.class); return convertToNative(result); } }); }
Example #4
Source File: DefaultOnChainPrivacyGroupManagementContract.java From besu with Apache License 2.0 | 6 votes |
public RemoteFunctionCall<List> getParticipants(byte[] _enclaveKey) { final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_GETPARTICIPANTS, Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(_enclaveKey)), Arrays.<TypeReference<?>>asList(new TypeReference<DynamicArray<Bytes32>>() {})); return new RemoteFunctionCall<List>( function, new Callable<List>() { @Override @SuppressWarnings("unchecked") public List call() throws Exception { List<Type> result = (List<Type>) executeCallSingleValueReturn(function, List.class); return convertToNative(result); } }); }
Example #5
Source File: Arrays.java From web3j with Apache License 2.0 | 6 votes |
public RemoteFunctionCall<List> multiFixed(List<List<BigInteger>> input) { final Function function = new Function(FUNC_MULTIFIXED, java.util.Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.StaticArray6<org.web3j.abi.datatypes.generated.StaticArray2>( org.web3j.abi.datatypes.generated.StaticArray2.class, 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 RemoteFunctionCall<List>(function, new Callable<List>() { @Override @SuppressWarnings("unchecked") public List call() throws Exception { List<Type> result = (List<Type>) executeCallSingleValueReturn(function, List.class); return convertToNative(result); } }); }
Example #6
Source File: Arrays.java From web3j with Apache License 2.0 | 6 votes |
public RemoteFunctionCall<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.datatypes.generated.StaticArray2>( org.web3j.abi.datatypes.generated.StaticArray2.class, 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 RemoteFunctionCall<List>(function, new Callable<List>() { @Override @SuppressWarnings("unchecked") public List call() throws Exception { List<Type> result = (List<Type>) executeCallSingleValueReturn(function, List.class); return convertToNative(result); } }); }
Example #7
Source File: DepositContract.java From teku with Apache License 2.0 | 6 votes |
public RemoteFunctionCall<TransactionReceipt> deposit( byte[] pubkey, byte[] withdrawal_credentials, byte[] signature, byte[] deposit_data_root, BigInteger weiValue) { final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_DEPOSIT, Arrays.<Type>asList( new org.web3j.abi.datatypes.DynamicBytes(pubkey), new org.web3j.abi.datatypes.DynamicBytes(withdrawal_credentials), new org.web3j.abi.datatypes.DynamicBytes(signature), new org.web3j.abi.datatypes.generated.Bytes32(deposit_data_root)), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function, weiValue); }
Example #8
Source File: OnChainPrivacyGroupManagementInterface.java From besu with Apache License 2.0 | 6 votes |
public RemoteFunctionCall<List> getParticipants(byte[] enclaveKey) { final Function function = new Function( FUNC_GETPARTICIPANTS, Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(enclaveKey)), Arrays.<TypeReference<?>>asList(new TypeReference<DynamicArray<Bytes32>>() {})); return new RemoteFunctionCall<List>( function, new Callable<List>() { @Override @SuppressWarnings("unchecked") public List call() throws Exception { List<Type> result = (List<Type>) executeCallSingleValueReturn(function, List.class); return convertToNative(result); } }); }
Example #9
Source File: SimpleAuction.java From web3j with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> bid(BigInteger weiValue) { final Function function = new Function( FUNC_BID, Arrays.<Type>asList(), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function, weiValue); }
Example #10
Source File: SimpleAuction.java From web3j with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> withdraw() { final Function function = new Function( FUNC_WITHDRAW, Arrays.<Type>asList(), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #11
Source File: SimpleAuction.java From web3j with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> auctionEnd() { final Function function = new Function( FUNC_AUCTIONEND, Arrays.<Type>asList(), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #12
Source File: ComplexStorage.java From web3j with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<Tuple2<Foo, Bar>> getFooBar() { final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(FUNC_GETFOOBAR, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Foo>() {}, new TypeReference<Bar>() {})); return new RemoteFunctionCall<Tuple2<Foo, Bar>>(function, new Callable<Tuple2<Foo, Bar>>() { @Override public Tuple2<Foo, Bar> call() throws Exception { List<Type> results = executeCallMultipleValueReturn(function); return new Tuple2<Foo, Bar>( (Foo) results.get(0), (Bar) results.get(1)); } }); }
Example #13
Source File: ComplexStorage.java From web3j with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> setWiz(Wiz _toSet) { final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_SETWIZ, Arrays.<Type>asList(_toSet), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #14
Source File: ComplexStorage.java From web3j with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> setNuu(Nuu _toSet) { final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_SETNUU, Arrays.<Type>asList(_toSet), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #15
Source File: ComplexStorage.java From web3j with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> setNaz(Naz _naz) { final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_SETNAZ, Arrays.<Type>asList(_naz), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #16
Source File: ComplexStorage.java From web3j with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> setBaz(Baz _toSet) { final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_SETBAZ, Arrays.<Type>asList(_toSet), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #17
Source File: ComplexStorage.java From web3j with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<Tuple2<Foo, BigInteger>> getFooUint() { final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(FUNC_GETFOOUINT, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Foo>() {}, new TypeReference<Uint256>() {})); return new RemoteFunctionCall<Tuple2<Foo, BigInteger>>(function, new Callable<Tuple2<Foo, BigInteger>>() { @Override public Tuple2<Foo, BigInteger> call() throws Exception { List<Type> results = executeCallMultipleValueReturn(function); return new Tuple2<Foo, BigInteger>( (Foo) results.get(0), (BigInteger) results.get(1).getValue()); } }); }
Example #18
Source File: ComplexStorage.java From web3j with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> setBar(Bar _toSet) { final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_SETBAR, Arrays.<Type>asList(_toSet), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #19
Source File: CrossContractReader.java From besu with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<BigInteger> read(final String emitter_address) { final Function function = new Function( FUNC_READ, Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(160, emitter_address)), Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {})); return executeRemoteCallSingleValueReturn(function, BigInteger.class); }
Example #20
Source File: ComplexStorage.java From web3j with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> setFuzz(Fuzz _toSet) { final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_SETFUZZ, Arrays.<Type>asList(_toSet), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #21
Source File: Arrays.java From web3j with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<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 RemoteFunctionCall<List>(function, new Callable<List>() { @Override @SuppressWarnings("unchecked") public List call() throws Exception { List<Type> result = (List<Type>) executeCallSingleValueReturn(function, List.class); return convertToNative(result); } }); }
Example #22
Source File: DepositContract.java From teku with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<byte[]> get_deposit_count() { final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_GET_DEPOSIT_COUNT, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<DynamicBytes>() {})); return executeRemoteCallSingleValueReturn(function, byte[].class); }
Example #23
Source File: DepositContract.java From teku with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<byte[]> get_deposit_root() { final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( FUNC_GET_DEPOSIT_ROOT, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {})); return executeRemoteCallSingleValueReturn(function, byte[].class); }
Example #24
Source File: EventEmitter.java From eventeum with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> emitEventAdditionalTypes(BigInteger uint16Value, BigInteger int64Value, byte[] byteValue) { final Function function = new Function( FUNC_EMITEVENTADDITIONALTYPES, Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint16(uint16Value), new org.web3j.abi.datatypes.generated.Int64(int64Value), new org.web3j.abi.datatypes.generated.Bytes1(byteValue)), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #25
Source File: EventEmitter.java From eventeum with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> emitEventNotOrdered(byte[] value1, BigInteger value2, String value3) { final Function function = new Function( FUNC_EMITEVENTNOTORDERED, Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(value1), new org.web3j.abi.datatypes.generated.Uint256(value2), new org.web3j.abi.datatypes.Utf8String(value3)), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #26
Source File: EventEmitter.java From eventeum with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> emitEventBytes16(byte[] bytes16Value) { final Function function = new Function( FUNC_EMITEVENTBYTES16, Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes16(bytes16Value)), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #27
Source File: EventEmitter.java From eventeum with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> emitEventArray(BigInteger value1, BigInteger value2, byte[] value3, byte[] value4) { final Function function = new Function( FUNC_EMITEVENTARRAY, Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(value1), new org.web3j.abi.datatypes.generated.Uint256(value2), new org.web3j.abi.datatypes.generated.Bytes32(value3), new org.web3j.abi.datatypes.generated.Bytes32(value4)), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #28
Source File: EventEmitter.java From eventeum with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> emitEvent(byte[] value1, BigInteger value2, String value3) { final Function function = new Function( FUNC_EMITEVENT, Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Bytes32(value1), new org.web3j.abi.datatypes.generated.Uint256(value2), new org.web3j.abi.datatypes.Utf8String(value3)), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #29
Source File: CrossContractReader.java From besu with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<TransactionReceipt> incrementRemote(final String crossAddress) { final Function function = new Function( FUNC_INCREMENTREMOTE, Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(160, crossAddress)), Collections.<TypeReference<?>>emptyList()); return executeRemoteCallTransaction(function); }
Example #30
Source File: SimpleStorage.java From ethsigner with Apache License 2.0 | 5 votes |
public RemoteFunctionCall<BigInteger> get() { final Function function = new Function( FUNC_GET, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {})); return executeRemoteCallSingleValueReturn(function, BigInteger.class); }