You will find some examples, such as a pool contract, and a contract with the Tezos specification fa1.2.
You can find the addresses of the contracts deployed in carthagenet in this directory.
We are going to need some faucet to be able to interact with the contracts. You can download faucet from https://faucet.tzalpha.net/
Replace the content of the faucetA and faucetB files with some faucet downloaded from the previous url.
This is in case the accounts run out of balance.
In case your faucet is new, you can activate it executing this command. If is already activate it the script will throw an error.
yarn activate
You can build the existing contracts, ligo.pool and fa12.ligo.
yarn build
// Only pool
yarn build:pool
// Only fa12
yarn build:token
You can deploy the existing contracts, ligo.pool and fa12.ligo, to the carthagenet network executing the following commands. Also the faucets files are going to be activated with this script.
yarn deploy
// Only pool
yarn deploy:pool
// Only fa12
yarn deploy:token
To run the unit tests for the pool.ligo contract, you must execute the following command:
yarn test:pool
To run the unit tests for the fa12.ligo contract, you must execute the following command:
yarn test:token
To run the unit tests for the borrow methods, you must execute the following command:
yarn test:borrow
You can run the examples with the following commands:
yarn example:deposit
yarn example:withdraw
yarn example:borrow
yarn example:repayborrow