Install the toolchain and pin the source
Install Foundry v1.8.0, Git, Python 3, Node.js with npm, andjq. Node and npm are required because the Universal Router dependency tree includes npm packages. Check the versions before creating the checkout:
uniswap-v4-hooks-example repository into a folder named monad-hook. The final argument in the git clone command sets this local folder name. Then enter the folder and check out the tested revision before initializing its recursive dependencies:
monad-hook folder throughout the guide.
Create the manifest directory and install the locked npm dependencies. npm ci --ignore-scripts keeps package installation from running third-party lifecycle scripts:
Build and test locally
foundry.toml configures Solidity 0.8.26, the Cancun EVM, and the compiler settings for the example’s dependencies.
Build the project and run its tests:
Prepare a testnet account
Import a testnet account into Foundry’s encrypted keystore:10143.
Load the contract addresses
shared-infrastructure.json is included at the root of the monad-hook directory you just cloned. It lists the existing testnet contracts. Load those addresses into your shell:

