Skip to content

Commit

Permalink
Regenerate code from specification file (algorand#721)
Browse files Browse the repository at this point in the history
Co-authored-by: Algorand Generation Bot <codegen@algorand.com>
  • Loading branch information
2 people authored and michaeltchuang committed Jul 25, 2024
1 parent 6a10c62 commit 5bb6634
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ public class SimulateRequest extends PathResponse {
@JsonProperty("extra-opcode-budget")
public Long extraOpcodeBudget;

/**
* If true, signers for transactions that are missing signatures will be fixed
* during evaluation.
*/
@JsonProperty("fix-signers")
public Boolean fixSigners;

/**
* If provided, specifies the round preceding the simulation. State changes through
* this round will be used to run this simulation. Usually only the 4 most recent
Expand Down Expand Up @@ -70,6 +77,7 @@ public boolean equals(Object o) {
if (!Objects.deepEquals(this.allowUnnamedResources, other.allowUnnamedResources)) return false;
if (!Objects.deepEquals(this.execTraceConfig, other.execTraceConfig)) return false;
if (!Objects.deepEquals(this.extraOpcodeBudget, other.extraOpcodeBudget)) return false;
if (!Objects.deepEquals(this.fixSigners, other.fixSigners)) return false;
if (!Objects.deepEquals(this.round, other.round)) return false;
if (!Objects.deepEquals(this.txnGroups, other.txnGroups)) return false;

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

import java.security.NoSuchAlgorithmException;
import java.util.Objects;

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

Expand All @@ -24,6 +26,24 @@ public class SimulateTransactionResult extends PathResponse {
@JsonProperty("exec-trace")
public SimulationTransactionExecTrace execTrace;

/**
* The account that needed to sign this transaction when no signature was provided
* and the provided signer was incorrect.
*/
@JsonProperty("fixed-signer")
public void fixedSigner(String fixedSigner) throws NoSuchAlgorithmException {
this.fixedSigner = new Address(fixedSigner);
}
@JsonProperty("fixed-signer")
public String fixedSigner() throws NoSuchAlgorithmException {
if (this.fixedSigner != null) {
return this.fixedSigner.encodeAsString();
} else {
return null;
}
}
public Address fixedSigner;

/**
* Budget used during execution of a logic sig transaction.
*/
Expand Down Expand Up @@ -60,6 +80,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.fixedSigner, other.fixedSigner)) return false;
if (!Objects.deepEquals(this.logicSigBudgetConsumed, other.logicSigBudgetConsumed)) return false;
if (!Objects.deepEquals(this.txnResult, other.txnResult)) return false;
if (!Objects.deepEquals(this.unnamedResourcesAccessed, other.unnamedResourcesAccessed)) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ public class SimulationEvalOverrides extends PathResponse {
@JsonProperty("extra-opcode-budget")
public Long extraOpcodeBudget;

/**
* If true, signers for transactions that are missing signatures will be fixed
* during evaluation.
*/
@JsonProperty("fix-signers")
public Boolean fixSigners;

/**
* The maximum log calls one can make during simulation
*/
Expand All @@ -53,6 +60,7 @@ public boolean equals(Object o) {
if (!Objects.deepEquals(this.allowEmptySignatures, other.allowEmptySignatures)) return false;
if (!Objects.deepEquals(this.allowUnnamedResources, other.allowUnnamedResources)) return false;
if (!Objects.deepEquals(this.extraOpcodeBudget, other.extraOpcodeBudget)) return false;
if (!Objects.deepEquals(this.fixSigners, other.fixSigners)) return false;
if (!Objects.deepEquals(this.maxLogCalls, other.maxLogCalls)) return false;
if (!Objects.deepEquals(this.maxLogSize, other.maxLogSize)) return false;

Expand Down

0 comments on commit 5bb6634

Please sign in to comment.