Foundry Setup and Configuration
Make sure your local environment is configured to point to the Tempo ecosystem. Ensure that you have thetempo variant of Foundry installed:
Preparing for Deployment
You will need a funded tester wallet on the Moderato network to pay for the contract deployment gas fees.- Export your deployment wallet’s private key.
- Use the native
castutility to request funds from the Moderato sponsor faucet.
Executing the Deployment Script
TheDeploy.s.sol script handles the orchestration, ensuring the contracts are deployed in the correct order so that constructor dependencies (such as the PayrollBatcher referencing the PayrollTreasury) are respected permanently.
Deploy.s.sol script for a single-click deployment.
Post-Deployment Steps
After successful deployment, Foundry will output the live contract addresses in your terminal. You must manually copy these addresses and inject them into your.env.local configuration for the Next.js API layer to interact with the current state.