Skip to content

Commit 910098e

Browse files
committed
Merge branch 'release/2.0.0'
2 parents 94032f7 + 4b2a5c4 commit 910098e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+40
-10765
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# 2.0.0
2+
3+
## What's Changed
4+
5+
### Breaking changes
6+
7+
* Remove `TxGroup.assignGroupID(Transaction[] txns, Address address)` in favor
8+
of `TxGroup.assignGroupID(Address address, Transaction ...txns)`.
9+
* Remove `Account.transactionWithSuggestedFeePerByte` in favor of `Account.setFeeByFeePerByte`.
10+
* Remove deprecated methods in `Transaction.java`, mark public `Transaction` constructor as hidden in favor of `com.algorand.algosdk.builder.transaction`.
11+
* Remove deprecated `Transaction.setFee` and `Transaction.setLease` methods.
12+
* Remove v1 algod API (`com.algorand.algosdk.algod.client`) due to API end-of-life (2022-12-01). Instead, use v2 algod API (`com.algorand.algosdk.v2.client.algod`).
13+
* Remove `cost` field in `DryrunTxnResult` in favor of 2 fields: `budget-added` and `budget-consumed`. `cost` can be derived by `budget-consumed - budget-added`.
14+
* Remove logicsig templates, `com/algorand/algosdk/resource/langspec.json`, `com.algorand.algosdk.logic` and methods in `com.algorand.algosdk.crypto` depending on `langspec.json`.
15+
* Remove the deprecated `MethodCallParams` public constructor in favor of `com.algorand.algosdk.builder.transaction.MethodCallTransactionBuilder`.
16+
* Remove unused generated types: `CatchpointAbortResponse`, `CatchpointStartResponse`.
17+
18+
**Full Changelog**: https://github.com/algorand/java-algorand-sdk/compare/1.22.0...2.0.0
19+
120
# 1.22.0
221

322
### Bugfixes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Maven:
1919
<dependency>
2020
<groupId>com.algorand</groupId>
2121
<artifactId>algosdk</artifactId>
22-
<version>1.22.0</version>
22+
<version>2.0.0</version>
2323
</dependency>
2424
```
2525

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.algorand</groupId>
66
<artifactId>algosdk</artifactId>
7-
<version>1.22.0</version>
7+
<version>2.0.0</version>
88
<packaging>jar</packaging>
99

1010
<name>${project.groupId}:${project.artifactId}</name>

src/main/java/com/algorand/algosdk/account/Account.java

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -219,35 +219,6 @@ public SignedBid signBid(Bid bid) throws NoSuchAlgorithmException {
219219
}
220220
}
221221

222-
/**
223-
* Creates a version of the given transaction with fee populated according to suggestedFeePerByte * estimateTxSize.
224-
* @param copyTx transaction to populate fee field
225-
* @param suggestedFeePerByte suggestedFee given by network
226-
* @return transaction with proper fee set
227-
* @throws NoSuchAlgorithmException could not estimate tx encoded size.
228-
* @deprecated Replaced by {@link #setFeeByFeePerByte}.
229-
* This is unsafe to use because the returned transaction is a shallow copy of copyTx.
230-
*/
231-
@Deprecated
232-
static public Transaction transactionWithSuggestedFeePerByte(Transaction copyTx, BigInteger suggestedFeePerByte) throws NoSuchAlgorithmException{
233-
BigInteger newFee = suggestedFeePerByte.multiply(estimatedEncodedSize(copyTx));
234-
if (newFee.compareTo(MIN_TX_FEE_UALGOS) < 0) {
235-
newFee = MIN_TX_FEE_UALGOS;
236-
}
237-
switch (copyTx.type) {
238-
case Payment:
239-
return new Transaction(copyTx.sender, newFee, copyTx.firstValid, copyTx.lastValid, copyTx.note, copyTx.genesisID, copyTx.genesisHash,
240-
copyTx.amount, copyTx.receiver, copyTx.closeRemainderTo);
241-
case KeyRegistration:
242-
return new Transaction(copyTx.sender, newFee, copyTx.firstValid, copyTx.lastValid, copyTx.note, copyTx.genesisID, copyTx.genesisHash,
243-
copyTx.votePK, copyTx.selectionPK, copyTx.voteFirst, copyTx.voteLast, copyTx.voteKeyDilution);
244-
case Default:
245-
throw new IllegalArgumentException("tx cannot have no type");
246-
default:
247-
throw new RuntimeException("cannot reach");
248-
}
249-
}
250-
251222
/**
252223
* Sets the transaction fee according to suggestedFeePerByte * estimateTxSize.
253224
* @param tx transaction to populate fee field
@@ -276,7 +247,7 @@ static public void setFeeByFeePerByte(Transaction tx, BigInteger suggestedFeePer
276247
if (fee.compareTo(Account.MIN_TX_FEE_UALGOS) < 0) {
277248
fee = Account.MIN_TX_FEE_UALGOS;
278249
}
279-
tx.setFee(fee);
250+
tx.fee = fee;
280251
}
281252

282253
/**

src/main/java/com/algorand/algosdk/algod/client/AlgodClient.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/main/java/com/algorand/algosdk/algod/client/ApiCallback.java

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)