PCL Assertion Workflow
Use this when you need the full lifecycle: create, test, store, submit, and deploy assertions.
When to Use
- Setting up a new assertions project with
pcl. - Running local tests and validating assertions before deployment.
- Storing, submitting, and deploying assertions in the Credible Layer dApp.
When NOT to Use
- You only need invariant design. Use
designing-assertions. - You only need Solidity implementation details. Use
implementing-assertions. - You only need test patterns and fuzzing. Use
testing-assertions.
Quick Start
- Initialize or clone a project (e.g.,
credible-layer-starter). - Run
FOUNDRY_PROFILE=assertions pcl testto validate locally. - Deploy target contracts with
forge script. - Authenticate:
pcl auth login. - Store assertions:
pcl store <AssertionName>. - Submit:
pcl submit(orpcl submit -a <AssertionName> -p <ProjectName>). - Deploy via dApp and wait for timelock.
Rationalizations to Reject
- "Tests can wait until after deployment." Always run
pcl testfirst. - "We can skip store/submit steps." Deployment depends on DA storage.
- "Any wallet works." Use the same address as contract deployer for authentication.
References
- Project Structure and CLI Flow