Beispiel #1
0
# Freezing, and txgroup
assert not goal.holding(goal.account, gold)[1]
freeze1 = goal.afrz(flo, gold, goal.account, True)
freeze2 = goal.afrz(flo, gold, joe, True)
txinfo, err = goal.send_group([freeze1, freeze2])
assert not err, err
assert goal.holding(goal.account, gold)[1]
assert goal.holding(joe, gold)[1]

# App create
teal = "test/scripts/e2e_subs/tealprogs"
approval = goal.assemble(os.path.join(teal, "app-escrow.teal"))
yes = goal.assemble("#pragma version 2\nint 28")  # 28 is just to uniquify
create = goal.appl(flo, 0,
                   local_schema=(1, 0),
                   global_schema=(0, 4),
                   approval_program=approval,
                   clear_program=yes)
txinfo, err = goal.send(create)
app_id = txinfo['application-index']
assert app_id

# app_create is a convenience wrapper around appl
create = goal.app_create(flo, approval, local_schema=(1, 0))
txinfo, err = goal.send(create)
assert not err, err

app2_id = txinfo['application-index']
assert app_id

app_info = goal.app_info(app_id)