org.fisco.bcos.web3j.abi.datatypes.generated.Int8 Java Examples
The following examples show how to use
org.fisco.bcos.web3j.abi.datatypes.generated.Int8.
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: BytesUtils.java From WeBASE-Collect-Bee with Apache License 2.0 | 5 votes |
public static String int8DynamicArrayToString(List<Int8> list) { List<String> stringList = new ArrayList<>(); for (int i = 0; i < list.size(); i++) { stringList.add(list.get(i).getValue().toString()); } return JacksonUtils.toJson(stringList); }
Example #2
Source File: ContractTypeUtilTest.java From web3sdk with Apache License 2.0 | 5 votes |
@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())); }