I’m using a stateless logic program to verify a set of signatures for a group of app call transactions, so each app call TX0,TX1,…TXn will be checked by a stateless program that works in tandem.
I’m having difficulties crafting the group transaction to work in this manner.
What Im doing is:
- Issuing the app-calls with sender set to stateless logic hash
$STATELESS_ADDR
, e.g:
goal app call --app-id $1 --from "$STATELESS_ADDR" --app-arg "str:verify" --app-arg "b64:$GK064" --app-arg "int:19" --noteb64 "$VAABODY64" -o verify0.txn
goal app call --app-id $1 --from "$STATELESS_ADDR" --app-arg "str:verify" --app-arg "b64:$GK164" --app-arg "int:19" --noteb64 "$VAABODY64" -o verify1.txn
goal app call --app-id $1 --from "$STATELESS_ADDR" --app-arg "str:verify" --app-arg "b64:$GK264" --app-arg "int:19" --noteb64 "$VAABODY64" -o verify2.txn
goal app call --app-id $1 --from "$STATELESS_ADDR" --app-arg "str:verify" --app-arg "b64:$GK364" --app-arg "int:19" --noteb64 "$VAABODY64" -o verify3.txn
- Assigning a group ID, combining and splitting the resulting TXs:
cat verify0.txn verify1.txn verify2.txn verify3.txn > verifycc.txn
goal clerk group -i verifycc.txn -o group.txn
goal clerk split -i group.txn -o verify-signed
- Signing the transactions with the program logic (with an additional argument I need),
goal clerk sign --program vaa-verify.teal --argb64 "$SIGNATURES064" --infile verify-signed-0 --outfile verify-signed-0
goal clerk sign --program vaa-verify.teal --argb64 "$SIGNATURES164" --infile verify-signed-1 --outfile verify-signed-1
goal clerk sign --program vaa-verify.teal --argb64 "$SIGNATURES264" --infile verify-signed-2 --outfile verify-signed-2 -
goal clerk sign --program vaa-verify.teal --argb64 "$SIGNATURES364" --infile verify-signed-3 --outfile verify-signed-3
cat verify-signed-0 verify-signed-1 verify-signed-2 verify-signed-3 > verifygroup.stxn
According to my information at hand, the logicSig can be used like this (unsigned) but If I sign the final group transaction with a standard account, goal yells me with “must be authorized by X” (X being the stateless logic).
Any tip of doing this in the right manner?
Thank you