Call an app and send it Algo

I want to make an app that runs Teal instructions when I send it some Algo, either using a Application Call or a Payment to the escrow account address.
Is this possible, or is there a workround?

Applications just react to Application Calls. If you just send some ALGO thorough a Payment transaction to the Smart Contract address, at protocol level, this has no difference with respect to sending some ALGO to any other account address, so you will not obtain any Smart Contract effect.

If you want your Smart Contract react specifically to Payment transactions you should pair both the Application Call and the Payment into a Group Transaction. Build your TEAL logic in such a way that if the Smart Contract is called through a Group Transaction, according your conditions (e.g. Payment amount and receiver are those expected by TEAL conditions), then it will react accordingly (e.g. minting an ASA, sending an ASA, updating a local variable, etc.).

1 Like

Thanks, that makes sense

there is no need to create application and make application calls

escrow account can sign transactions by teal program… the hash of this teal program is basically the address of this escrow account

but i agree that people usually do the application and application calls, so that they can track usage of their teal escrow accounts at one indexer call…