PCL Quickstart
Quickstart for the Phylax Credible Layer (PCL) CLI
What is the PCL?
The Phylax Credible Layer (PCL) is a CLI tool built on Phoundry, our modified version of the Foundry development framework. PCL allows you to run and test assertions on your smart contracts. The main command pcl
provides access to phorge
, our Foundry fork that maintains compatibility with standard Forge commands while adding specialized features for assertion testing.
Installation
Build from Source
It requires the following:
just
Rust >= 1.86 nightly
git
After you have installed the above, you can build the CLI by running the following:
This will build the CLI and make it available as pcl
.
Usage
To execute phorge
, a minimal fork of Forge which includes a cheatcode for assertion execution, you can run:
You need to specify the assertions directory, which is the directory containing the assertions source and tests you want to test or build.
Phorge expects the following directory structure:
Assertion source files should be in the src
directory, and test files should be in the test
directory. Test files should have the .t.sol
extension, and test functions should start with test_
. As a minimal fork of Forge, it behaves identically to Forge.
By defining the assertions directory, the CLI will automatically add the src
and test
directories to the phorge command. That way, you can share a foundry.toml
and lib
directory between the sources and tests of the smart contracts and the assertions.