Skip to main content

Installation

Install using forge install​

Prerequisites​

To support development with UCS, we recommend installing foundry, a smart contract development toolchain. Although UCS is not strictly dependent on foundry, the following instructions are tailored for users who have foundry installed. If you are using a different tool or environment, please adapt the steps as necessary.

Installing​

To add the UCS Ops library to your project, execute the following command in your terminal:

forge install ecdysisxyz/ucs-ops

This command installs the UCS Ops library, enabling you to utilize its features in your smart contract development.

Setting remappings.txt​

The remappings.txt file helps Foundry understand where to find the UCS Ops library in your project. If the file does not exist, create it at the root of your project by running:

touch remappings.txt

Add the remapping above​

Add the following line to your remappings.txt to set up the library path correctly:

@ucs-ops/=lib/ucs-ops/

Setting .env​

The .env file contains environment variables essential for configuring your UCS project. Copy the sample .env file provided by the UCS Ops library to your project root using:

cp lib/ucs-ops/.env.sample .env

After copying, ensure to customize the .env file to match your project's specific requirements.