Escrow stateless smart contract - General - Algorand

Escrow stateless smart contract

post by isha on Sep 24, 2021

Can anyone please help to understand how to add conditions for Escrow account in stateless smart contracts.

post by danger_dave on Sep 24, 2021

Hey isha,

Could you be more specific?

Smart Contracts are written in TEAL (Transaction Execution Approval Language).

There are several examples of stateless smart contracts available to help you learn more here.

Some good ones for getting started in Python are:

  1. Hash Time Lock Contract
  2. Periodic Payment

post by isha on Sep 24, 2021

Okay so for example,

If I want to transfer ASA in exchange of algos using an escrow account.

So here my condition is once the receiver receives ASA only then algos from escrow account should be transferred(released) to the ASA sender.

post by fabrice on Sep 24, 2021

This is exactly what the limit order contract does.

To see how it does it, see Algorand Developer Portal
To see how to use it: LimitOrder Contract with JavaScript | Algorand Developer Portal

(I would recommend searching for similar tutorials in Python, Java, Go)

I would strongly recommend to read the introduction to smart contracts first:

The smart contract above is “stateless”.

post by isha on Sep 24, 2021

If you have any example of stateless smart contract related to escrow account please send me.

post by isha on Sep 25, 2021

Okay great I’ll try working on this.

Thanks a lot!