You probably do NOT need to dploy the protocol. This is only necessary
if the rules engine is not already deployed on the network your application is
on or you are developing locally and need or want to test out the rules in
that environment.
Most projects can simply connect to an existing deployment of the rules engine. Check the networks page for a list of networks the protocol is live.
Due to the architecture of the Protocol, several contracts are required to be deployed to utilize the protocol. Once these are deployed,
several application ecosystems may utilize these contracts independently without affecting each other. The following diagram
is an overview of this deployment process:
In the same terminal as above, navigate to the cloned repo directory and run the build script.
Copy
Ask AI
bash script/deploy/DeployProtocol.sh
If this is your first time and you’re trying to deploy in a local development environment, you might run into errors with the above approach, it’s recommended to set a local profile for foundry prior to deployment:
Copy
Ask AI
export FOUNDRY_PROFILE=local
The deployment script will add the output RuleProcessorDiamond address to your .env file. Source it for the future interactions with the protocol: