Thanks for your answer @fabrice.
The child application is correctly deployed as a standalone using its create method.
I also think encoding the arguments on the inner transaction could be the problem.
What would be the correct way to invoke the create method using InnerTxnBuilder.MethodCall?
I’m trying as follows
InnerTxnBuilder.Begin(),
InnerTxnBuilder.MethodCall(
app_id=Int(0),
method_signature="create(address,address,uint64,uint64,string)void",
args=[
Global.creator_address(),
Global.current_application_address(),
parent_arg1,
parent_arg3,
parent_arg2
],
extra_fields={
TxnField.approval_program: self. child_app.approval.binary,
TxnField.clear_state_program: self. child_app.clear.binary,
TxnField.fee: Int(0)
}
),
InnerTxnBuilder.Submit(),
but app_id=Int(0) is not an acceptable app reference:
beaker.client.logic_error.LogicException: Txn XSZKJYKCHVXFOPSWUPNWDOAUXC3Z4A3BP6SQ56VTJFUGZ2E6A5MA had error 'invalid App reference 0' at PC 858 and Source Line 418:
assert
itxn_begin
pushint 6 // appl
itxn_field TypeEnum
intc_0 // 0
itxn_field ApplicationID <-- Error
pushbytes 0x22418c77 // "create(address,address,uint64,uint64,string)void"
itxn_field ApplicationArgs
global CreatorAddress
itxn_field ApplicationArgs