Issue with application call transaction

Hello,

I’m trying to call my application but the SDK enforces an approval program, which is strange. Check the SDK call:

	toSignByOwner, err := transaction.MakeApplicationCallTx(positionAppId, positionCallAppArgs, accounts, make([]uint64, 0),
		foreignAssets, types.NoOpOC, make([]byte, 0), clearProgram, globalSchema, localSchema, txParams, account.Address,
		note, types.Digest{}, [32]byte{}, types.Address{})

I shouldn’t need to pass most of this parameters, I would be satisfied with just:

txParams, AppArgs, AppId, onComplete and accounts.

Maybe because of all these parameters the call from SDK result in this failure:

“programs may only be specified during application creation or update”

Has anybody seen this before? I’m afraid this is an issue with Golang SDK since I can see methods in others languages with less arguments. Can someone confirm such a behavior ?

I’m guessing you’re using the Go SDK.

MakeApplicationCallTx is the generic function. You need to specify nil for approvalProg and clearProg.

If it actually simpler to use the specific function. In your case, it is MakeApplicationNoOpTx.

Hey Fabrice, thanks for the answer. I noticed the other function some time later, it seems to work fine now.

:slight_smile: