This is an example of how to create a smart contract in Stellar Network, just follow the instructions below:
- Copy .env.example into a .env
- Go to Stellar Laboratory and create 2 accounts, copy their public and secret keys to .env for Bob and Alice
- Fund those accounts using Stellar Friendbot
- Create a third account for the Escrow and copy it into the .env
At this point, you can run npm start
to interact with the smart contract.
To show how it works, run the scripts in the following order:
- Crear el escrow
- Añadir el mecanismo multifirma
- Fondear el escrow
- Liberar los fondos
- Firmar la liberacion de fondos
- Retirar fondos