use of io.nem.symbol.sdk.openapi.vertx.model.MetadataEntryDTO in project nem2-sdk-java by nemtech.
the class MetadataRepositoryVertxImplTest method createMetadataDto.
private MetadataInfoDTO createMetadataDto(String name, MetadataTypeEnum type, String targetId) {
MetadataInfoDTO dto = new MetadataInfoDTO();
dto.setId(name);
Address sourceAddress = Account.generateNewAccount(networkType).getAddress();
Address targetAddress = Account.generateNewAccount(networkType).getAddress();
MetadataEntryDTO metadataEntry = new MetadataEntryDTO();
metadataEntry.setVersion(1);
metadataEntry.setCompositeHash("ompositeHash " + name);
metadataEntry.setMetadataType(type);
metadataEntry.setScopedMetadataKey("10");
metadataEntry.sourceAddress(sourceAddress.encoded());
metadataEntry.setTargetId(targetId);
metadataEntry.setTargetAddress(targetAddress.encoded());
metadataEntry.setValue(ConvertUtils.fromStringToHex(name + " message"));
dto.setMetadataEntry(metadataEntry);
return dto;
}
Aggregations