Skip to content

Commit

Permalink
msgpack serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
ahangsu committed Jul 31, 2023
1 parent f2432a1 commit 418f614
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions algosdk/v2client/models/simulate_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def dictify(self) -> Dict[str, Any]:

class SimulateTraceConfig(object):
enable: bool
stack_change: bool
scratch_change: bool

def __init__(
self,
Expand All @@ -43,6 +45,7 @@ class SimulateRequest(object):
allow_more_logs: bool
allow_empty_signatures: bool
extra_opcode_budget: int
exec_trace_config: SimulateTraceConfig

def __init__(
self,
Expand All @@ -51,14 +54,15 @@ def __init__(
allow_more_logs: bool = False,
allow_empty_signatures: bool = False,
extra_opcode_budget: int = 0,
trace_config: Optional[SimulateTraceConfig] = None,
exec_trace_config: Optional[SimulateTraceConfig] = None,
) -> None:
self.txn_groups = txn_groups
self.allow_more_logs = allow_more_logs
self.allow_empty_signatures = allow_empty_signatures
self.extra_opcode_budget = extra_opcode_budget
if trace_config:
self.trace_config = trace_config
self.exec_trace_config = (
exec_trace_config if exec_trace_config else SimulateTraceConfig()
)

def dictify(self) -> Dict[str, Any]:
return {
Expand All @@ -68,5 +72,5 @@ def dictify(self) -> Dict[str, Any]:
"allow-more-logging": self.allow_more_logs,
"allow-empty-signatures": self.allow_empty_signatures,
"extra-opcode-budget": self.extra_opcode_budget,
"exec-trace-config": self.trace_config,
"exec-trace-config": self.exec_trace_config,
}

0 comments on commit 418f614

Please sign in to comment.