Skip to content

Commit

Permalink
chore: prepare to release 2.18.0
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Tedrow <[email protected]>
  • Loading branch information
Sean-Tedrow-LB committed Oct 3, 2022
1 parent 6ef6fe8 commit 7c74470
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 18 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.18.0-beta.1
## 2.18.0

### Added
- `TransactionResponse.[get|set]ValidateStatus()`
- `TransactionReceipt.validateStatus()`
- `TransactionRecord.validateReceiptStatus()`
- `TransactionReceipt.transactionId`
- `TopicUpdateTransaction.[get|set]ExpirationTime()`
- `CustomFee.[set|get]AllCollectorsAreExempt()`

## 2.17.4

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Select _one_ of the following depending on your target platform.

```groovy
// Android, Corda DJVM, Java 7+
implementation 'com.hedera.hashgraph:sdk-jdk7:2.18.0-beta.1'
implementation 'com.hedera.hashgraph:sdk-jdk7:2.18.0'
// Java 9+, Kotlin
implementation 'com.hedera.hashgraph:sdk:2.18.0-beta.1'
implementation 'com.hedera.hashgraph:sdk:2.18.0'
```

Select _one_ of the following to provide the gRPC implementation.
Expand Down Expand Up @@ -61,14 +61,14 @@ Select _one_ of the following depending on your target platform.
<dependency>
<groupId>com.hedera.hashgraph</groupId>
<artifactId>sdk-jdk7</artifactId>
<version>2.18.0-beta.1</version>
<version>2.18.0</version>
</dependency>

<!-- Java 9+, Kotlin -->
<dependency>
<groupId>com.hedera.hashgraph</groupId>
<artifactId>sdk</artifactId>
<version>2.18.0-beta.1</version>
<version>2.18.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion example-android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dependencies {
implementation "com.google.code.gson:gson:2.9.1"
implementation 'javax.annotation:javax.annotation-api:1.3.2'
implementation "com.esaulpaugh:headlong:8.0.0"
implementation files('../../sdk/build/libs/sdk-2.18.0-beta.1.jar')
implementation files('../../sdk/build/libs/sdk-2.18.0.jar')
implementation 'io.grpc:grpc-okhttp:1.46.0'

implementation "net.sourceforge.streamsupport:streamsupport:1.7.4"
Expand Down
14 changes: 9 additions & 5 deletions sdk/src/main/java/com/hedera/hashgraph/sdk/CustomFee.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ static CustomFee fromProtobuf(com.hedera.hashgraph.sdk.proto.CustomFee customFee
if (customFee.hasFeeCollectorAccountId()) {
outFee.feeCollectorAccountId = AccountId.fromProtobuf(customFee.getFeeCollectorAccountId());
}
outFee.allCollectorsAreExempt = customFee.getAllCollectorsAreExempt();
// TODO: allCollectorsAreExempt is temporarily commented out for 2.18.0, it is implemented in 2.18.0-beta.1
//outFee.allCollectorsAreExempt = customFee.getAllCollectorsAreExempt();

return outFee;
}
Expand Down Expand Up @@ -113,7 +114,8 @@ public AccountId getFeeCollectorAccountId() {
*
* @return whether all fee collectors are exempt from fees
*/
public boolean getAllCollectorsAreExempt() {
// TODO: this is temporarily made private for 2.18.0, it is public in 2.18.0-beta.1
private boolean getAllCollectorsAreExempt() {
return allCollectorsAreExempt;
}

Expand Down Expand Up @@ -146,7 +148,8 @@ protected com.hedera.hashgraph.sdk.proto.CustomFee finishToProtobuf(com.hedera.h
if (feeCollectorAccountId != null) {
customFeeBuilder.setFeeCollectorAccountId(feeCollectorAccountId.toProtobuf());
}
customFeeBuilder.setAllCollectorsAreExempt(allCollectorsAreExempt);
// TODO: allCollectorsAreExempt is temporarily commented out for 2.18.0, it is implemented in 2.18.0-beta.1
//customFeeBuilder.setAllCollectorsAreExempt(allCollectorsAreExempt);
return customFeeBuilder.build();
}

Expand All @@ -167,8 +170,9 @@ public byte[] toBytes() {
}

protected MoreObjects.ToStringHelper toStringHelper() {
// TODO: allCollectorsAreExempt is temporarily commented out for 2.18.0, it is implemented in 2.18.0-beta.1
return MoreObjects.toStringHelper(this)
.add("feeCollectorAccountId", feeCollectorAccountId)
.add("allCollectorsAreExempt", allCollectorsAreExempt);
.add("feeCollectorAccountId", feeCollectorAccountId);
//.add("allCollectorsAreExempt", allCollectorsAreExempt);
}
}
5 changes: 3 additions & 2 deletions sdk/src/main/java/com/hedera/hashgraph/sdk/CustomFeeBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public F setFeeCollectorAccountId(AccountId feeCollectorAccountId) {
* @param allCollectorsAreExempt whether all fee collectors are exempt from fees
* @return {@code this}
*/
public F setAllCollectorsAreExempt(boolean allCollectorsAreExempt) {
// TODO: this is temporarily made private for 2.18.0, it is public in 2.18.0-beta.1
private F setAllCollectorsAreExempt(boolean allCollectorsAreExempt) {
this.allCollectorsAreExempt = allCollectorsAreExempt;
// noinspection unchecked
return (F) this;
Expand All @@ -54,7 +55,7 @@ public F setAllCollectorsAreExempt(boolean allCollectorsAreExempt) {

protected F finishDeepClone(CustomFeeBase<F> source) {
feeCollectorAccountId = source.feeCollectorAccountId;
allCollectorsAreExempt = source.getAllCollectorsAreExempt();
allCollectorsAreExempt = source.allCollectorsAreExempt;

// noinspection unchecked
return (F) this;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
com.hedera.hashgraph.sdk.CustomFeeListTest.deepClone=[
"[CustomFixedFee{feeCollectorAccountId=0.0.4322, allCollectorsAreExempt=false, amount=10, demoninatingTokenId=0.0.483902}, CustomFractionalFee{feeCollectorAccountId=0.0.389042, allCollectorsAreExempt=false, numerator=3, denominator=7, min=3, max=100, assessmentMethod=INCLUSIVE}, CustomRoyaltyFee{feeCollectorAccountId=0.0.23423, allCollectorsAreExempt=false, numerator=5, denominator=8, fallbackFee=CustomFixedFee{feeCollectorAccountId=null, allCollectorsAreExempt=false, amount=10, demoninatingTokenId=0.0.483902}}]"
"[CustomFixedFee{feeCollectorAccountId=0.0.4322, amount=10, demoninatingTokenId=0.0.483902}, CustomFractionalFee{feeCollectorAccountId=0.0.389042, numerator=3, denominator=7, min=3, max=100, assessmentMethod=INCLUSIVE}, CustomRoyaltyFee{feeCollectorAccountId=0.0.23423, numerator=5, denominator=8, fallbackFee=CustomFixedFee{feeCollectorAccountId=null, amount=10, demoninatingTokenId=0.0.483902}}]"
]


com.hedera.hashgraph.sdk.CustomFeeListTest.shouldSerialize=[
"[CustomFixedFee{feeCollectorAccountId=0.0.4322, allCollectorsAreExempt=false, amount=10, demoninatingTokenId=0.0.483902}, CustomFractionalFee{feeCollectorAccountId=0.0.389042, allCollectorsAreExempt=false, numerator=3, denominator=7, min=3, max=100, assessmentMethod=INCLUSIVE}, CustomRoyaltyFee{feeCollectorAccountId=0.0.23423, allCollectorsAreExempt=false, numerator=5, denominator=8, fallbackFee=CustomFixedFee{feeCollectorAccountId=null, allCollectorsAreExempt=false, amount=10, demoninatingTokenId=0.0.483902}}]"
"[CustomFixedFee{feeCollectorAccountId=0.0.4322, amount=10, demoninatingTokenId=0.0.483902}, CustomFractionalFee{feeCollectorAccountId=0.0.389042, numerator=3, denominator=7, min=3, max=100, assessmentMethod=INCLUSIVE}, CustomRoyaltyFee{feeCollectorAccountId=0.0.23423, numerator=5, denominator=8, fallbackFee=CustomFixedFee{feeCollectorAccountId=null, amount=10, demoninatingTokenId=0.0.483902}}]"
]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
com.hedera.hashgraph.sdk.TokenInfoTest.shouldSerialize=[
"TokenInfo{tokenId=0.0.48920, name=name, symbol=&, decimals=3, totalSupply=1000, treasuryAccountId=0.0.932, adminKey=null, kycKey=null, freezeKey=null, wipeKey=null, supplyKey=null, feeScheduleKey=null, defaultFreezeStatus=null, defaultKycStatus=null, isDeleted=false, autoRenewAccount=null, autoRenewPeriod=null, expirationTime=null, tokenMemo=memo, customFees=[CustomFixedFee{feeCollectorAccountId=0.0.4322, allCollectorsAreExempt=false, amount=10, demoninatingTokenId=0.0.483902}, CustomFractionalFee{feeCollectorAccountId=0.0.389042, allCollectorsAreExempt=false, numerator=3, denominator=7, min=3, max=100, assessmentMethod=INCLUSIVE}], tokenType=FUNGIBLE_COMMON, supplyType=FINITE, maxSupply=1000000, pauseKey=null, pauseStatus=true, ledgerId=mainnet}"
"TokenInfo{tokenId=0.0.48920, name=name, symbol=&, decimals=3, totalSupply=1000, treasuryAccountId=0.0.932, adminKey=null, kycKey=null, freezeKey=null, wipeKey=null, supplyKey=null, feeScheduleKey=null, defaultFreezeStatus=null, defaultKycStatus=null, isDeleted=false, autoRenewAccount=null, autoRenewPeriod=null, expirationTime=null, tokenMemo=memo, customFees=[CustomFixedFee{feeCollectorAccountId=0.0.4322, amount=10, demoninatingTokenId=0.0.483902}, CustomFractionalFee{feeCollectorAccountId=0.0.389042, numerator=3, denominator=7, min=3, max=100, assessmentMethod=INCLUSIVE}], tokenType=FUNGIBLE_COMMON, supplyType=FINITE, maxSupply=1000000, pauseKey=null, pauseStatus=true, ledgerId=mainnet}"
]
2 changes: 1 addition & 1 deletion version.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// and `sdk/build.gradle` so I extracted them into another file and made both aforementioned
// files import this one.
group = "com.hedera.hashgraph"
version = "2.18.0-beta.1"
version = "2.18.0"

0 comments on commit 7c74470

Please sign in to comment.