Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate code with the latest specification file (d559cb2f) #592

Merged
merged 1 commit into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@


/**
* Given an application ID and box name, it returns the box name and value (each
* base64 encoded). Box names must be in the goal app call arg encoding form
* Given an application ID and box name, it returns the round, box name, and value
* (each base64 encoded). Box names must be in the goal app call arg encoding form
* 'encoding:value'. For ints, use the form 'int:1234'. For raw bytes, use the form
* 'b64:A=='. For printable strings, use the form 'str:hello'. For addresses, use
* the form 'addr:XYZ...'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ public GetApplicationBoxes GetApplicationBoxes(Long applicationId) {
}

/**
* Given an application ID and box name, it returns the box name and value (each
* base64 encoded). Box names must be in the goal app call arg encoding form
* Given an application ID and box name, it returns the round, box name, and value
* (each base64 encoded). Box names must be in the goal app call arg encoding form
* 'encoding:value'. For ints, use the form 'int:1234'. For raw bytes, use the form
* 'b64:A=='. For printable strings, use the form 'str:hello'. For addresses, use
* the form 'addr:XYZ...'.
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/algorand/algosdk/v2/client/model/Box.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public String name() {
}
public byte[] name;

/**
* The round for which this information is relevant
*/
@JsonProperty("round")
public Long round;

/**
* (value) box value, base64 encoded.
*/
Expand All @@ -43,6 +49,7 @@ public boolean equals(Object o) {

Box other = (Box) o;
if (!Objects.deepEquals(this.name, other.name)) return false;
if (!Objects.deepEquals(this.round, other.round)) return false;
if (!Objects.deepEquals(this.value, other.value)) return false;

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public class SimulateRequest extends PathResponse {
@JsonProperty("allow-more-logging")
public Boolean allowMoreLogging;

/**
* An object that configures simulation execution trace.
*/
@JsonProperty("exec-trace-config")
public SimulateTraceConfig execTraceConfig;

/**
* Applies extra opcode budget during simulation for each transaction group.
*/
Expand All @@ -46,6 +52,7 @@ public boolean equals(Object o) {
SimulateRequest other = (SimulateRequest) o;
if (!Objects.deepEquals(this.allowEmptySignatures, other.allowEmptySignatures)) return false;
if (!Objects.deepEquals(this.allowMoreLogging, other.allowMoreLogging)) return false;
if (!Objects.deepEquals(this.execTraceConfig, other.execTraceConfig)) return false;
if (!Objects.deepEquals(this.extraOpcodeBudget, other.extraOpcodeBudget)) return false;
if (!Objects.deepEquals(this.txnGroups, other.txnGroups)) return false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ public class SimulateResponse extends PathResponse {
@JsonProperty("eval-overrides")
public SimulationEvalOverrides evalOverrides;

/**
* An object that configures simulation execution trace.
*/
@JsonProperty("exec-trace-config")
public SimulateTraceConfig execTraceConfig;

/**
* The round immediately preceding this simulation. State changes through this
* round were used to run this simulation.
Expand Down Expand Up @@ -47,6 +53,7 @@ public boolean equals(Object o) {

SimulateResponse other = (SimulateResponse) o;
if (!Objects.deepEquals(this.evalOverrides, other.evalOverrides)) return false;
if (!Objects.deepEquals(this.execTraceConfig, other.execTraceConfig)) return false;
if (!Objects.deepEquals(this.lastRound, other.lastRound)) return false;
if (!Objects.deepEquals(this.txnGroups, other.txnGroups)) return false;
if (!Objects.deepEquals(this.version, other.version)) return false;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.algorand.algosdk.v2.client.model;

import java.util.Objects;

import com.algorand.algosdk.v2.client.common.PathResponse;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* An object that configures simulation execution trace.
*/
public class SimulateTraceConfig extends PathResponse {

/**
* A boolean option for opting in execution trace features simulation endpoint.
*/
@JsonProperty("enable")
public Boolean enable;

@Override
public boolean equals(Object o) {

if (this == o) return true;
if (o == null) return false;

SimulateTraceConfig other = (SimulateTraceConfig) o;
if (!Objects.deepEquals(this.enable, other.enable)) return false;

return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ public class SimulateTransactionResult extends PathResponse {
@JsonProperty("app-budget-consumed")
public Long appBudgetConsumed;

/**
* The execution trace of calling an app or a logic sig, containing the inner app
* call trace in a recursive way.
*/
@JsonProperty("exec-trace")
public SimulationTransactionExecTrace execTrace;

/**
* Budget used during execution of a logic sig transaction.
*/
Expand All @@ -38,6 +45,7 @@ public boolean equals(Object o) {

SimulateTransactionResult other = (SimulateTransactionResult) o;
if (!Objects.deepEquals(this.appBudgetConsumed, other.appBudgetConsumed)) return false;
if (!Objects.deepEquals(this.execTrace, other.execTrace)) return false;
if (!Objects.deepEquals(this.logicSigBudgetConsumed, other.logicSigBudgetConsumed)) return false;
if (!Objects.deepEquals(this.txnResult, other.txnResult)) return false;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.algorand.algosdk.v2.client.model;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import com.algorand.algosdk.v2.client.common.PathResponse;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The set of trace information and effect from evaluating a single opcode.
*/
public class SimulationOpcodeTraceUnit extends PathResponse {

/**
* The program counter of the current opcode being evaluated.
*/
@JsonProperty("pc")
public Long pc;

/**
* The indexes of the traces for inner transactions spawned by this opcode, if any.
*/
@JsonProperty("spawned-inners")
public List<Long> spawnedInners = new ArrayList<Long>();

@Override
public boolean equals(Object o) {

if (this == o) return true;
if (o == null) return false;

SimulationOpcodeTraceUnit other = (SimulationOpcodeTraceUnit) o;
if (!Objects.deepEquals(this.pc, other.pc)) return false;
if (!Objects.deepEquals(this.spawnedInners, other.spawnedInners)) return false;

return true;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.algorand.algosdk.v2.client.model;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import com.algorand.algosdk.v2.client.common.PathResponse;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The execution trace of calling an app or a logic sig, containing the inner app
* call trace in a recursive way.
*/
public class SimulationTransactionExecTrace extends PathResponse {

/**
* Program trace that contains a trace of opcode effects in an approval program.
*/
@JsonProperty("approval-program-trace")
public List<SimulationOpcodeTraceUnit> approvalProgramTrace = new ArrayList<SimulationOpcodeTraceUnit>();

/**
* Program trace that contains a trace of opcode effects in a clear state program.
*/
@JsonProperty("clear-state-program-trace")
public List<SimulationOpcodeTraceUnit> clearStateProgramTrace = new ArrayList<SimulationOpcodeTraceUnit>();

/**
* An array of SimulationTransactionExecTrace representing the execution trace of
* any inner transactions executed.
*/
@JsonProperty("inner-trace")
public List<SimulationTransactionExecTrace> innerTrace = new ArrayList<SimulationTransactionExecTrace>();

/**
* Program trace that contains a trace of opcode effects in a logic sig.
*/
@JsonProperty("logic-sig-trace")
public List<SimulationOpcodeTraceUnit> logicSigTrace = new ArrayList<SimulationOpcodeTraceUnit>();

@Override
public boolean equals(Object o) {

if (this == o) return true;
if (o == null) return false;

SimulationTransactionExecTrace other = (SimulationTransactionExecTrace) o;
if (!Objects.deepEquals(this.approvalProgramTrace, other.approvalProgramTrace)) return false;
if (!Objects.deepEquals(this.clearStateProgramTrace, other.clearStateProgramTrace)) return false;
if (!Objects.deepEquals(this.innerTrace, other.innerTrace)) return false;
if (!Objects.deepEquals(this.logicSigTrace, other.logicSigTrace)) return false;

return true;
}
}