1. Clone the repository
Clone the Pulse Hook repository and move into the project directory:2. Install dependencies
Install the project dependencies using Forge:3. Build and test
Before deploying, make sure the project compiles and all tests pass:4. Configure your environment
Copy the example environment file:RPC_URL— RPC endpoint for the network you want to deploy to.PRIVATE_KEY— private key of the deploying wallet.WALLET_ADDRESS— address corresponding toPRIVATE_KEY.
Security: Never commit .env or expose your private key. For deployments, use a dedicated wallet with only the funds required for gas.
Before broadcasting the deployment, verify that your RPC points to the intended network:
WALLET_ADDRESS corresponds to PRIVATE_KEY.
5. HelperConfig
The deployment script usesHelperConfig to automatically load the correct configuration for the network you are deploying to.
HelperConfig reads block.chainid at deployment time and selects the corresponding configuration. You do not need to manually specify the chain ID in the deployment command.
Important: deploying to a new networkThis guide is specifically designed for deploying the Pulse Hook to a network where it has not been deployed yet.If you are deploying to a new network, add a new network configuration to
HelperConfig before deploying. This keeps the deployment configuration inside the repository, making the deployment process easier to understand, fully controlled, and automatic.You only need to provide the network-specific configuration, such as the Uniswap v4 Pool Manager address and the trusted tokens for that network.Once the configuration is added, the deployment script automatically selects it based on the detected chain ID.Do not deploy to an unsupported network without adding its configuration first.Currently configured networks
How HelperConfig works
The deployment script calls:
block.chainid and selects the appropriate network configuration:
- the network’s Uniswap v4 Pool Manager address;
- a list of trusted tokens used by the hook.
Important: HelperConfig does not deploy the Pool Manager or tokens. It only selects the network-specific addresses and configuration that the hook should use.
Adding a new network
To deploy to a network that is not currently supported, add a new configuration function toHelperConfig and connect it to the corresponding chain ID.
For example:
getDeploymentConfig():
Important: For a new network, make sure you use the correct Uniswap v4 Pool Manager address and the correct token addresses for that network.If
block.chainid does not match a configured network, the deployment should revert with an unsupported-network error rather than silently using a different network configuration.
6. Deploy the hook
Once your environment is configured, run:- detects the network through
block.chainid; - loads the corresponding
HelperConfig; - performs the required hook address mining;
- deploys the hook to the mined address;
- broadcasts the deployment.
Important: Make sureRPC_URLpoints to the network where you intend to deploy before using--broadcast.
7. Verify the deployment
After deployment, find the deployed hook address in the Forge output. First, verify that contract code exists at the address:Note: The hook address is the address of your deployed hook contract. It is not the Uniswap v4 Pool Manager address.