Java Code Examples for org.fisco.bcos.web3j.abi.datatypes.Type

The following examples show how to use org.fisco.bcos.web3j.abi.datatypes.Type. These examples are extracted from open source projects. 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 Project: web3sdk   Source File: ChainGovernance.java    License: Apache License 2.0 6 votes vote down vote up
public RemoteCall<Tuple2<Boolean, BigInteger>> queryCommitteeMemberWeight(String user) {
    final Function function =
            new Function(
                    FUNC_QUERYCOMMITTEEMEMBERWEIGHT,
                    Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Address(user)),
                    Arrays.<TypeReference<?>>asList(
                            new TypeReference<Bool>() {}, new TypeReference<Int256>() {}));
    return new RemoteCall<Tuple2<Boolean, BigInteger>>(
            new Callable<Tuple2<Boolean, BigInteger>>() {
                @Override
                public Tuple2<Boolean, BigInteger> call() throws Exception {
                    List<Type> results = executeCallMultipleValueReturn(function);
                    return new Tuple2<Boolean, BigInteger>(
                            (Boolean) results.get(0).getValue(),
                            (BigInteger) results.get(1).getValue());
                }
            });
}
 
Example 2
Source Project: WeEvent   Source File: Topic.java    License: Apache License 2.0 6 votes vote down vote up
public void flushSnapshot(List<String> topicName, List<BigInteger> lastSequence, List<BigInteger> lastBlock,
                          List<BigInteger> lastTimestamp, List<String> lastSender, TransactionSucCallback callback) {
    final Function function = new Function(
            FUNC_FLUSHSNAPSHOT, 
            Arrays.<Type>asList(topicName.isEmpty()?org.fisco.bcos.web3j.abi.datatypes.DynamicArray.empty("string[]"):
                    new org.fisco.bcos.web3j.abi.datatypes.DynamicArray<org.fisco.bcos.web3j.abi.datatypes.Utf8String>(
                    org.fisco.bcos.web3j.abi.Utils.typeMap(topicName, org.fisco.bcos.web3j.abi.datatypes.Utf8String.class)), 
            lastSequence.isEmpty()?org.fisco.bcos.web3j.abi.datatypes.DynamicArray.empty("uint256[]"):
                new org.fisco.bcos.web3j.abi.datatypes.DynamicArray<org.fisco.bcos.web3j.abi.datatypes.generated.Uint256>(
                    org.fisco.bcos.web3j.abi.Utils.typeMap(lastSequence, org.fisco.bcos.web3j.abi.datatypes.generated.Uint256.class)), 
            lastBlock.isEmpty()?org.fisco.bcos.web3j.abi.datatypes.DynamicArray.empty("uint256[]"):
                new org.fisco.bcos.web3j.abi.datatypes.DynamicArray<org.fisco.bcos.web3j.abi.datatypes.generated.Uint256>(
                    org.fisco.bcos.web3j.abi.Utils.typeMap(lastBlock, org.fisco.bcos.web3j.abi.datatypes.generated.Uint256.class)), 
            lastTimestamp.isEmpty()?org.fisco.bcos.web3j.abi.datatypes.DynamicArray.empty("uint256[]"):
                new org.fisco.bcos.web3j.abi.datatypes.DynamicArray<org.fisco.bcos.web3j.abi.datatypes.generated.Uint256>(
                    org.fisco.bcos.web3j.abi.Utils.typeMap(lastTimestamp, org.fisco.bcos.web3j.abi.datatypes.generated.Uint256.class)), 
            lastSender.isEmpty()?org.fisco.bcos.web3j.abi.datatypes.DynamicArray.empty("address[]"):
                new org.fisco.bcos.web3j.abi.datatypes.DynamicArray<org.fisco.bcos.web3j.abi.datatypes.Address>(
                    org.fisco.bcos.web3j.abi.Utils.typeMap(lastSender, org.fisco.bcos.web3j.abi.datatypes.Address.class))), 
            Collections.<TypeReference<?>>emptyList());
    asyncExecuteTransaction(function, callback);
}
 
Example 3
@Deprecated
public static RemoteCall<TestRingSig> deploy(
        Web3j web3j,
        Credentials credentials,
        BigInteger gasPrice,
        BigInteger gasLimit,
        String _sig,
        String _message,
        String _param_info) {
    String encodedConstructor =
            FunctionEncoder.encodeConstructor(
                    Arrays.<Type>asList(
                            new Utf8String(_sig),
                            new Utf8String(_message),
                            new Utf8String(_param_info)));
    return deployRemoteCall(
            TestRingSig.class,
            web3j,
            credentials,
            gasPrice,
            gasLimit,
            BINARY,
            encodedConstructor);
}
 
Example 4
Source Project: WeBASE-Front   Source File: EvidenceSignersData.java    License: Apache License 2.0 6 votes vote down vote up
public Tuple6<String, String, String, BigInteger, byte[], byte[]> getNewEvidenceInput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getInput().substring(10);
    final Function function = new Function(FUNC_NEWEVIDENCE, 
            Arrays.<Type>asList(), 
            Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Uint8>() {}, new TypeReference<Bytes32>() {}, new TypeReference<Bytes32>() {}));
    List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());;
    return new Tuple6<String, String, String, BigInteger, byte[], byte[]>(

            (String) results.get(0).getValue(), 
            (String) results.get(1).getValue(), 
            (String) results.get(2).getValue(), 
            (BigInteger) results.get(3).getValue(), 
            (byte[]) results.get(4).getValue(), 
            (byte[]) results.get(5).getValue()
            );
}
 
Example 5
Source Project: web3sdk   Source File: Utils.java    License: Apache License 2.0 6 votes vote down vote up
public static <T, R extends Type<T>> List<R> typeMap(List<T> input, Class<R> destType)
        throws TypeMappingException {

    List<R> result = new ArrayList<R>(input.size());

    if (!input.isEmpty()) {
        try {
            Constructor<R> constructor =
                    destType.getDeclaredConstructor(input.get(0).getClass());
            for (T value : input) {
                result.add(constructor.newInstance(value));
            }
        } catch (NoSuchMethodException
                | IllegalAccessException
                | InvocationTargetException
                | InstantiationException e) {
            throw new TypeMappingException(e);
        }
    }
    return result;
}
 
Example 6
Source Project: web3sdk   Source File: MixContract.java    License: Apache License 2.0 6 votes vote down vote up
public RemoteCall<Tuple3<List<byte[]>, List<BigInteger>, List<byte[]>>> read(String name) {
    final Function function =
            new Function(
                    FUNC_READ,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(name)),
                    Arrays.<TypeReference<?>>asList(
                            new TypeReference<DynamicArray<Bytes32>>() {},
                            new TypeReference<DynamicArray<Int256>>() {},
                            new TypeReference<DynamicArray<Bytes32>>() {}));
    return new RemoteCall<Tuple3<List<byte[]>, List<BigInteger>, List<byte[]>>>(
            new Callable<Tuple3<List<byte[]>, List<BigInteger>, List<byte[]>>>() {
                @Override
                public Tuple3<List<byte[]>, List<BigInteger>, List<byte[]>> call()
                        throws Exception {
                    List<Type> results = executeCallMultipleValueReturn(function);
                    return new Tuple3<List<byte[]>, List<BigInteger>, List<byte[]>>(
                            convertToNative((List<Bytes32>) results.get(0).getValue()),
                            convertToNative((List<Int256>) results.get(1).getValue()),
                            convertToNative((List<Bytes32>) results.get(2).getValue()));
                }
            });
}
 
Example 7
Source Project: WeEvent   Source File: Topic.java    License: Apache License 2.0 6 votes vote down vote up
public Tuple5<List<String>, List<BigInteger>, List<BigInteger>, List<BigInteger>, List<String>> getFlushSnapshotInput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getInput().substring(10);
    final Function function = new Function(FUNC_FLUSHSNAPSHOT, 
            Arrays.<Type>asList(), 
            Arrays.<TypeReference<?>>asList(
                new TypeReference<DynamicArray<Utf8String>>() {},
                new TypeReference<DynamicArray<Uint256>>() {},
                new TypeReference<DynamicArray<Uint256>>() {},
                new TypeReference<DynamicArray<Uint256>>() {},
                new TypeReference<DynamicArray<Address>>() {}));
    List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());;
    return new Tuple5<List<String>, List<BigInteger>, List<BigInteger>, List<BigInteger>, List<String>>(

            convertToNative((List<Utf8String>) results.get(0).getValue()), 
            convertToNative((List<Uint256>) results.get(1).getValue()), 
            convertToNative((List<Uint256>) results.get(2).getValue()), 
            convertToNative((List<Uint256>) results.get(3).getValue()), 
            convertToNative((List<Address>) results.get(4).getValue())
            );
}
 
Example 8
Source Project: web3sdk   Source File: CRUD.java    License: Apache License 2.0 6 votes vote down vote up
public void update(
        String tableName,
        String key,
        String entry,
        String condition,
        String optional,
        TransactionSucCallback callback) {
    final Function function =
            new Function(
                    FUNC_UPDATE,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(tableName),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(key),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(entry),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(condition),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(optional)),
                    Collections.<TypeReference<?>>emptyList());
    asyncExecuteTransaction(function, callback);
}
 
Example 9
Source Project: web3sdk   Source File: TableTest.java    License: Apache License 2.0 6 votes vote down vote up
public RemoteCall<Tuple3<List<byte[]>, List<BigInteger>, List<byte[]>>> select(String name) {
    final Function function =
            new Function(
                    FUNC_SELECT,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(name)),
                    Arrays.<TypeReference<?>>asList(
                            new TypeReference<DynamicArray<Bytes32>>() {},
                            new TypeReference<DynamicArray<Int256>>() {},
                            new TypeReference<DynamicArray<Bytes32>>() {}));
    return new RemoteCall<Tuple3<List<byte[]>, List<BigInteger>, List<byte[]>>>(
            new Callable<Tuple3<List<byte[]>, List<BigInteger>, List<byte[]>>>() {
                @Override
                public Tuple3<List<byte[]>, List<BigInteger>, List<byte[]>> call()
                        throws Exception {
                    List<Type> results = executeCallMultipleValueReturn(function);
                    return new Tuple3<List<byte[]>, List<BigInteger>, List<byte[]>>(
                            convertToNative((List<Bytes32>) results.get(0).getValue()),
                            convertToNative((List<Int256>) results.get(1).getValue()),
                            convertToNative((List<Bytes32>) results.get(2).getValue()));
                }
            });
}
 
Example 10
Source Project: web3sdk   Source File: EvidenceVerify.java    License: Apache License 2.0 6 votes vote down vote up
public String insertEvidenceSeq(
        String evi,
        String info,
        String id,
        String signAddr,
        byte[] message,
        BigInteger v,
        byte[] r,
        byte[] s) {
    final Function function =
            new Function(
                    FUNC_INSERTEVIDENCE,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(evi),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(info),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(id),
                            new org.fisco.bcos.web3j.abi.datatypes.Address(signAddr),
                            new org.fisco.bcos.web3j.abi.datatypes.generated.Bytes32(message),
                            new org.fisco.bcos.web3j.abi.datatypes.generated.Uint8(v),
                            new org.fisco.bcos.web3j.abi.datatypes.generated.Bytes32(r),
                            new org.fisco.bcos.web3j.abi.datatypes.generated.Bytes32(s)),
                    Collections.<TypeReference<?>>emptyList());
    return createTransactionSeq(function);
}
 
Example 11
Source Project: WeEvent   Source File: TopicController.java    License: Apache License 2.0 6 votes vote down vote up
public RemoteCall<Tuple3<BigInteger, BigInteger, List<String>>> listTopicName(BigInteger pageIndex, BigInteger pageSize) {
    final Function function = new Function(FUNC_LISTTOPICNAME, 
            Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.generated.Uint256(pageIndex), 
            new org.fisco.bcos.web3j.abi.datatypes.generated.Uint256(pageSize)), 
            Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}, new TypeReference<Uint256>() {}, new TypeReference<DynamicArray<Utf8String>>() {}));
    return new RemoteCall<Tuple3<BigInteger, BigInteger, List<String>>>(
            new Callable<Tuple3<BigInteger, BigInteger, List<String>>>() {
                @Override
                public Tuple3<BigInteger, BigInteger, List<String>> call() throws Exception {
                    List<Type> results = executeCallMultipleValueReturn(function);
                    return new Tuple3<BigInteger, BigInteger, List<String>>(
                            (BigInteger) results.get(0).getValue(), 
                            (BigInteger) results.get(1).getValue(), 
                            convertToNative((List<Utf8String>) results.get(2).getValue()));
                }
            });
}
 
Example 12
Source Project: evidenceSample   Source File: EvidenceSignersData.java    License: Apache License 2.0 5 votes vote down vote up
public void newEvidence(String evi, String info, String id, BigInteger v, byte[] r, byte[] s, TransactionSucCallback callback) {
    final Function function = new Function(
            FUNC_NEWEVIDENCE, 
            Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Utf8String(evi), 
            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(info), 
            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(id), 
            new org.fisco.bcos.web3j.abi.datatypes.generated.Uint8(v), 
            new org.fisco.bcos.web3j.abi.datatypes.generated.Bytes32(r), 
            new org.fisco.bcos.web3j.abi.datatypes.generated.Bytes32(s)), 
            Collections.<TypeReference<?>>emptyList());
    asyncExecuteTransaction(function, callback);
}
 
Example 13
Source Project: WeBASE-Codegen-Monkey   Source File: HelloWorld.java    License: Apache License 2.0 5 votes vote down vote up
public void set(String n, TransactionSucCallback callback) {
    final Function function = new Function(
            FUNC_SET, 
            Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Utf8String(n)), 
            Collections.<TypeReference<?>>emptyList());
    asyncExecuteTransaction(function, callback);
}
 
Example 14
Source Project: WeBASE-Codegen-Monkey   Source File: HelloWorld.java    License: Apache License 2.0 5 votes vote down vote up
public String setSeq(String n) {
    final Function function = new Function(
            FUNC_SET, 
            Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Utf8String(n)), 
            Collections.<TypeReference<?>>emptyList());
    return createTransactionSeq(function);
}
 
Example 15
Source Project: web3sdk   Source File: ContractLifeCyclePrecompiled.java    License: Apache License 2.0 5 votes vote down vote up
public RemoteCall<TransactionReceipt> grantManager(String contractAddr, String userAddr) {
    final Function function =
            new Function(
                    FUNC_GRANTMANAGER,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.Address(contractAddr),
                            new org.fisco.bcos.web3j.abi.datatypes.Address(userAddr)),
                    Collections.<TypeReference<?>>emptyList());
    return executeRemoteCallTransaction(function);
}
 
Example 16
Source Project: web3sdk   Source File: Permission.java    License: Apache License 2.0 5 votes vote down vote up
public Tuple1<BigInteger> getGrantWriteOutput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getOutput();
    final Function function =
            new Function(
                    FUNC_GRANTWRITE,
                    Arrays.<Type>asList(),
                    Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {}));
    List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
    ;
    return new Tuple1<BigInteger>((BigInteger) results.get(0).getValue());
}
 
Example 17
Source Project: web3sdk   Source File: TableTest.java    License: Apache License 2.0 5 votes vote down vote up
public void update(
        String name, BigInteger item_id, String item_name, TransactionSucCallback callback) {
    final Function function =
            new Function(
                    FUNC_UPDATE,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(name),
                            new org.fisco.bcos.web3j.abi.datatypes.generated.Int256(item_id),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(item_name)),
                    Collections.<TypeReference<?>>emptyList());
    asyncExecuteTransaction(function, callback);
}
 
Example 18
Source Project: web3sdk   Source File: Permission.java    License: Apache License 2.0 5 votes vote down vote up
public void insert(String table_name, String addr, TransactionSucCallback callback) {
    final Function function =
            new Function(
                    FUNC_INSERT,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(table_name),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(addr)),
                    Collections.<TypeReference<?>>emptyList());
    asyncExecuteTransaction(function, callback);
}
 
Example 19
Source Project: WeBASE-Front   Source File: AbiUtil.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * ethCall Result Parse.
 * 
 * @param funOutputTypes list
 * @param typeList list
 * @return
 */
public static Object callResultParse(List<String> funOutputTypes, List<Type> typeList)
    throws FrontException {
    if (funOutputTypes.size() == typeList.size()) {
        List<Object> result = new ArrayList<>();
        for (int i = 0; i < funOutputTypes.size(); i++) {
            Class<? extends Type> outputType = null;
            Object value = null;
            if (funOutputTypes.get(i).contains("[")
                    && funOutputTypes.get(i).contains("]")) {
                List<Object> values = new ArrayList<>();
                List<Type> results = (List<Type>) typeList.get(i).getValue();
                for (int j = 0; j < results.size(); j++) {
                    outputType = AbiTypes.getType(funOutputTypes.get(i).substring(0,
                            funOutputTypes.get(i).indexOf("[")));
                    value = ContractTypeUtil.decodeResult(results.get(j), outputType);
                    values.add(value);
                }
                result.add(values);
            } else {
                outputType = AbiTypes.getType(funOutputTypes.get(i));
                value = ContractTypeUtil.decodeResult(typeList.get(i), outputType);
                result.add(value);
            }
        }
        return JsonUtils.toJavaObject(JsonUtils.toJSONString(result), Object.class);
    }
    throw new FrontException("output parameter not match");
}
 
Example 20
Source Project: web3sdk   Source File: ChainGovernance.java    License: Apache License 2.0 5 votes vote down vote up
public RemoteCall<TransactionReceipt> updateThreshold(BigInteger threshold) {
    final Function function =
            new Function(
                    FUNC_UPDATETHRESHOLD,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.generated.Int256(threshold)),
                    Collections.<TypeReference<?>>emptyList());
    return executeRemoteCallTransaction(function);
}
 
Example 21
Source Project: web3sdk   Source File: TableTest.java    License: Apache License 2.0 5 votes vote down vote up
public RemoteCall<TransactionReceipt> create() {
    final Function function =
            new Function(
                    FUNC_CREATE,
                    Arrays.<Type>asList(),
                    Collections.<TypeReference<?>>emptyList());
    return executeRemoteCallTransaction(function);
}
 
Example 22
Source Project: web3sdk   Source File: Permission.java    License: Apache License 2.0 5 votes vote down vote up
public String grantWriteSeq(String contractAddr, String user) {
    final Function function =
            new Function(
                    FUNC_GRANTWRITE,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.Address(contractAddr),
                            new org.fisco.bcos.web3j.abi.datatypes.Address(user)),
                    Collections.<TypeReference<?>>emptyList());
    return createTransactionSeq(function);
}
 
Example 23
public RemoteCall<TransactionReceipt> verify_group_sig() {
    final Function function =
            new Function(
                    FUNC_VERIFY_GROUP_SIG,
                    Arrays.<Type>asList(),
                    Collections.<TypeReference<?>>emptyList());
    return executeRemoteCallTransaction(function);
}
 
Example 24
Source Project: web3sdk   Source File: SystemConfig.java    License: Apache License 2.0 5 votes vote down vote up
public RemoteCall<TransactionReceipt> setValueByKey(String key, String value) {
    final Function function =
            new Function(
                    FUNC_SETVALUEBYKEY,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(key),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(value)),
                    Collections.<TypeReference<?>>emptyList());
    return executeRemoteCallTransaction(function);
}
 
Example 25
Source Project: web3sdk   Source File: ContractLifeCyclePrecompiled.java    License: Apache License 2.0 5 votes vote down vote up
public Tuple1<String> getUnfreezeInput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getInput().substring(10);
    final Function function =
            new Function(
                    FUNC_UNFREEZE,
                    Arrays.<Type>asList(),
                    Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}));
    List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
    ;
    return new Tuple1<String>((String) results.get(0).getValue());
}
 
Example 26
public RemoteCall<String> get_group_sig() {
    final Function function =
            new Function(
                    FUNC_GET_GROUP_SIG,
                    Arrays.<Type>asList(),
                    Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}));
    return executeRemoteCallSingleValueReturn(function, String.class);
}
 
Example 27
Source Project: web3sdk   Source File: Permission.java    License: Apache License 2.0 5 votes vote down vote up
public Tuple1<BigInteger> getRevokeWriteOutput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getOutput();
    final Function function =
            new Function(
                    FUNC_REVOKEWRITE,
                    Arrays.<Type>asList(),
                    Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {}));
    List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
    ;
    return new Tuple1<BigInteger>((BigInteger) results.get(0).getValue());
}
 
Example 28
Source Project: WeEvent   Source File: Topic.java    License: Apache License 2.0 5 votes vote down vote up
public Tuple1<Boolean> getAddTopicACLOutput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getOutput();
    final Function function = new Function(FUNC_ADDTOPICACL, 
            Arrays.<Type>asList(), 
            Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
    List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());;
    return new Tuple1<Boolean>(

            (Boolean) results.get(0).getValue()
            );
}
 
Example 29
Source Project: web3sdk   Source File: ParallelOk.java    License: Apache License 2.0 5 votes vote down vote up
public String enableParallelSeq() {
    final Function function =
            new Function(
                    FUNC_ENABLEPARALLEL,
                    Arrays.<Type>asList(),
                    Collections.<TypeReference<?>>emptyList());
    return createTransactionSeq(function);
}
 
Example 30
Source Project: web3sdk   Source File: ChainGovernance.java    License: Apache License 2.0 5 votes vote down vote up
public void updateCommitteeMemberWeight(
        String user, BigInteger weight, TransactionSucCallback callback) {
    final Function function =
            new Function(
                    FUNC_UPDATECOMMITTEEMEMBERWEIGHT,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.Address(user),
                            new org.fisco.bcos.web3j.abi.datatypes.generated.Int256(weight)),
                    Collections.<TypeReference<?>>emptyList());
    asyncExecuteTransaction(function, callback);
}