Skip to content

Commit adbda95

Browse files
Regenerate code from specification file (#592)
Co-authored-by: Algorand Generation Bot <[email protected]>
1 parent 64b38d2 commit adbda95

File tree

9 files changed

+157
-4
lines changed

9 files changed

+157
-4
lines changed

src/main/java/com/algorand/algosdk/v2/client/algod/GetApplicationBoxByName.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010

1111
/**
12-
* Given an application ID and box name, it returns the box name and value (each
13-
* base64 encoded). Box names must be in the goal app call arg encoding form
12+
* Given an application ID and box name, it returns the round, box name, and value
13+
* (each base64 encoded). Box names must be in the goal app call arg encoding form
1414
* 'encoding:value'. For ints, use the form 'int:1234'. For raw bytes, use the form
1515
* 'b64:A=='. For printable strings, use the form 'str:hello'. For addresses, use
1616
* the form 'addr:XYZ...'.

src/main/java/com/algorand/algosdk/v2/client/common/AlgodClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@ public GetApplicationBoxes GetApplicationBoxes(Long applicationId) {
314314
}
315315

316316
/**
317-
* Given an application ID and box name, it returns the box name and value (each
318-
* base64 encoded). Box names must be in the goal app call arg encoding form
317+
* Given an application ID and box name, it returns the round, box name, and value
318+
* (each base64 encoded). Box names must be in the goal app call arg encoding form
319319
* 'encoding:value'. For ints, use the form 'int:1234'. For raw bytes, use the form
320320
* 'b64:A=='. For printable strings, use the form 'str:hello'. For addresses, use
321321
* the form 'addr:XYZ...'.

src/main/java/com/algorand/algosdk/v2/client/model/Box.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ public String name() {
2323
}
2424
public byte[] name;
2525

26+
/**
27+
* The round for which this information is relevant
28+
*/
29+
@JsonProperty("round")
30+
public Long round;
31+
2632
/**
2733
* (value) box value, base64 encoded.
2834
*/
@@ -43,6 +49,7 @@ public boolean equals(Object o) {
4349

4450
Box other = (Box) o;
4551
if (!Objects.deepEquals(this.name, other.name)) return false;
52+
if (!Objects.deepEquals(this.round, other.round)) return false;
4653
if (!Objects.deepEquals(this.value, other.value)) return false;
4754

4855
return true;

src/main/java/com/algorand/algosdk/v2/client/model/SimulateRequest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ public class SimulateRequest extends PathResponse {
2525
@JsonProperty("allow-more-logging")
2626
public Boolean allowMoreLogging;
2727

28+
/**
29+
* An object that configures simulation execution trace.
30+
*/
31+
@JsonProperty("exec-trace-config")
32+
public SimulateTraceConfig execTraceConfig;
33+
2834
/**
2935
* Applies extra opcode budget during simulation for each transaction group.
3036
*/
@@ -46,6 +52,7 @@ public boolean equals(Object o) {
4652
SimulateRequest other = (SimulateRequest) o;
4753
if (!Objects.deepEquals(this.allowEmptySignatures, other.allowEmptySignatures)) return false;
4854
if (!Objects.deepEquals(this.allowMoreLogging, other.allowMoreLogging)) return false;
55+
if (!Objects.deepEquals(this.execTraceConfig, other.execTraceConfig)) return false;
4956
if (!Objects.deepEquals(this.extraOpcodeBudget, other.extraOpcodeBudget)) return false;
5057
if (!Objects.deepEquals(this.txnGroups, other.txnGroups)) return false;
5158

src/main/java/com/algorand/algosdk/v2/client/model/SimulateResponse.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ public class SimulateResponse extends PathResponse {
2020
@JsonProperty("eval-overrides")
2121
public SimulationEvalOverrides evalOverrides;
2222

23+
/**
24+
* An object that configures simulation execution trace.
25+
*/
26+
@JsonProperty("exec-trace-config")
27+
public SimulateTraceConfig execTraceConfig;
28+
2329
/**
2430
* The round immediately preceding this simulation. State changes through this
2531
* round were used to run this simulation.
@@ -47,6 +53,7 @@ public boolean equals(Object o) {
4753

4854
SimulateResponse other = (SimulateResponse) o;
4955
if (!Objects.deepEquals(this.evalOverrides, other.evalOverrides)) return false;
56+
if (!Objects.deepEquals(this.execTraceConfig, other.execTraceConfig)) return false;
5057
if (!Objects.deepEquals(this.lastRound, other.lastRound)) return false;
5158
if (!Objects.deepEquals(this.txnGroups, other.txnGroups)) return false;
5259
if (!Objects.deepEquals(this.version, other.version)) return false;
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.algorand.algosdk.v2.client.model;
2+
3+
import java.util.Objects;
4+
5+
import com.algorand.algosdk.v2.client.common.PathResponse;
6+
import com.fasterxml.jackson.annotation.JsonProperty;
7+
8+
/**
9+
* An object that configures simulation execution trace.
10+
*/
11+
public class SimulateTraceConfig extends PathResponse {
12+
13+
/**
14+
* A boolean option for opting in execution trace features simulation endpoint.
15+
*/
16+
@JsonProperty("enable")
17+
public Boolean enable;
18+
19+
@Override
20+
public boolean equals(Object o) {
21+
22+
if (this == o) return true;
23+
if (o == null) return false;
24+
25+
SimulateTraceConfig other = (SimulateTraceConfig) o;
26+
if (!Objects.deepEquals(this.enable, other.enable)) return false;
27+
28+
return true;
29+
}
30+
}

src/main/java/com/algorand/algosdk/v2/client/model/SimulateTransactionResult.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ public class SimulateTransactionResult extends PathResponse {
1717
@JsonProperty("app-budget-consumed")
1818
public Long appBudgetConsumed;
1919

20+
/**
21+
* The execution trace of calling an app or a logic sig, containing the inner app
22+
* call trace in a recursive way.
23+
*/
24+
@JsonProperty("exec-trace")
25+
public SimulationTransactionExecTrace execTrace;
26+
2027
/**
2128
* Budget used during execution of a logic sig transaction.
2229
*/
@@ -38,6 +45,7 @@ public boolean equals(Object o) {
3845

3946
SimulateTransactionResult other = (SimulateTransactionResult) o;
4047
if (!Objects.deepEquals(this.appBudgetConsumed, other.appBudgetConsumed)) return false;
48+
if (!Objects.deepEquals(this.execTrace, other.execTrace)) return false;
4149
if (!Objects.deepEquals(this.logicSigBudgetConsumed, other.logicSigBudgetConsumed)) return false;
4250
if (!Objects.deepEquals(this.txnResult, other.txnResult)) return false;
4351

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package com.algorand.algosdk.v2.client.model;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
import java.util.Objects;
6+
7+
import com.algorand.algosdk.v2.client.common.PathResponse;
8+
import com.fasterxml.jackson.annotation.JsonProperty;
9+
10+
/**
11+
* The set of trace information and effect from evaluating a single opcode.
12+
*/
13+
public class SimulationOpcodeTraceUnit extends PathResponse {
14+
15+
/**
16+
* The program counter of the current opcode being evaluated.
17+
*/
18+
@JsonProperty("pc")
19+
public Long pc;
20+
21+
/**
22+
* The indexes of the traces for inner transactions spawned by this opcode, if any.
23+
*/
24+
@JsonProperty("spawned-inners")
25+
public List<Long> spawnedInners = new ArrayList<Long>();
26+
27+
@Override
28+
public boolean equals(Object o) {
29+
30+
if (this == o) return true;
31+
if (o == null) return false;
32+
33+
SimulationOpcodeTraceUnit other = (SimulationOpcodeTraceUnit) o;
34+
if (!Objects.deepEquals(this.pc, other.pc)) return false;
35+
if (!Objects.deepEquals(this.spawnedInners, other.spawnedInners)) return false;
36+
37+
return true;
38+
}
39+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package com.algorand.algosdk.v2.client.model;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
import java.util.Objects;
6+
7+
import com.algorand.algosdk.v2.client.common.PathResponse;
8+
import com.fasterxml.jackson.annotation.JsonProperty;
9+
10+
/**
11+
* The execution trace of calling an app or a logic sig, containing the inner app
12+
* call trace in a recursive way.
13+
*/
14+
public class SimulationTransactionExecTrace extends PathResponse {
15+
16+
/**
17+
* Program trace that contains a trace of opcode effects in an approval program.
18+
*/
19+
@JsonProperty("approval-program-trace")
20+
public List<SimulationOpcodeTraceUnit> approvalProgramTrace = new ArrayList<SimulationOpcodeTraceUnit>();
21+
22+
/**
23+
* Program trace that contains a trace of opcode effects in a clear state program.
24+
*/
25+
@JsonProperty("clear-state-program-trace")
26+
public List<SimulationOpcodeTraceUnit> clearStateProgramTrace = new ArrayList<SimulationOpcodeTraceUnit>();
27+
28+
/**
29+
* An array of SimulationTransactionExecTrace representing the execution trace of
30+
* any inner transactions executed.
31+
*/
32+
@JsonProperty("inner-trace")
33+
public List<SimulationTransactionExecTrace> innerTrace = new ArrayList<SimulationTransactionExecTrace>();
34+
35+
/**
36+
* Program trace that contains a trace of opcode effects in a logic sig.
37+
*/
38+
@JsonProperty("logic-sig-trace")
39+
public List<SimulationOpcodeTraceUnit> logicSigTrace = new ArrayList<SimulationOpcodeTraceUnit>();
40+
41+
@Override
42+
public boolean equals(Object o) {
43+
44+
if (this == o) return true;
45+
if (o == null) return false;
46+
47+
SimulationTransactionExecTrace other = (SimulationTransactionExecTrace) o;
48+
if (!Objects.deepEquals(this.approvalProgramTrace, other.approvalProgramTrace)) return false;
49+
if (!Objects.deepEquals(this.clearStateProgramTrace, other.clearStateProgramTrace)) return false;
50+
if (!Objects.deepEquals(this.innerTrace, other.innerTrace)) return false;
51+
if (!Objects.deepEquals(this.logicSigTrace, other.logicSigTrace)) return false;
52+
53+
return true;
54+
}
55+
}

0 commit comments

Comments
 (0)