> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phylax.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy Assertions with the Platform

> Create projects and deploy assertions to protect your contracts

This guide shows you how to create a project in the [Phylax platform](https://app.phylax.systems), create a release with `pcl apply`, and deploy assertions to protect your smart contracts.

**Prerequisites**:

* [pcl installed](/credible/credible-install)
* Smart contracts deployed on a supported chain
* An assertion [written](/credible/write-first-assertion) and [tested](/credible/testing-assertions)

**What you'll accomplish**: Create a project, link your contracts, create a pending release, and deploy assertions to staging or production.

<Note>
  New to the platform? See the [Platform Overview](/credible/dapp-overview) to understand its features.
</Note>

## Step 1: Authenticate

Authenticate through `pcl`:

```bash theme={null}
pcl auth login
```

1. A login link appears in your terminal
2. Open it in your browser
3. Authenticate via wallet, email, Google, or GitHub
4. Enter the login code from the CLI

<Frame caption="Authentication with pcl auth login">
  <img src="https://mintcdn.com/phylaxsystems/7j2cp3HkgylEjcrh/images/pcl_auth_login.webp?fit=max&auto=format&n=7j2cp3HkgylEjcrh&q=85&s=cc0b8abab29111c967d36f61a4590b1a" alt="Authentication with pcl auth login" width="1920" height="1288" data-path="images/pcl_auth_login.webp" />
</Frame>

<Note>
  Authentication links your wallet address with your `pcl` session, allowing you to manage projects that your wallet owns.
</Note>

## Step 2: Create a Project

1. Navigate to the "Projects" tab or click "Create a Project"

2. Enter project details:
   * **Project Name**: Your protocol name
   * **Project Description**: What your project does
   * **Target Chain**: Where your contracts are deployed

3. Click "Continue to contract selection"

4. Add contract addresses:
   * Enter each contract you want to protect
   * Only contracts where your wallet is authorized can be added
   * The platform verifies admin access via the network's admin verifier (often owner-based)

5. Review and click "Create Project"

<Frame caption="Creating a project in the platform">
  <img src="https://mintcdn.com/phylaxsystems/52ijm7LHavAYiL56/images/create_project_dapp.webp?fit=max&auto=format&n=52ijm7LHavAYiL56&q=85&s=6ed8f3f16c886c4a1c1e84c2713a079e" alt="Create project form in the Phylax platform" width="2048" height="1308" data-path="images/create_project_dapp.webp" />
</Frame>

<Note>
  Only authorized admins can create a project for a contract. See [Ownership Verification](/credible/ownership-verification) for details on verification methods.
</Note>

## Step 3: Apply Your Assertions

Configure your `credible.toml` and create a release with `pcl apply`:

```bash theme={null}
pcl apply
```

This reads your `credible.toml` configuration, builds the assertion contracts, previews the requested changes, and creates a pending release on the platform after you confirm. See [Apply Assertions](/credible/apply-assertions) for detailed instructions on configuring `credible.toml` and using `pcl apply`.

## Step 4: Deploy the Assertion

After applying via `pcl`, complete deployment in the platform:

1. Navigate to your project

2. Click the "Deployment" tab

3. Find your assertion and click "Proceed to Review"

4. Review the release diff

5. Review assertion details:
   * Assertion name and parameters
   * Target contract address
   * Trigger conditions

6. Choose environment:
   * **Staging**: For testing (assertions run but don't block transactions)
   * **Production**: For active protection (assertions block violating transactions)

7. Click "Deploy" and sign the transaction

<Frame caption="Deploying an assertion in the platform">
  <img src="https://mintcdn.com/phylaxsystems/7j2cp3HkgylEjcrh/images/deploy_assertion_trimmed.webp?fit=max&auto=format&n=7j2cp3HkgylEjcrh&q=85&s=0d4c0da12b3fd1bb01a3bedc45bf5a09" alt="Deploying Assertion" width="1280" height="639" data-path="images/deploy_assertion_trimmed.webp" />
</Frame>

<Note>
  Adding an assertion is not immediate. The deployment transaction registers it in the on-chain [State Oracle](./credible-layer-contracts#state-oracle), and the State Oracle enforces a configured [timelock](./glossary#timelock) before the assertion becomes staged or enforced.
</Note>

<Note>
  Projects are managed in the platform, but the deployment transaction should be signed by the protocol admin, also called the manager wallet, that controls assertion lifecycle operations for the protected contracts. Use a multisig or governance-controlled wallet where appropriate.
</Note>

<Note>
  The same model applies when you remove an assertion later. Removal is also scheduled through the State Oracle contracts and only takes effect after that configured timelock expires.
</Note>

## Step 5: Monitor Your Assertions

After deployment, manage assertions through your project dashboard:

* **View Active Assertions**: See all assertions protecting your contracts
* **Monitor Status**: Check assertion execution and triggered violations
* **View Incidents**: View incidents that were prevented by assertions
* **Update Assertions**: Submit new versions as your protocol evolves
* **Remove Assertions**: Request removal when needed; the assertion remains active until the State Oracle timelock finishes

## Troubleshooting

| Error                                    | Solution                                                                                                                                    |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| "Contract ownership verification failed" | Ensure your wallet passes the admin verifier (often `owner()`) or [request manual verification](/credible/manual-verification) if available |
| "Assertion already exists"               | Use a different name or update the existing assertion                                                                                       |
| "Authentication expired"                 | Run `pcl auth login` to refresh                                                                                                             |

## Recap

You've deployed an assertion to protect your protocol:

1. **Authenticate**: Sign in via `pcl auth login`
2. **Create project**: Set up your project and link contracts
3. **Apply**: Create a release via `pcl apply`
4. **Deploy**: Complete deployment in the platform and sign transaction
5. **Monitor**: Track assertion status in your dashboard

## Video Walkthrough

Full walkthrough from authentication to deployment:

<iframe width="560" height="315" src="https://www.youtube.com/embed/MrDVLp5UDZ0?si=tdgQEJ3Tkps2LwJA" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />

## Next Steps

<CardGroup cols={2}>
  <Card title="Write Assertions" icon="code" href="/credible/write-first-assertion">
    Learn how to write effective assertions
  </Card>

  <Card title="Test Assertions" icon="flask" href="/credible/testing-assertions">
    Test your assertions before deployment
  </Card>

  <Card title="Incidents" icon="warning" href="/credible/dapp-incidents">
    Monitor prevented violations
  </Card>

  <Card title="Ownership Verification" icon="shield-check" href="/credible/ownership-verification">
    Understand ownership requirements
  </Card>
</CardGroup>
