Skip to content

Commit

Permalink
reformat local and global state to work with correct msgpack encoding (
Browse files Browse the repository at this point in the history
  • Loading branch information
barnjamin authored Jan 12, 2022
1 parent ee7f9d2 commit 5b496e0
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions algosdk/future/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -3110,15 +3110,28 @@ def create_dryrun(
appId = defaultAppId
# Make up app id, since tealdbg/dryrun doesnt like 0s
# https://github.com/algorand/go-algorand/blob/e466aa18d4d963868d6d15279b1c881977fa603f/libgoal/libgoal.go#L1089-L1090

ls = txn.local_schema
if ls is not None:
ls = models.ApplicationStateSchema(
ls.num_uints, ls.num_byte_slices
)

gs = txn.global_schema
if gs is not None:
gs = models.ApplicationStateSchema(
gs.num_uints, gs.num_byte_slices
)

app_infos.append(
models.Application(
id=appId,
params=models.ApplicationParams(
creator=txn.sender,
approval_program=txn.approval_program,
clear_state_program=txn.clear_program,
local_state_schema=txn.local_schema,
global_state_schema=txn.global_schema,
local_state_schema=ls,
global_state_schema=gs,
),
)
)
Expand Down

0 comments on commit 5b496e0

Please sign in to comment.