Skip to content

Commit c42ad19

Browse files
committed
Merge branch 'release/2.1.0'
2 parents 910098e + bb13e02 commit c42ad19

Some content is hidden

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

57 files changed

+3139
-14
lines changed

.github/workflows/pr-type-category.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ jobs:
1010
name: Check PR Category and Type
1111
steps:
1212
- name: Checking for correct number of required github pr labels
13-
uses: mheap/github-action-required-labels@v2
13+
uses: mheap/github-action-required-labels@v3
1414
with:
1515
mode: exactly
1616
count: 1
1717
labels: "New Feature, Enhancement, Bug-Fix, Not-Yet-Enabled, Skip-Release-Notes"
1818

1919
- name: "Checking for PR Category in PR title. Should be like '<category>: <pr title>'."
20+
env:
21+
PR_TITLE: ${{ github.event.pull_request.title }}
2022
run: |
21-
if [[ ! "${{ github.event.pull_request.title }}" =~ ^.{2,}\:.{2,} ]]; then
23+
if [[ ! "$PR_TITLE" =~ ^.{2,}\:.{2,} ]]; then
2224
echo "## PR Category is missing from PR title. Please add it like '<category>: <pr title>'." >> GITHUB_STEP_SUMMARY
2325
exit 1
2426
fi

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# 2.1.0
2+
3+
## What's Changed
4+
Supports new devmode block timestamp offset endpoints.
5+
6+
### Bugfixes
7+
* Bug-Fix: update label github action to v3 by @michaeltchuang in https://github.com/algorand/java-algorand-sdk/pull/531
8+
### Enhancements
9+
* algod REST API: Add test for /v2/teal/disassemble by @michaeldiamant in https://github.com/algorand/java-algorand-sdk/pull/433
10+
* Documentation: Adds examples to be pulled into docs by @barnjamin in https://github.com/algorand/java-algorand-sdk/pull/506
11+
* Fix: improve error message for mismatched args by @barnjamin in https://github.com/algorand/java-algorand-sdk/pull/511
12+
* api: Regenerate Client Interfaces and implement cucumber tests. by @winder in https://github.com/algorand/java-algorand-sdk/pull/555
13+
* DevOps: Add CODEOWNERS to restrict workflow editing by @onetechnical in https://github.com/algorand/java-algorand-sdk/pull/559
14+
15+
## New Contributors
16+
* @michaeltchuang made their first contribution in https://github.com/algorand/java-algorand-sdk/pull/531
17+
18+
**Full Changelog**: https://github.com/algorand/java-algorand-sdk/compare/2.0.0...2.1.0
19+
120
# 2.0.0
221

322
## What's Changed

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.github/ @algorand/dev
2+
.circleci/ @algorand/dev

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>2.0.0</version>
22+
<version>2.1.0</version>
2323
</dependency>
2424
```
2525

examples/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Algorand Java SDK Examples
2+
3+
4+
5+
Running
6+
--------
7+
Package with `mvn`
8+
```sh
9+
mvn package
10+
```
11+
12+
Run an example with java
13+
```sh
14+
java -cp target/sdk-extras-1.0-SNAPSHOT.jar com.algorand.examples.Example
15+
```

examples/application/approval.teal

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
#pragma version 4
2+
// Handle each possible OnCompletion type. We don't have to worry about
3+
// handling ClearState, because the ClearStateProgram will execute in that
4+
// case, not the ApprovalProgram.
5+
txn ApplicationID
6+
int 0
7+
==
8+
bnz handle_approve
9+
10+
txn OnCompletion
11+
int NoOp
12+
==
13+
bnz handle_noop
14+
15+
txn OnCompletion
16+
int OptIn
17+
==
18+
bnz handle_approve
19+
20+
txn OnCompletion
21+
int CloseOut
22+
==
23+
bnz handle_closeout
24+
25+
txn OnCompletion
26+
int UpdateApplication
27+
==
28+
bnz handle_updateapp
29+
30+
txn OnCompletion
31+
int DeleteApplication
32+
==
33+
bnz handle_deleteapp
34+
35+
// Unexpected OnCompletion value. Should be unreachable.
36+
err
37+
38+
handle_noop:
39+
// Handle NoOp
40+
41+
// read global state
42+
byte "counter"
43+
dup
44+
app_global_get
45+
46+
// increment the value
47+
int 1
48+
+
49+
50+
// store to scratch space
51+
dup
52+
store 0
53+
54+
// update global state
55+
app_global_put
56+
57+
// read local state for sender
58+
int 0
59+
byte "counter"
60+
app_local_get
61+
62+
// increment the value
63+
int 1
64+
+
65+
store 1
66+
67+
// update local state for sender
68+
int 0
69+
byte "counter"
70+
load 1
71+
app_local_put
72+
73+
// load return value as approval
74+
load 0
75+
return
76+
77+
78+
handle_closeout:
79+
// Handle CloseOut
80+
//approval
81+
int 1
82+
return
83+
84+
handle_deleteapp:
85+
// Check for creator
86+
global CreatorAddress
87+
txn Sender
88+
==
89+
return
90+
91+
handle_updateapp:
92+
// Check for creator
93+
global CreatorAddress
94+
txn Sender
95+
==
96+
return
97+
98+
handle_approve:
99+
int 1
100+
return
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#pragma version 4
2+
// Handle each possible OnCompletion type. We don't have to worry about
3+
// handling ClearState, because the ClearStateProgram will execute in that
4+
// case, not the ApprovalProgram.
5+
6+
txn ApplicationID
7+
int 0
8+
==
9+
bnz handle_approve
10+
11+
txn OnCompletion
12+
int NoOp
13+
==
14+
bnz handle_noop
15+
16+
txn OnCompletion
17+
int OptIn
18+
==
19+
bnz handle_approve
20+
21+
txn OnCompletion
22+
int CloseOut
23+
==
24+
bnz handle_closeout
25+
26+
txn OnCompletion
27+
int UpdateApplication
28+
==
29+
bnz handle_updateapp
30+
31+
txn OnCompletion
32+
int DeleteApplication
33+
==
34+
bnz handle_deleteapp
35+
36+
// Unexpected OnCompletion value. Should be unreachable.
37+
err
38+
39+
handle_noop:
40+
// Handle NoOp
41+
42+
// read global state
43+
byte "counter"
44+
dup
45+
app_global_get
46+
47+
// increment the value
48+
int 1
49+
+
50+
51+
// store to scratch space
52+
dup
53+
store 0
54+
55+
// update global state
56+
app_global_put
57+
58+
// read local state for sender
59+
int 0
60+
byte "counter"
61+
app_local_get
62+
63+
// increment the value
64+
int 1
65+
+
66+
store 1
67+
68+
// update local state for sender
69+
// update "counter"
70+
int 0
71+
byte "counter"
72+
load 1
73+
app_local_put
74+
75+
// update "timestamp"
76+
int 0
77+
byte "timestamp"
78+
txn ApplicationArgs 0
79+
app_local_put
80+
81+
// load return value as approval
82+
load 0
83+
return
84+
85+
handle_closeout:
86+
// Handle CloseOut
87+
//approval
88+
int 1
89+
return
90+
91+
handle_deleteapp:
92+
// Check for creator
93+
global CreatorAddress
94+
txn Sender
95+
==
96+
return
97+
98+
handle_updateapp:
99+
// Check for creator
100+
global CreatorAddress
101+
txn Sender
102+
==
103+
return
104+
105+
handle_approve:
106+
int 1
107+
return

examples/application/clear.teal

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#pragma version 4
2+
int 1
3+
return

0 commit comments

Comments
 (0)