Deploying Your Custom EVM Protocol
Last updated
Was this helpful?
Last updated
Was this helpful?
This guide provides step-by-step instructions on how to deploy your custom EVM protocol. By following these steps, you can successfully deploy your custom EVM protocol across multiple chains. If you encounter issues, refer to the section of this guide and the guide or reach out to us through our .
Before deployment, ensure you are familiar with payable functions in and have initiated a project.
To streamline development, start by installing the Entangle Labs UIP Contracts package. It includes ready-to-use code and interfaces for deployment.
Obtain the endpoint contract address for the chain where you plan to deploy your protocol. You can find endpoint addresses for each connected chain in the Entangle Labs UIP Contracts NPM package.
For testnet, they are located in the following folder:
For mainnet, they are located in the following folder:
Read section to learn more about the propose
function, its parameters and the customizable message transmission options.
Develop a payable function that interacts with the endpoint. For example, sending a message to the endpoint requires calling the propose
function using the IEndpoint
interface:
This step will only apply if your contract is designed to receive messages too.
The receiving contract must implement the MessageReceiver
interface, which you can find in @entagle-labs/uip-contracts
npm package — installed in the step — specifically the execute
function:
The execute
function processes the received payload. Note that the Endpoint contract should have access control to this function. Make sure that your contract imports MessageReceiver
and inherits from it, for example:
Below, we provide the MessageReceiver
code for convenience. Please refer to the package for the most up-to-date version.
This section provides information, tips, and solutions for common issues you may encounter while deploying the protocol.
Verify the installed package version: Make sure you have the latest version of the @entangle-labs/uip-contracts
npm package installed. To check the latest version, visit the official .
Retrieve message hash: Use the following command to obtain the TEIB transaction hash for your message:
Check message status: Once you have the hash, use:
PROTOCOL_FAILED: This occurs when the destination protocol is incompatible with the destination Endpoint. Ensure that the destination protocol implements the MessageReceiver
interface (as described in the section).