Search in sources :

Example 11 with Tuple1

use of org.fisco.bcos.web3j.tuples.generated.Tuple1 in project web3sdk by FISCO-BCOS.

the class Permission method getInsertOutput.

public Tuple1<BigInteger> getInsertOutput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getOutput();
    final Function function = new Function(FUNC_INSERT, 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());
}
Also used : Function(org.fisco.bcos.web3j.abi.datatypes.Function) Type(org.fisco.bcos.web3j.abi.datatypes.Type) EncryptType(org.fisco.bcos.web3j.crypto.EncryptType) Tuple1(org.fisco.bcos.web3j.tuples.generated.Tuple1) Utf8String(org.fisco.bcos.web3j.abi.datatypes.Utf8String) TypeReference(org.fisco.bcos.web3j.abi.TypeReference)

Example 12 with Tuple1

use of org.fisco.bcos.web3j.tuples.generated.Tuple1 in project web3sdk by FISCO-BCOS.

the class ContractLifeCyclePrecompiled method getFreezeInput.

public Tuple1<String> getFreezeInput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getInput().substring(10);
    final Function function = new Function(FUNC_FREEZE, 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());
}
Also used : Function(org.fisco.bcos.web3j.abi.datatypes.Function) Type(org.fisco.bcos.web3j.abi.datatypes.Type) Tuple1(org.fisco.bcos.web3j.tuples.generated.Tuple1) Utf8String(org.fisco.bcos.web3j.abi.datatypes.Utf8String) TypeReference(org.fisco.bcos.web3j.abi.TypeReference)

Example 13 with Tuple1

use of org.fisco.bcos.web3j.tuples.generated.Tuple1 in project web3sdk by FISCO-BCOS.

the class ContractLifeCyclePrecompiled method getFreezeOutput.

public Tuple1<BigInteger> getFreezeOutput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getOutput();
    final Function function = new Function(FUNC_FREEZE, 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());
}
Also used : Function(org.fisco.bcos.web3j.abi.datatypes.Function) Type(org.fisco.bcos.web3j.abi.datatypes.Type) Tuple1(org.fisco.bcos.web3j.tuples.generated.Tuple1) Utf8String(org.fisco.bcos.web3j.abi.datatypes.Utf8String) TypeReference(org.fisco.bcos.web3j.abi.TypeReference)

Example 14 with Tuple1

use of org.fisco.bcos.web3j.tuples.generated.Tuple1 in project web3sdk by FISCO-BCOS.

the class ContractLifeCyclePrecompiled method getGrantManagerOutput.

public Tuple1<BigInteger> getGrantManagerOutput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getOutput();
    final Function function = new Function(FUNC_GRANTMANAGER, 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());
}
Also used : Function(org.fisco.bcos.web3j.abi.datatypes.Function) Type(org.fisco.bcos.web3j.abi.datatypes.Type) Tuple1(org.fisco.bcos.web3j.tuples.generated.Tuple1) Utf8String(org.fisco.bcos.web3j.abi.datatypes.Utf8String) TypeReference(org.fisco.bcos.web3j.abi.TypeReference)

Example 15 with Tuple1

use of org.fisco.bcos.web3j.tuples.generated.Tuple1 in project web3sdk by FISCO-BCOS.

the class ContractLifeCyclePrecompiled method getUnfreezeOutput.

public Tuple1<BigInteger> getUnfreezeOutput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getOutput();
    final Function function = new Function(FUNC_UNFREEZE, 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());
}
Also used : Function(org.fisco.bcos.web3j.abi.datatypes.Function) Type(org.fisco.bcos.web3j.abi.datatypes.Type) Tuple1(org.fisco.bcos.web3j.tuples.generated.Tuple1) Utf8String(org.fisco.bcos.web3j.abi.datatypes.Utf8String) TypeReference(org.fisco.bcos.web3j.abi.TypeReference)

Aggregations

TypeReference (org.fisco.bcos.web3j.abi.TypeReference)26 Function (org.fisco.bcos.web3j.abi.datatypes.Function)26 Type (org.fisco.bcos.web3j.abi.datatypes.Type)26 Tuple1 (org.fisco.bcos.web3j.tuples.generated.Tuple1)26 Utf8String (org.fisco.bcos.web3j.abi.datatypes.Utf8String)25 EncryptType (org.fisco.bcos.web3j.crypto.EncryptType)6