Skip to content

Commit 704d1fe

Browse files
committed
Merge branch 'release/1.15.0'
2 parents 6506e97 + 48fd038 commit 704d1fe

33 files changed

+1312
-891
lines changed

.circleci/config.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@ workflows:
44
version: 2
55
test:
66
jobs:
7-
- unit-test
8-
- integration-test
7+
- unit-test:
8+
filters:
9+
branches:
10+
ignore:
11+
- gh-pages
12+
- integration-test:
13+
filters:
14+
branches:
15+
ignore:
16+
- gh-pages
917

1018
jobs:
1119
unit-test:

.github/workflows/codegen.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "SDK Code Generation"
2+
on:
3+
schedule:
4+
- cron: '20 23 * * *'
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
jobs:
9+
generate_and_pr:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out repository
13+
uses: actions/checkout@v3
14+
- name: Generate and PR
15+
uses: algorand/generator/.github/actions/sdk-codegen/@master
16+
with:
17+
args: "-k JAVA"
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# 1.15.0
2+
3+
## What's Changed
4+
* Rerun code generation based on new models by @Eric-Warehime in https://github.com/algorand/java-algorand-sdk/pull/321
5+
* Excluding gh-pages branch from cicd by @algojack in https://github.com/algorand/java-algorand-sdk/pull/325
6+
* Build: Add SDK code generation workflow by @Eric-Warehime in https://github.com/algorand/java-algorand-sdk/pull/327
7+
* Add branch info to sdk gen action by @Eric-Warehime in https://github.com/algorand/java-algorand-sdk/pull/330
8+
* Generate updated client API code by @algoidurovic in https://github.com/algorand/java-algorand-sdk/pull/318
9+
* Introduce unified `MethodCallTransactionBuilder` & deprecate `MethodCallParams.Builder` by @jasonpaulos in https://github.com/algorand/java-algorand-sdk/pull/324
10+
11+
## New Contributors
12+
* @Eric-Warehime made their first contribution in https://github.com/algorand/java-algorand-sdk/pull/321
13+
* @algoidurovic made their first contribution in https://github.com/algorand/java-algorand-sdk/pull/318
14+
115
# 1.14.0
216
## Added
317
- Add foreign app address to dryrun creator (#315)

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.14.0</version>
22+
<version>1.15.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.14.0</version>
7+
<version>1.15.0</version>
88
<packaging>jar</packaging>
99

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

src/main/java/com/algorand/algosdk/builder/transaction/ApplicationBaseTransactionBuilder.java

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import java.util.Objects;
1010

1111
@SuppressWarnings("unchecked")
12-
public abstract class ApplicationBaseTransactionBuilder<T extends ApplicationBaseTransactionBuilder<T>> extends TransactionBuilder<T> {
12+
public abstract class ApplicationBaseTransactionBuilder<T extends ApplicationBaseTransactionBuilder<T>> extends TransactionBuilder<T> implements ApplicationCallReferencesSetter<T> {
1313
private Transaction.OnCompletion onCompletion;
1414
private List<byte[]> applicationArgs;
1515
private List<Address> accounts;
@@ -38,9 +38,7 @@ protected void applyTo(Transaction txn) {
3838
if (foreignAssets != null) txn.foreignAssets = foreignAssets;
3939
}
4040

41-
/**
42-
* ApplicationID is the application being interacted with, or 0 if creating a new application.
43-
*/
41+
@Override
4442
public T applicationId(Long applicationId) {
4543
this.applicationId = applicationId;
4644
return (T) this;
@@ -75,27 +73,19 @@ public T argsBase64Encoded(List<String> args) {
7573
return this.args(decodedArgs);
7674
}
7775

78-
/**
79-
* Accounts lists the accounts (in addition to the sender) that may be accessed from the application logic.
80-
*/
76+
@Override
8177
public T accounts(List<Address> accounts) {
8278
this.accounts = accounts;
8379
return (T) this;
8480
}
8581

86-
/**
87-
* ForeignApps lists the applications (in addition to txn.ApplicationID) whose global states may be accessed by this
88-
* application. The access is read-only.
89-
*/
82+
@Override
9083
public T foreignApps(List<Long> foreignApps) {
9184
this.foreignApps = foreignApps;
9285
return (T) this;
9386
}
9487

95-
/**
96-
* ForeignAssets lists the assets whose global states may be accessed by this
97-
* application. The access is read-only.
98-
*/
88+
@Override
9989
public T foreignAssets(List<Long> foreignAssets) {
10090
this.foreignAssets = foreignAssets;
10191
return (T) this;
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.algorand.algosdk.builder.transaction;
2+
3+
import java.util.List;
4+
5+
import com.algorand.algosdk.crypto.Address;
6+
7+
public interface ApplicationCallReferencesSetter<T extends ApplicationCallReferencesSetter<T>> {
8+
9+
/**
10+
* ApplicationID is the application being interacted with, or 0 if creating a new application.
11+
*/
12+
public T applicationId(Long applicationId);
13+
14+
/**
15+
* Accounts lists the accounts (in addition to the sender) that may be accessed from the application logic.
16+
*/
17+
public T accounts(List<Address> accounts);
18+
19+
/**
20+
* ForeignApps lists the applications (in addition to txn.ApplicationID) whose global states may be accessed by this
21+
* application. The access is read-only.
22+
*/
23+
public T foreignApps(List<Long> foreignApps);
24+
25+
/**
26+
* ForeignAssets lists the assets whose global states may be accessed by this
27+
* application. The access is read-only.
28+
*/
29+
public T foreignAssets(List<Long> foreignAssets);
30+
}

src/main/java/com/algorand/algosdk/builder/transaction/ApplicationCreateTransactionBuilder.java

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.algorand.algosdk.transaction.Transaction;
55

66
@SuppressWarnings("unchecked")
7-
public class ApplicationCreateTransactionBuilder<T extends ApplicationCreateTransactionBuilder<T>> extends ApplicationUpdateTransactionBuilder<T> {
7+
public class ApplicationCreateTransactionBuilder<T extends ApplicationCreateTransactionBuilder<T>> extends ApplicationUpdateTransactionBuilder<T> implements StateSchemaSetter<T> {
88
private StateSchema localStateSchema;
99
private StateSchema globalStateSchema;
1010
private Long extraPages = 0L;
@@ -54,30 +54,19 @@ public T optIn(boolean optIn) {
5454
return (T) this;
5555
}
5656

57-
/**
58-
* LocalStateSchema sets limits on the number of strings and integers that may be stored in an account's LocalState.
59-
* for this application. The larger these limits are, the larger minimum balance must be maintained inside the
60-
* account of any users who opt into this application. The LocalStateSchema is immutable.
61-
*/
57+
@Override
6258
public T localStateSchema(StateSchema localStateSchema) {
6359
this.localStateSchema = localStateSchema;
6460
return (T) this;
6561
}
6662

67-
/**
68-
* GlobalStateSchema sets limits on the number of strings and integers that may be stored in the GlobalState. The
69-
* larger these limits are, the larger minimum balance must be maintained inside the creator's account (in order to
70-
* 'pay' for the state that can be used). The GlobalStateSchema is immutable.
71-
*/
63+
@Override
7264
public T globalStateSchema(StateSchema globalStateSchema) {
7365
this.globalStateSchema = globalStateSchema;
7466
return (T) this;
7567
}
7668

77-
/**
78-
* extraPages allows you to rent extra pages of memory for the application. Each page is 2048 bytes of shared
79-
* memory between approval and clear state programs. extraPages parameter must be an integer between 0 and 3 inclusive.
80-
*/
69+
@Override
8170
public T extraPages(Long extraPages) {
8271
if (extraPages == null || extraPages < 0 || extraPages > 3) {
8372
throw new IllegalArgumentException("extraPages must be an integer between 0 and 3 inclusive");

src/main/java/com/algorand/algosdk/builder/transaction/ApplicationUpdateTransactionBuilder.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.algorand.algosdk.transaction.Transaction;
55

66
@SuppressWarnings("unchecked")
7-
public class ApplicationUpdateTransactionBuilder<T extends ApplicationUpdateTransactionBuilder<T>> extends ApplicationBaseTransactionBuilder<T> {
7+
public class ApplicationUpdateTransactionBuilder<T extends ApplicationUpdateTransactionBuilder<T>> extends ApplicationBaseTransactionBuilder<T> implements TEALProgramSetter<T> {
88
private TEALProgram approvalProgram;
99
private TEALProgram clearStateProgram;
1010

@@ -27,18 +27,13 @@ protected void applyTo(Transaction txn) {
2727
super.applyTo(txn);
2828
}
2929

30-
/**
31-
* ApprovalProgram determines whether or not this ApplicationCall transaction will be approved or not.
32-
*/
30+
@Override
3331
public T approvalProgram(TEALProgram approvalProgram) {
3432
this.approvalProgram = approvalProgram;
3533
return (T) this;
3634
}
3735

38-
/**
39-
* ClearStateProgram executes when a clear state ApplicationCall transaction is executed. This program may not
40-
* reject the transaction, only update state.
41-
*/
36+
@Override
4237
public T clearStateProgram(TEALProgram clearStateProgram) {
4338
this.clearStateProgram = clearStateProgram;
4439
return (T) this;

0 commit comments

Comments
 (0)