Setting up Your Project

Create Environment

To start, run the command

chr create-rell-dapp my-first-project

To install chr command, check here.

Navigate into the folder

cd my-first-project/

You can now open the project in your favorite IDE.

Project Structure

A typical Yours Protocol project follows the standard Chromia project structure:

your-dapp/
β”œβ”€β”€ chromia.yml           # Project configuration
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ modules/
β”‚   β”‚   β”œβ”€β”€ your_module_a/    # Your custom modules
β”‚   β”‚   β”œβ”€β”€ your_module_b/    # Your custom modules
β”‚   β”œβ”€β”€ libs/             # Your dependencies
β”‚   β”‚   β”œβ”€β”€ ft4/          # FT4 library
β”‚   β”‚   β”œβ”€β”€ iccf/         # ICCF library
β”‚   β”‚   └── yours/        # Yours Protocol library
β”‚   └── main.rell         # Main application file

Dependencies

Yours Protocol has two dependencies in order to be interoperable with other blockchains and dapps:

  • FT4 - Account management system for handling token ownership and transfers

  • ICCF - Inter-Chain Communication Facility for cross-chain bridging and token interoperability

Add the following libraries to your chromia.yaml:

After adding the dependencies to your config file, install them using the Chromia CLI:

Specify entry file

Per default configuration, in your chromia.yml the entry file should be src/ but, to keep everything organized and ready for your project to grow, we suggest specifying it.

Next Steps

With your project set up and dependencies installed, you're ready to:

Last updated

Was this helpful?