I was playing around with Pyteal and I thought about this…
program = And( Txn.type_enum() == TxnType.Payment, Txn.fee() <= Int(1000), Txn.amount() >= Int(1000), Txn.sender() == Addr(), Global.group_size() == Int(1), Txn.rekey_to() == Global.zero_address() )
I want to declare the ‘’‘Txn.sender()’’’ to be the contract address. How do I specify that condition?
Txn.sender() is implicitly the contract address since it cant be anything else.
Ben
But I can specify the sender to another address like so: Txn.sender() == “address” and only that address passed will be the sender else the contract fails, So do you mean if I don’t specify, the Txn.sender() will be the contract address. Am I right?
In TEAL the Txn is the transaction currently being evaluated. The sender will always* be the contract address
*except in the case of a rekey
I understand now, Thank you Ben!