FT4 Library is a library for Rell modules (Chromia smart contract language). It can be imported and used as a token provider and manager. It allows several operations, among them: creation of different assets (type of tokens), allocation of tokens, transf
The FT4 library is a toolkit to help dApp developers build real world
applications within the Chromia ecosystem by providing out of the box support
for things such as account creation and access management and interaction with
external signature solutions already familiar to the user. It also provides
asset management. Allowing issuance, allocation and transfers and tracing of
asset activities, both within a chain as well as across other chains within the
Chromia ecosystem.
- Asset Management: Facilitate the creation, allocation, and management of
assets.
- Asset Allocation and Transfers: Perform secure and efficient asset
transfers.
- Cross-Chain Transfers: Enable the movement of assets between distinct
blockchains.
- Account Registration and Management: Create and oversee user accounts
independently of asset activities.
A full documentation on how to use the various features of the library can be
found on the
official docs page.
This repository contains the FT4 library and a comprehensive suite of tests
written in Node.js and Jest. The current testing setup serves as a temporary
measure, as a Rell-based testing suite is in development.
- Node.js
- Chromia CLI
- Docker
- [Optional] PostgreSQL for database sessions
Clone the repository and install the dependencies:
``bash`
git clone git@gitlab.com:chromaway/ft4-lib.git
cd ft4-lib
pnpm install
chr install
Build TypeScript library into dist/:
`bash`
pnpm run build
Run the complete set of Rell and TypeScript tests:
`bash`
pnpm run test
Run only Rell or TypeScript tests:
`bash`
pnpm run test:rell
pnpm run test:js
The TypeScript tests can be run with even more granularity:
`bash`
pnpm run test:js-unit # does not make any calls to a real blockchain
pnpm run test:js-integration # stars a single blockchain which it interacts with
pnpm run test:js-multichain # Stars a cluster of chains which it interacts with
To execute particular tests in Rell, use the --tests or -t option:
`bash`
pnpm run test:rell -- --tests=test1,test2
pnpm run test:rell -- -t=test1,test2
Execute specific Jest tests by string matching:
`bash`
pnpm run test:js 'string matching test(s)'
Examples:
`bash`
pnpm run test:js 'user'
pnpm run test:js 'rate|sso'
Run e2e tests interactively:
`bash`
pnpm run test:e2e
Run e2e tests in headless mode:
`bash`
pnpm run test:e2e:headless
Update changelog in doc/release-notes/, then run./scripts/compile-changelog.sh script to assemble changelog.md andrell-changelog.md. Do not update changelog.md or rell-changelog.md`
directly.
This project is licensed under the Apache License, Version 2.0. For more
details, see the LICENSE file in the repository or visit
Apache License, Version 2.0.