org.fisco.bcos.web3j.abi.datatypes.Bool Java Examples

The following examples show how to use org.fisco.bcos.web3j.abi.datatypes.Bool. 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: TypeDecoder.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
static <T extends Type> T decode(String input, int offset, Class<T> type) {
    if (NumericType.class.isAssignableFrom(type)) {
        return (T) decodeNumeric(input.substring(offset), (Class<NumericType>) type);
    } else if (Address.class.isAssignableFrom(type)) {
        return (T) decodeAddress(input.substring(offset));
    } else if (Bool.class.isAssignableFrom(type)) {
        return (T) decodeBool(input, offset);
    } else if (Bytes.class.isAssignableFrom(type)) {
        return (T) decodeBytes(input, offset, (Class<Bytes>) type);
    } else if (DynamicBytes.class.isAssignableFrom(type)) {
        return (T) decodeDynamicBytes(input, offset);
    } else if (Utf8String.class.isAssignableFrom(type)) {
        return (T) decodeUtf8String(input, offset);
    } else if (Array.class.isAssignableFrom(type)) {
        throw new UnsupportedOperationException(
                "Array types must be wrapped in a TypeReference");
    } else {
        throw new UnsupportedOperationException("Type cannot be encoded: " + type.getClass());
    }
}
 
Example #2
Source File: AbiTypesMapperGenerator.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
private MethodSpec.Builder addTypes(MethodSpec.Builder builder, String packageName) {
    builder =
            addStatement(
                    builder, packageName, Address.TYPE_NAME, Address.class.getSimpleName());

    builder = addStatement(builder, packageName, Bool.TYPE_NAME, Bool.class.getSimpleName());

    builder =
            addStatement(
                    builder,
                    packageName,
                    Utf8String.TYPE_NAME,
                    Utf8String.class.getSimpleName());

    builder =
            addStatement(
                    builder,
                    packageName,
                    DynamicBytes.TYPE_NAME,
                    DynamicBytes.class.getSimpleName());

    // TODO: Fixed array & dynamic array support
    return builder;
}
 
Example #3
Source File: ChainGovernance.java    From web3sdk with 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 #4
Source File: ResultEntityTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
@Test
public void typeToObjectTest0() {

    assertThat(ResultEntity.typeToObject(new Uint256(2)), is(new BigInteger("2")));
    assertThat(ResultEntity.typeToObject(new Int256(-1)), is(new BigInteger("-1")));
    assertThat(ResultEntity.typeToObject(new Utf8String("adsfjkl")), is("adsfjkl"));
    assertThat(ResultEntity.typeToObject(new Bool(true)), is(true));
    assertThat(ResultEntity.typeToObject(new DynamicBytes("0x111".getBytes())), is("0x111"));
    assertThat(
            ResultEntity.typeToObject(new Address("0x111")),
            is("0x0000000000000000000000000000000000000111"));
    assertThat(
            ResultEntity.typeToObject(
                    new Bytes32("01234567890123456789012345678912".getBytes())),
            is("01234567890123456789012345678912"));
}
 
Example #5
Source File: EventEncoderTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
@Test
public void testEventbuildMethodSignature2() {
    Event event =
            new Event(
                    "f",
                    Arrays.<TypeReference<?>>asList(
                            new TypeReference<DynamicBytes>() {},
                            new TypeReference<Bool>() {},
                            new TypeReference<DynamicArray<Uint256>>() {}));

    assertThat(
            EventEncoder.buildMethodSignature(event.getName(), event.getParameters()),
            is("f(bytes,bool,uint256[])"));

    assertThat(
            EventEncoder.encode(event),
            is("0xa83b3f0112fa8ecc02937d734929bbaa30731fe27b20195418852fb64ac2837d"));

    assertThat(
            EventEncoder.buildEventSignature("f(bytes,bool,uint256[])"),
            is("0xa83b3f0112fa8ecc02937d734929bbaa30731fe27b20195418852fb64ac2837d"));
}
 
Example #6
Source File: EventEncoderTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
@Test
public void testEventbuildMethodSignature4() {
    Event event =
            new Event(
                    "test4",
                    Arrays.<TypeReference<?>>asList(
                            new TypeReference<Uint32>() {}, new TypeReference<Bool>() {}));

    assertThat(
            EventEncoder.buildMethodSignature(event.getName(), event.getParameters()),
            is("test4(uint32,bool)"));

    assertThat(
            EventEncoder.encode(event),
            is("0xd7ee7b8ce8fd8944f6c4fc1d3d8f656f855a5b9c130a876af272bdb06b056f9c"));

    assertThat(
            EventEncoder.buildEventSignature("test4(uint32,bool)"),
            is("0xd7ee7b8ce8fd8944f6c4fc1d3d8f656f855a5b9c130a876af272bdb06b056f9c"));
}
 
Example #7
Source File: EventEncoderTest.java    From web3sdk with Apache License 2.0 6 votes vote down vote up
@Test
public void testEventbuildMethodSignature9() {
    Event event =
            new Event(
                    "test9",
                    Arrays.<TypeReference<?>>asList(
                            new TypeReference<Utf8String>() {},
                            new TypeReference<Uint256>() {},
                            new TypeReference<StaticArray6<Uint256>>() {},
                            new TypeReference<DynamicArray<Uint256>>() {},
                            new TypeReference<Bool>() {},
                            new TypeReference<Address>() {}));

    assertThat(
            EventEncoder.buildMethodSignature(event.getName(), event.getParameters()),
            is("test9(string,uint256,uint256[6],uint256[],bool,address)"));

    assertThat(
            EventEncoder.encode(event),
            is("0xa37d8a63087cf5837e0b9ff13d07d756479f8afdfe4b05ea3dfdc98154ef58ed"));

    assertThat(
            EventEncoder.buildEventSignature(
                    "test9(string,uint256,uint256[6],uint256[],bool,address)"),
            is("0xa37d8a63087cf5837e0b9ff13d07d756479f8afdfe4b05ea3dfdc98154ef58ed"));
}
 
Example #8
Source File: Evidence.java    From WeBASE-Front with Apache License 2.0 5 votes vote down vote up
public Tuple1<Boolean> getAddSignaturesOutput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getOutput();
    final Function function = new Function(FUNC_ADDSIGNATURES, 
            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 #9
Source File: SolidityFunctionWrapper.java    From web3sdk with Apache License 2.0 5 votes vote down vote up
static TypeName getNativeType(TypeName typeName) {

        if (typeName instanceof ParameterizedTypeName) {
            return getNativeType((ParameterizedTypeName) typeName);
        }

        String simpleName = ((ClassName) typeName).simpleName();

        if (simpleName.startsWith(Address.class.getSimpleName())) {
            return TypeName.get(String.class);
        } else if (simpleName.startsWith("Uint")) {
            return TypeName.get(BigInteger.class);
        } else if (simpleName.startsWith("Int")) {
            return TypeName.get(BigInteger.class);
        } else if (simpleName.startsWith(Utf8String.class.getSimpleName())) {
            return TypeName.get(String.class);
        } else if (simpleName.startsWith("Bytes")) {
            return TypeName.get(byte[].class);
        } else if (simpleName.startsWith(DynamicBytes.class.getSimpleName())) {
            return TypeName.get(byte[].class);
        } else if (simpleName.startsWith(Bool.class.getSimpleName())) {
            return TypeName.get(Boolean.class); // boolean cannot be a parameterized type
        } else {
            throw new UnsupportedOperationException(
                    "Unsupported type: " + typeName + ", no native type mapping exists.");
        }
    }
 
Example #10
Source File: ContractTypeUtilTest.java    From web3sdk with Apache License 2.0 5 votes vote down vote up
@Test
public void getTypeTest() throws BaseException {
    assertThat(ContractTypeUtil.getType("bytes").getName(), is(DynamicBytes.class.getName()));
    assertThat(ContractTypeUtil.getType("address").getName(), is(Address.class.getName()));
    assertThat(ContractTypeUtil.getType("string").getName(), is(Utf8String.class.getName()));
    assertThat(ContractTypeUtil.getType("int").getName(), is(Int256.class.getName()));
    assertThat(ContractTypeUtil.getType("uint").getName(), is(Uint256.class.getName()));
    assertThat(ContractTypeUtil.getType("int256").getName(), is(Int256.class.getName()));
    assertThat(ContractTypeUtil.getType("uint256").getName(), is(Uint256.class.getName()));
    assertThat(ContractTypeUtil.getType("int8").getName(), is(Int8.class.getName()));
    assertThat(ContractTypeUtil.getType("uint8").getName(), is(Uint8.class.getName()));
    assertThat(ContractTypeUtil.getType("bool").getName(), is(Bool.class.getName()));
    assertThat(ContractTypeUtil.getType("bytes1").getName(), is(Bytes1.class.getName()));
    assertThat(ContractTypeUtil.getType("bytes32").getName(), is(Bytes32.class.getName()));
}
 
Example #11
Source File: ResultEntity.java    From web3sdk with Apache License 2.0 5 votes vote down vote up
public static Object typeToObject(Type type) {
    Object obj = null;
    if (type instanceof NumericType) { // uint int
        obj = ((NumericType) type).getValue();
    } else if (type instanceof Bool) { // bool
        obj = ((Bool) type).getValue();
    } else if (type instanceof Address) { // address
        obj = type.toString();
    } else if (type instanceof Bytes) { // bytes32
        obj = new String(((Bytes) type).getValue()).trim();
    } else if (type instanceof DynamicBytes) { // bytes
        obj = new String(((DynamicBytes) type).getValue()).trim();
    } else if (type instanceof Utf8String) { // string
        obj = ((Utf8String) type).getValue();
    } else if (type instanceof Array) { // T[] T[k]
        List<Object> r = new ArrayList<Object>();
        List l = ((Array) type).getValue();
        for (int i = 0; i < l.size(); ++i) {
            r.add(typeToObject((Type) l.get(i)));
        }

        obj = (Object) r;
    } else {
        obj = (Object) obj;
    }

    return obj;
}
 
Example #12
Source File: TestGroupSig.java    From group-signature-client with GNU General Public License v3.0 5 votes vote down vote up
public RemoteCall<Boolean> get_group_verify_result() {
    final Function function =
            new Function(
                    FUNC_GET_GROUP_VERIFY_RESULT,
                    Arrays.<Type>asList(),
                    Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
    return executeRemoteCallSingleValueReturn(function, Boolean.class);
}
 
Example #13
Source File: RingSigPrecompiled.java    From group-signature-client with GNU General Public License v3.0 5 votes vote down vote up
public RemoteCall<Boolean> ringSigVerify(String signature, String message, String paramInfo) {
    final Function function =
            new Function(
                    FUNC_RINGSIGVERIFY,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(signature),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(message),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(paramInfo)),
                    Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
    return executeRemoteCallSingleValueReturn(function, Boolean.class);
}
 
Example #14
Source File: TestGroupSig.java    From group-signature-client with GNU General Public License v3.0 5 votes vote down vote up
public Tuple1<Boolean> getVerify_group_sigOutput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getOutput();
    final Function function =
            new Function(
                    FUNC_VERIFY_GROUP_SIG,
                    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 #15
Source File: TestRingSig.java    From group-signature-client with GNU General Public License v3.0 5 votes vote down vote up
public Tuple1<Boolean> getVerify_ring_sigOutput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getOutput();
    final Function function =
            new Function(
                    FUNC_VERIFY_RING_SIG,
                    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 #16
Source File: TestRingSig.java    From group-signature-client with GNU General Public License v3.0 5 votes vote down vote up
public RemoteCall<Boolean> get_ring_verify_result() {
    final Function function =
            new Function(
                    FUNC_GET_RING_VERIFY_RESULT,
                    Arrays.<Type>asList(),
                    Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
    return executeRemoteCallSingleValueReturn(function, Boolean.class);
}
 
Example #17
Source File: TopicController.java    From WeEvent with Apache License 2.0 5 votes vote down vote up
public RemoteCall<Tuple8<Boolean, String, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, String>> getTopicInfo(String topicName) {
    final Function function = new Function(FUNC_GETTOPICINFO, 
            Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Utf8String(topicName)), 
            Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {},
                new TypeReference<Address>() {},
                new TypeReference<Uint256>() {},
                new TypeReference<Uint256>() {},
                new TypeReference<Uint256>() {},
                new TypeReference<Uint256>() {},
                new TypeReference<Uint256>() {},
                new TypeReference<Address>() {}));
    return new RemoteCall<Tuple8<Boolean, String, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, String>>(
            new Callable<Tuple8<Boolean, String, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, String>>() {
                @Override
                public Tuple8<Boolean, String, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, String> call() throws Exception {
                    List<Type> results = executeCallMultipleValueReturn(function);
                    return new Tuple8<Boolean, String, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, String>(
                            (Boolean) results.get(0).getValue(), 
                            (String) results.get(1).getValue(), 
                            (BigInteger) results.get(2).getValue(), 
                            (BigInteger) results.get(3).getValue(), 
                            (BigInteger) results.get(4).getValue(), 
                            (BigInteger) results.get(5).getValue(), 
                            (BigInteger) results.get(6).getValue(), 
                            (String) results.get(7).getValue());
                }
            });
}
 
Example #18
Source File: TopicController.java    From WeEvent with Apache License 2.0 5 votes vote down vote up
public Tuple1<Boolean> getAddTopicInfoOutput(TransactionReceipt transactionReceipt) {
    String data = transactionReceipt.getOutput();
    final Function function = new Function(FUNC_ADDTOPICINFO, 
            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 #19
Source File: Topic.java    From WeEvent with 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 #20
Source File: GroupSigPrecompiled.java    From group-signature-client with GNU General Public License v3.0 5 votes vote down vote up
public RemoteCall<Boolean> groupSigVerify(
        String signature, String message, String gpkInfo, String paramInfo) {
    final Function function =
            new Function(
                    FUNC_GROUPSIGVERIFY,
                    Arrays.<Type>asList(
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(signature),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(message),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(gpkInfo),
                            new org.fisco.bcos.web3j.abi.datatypes.Utf8String(paramInfo)),
                    Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
    return executeRemoteCallSingleValueReturn(function, Boolean.class);
}
 
Example #21
Source File: EvidenceSignersData.java    From evidenceSample with Apache License 2.0 4 votes vote down vote up
public RemoteCall<Boolean> verify(String addr) {
    final Function function = new Function(FUNC_VERIFY, 
            Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Address(addr)), 
            Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
    return executeRemoteCallSingleValueReturn(function, Boolean.class);
}
 
Example #22
Source File: StaticArrayReference.java    From web3sdk with Apache License 2.0 4 votes vote down vote up
private static TypeReference<?> create26(String type, boolean indexed) throws BaseException {

        if (ContractTypeUtil.invalidInt(type)) {
            return new TypeReference<StaticArray26<Int256>>(indexed) {};
        } else if (ContractTypeUtil.invalidUint(type)) {
            return new TypeReference<StaticArray26<Uint256>>(indexed) {};
        }

        switch (type) {
            case "address":
                return new TypeReference<StaticArray26<Address>>(indexed) {};
            case "bool":
                return new TypeReference<StaticArray26<Bool>>(indexed) {};
            case "string":
                return new TypeReference<StaticArray26<Utf8String>>(indexed) {};
            case "bytes":
                return new TypeReference<StaticArray26<DynamicBytes>>(indexed) {};
            case "bytes1":
                return new TypeReference<StaticArray26<Bytes1>>(indexed) {};
            case "bytes2":
                return new TypeReference<StaticArray26<Bytes2>>(indexed) {};
            case "bytes3":
                return new TypeReference<StaticArray26<Bytes3>>(indexed) {};
            case "bytes4":
                return new TypeReference<StaticArray26<Bytes4>>(indexed) {};
            case "bytes5":
                return new TypeReference<StaticArray26<Bytes5>>(indexed) {};
            case "bytes6":
                return new TypeReference<StaticArray26<Bytes6>>(indexed) {};
            case "bytes7":
                return new TypeReference<StaticArray26<Bytes7>>(indexed) {};
            case "bytes8":
                return new TypeReference<StaticArray26<Bytes8>>(indexed) {};
            case "bytes9":
                return new TypeReference<StaticArray26<Bytes9>>(indexed) {};
            case "bytes10":
                return new TypeReference<StaticArray26<Bytes10>>(indexed) {};
            case "bytes11":
                return new TypeReference<StaticArray26<Bytes11>>(indexed) {};
            case "bytes12":
                return new TypeReference<StaticArray26<Bytes12>>(indexed) {};
            case "bytes13":
                return new TypeReference<StaticArray26<Bytes13>>(indexed) {};
            case "bytes14":
                return new TypeReference<StaticArray26<Bytes14>>(indexed) {};
            case "bytes15":
                return new TypeReference<StaticArray26<Bytes15>>(indexed) {};
            case "bytes16":
                return new TypeReference<StaticArray26<Bytes16>>(indexed) {};
            case "bytes17":
                return new TypeReference<StaticArray26<Bytes17>>(indexed) {};
            case "bytes18":
                return new TypeReference<StaticArray26<Bytes18>>(indexed) {};
            case "bytes19":
                return new TypeReference<StaticArray26<Bytes19>>(indexed) {};
            case "bytes20":
                return new TypeReference<StaticArray26<Bytes20>>(indexed) {};
            case "bytes21":
                return new TypeReference<StaticArray26<Bytes21>>(indexed) {};
            case "bytes22":
                return new TypeReference<StaticArray26<Bytes22>>(indexed) {};
            case "bytes23":
                return new TypeReference<StaticArray26<Bytes23>>(indexed) {};
            case "bytes24":
                return new TypeReference<StaticArray26<Bytes24>>(indexed) {};
            case "bytes25":
                return new TypeReference<StaticArray26<Bytes25>>(indexed) {};
            case "bytes26":
                return new TypeReference<StaticArray26<Bytes26>>(indexed) {};
            case "bytes27":
                return new TypeReference<StaticArray26<Bytes27>>(indexed) {};
            case "bytes28":
                return new TypeReference<StaticArray26<Bytes28>>(indexed) {};
            case "bytes29":
                return new TypeReference<StaticArray26<Bytes29>>(indexed) {};
            case "bytes30":
                return new TypeReference<StaticArray26<Bytes30>>(indexed) {};
            case "bytes31":
                return new TypeReference<StaticArray26<Bytes31>>(indexed) {};
            case "bytes32":
                return new TypeReference<StaticArray26<Bytes32>>(indexed) {};
            default:
                throw new BaseException(
                        201201, String.format(" %s[26] unsupported encoding array type ", type));
        }
    }
 
Example #23
Source File: Evidence.java    From evidenceSample with Apache License 2.0 4 votes vote down vote up
public RemoteCall<Boolean> CallVerify(String addr) {
    final Function function = new Function(FUNC_CALLVERIFY, 
            Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Address(addr)), 
            Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
    return executeRemoteCallSingleValueReturn(function, Boolean.class);
}
 
Example #24
Source File: StaticArrayReference.java    From web3sdk with Apache License 2.0 4 votes vote down vote up
private static TypeReference<?> create128(String type, boolean indexed) throws BaseException {

        if (ContractTypeUtil.invalidInt(type)) {
            return new TypeReference<StaticArray128<Int256>>(indexed) {};
        } else if (ContractTypeUtil.invalidUint(type)) {
            return new TypeReference<StaticArray128<Uint256>>(indexed) {};
        }

        switch (type) {
            case "address":
                return new TypeReference<StaticArray128<Address>>(indexed) {};
            case "bool":
                return new TypeReference<StaticArray128<Bool>>(indexed) {};
            case "string":
                return new TypeReference<StaticArray128<Utf8String>>(indexed) {};
            case "bytes":
                return new TypeReference<StaticArray128<DynamicBytes>>(indexed) {};
            case "bytes1":
                return new TypeReference<StaticArray128<Bytes1>>(indexed) {};
            case "bytes2":
                return new TypeReference<StaticArray128<Bytes2>>(indexed) {};
            case "bytes3":
                return new TypeReference<StaticArray128<Bytes3>>(indexed) {};
            case "bytes4":
                return new TypeReference<StaticArray128<Bytes4>>(indexed) {};
            case "bytes5":
                return new TypeReference<StaticArray128<Bytes5>>(indexed) {};
            case "bytes6":
                return new TypeReference<StaticArray128<Bytes6>>(indexed) {};
            case "bytes7":
                return new TypeReference<StaticArray128<Bytes7>>(indexed) {};
            case "bytes8":
                return new TypeReference<StaticArray128<Bytes8>>(indexed) {};
            case "bytes9":
                return new TypeReference<StaticArray128<Bytes9>>(indexed) {};
            case "bytes10":
                return new TypeReference<StaticArray128<Bytes10>>(indexed) {};
            case "bytes11":
                return new TypeReference<StaticArray128<Bytes11>>(indexed) {};
            case "bytes12":
                return new TypeReference<StaticArray128<Bytes12>>(indexed) {};
            case "bytes13":
                return new TypeReference<StaticArray128<Bytes13>>(indexed) {};
            case "bytes14":
                return new TypeReference<StaticArray128<Bytes14>>(indexed) {};
            case "bytes15":
                return new TypeReference<StaticArray128<Bytes15>>(indexed) {};
            case "bytes16":
                return new TypeReference<StaticArray128<Bytes16>>(indexed) {};
            case "bytes17":
                return new TypeReference<StaticArray128<Bytes17>>(indexed) {};
            case "bytes18":
                return new TypeReference<StaticArray128<Bytes18>>(indexed) {};
            case "bytes19":
                return new TypeReference<StaticArray128<Bytes19>>(indexed) {};
            case "bytes20":
                return new TypeReference<StaticArray128<Bytes20>>(indexed) {};
            case "bytes21":
                return new TypeReference<StaticArray128<Bytes21>>(indexed) {};
            case "bytes22":
                return new TypeReference<StaticArray128<Bytes22>>(indexed) {};
            case "bytes23":
                return new TypeReference<StaticArray128<Bytes23>>(indexed) {};
            case "bytes24":
                return new TypeReference<StaticArray128<Bytes24>>(indexed) {};
            case "bytes25":
                return new TypeReference<StaticArray128<Bytes25>>(indexed) {};
            case "bytes26":
                return new TypeReference<StaticArray128<Bytes26>>(indexed) {};
            case "bytes27":
                return new TypeReference<StaticArray128<Bytes27>>(indexed) {};
            case "bytes28":
                return new TypeReference<StaticArray128<Bytes28>>(indexed) {};
            case "bytes29":
                return new TypeReference<StaticArray128<Bytes29>>(indexed) {};
            case "bytes30":
                return new TypeReference<StaticArray128<Bytes30>>(indexed) {};
            case "bytes31":
                return new TypeReference<StaticArray128<Bytes31>>(indexed) {};
            case "bytes32":
                return new TypeReference<StaticArray128<Bytes32>>(indexed) {};
            default:
                throw new BaseException(
                        201201, String.format(" %s[128] unsupported encoding array type ", type));
        }
    }
 
Example #25
Source File: StaticArrayReference.java    From web3sdk with Apache License 2.0 4 votes vote down vote up
private static TypeReference<?> create32(String type, boolean indexed) throws BaseException {

        if (ContractTypeUtil.invalidInt(type)) {
            return new TypeReference<StaticArray32<Int256>>(indexed) {};
        } else if (ContractTypeUtil.invalidUint(type)) {
            return new TypeReference<StaticArray32<Uint256>>(indexed) {};
        }

        switch (type) {
            case "address":
                return new TypeReference<StaticArray32<Address>>(indexed) {};
            case "bool":
                return new TypeReference<StaticArray32<Bool>>(indexed) {};
            case "string":
                return new TypeReference<StaticArray32<Utf8String>>(indexed) {};
            case "bytes":
                return new TypeReference<StaticArray32<DynamicBytes>>(indexed) {};
            case "bytes1":
                return new TypeReference<StaticArray32<Bytes1>>(indexed) {};
            case "bytes2":
                return new TypeReference<StaticArray32<Bytes2>>(indexed) {};
            case "bytes3":
                return new TypeReference<StaticArray32<Bytes3>>(indexed) {};
            case "bytes4":
                return new TypeReference<StaticArray32<Bytes4>>(indexed) {};
            case "bytes5":
                return new TypeReference<StaticArray32<Bytes5>>(indexed) {};
            case "bytes6":
                return new TypeReference<StaticArray32<Bytes6>>(indexed) {};
            case "bytes7":
                return new TypeReference<StaticArray32<Bytes7>>(indexed) {};
            case "bytes8":
                return new TypeReference<StaticArray32<Bytes8>>(indexed) {};
            case "bytes9":
                return new TypeReference<StaticArray32<Bytes9>>(indexed) {};
            case "bytes10":
                return new TypeReference<StaticArray32<Bytes10>>(indexed) {};
            case "bytes11":
                return new TypeReference<StaticArray32<Bytes11>>(indexed) {};
            case "bytes12":
                return new TypeReference<StaticArray32<Bytes12>>(indexed) {};
            case "bytes13":
                return new TypeReference<StaticArray32<Bytes13>>(indexed) {};
            case "bytes14":
                return new TypeReference<StaticArray32<Bytes14>>(indexed) {};
            case "bytes15":
                return new TypeReference<StaticArray32<Bytes15>>(indexed) {};
            case "bytes16":
                return new TypeReference<StaticArray32<Bytes16>>(indexed) {};
            case "bytes17":
                return new TypeReference<StaticArray32<Bytes17>>(indexed) {};
            case "bytes18":
                return new TypeReference<StaticArray32<Bytes18>>(indexed) {};
            case "bytes19":
                return new TypeReference<StaticArray32<Bytes19>>(indexed) {};
            case "bytes20":
                return new TypeReference<StaticArray32<Bytes20>>(indexed) {};
            case "bytes21":
                return new TypeReference<StaticArray32<Bytes21>>(indexed) {};
            case "bytes22":
                return new TypeReference<StaticArray32<Bytes22>>(indexed) {};
            case "bytes23":
                return new TypeReference<StaticArray32<Bytes23>>(indexed) {};
            case "bytes24":
                return new TypeReference<StaticArray32<Bytes24>>(indexed) {};
            case "bytes25":
                return new TypeReference<StaticArray32<Bytes25>>(indexed) {};
            case "bytes26":
                return new TypeReference<StaticArray32<Bytes26>>(indexed) {};
            case "bytes27":
                return new TypeReference<StaticArray32<Bytes27>>(indexed) {};
            case "bytes28":
                return new TypeReference<StaticArray32<Bytes28>>(indexed) {};
            case "bytes29":
                return new TypeReference<StaticArray32<Bytes29>>(indexed) {};
            case "bytes30":
                return new TypeReference<StaticArray32<Bytes30>>(indexed) {};
            case "bytes31":
                return new TypeReference<StaticArray32<Bytes31>>(indexed) {};
            case "bytes32":
                return new TypeReference<StaticArray32<Bytes32>>(indexed) {};
            default:
                throw new BaseException(
                        201201, String.format(" %s[32] unsupported encoding array type ", type));
        }
    }
 
Example #26
Source File: StaticArrayReference.java    From web3sdk with Apache License 2.0 4 votes vote down vote up
private static TypeReference<?> create31(String type, boolean indexed) throws BaseException {

        if (ContractTypeUtil.invalidInt(type)) {
            return new TypeReference<StaticArray31<Int256>>(indexed) {};
        } else if (ContractTypeUtil.invalidUint(type)) {
            return new TypeReference<StaticArray31<Uint256>>(indexed) {};
        }

        switch (type) {
            case "address":
                return new TypeReference<StaticArray31<Address>>(indexed) {};
            case "bool":
                return new TypeReference<StaticArray31<Bool>>(indexed) {};
            case "string":
                return new TypeReference<StaticArray31<Utf8String>>(indexed) {};
            case "bytes":
                return new TypeReference<StaticArray31<DynamicBytes>>(indexed) {};
            case "bytes1":
                return new TypeReference<StaticArray31<Bytes1>>(indexed) {};
            case "bytes2":
                return new TypeReference<StaticArray31<Bytes2>>(indexed) {};
            case "bytes3":
                return new TypeReference<StaticArray31<Bytes3>>(indexed) {};
            case "bytes4":
                return new TypeReference<StaticArray31<Bytes4>>(indexed) {};
            case "bytes5":
                return new TypeReference<StaticArray31<Bytes5>>(indexed) {};
            case "bytes6":
                return new TypeReference<StaticArray31<Bytes6>>(indexed) {};
            case "bytes7":
                return new TypeReference<StaticArray31<Bytes7>>(indexed) {};
            case "bytes8":
                return new TypeReference<StaticArray31<Bytes8>>(indexed) {};
            case "bytes9":
                return new TypeReference<StaticArray31<Bytes9>>(indexed) {};
            case "bytes10":
                return new TypeReference<StaticArray31<Bytes10>>(indexed) {};
            case "bytes11":
                return new TypeReference<StaticArray31<Bytes11>>(indexed) {};
            case "bytes12":
                return new TypeReference<StaticArray31<Bytes12>>(indexed) {};
            case "bytes13":
                return new TypeReference<StaticArray31<Bytes13>>(indexed) {};
            case "bytes14":
                return new TypeReference<StaticArray31<Bytes14>>(indexed) {};
            case "bytes15":
                return new TypeReference<StaticArray31<Bytes15>>(indexed) {};
            case "bytes16":
                return new TypeReference<StaticArray31<Bytes16>>(indexed) {};
            case "bytes17":
                return new TypeReference<StaticArray31<Bytes17>>(indexed) {};
            case "bytes18":
                return new TypeReference<StaticArray31<Bytes18>>(indexed) {};
            case "bytes19":
                return new TypeReference<StaticArray31<Bytes19>>(indexed) {};
            case "bytes20":
                return new TypeReference<StaticArray31<Bytes20>>(indexed) {};
            case "bytes21":
                return new TypeReference<StaticArray31<Bytes21>>(indexed) {};
            case "bytes22":
                return new TypeReference<StaticArray31<Bytes22>>(indexed) {};
            case "bytes23":
                return new TypeReference<StaticArray31<Bytes23>>(indexed) {};
            case "bytes24":
                return new TypeReference<StaticArray31<Bytes24>>(indexed) {};
            case "bytes25":
                return new TypeReference<StaticArray31<Bytes25>>(indexed) {};
            case "bytes26":
                return new TypeReference<StaticArray31<Bytes26>>(indexed) {};
            case "bytes27":
                return new TypeReference<StaticArray31<Bytes27>>(indexed) {};
            case "bytes28":
                return new TypeReference<StaticArray31<Bytes28>>(indexed) {};
            case "bytes29":
                return new TypeReference<StaticArray31<Bytes29>>(indexed) {};
            case "bytes30":
                return new TypeReference<StaticArray31<Bytes30>>(indexed) {};
            case "bytes31":
                return new TypeReference<StaticArray31<Bytes31>>(indexed) {};
            case "bytes32":
                return new TypeReference<StaticArray31<Bytes32>>(indexed) {};
            default:
                throw new BaseException(
                        201201, String.format(" %s[31] unsupported encoding array type ", type));
        }
    }
 
Example #27
Source File: StaticArrayReference.java    From web3sdk with Apache License 2.0 4 votes vote down vote up
private static TypeReference<?> create30(String type, boolean indexed) throws BaseException {

        if (ContractTypeUtil.invalidInt(type)) {
            return new TypeReference<StaticArray30<Int256>>(indexed) {};
        } else if (ContractTypeUtil.invalidUint(type)) {
            return new TypeReference<StaticArray30<Uint256>>(indexed) {};
        }

        switch (type) {
            case "address":
                return new TypeReference<StaticArray30<Address>>(indexed) {};
            case "bool":
                return new TypeReference<StaticArray30<Bool>>(indexed) {};
            case "string":
                return new TypeReference<StaticArray30<Utf8String>>(indexed) {};
            case "bytes":
                return new TypeReference<StaticArray30<DynamicBytes>>(indexed) {};
            case "bytes1":
                return new TypeReference<StaticArray30<Bytes1>>(indexed) {};
            case "bytes2":
                return new TypeReference<StaticArray30<Bytes2>>(indexed) {};
            case "bytes3":
                return new TypeReference<StaticArray30<Bytes3>>(indexed) {};
            case "bytes4":
                return new TypeReference<StaticArray30<Bytes4>>(indexed) {};
            case "bytes5":
                return new TypeReference<StaticArray30<Bytes5>>(indexed) {};
            case "bytes6":
                return new TypeReference<StaticArray30<Bytes6>>(indexed) {};
            case "bytes7":
                return new TypeReference<StaticArray30<Bytes7>>(indexed) {};
            case "bytes8":
                return new TypeReference<StaticArray30<Bytes8>>(indexed) {};
            case "bytes9":
                return new TypeReference<StaticArray30<Bytes9>>(indexed) {};
            case "bytes10":
                return new TypeReference<StaticArray30<Bytes10>>(indexed) {};
            case "bytes11":
                return new TypeReference<StaticArray30<Bytes11>>(indexed) {};
            case "bytes12":
                return new TypeReference<StaticArray30<Bytes12>>(indexed) {};
            case "bytes13":
                return new TypeReference<StaticArray30<Bytes13>>(indexed) {};
            case "bytes14":
                return new TypeReference<StaticArray30<Bytes14>>(indexed) {};
            case "bytes15":
                return new TypeReference<StaticArray30<Bytes15>>(indexed) {};
            case "bytes16":
                return new TypeReference<StaticArray30<Bytes16>>(indexed) {};
            case "bytes17":
                return new TypeReference<StaticArray30<Bytes17>>(indexed) {};
            case "bytes18":
                return new TypeReference<StaticArray30<Bytes18>>(indexed) {};
            case "bytes19":
                return new TypeReference<StaticArray30<Bytes19>>(indexed) {};
            case "bytes20":
                return new TypeReference<StaticArray30<Bytes20>>(indexed) {};
            case "bytes21":
                return new TypeReference<StaticArray30<Bytes21>>(indexed) {};
            case "bytes22":
                return new TypeReference<StaticArray30<Bytes22>>(indexed) {};
            case "bytes23":
                return new TypeReference<StaticArray30<Bytes23>>(indexed) {};
            case "bytes24":
                return new TypeReference<StaticArray30<Bytes24>>(indexed) {};
            case "bytes25":
                return new TypeReference<StaticArray30<Bytes25>>(indexed) {};
            case "bytes26":
                return new TypeReference<StaticArray30<Bytes26>>(indexed) {};
            case "bytes27":
                return new TypeReference<StaticArray30<Bytes27>>(indexed) {};
            case "bytes28":
                return new TypeReference<StaticArray30<Bytes28>>(indexed) {};
            case "bytes29":
                return new TypeReference<StaticArray30<Bytes29>>(indexed) {};
            case "bytes30":
                return new TypeReference<StaticArray30<Bytes30>>(indexed) {};
            case "bytes31":
                return new TypeReference<StaticArray30<Bytes31>>(indexed) {};
            case "bytes32":
                return new TypeReference<StaticArray30<Bytes32>>(indexed) {};
            default:
                throw new BaseException(
                        201201, String.format(" %s[30] unsupported encoding array type ", type));
        }
    }
 
Example #28
Source File: StaticArrayReference.java    From web3sdk with Apache License 2.0 4 votes vote down vote up
private static TypeReference<?> create29(String type, boolean indexed) throws BaseException {

        if (ContractTypeUtil.invalidInt(type)) {
            return new TypeReference<StaticArray29<Int256>>(indexed) {};
        } else if (ContractTypeUtil.invalidUint(type)) {
            return new TypeReference<StaticArray29<Uint256>>(indexed) {};
        }

        switch (type) {
            case "address":
                return new TypeReference<StaticArray29<Address>>(indexed) {};
            case "bool":
                return new TypeReference<StaticArray29<Bool>>(indexed) {};
            case "string":
                return new TypeReference<StaticArray29<Utf8String>>(indexed) {};
            case "bytes":
                return new TypeReference<StaticArray29<DynamicBytes>>(indexed) {};
            case "bytes1":
                return new TypeReference<StaticArray29<Bytes1>>(indexed) {};
            case "bytes2":
                return new TypeReference<StaticArray29<Bytes2>>(indexed) {};
            case "bytes3":
                return new TypeReference<StaticArray29<Bytes3>>(indexed) {};
            case "bytes4":
                return new TypeReference<StaticArray29<Bytes4>>(indexed) {};
            case "bytes5":
                return new TypeReference<StaticArray29<Bytes5>>(indexed) {};
            case "bytes6":
                return new TypeReference<StaticArray29<Bytes6>>(indexed) {};
            case "bytes7":
                return new TypeReference<StaticArray29<Bytes7>>(indexed) {};
            case "bytes8":
                return new TypeReference<StaticArray29<Bytes8>>(indexed) {};
            case "bytes9":
                return new TypeReference<StaticArray29<Bytes9>>(indexed) {};
            case "bytes10":
                return new TypeReference<StaticArray29<Bytes10>>(indexed) {};
            case "bytes11":
                return new TypeReference<StaticArray29<Bytes11>>(indexed) {};
            case "bytes12":
                return new TypeReference<StaticArray29<Bytes12>>(indexed) {};
            case "bytes13":
                return new TypeReference<StaticArray29<Bytes13>>(indexed) {};
            case "bytes14":
                return new TypeReference<StaticArray29<Bytes14>>(indexed) {};
            case "bytes15":
                return new TypeReference<StaticArray29<Bytes15>>(indexed) {};
            case "bytes16":
                return new TypeReference<StaticArray29<Bytes16>>(indexed) {};
            case "bytes17":
                return new TypeReference<StaticArray29<Bytes17>>(indexed) {};
            case "bytes18":
                return new TypeReference<StaticArray29<Bytes18>>(indexed) {};
            case "bytes19":
                return new TypeReference<StaticArray29<Bytes19>>(indexed) {};
            case "bytes20":
                return new TypeReference<StaticArray29<Bytes20>>(indexed) {};
            case "bytes21":
                return new TypeReference<StaticArray29<Bytes21>>(indexed) {};
            case "bytes22":
                return new TypeReference<StaticArray29<Bytes22>>(indexed) {};
            case "bytes23":
                return new TypeReference<StaticArray29<Bytes23>>(indexed) {};
            case "bytes24":
                return new TypeReference<StaticArray29<Bytes24>>(indexed) {};
            case "bytes25":
                return new TypeReference<StaticArray29<Bytes25>>(indexed) {};
            case "bytes26":
                return new TypeReference<StaticArray29<Bytes26>>(indexed) {};
            case "bytes27":
                return new TypeReference<StaticArray29<Bytes27>>(indexed) {};
            case "bytes28":
                return new TypeReference<StaticArray29<Bytes28>>(indexed) {};
            case "bytes29":
                return new TypeReference<StaticArray29<Bytes29>>(indexed) {};
            case "bytes30":
                return new TypeReference<StaticArray29<Bytes30>>(indexed) {};
            case "bytes31":
                return new TypeReference<StaticArray29<Bytes31>>(indexed) {};
            case "bytes32":
                return new TypeReference<StaticArray29<Bytes32>>(indexed) {};
            default:
                throw new BaseException(
                        201201, String.format(" %s[29] unsupported encoding array type ", type));
        }
    }
 
Example #29
Source File: StaticArrayReference.java    From web3sdk with Apache License 2.0 4 votes vote down vote up
private static TypeReference<?> create28(String type, boolean indexed) throws BaseException {

        if (ContractTypeUtil.invalidInt(type)) {
            return new TypeReference<StaticArray28<Int256>>(indexed) {};
        } else if (ContractTypeUtil.invalidUint(type)) {
            return new TypeReference<StaticArray28<Uint256>>(indexed) {};
        }

        switch (type) {
            case "address":
                return new TypeReference<StaticArray28<Address>>(indexed) {};
            case "bool":
                return new TypeReference<StaticArray28<Bool>>(indexed) {};
            case "string":
                return new TypeReference<StaticArray28<Utf8String>>(indexed) {};
            case "bytes":
                return new TypeReference<StaticArray28<DynamicBytes>>(indexed) {};
            case "bytes1":
                return new TypeReference<StaticArray28<Bytes1>>(indexed) {};
            case "bytes2":
                return new TypeReference<StaticArray28<Bytes2>>(indexed) {};
            case "bytes3":
                return new TypeReference<StaticArray28<Bytes3>>(indexed) {};
            case "bytes4":
                return new TypeReference<StaticArray28<Bytes4>>(indexed) {};
            case "bytes5":
                return new TypeReference<StaticArray28<Bytes5>>(indexed) {};
            case "bytes6":
                return new TypeReference<StaticArray28<Bytes6>>(indexed) {};
            case "bytes7":
                return new TypeReference<StaticArray28<Bytes7>>(indexed) {};
            case "bytes8":
                return new TypeReference<StaticArray28<Bytes8>>(indexed) {};
            case "bytes9":
                return new TypeReference<StaticArray28<Bytes9>>(indexed) {};
            case "bytes10":
                return new TypeReference<StaticArray28<Bytes10>>(indexed) {};
            case "bytes11":
                return new TypeReference<StaticArray28<Bytes11>>(indexed) {};
            case "bytes12":
                return new TypeReference<StaticArray28<Bytes12>>(indexed) {};
            case "bytes13":
                return new TypeReference<StaticArray28<Bytes13>>(indexed) {};
            case "bytes14":
                return new TypeReference<StaticArray28<Bytes14>>(indexed) {};
            case "bytes15":
                return new TypeReference<StaticArray28<Bytes15>>(indexed) {};
            case "bytes16":
                return new TypeReference<StaticArray28<Bytes16>>(indexed) {};
            case "bytes17":
                return new TypeReference<StaticArray28<Bytes17>>(indexed) {};
            case "bytes18":
                return new TypeReference<StaticArray28<Bytes18>>(indexed) {};
            case "bytes19":
                return new TypeReference<StaticArray28<Bytes19>>(indexed) {};
            case "bytes20":
                return new TypeReference<StaticArray28<Bytes20>>(indexed) {};
            case "bytes21":
                return new TypeReference<StaticArray28<Bytes21>>(indexed) {};
            case "bytes22":
                return new TypeReference<StaticArray28<Bytes22>>(indexed) {};
            case "bytes23":
                return new TypeReference<StaticArray28<Bytes23>>(indexed) {};
            case "bytes24":
                return new TypeReference<StaticArray28<Bytes24>>(indexed) {};
            case "bytes25":
                return new TypeReference<StaticArray28<Bytes25>>(indexed) {};
            case "bytes26":
                return new TypeReference<StaticArray28<Bytes26>>(indexed) {};
            case "bytes27":
                return new TypeReference<StaticArray28<Bytes27>>(indexed) {};
            case "bytes28":
                return new TypeReference<StaticArray28<Bytes28>>(indexed) {};
            case "bytes29":
                return new TypeReference<StaticArray28<Bytes29>>(indexed) {};
            case "bytes30":
                return new TypeReference<StaticArray28<Bytes30>>(indexed) {};
            case "bytes31":
                return new TypeReference<StaticArray28<Bytes31>>(indexed) {};
            case "bytes32":
                return new TypeReference<StaticArray28<Bytes32>>(indexed) {};
            default:
                throw new BaseException(
                        201201, String.format(" %s[28] unsupported encoding array type ", type));
        }
    }
 
Example #30
Source File: StaticArrayReference.java    From web3sdk with Apache License 2.0 4 votes vote down vote up
private static TypeReference<?> create27(String type, boolean indexed) throws BaseException {

        if (ContractTypeUtil.invalidInt(type)) {
            return new TypeReference<StaticArray27<Int256>>(indexed) {};
        } else if (ContractTypeUtil.invalidUint(type)) {
            return new TypeReference<StaticArray27<Uint256>>(indexed) {};
        }

        switch (type) {
            case "address":
                return new TypeReference<StaticArray27<Address>>(indexed) {};
            case "bool":
                return new TypeReference<StaticArray27<Bool>>(indexed) {};
            case "string":
                return new TypeReference<StaticArray27<Utf8String>>(indexed) {};
            case "bytes":
                return new TypeReference<StaticArray27<DynamicBytes>>(indexed) {};
            case "bytes1":
                return new TypeReference<StaticArray27<Bytes1>>(indexed) {};
            case "bytes2":
                return new TypeReference<StaticArray27<Bytes2>>(indexed) {};
            case "bytes3":
                return new TypeReference<StaticArray27<Bytes3>>(indexed) {};
            case "bytes4":
                return new TypeReference<StaticArray27<Bytes4>>(indexed) {};
            case "bytes5":
                return new TypeReference<StaticArray27<Bytes5>>(indexed) {};
            case "bytes6":
                return new TypeReference<StaticArray27<Bytes6>>(indexed) {};
            case "bytes7":
                return new TypeReference<StaticArray27<Bytes7>>(indexed) {};
            case "bytes8":
                return new TypeReference<StaticArray27<Bytes8>>(indexed) {};
            case "bytes9":
                return new TypeReference<StaticArray27<Bytes9>>(indexed) {};
            case "bytes10":
                return new TypeReference<StaticArray27<Bytes10>>(indexed) {};
            case "bytes11":
                return new TypeReference<StaticArray27<Bytes11>>(indexed) {};
            case "bytes12":
                return new TypeReference<StaticArray27<Bytes12>>(indexed) {};
            case "bytes13":
                return new TypeReference<StaticArray27<Bytes13>>(indexed) {};
            case "bytes14":
                return new TypeReference<StaticArray27<Bytes14>>(indexed) {};
            case "bytes15":
                return new TypeReference<StaticArray27<Bytes15>>(indexed) {};
            case "bytes16":
                return new TypeReference<StaticArray27<Bytes16>>(indexed) {};
            case "bytes17":
                return new TypeReference<StaticArray27<Bytes17>>(indexed) {};
            case "bytes18":
                return new TypeReference<StaticArray27<Bytes18>>(indexed) {};
            case "bytes19":
                return new TypeReference<StaticArray27<Bytes19>>(indexed) {};
            case "bytes20":
                return new TypeReference<StaticArray27<Bytes20>>(indexed) {};
            case "bytes21":
                return new TypeReference<StaticArray27<Bytes21>>(indexed) {};
            case "bytes22":
                return new TypeReference<StaticArray27<Bytes22>>(indexed) {};
            case "bytes23":
                return new TypeReference<StaticArray27<Bytes23>>(indexed) {};
            case "bytes24":
                return new TypeReference<StaticArray27<Bytes24>>(indexed) {};
            case "bytes25":
                return new TypeReference<StaticArray27<Bytes25>>(indexed) {};
            case "bytes26":
                return new TypeReference<StaticArray27<Bytes26>>(indexed) {};
            case "bytes27":
                return new TypeReference<StaticArray27<Bytes27>>(indexed) {};
            case "bytes28":
                return new TypeReference<StaticArray27<Bytes28>>(indexed) {};
            case "bytes29":
                return new TypeReference<StaticArray27<Bytes29>>(indexed) {};
            case "bytes30":
                return new TypeReference<StaticArray27<Bytes30>>(indexed) {};
            case "bytes31":
                return new TypeReference<StaticArray27<Bytes31>>(indexed) {};
            case "bytes32":
                return new TypeReference<StaticArray27<Bytes32>>(indexed) {};
            default:
                throw new BaseException(
                        201201, String.format(" %s[27] unsupported encoding array type ", type));
        }
    }