Protocol Deployment
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 supported chains 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:
- Open a new terminal
- Set environmental variables and source the .env file (
source .env
) and then feel free - In the same terminal as above, ensure that the Foundry installation is current (see troubleshooting section)
- In the same terminal as above, navigate to the cloned repo directory and run the build script.
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:
- The deployment script will add the output RuleProcessorDiamond address to your .env file. Source it for the future interactions with the protocol:
- Set the version of the protocol:
substitute <PROTOCOL_VERSION>
with the proper value. i.e: “1.1.0”.
-
(Optional) If a multi-sig wallet is to hold the protocol’s ownership, then:
- Export the multi-sig address to zsh:
- Transfer the ownership to multi-sig wallet.
- Check that the owner is the multi-sig wallet:
If the response is the same address as MULTISIG_WALLET, the ownership transfer was successful. If not, repeat the process.