Homepage • Applications Repository • Deployed Contracts
⚠️ Tezos Payments is in active development so any component (application, contract, package, API) is subject to change⚠️
Prod
Coming Soon
Smart contracts are the core of the Tezos payments. There are three types of contracts:
-
Service contract. This contract represents information of a user's real service, and has methods to update this information, and also has a method of the ability to accept payments.
src/service/main.religo -
Services factory contract. This contract stores a collection of the created service contracts for each user, and a contract of the current implementation that helps to produce new service contracts.
src/services-factory/main.religo -
Services factory implementation contract. Using this contract, users can create service contracts for themselves.
src/services-factory-implementation/main.religo
Smart contracts are written in LIGO using the ReasonLIGO syntax.
This repository contains all smart contracts and their tests
tezospayments-contracts/
├── migrations
├── scripts
├── src/
│ ├── common
│ ├── main
│ ├── service
│ ├── services-factory
│ └── services-factory-implementation
├── tests
└── typings
-
migrations
. Smart contract migrations; -
scripts
. Any tool scripts for building, testing, or any other development help; -
src
. Source code of smart contracts;-
common
. Common types shared in smart contracts; -
lambdas
. Code that will be compiled as a lambda; -
main
. Contracts that will be compiled; -
<contract-name>
. Contract implementations;
-
-
tests
. Contract tests. This directory contains not only tests but also test data; -
typings
. TypeScript type definitions of smart contracts and the related data.
- Bash
- Docker version 20.10.7 or later
We build smart contracts using the ligo docker image in the bash script.
To build all smart contracts you just need to call this script with the following command:
bash ./scripts/build.sh
The sandbox node is required for local deployments of smart contracts and for launching tests locally. We use the flextesa image and the custom script written in TypeScript to launch the sandbox node.
- Go to the root directory of the repository;
- Install npm packages using the command
npm i
- Start the sandbox node using the command
npm run start-sandbox
- When the node is ready, you'll see
Flextesa: Pause Sandbox is READY \o/ Flextesa: Please enter command:
When the sandbox node is launched, we can launch smart contract tests. We use the truffle package (tezos version) with small patches for testing smart contracts. Tests are written in TypeScript;
- Don't close the Sandbox terminal session. Open another terminal session;
- Go to the root directory of the repository;
- Run tests using the command
npm test