Unable to have example teal contracts approved

I am just following along the examples:

  1. Used this split.py template from github; version=3
    pyteal/split.py at master · algorand/pyteal · GitHub
    using the addresses supplied within sandbox docker.
    also created clear.teal; version 3 int 0

  2. Ran it, and gave me teal output, save as “sample.teal”

  3. copy the teal code to container in sandbox
    ./sandbox copyTo “sample.teal”

  4. Restarted my docker. File is updated, ok.

  5. run goal app create --creator MOYUWFGVM7FIHTBEPC5FT2N4QZ546RGRM2LECEXBO5VP3X2SA2AKKMMVKQ --approval-prog sample.teal --clear-prog clear.teal --global-byteslices 1 --global-ints 1 --local-byteslices 1 --local-ints 1

  6. returns TransactionPool.Remember: transaction PP7DHEXACNA3U3VZI5KMXGTHNNBXJDQNTVUKZ4QH7YWEVRBC6BHQ: transaction rejected by ApprovalProgram

Not quite sure what is wrong?
All the examples that didn’t have addresses ran successfully but I do not know what else to provide here?

pyteal/split.py at master · algorand/pyteal · GitHub is a “stateless TEAL” and should be used as a “logicsig” not as an application/stateful smart contract.

Learn more there: Smart Contract Overview - Algorand Developer Portal

I see. Related to this split payment, when the contract uses variables, I am not understanding where are the variables being inputted, such as TMPL_FEE, TMPL_OWN, etc.
I think I am getting confused when to use what
One example uses javascript, and pass arguments…

// Initialize arguments array
    const args = [];
    // // String parameter
    args.push(""); // do i pass my txn_fee etc here??
    // Integer parameter
    args.push(algosdk.encodeUint64(123)); 
    const lsig = algosdk.makeLogicSig(program, args);

It says push the arguments, what does it look like in this split example? But there’s another example that uses arg 0. Confusing.

TMPL_FEE, TMPL_OWN are different from arguments.
They are just template parameters that must be replaced by the correct value before compiling the TEAL code.
The TEAL compiler does not know of TMPL_FEE, …

Arguments are arguments of the logicsig. Every time the logic sig is used, you can give different arguments.

I see. I was getting very confused. I thought it was passed somewhere. Now I get it. Thanks.