Deployment Guide

Deploy to Ethereum Mainnet

A complete step-by-step guide to deploying all 6 KLEAN-KUT smart contracts to Ethereum Mainnet using Foundry. From zero to live in under 20 minutes.

01

Install Foundry

Foundry is the Solidity-native development toolkit used to deploy the contracts. Install it with a single command.

curl -L https://foundry.paradigm.xyz | bash && foundryup
!

After running, close and reopen your terminal, then run foundryup.

02

Configure Your .env File

Copy .env.example to .env and fill in your three credentials: deployer private key, Alchemy/Infura RPC URL, and Etherscan API key.

DEPLOYER_PRIVATE_KEY=your_private_key_without_0x
MAINNET_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY
ETHERSCAN_API_KEY=YOUR_ETHERSCAN_KEY
!

Never share your .env file. Your private key gives full control of the deployer wallet.

03

Run the Deployment

Execute the single deployment command. Foundry will deploy all 6 contracts in sequence, verify them on Etherscan, and print all contract addresses.

forge script script/DeployKleanKut.s.sol:DeployKleanKut \
  --rpc-url $MAINNET_RPC_URL \
  --private-key $DEPLOYER_PRIVATE_KEY \
  --broadcast \
  --verify \
  --etherscan-api-key $ETHERSCAN_API_KEY \
  -vvvv
!

Deployment takes 5-15 minutes. You need ~0.1-0.3 ETH in your deployer wallet for gas.

04

Save Your Contract Addresses

After deployment, the script prints a summary of all 6 deployed contract addresses. Save these - they are your permanent on-chain assets.

KleanKutTreasury:    0x...
KleanKutInsurance:   0x...
KleanKutReputation:  0x...
KleanKutLending:     0x...
KleanKutRWA:         0x...
KleanKutAgentLayer:  0x...
!

Verify all contracts at etherscan.io to confirm successful deployment and source code verification.

Requirements

MetaMask Deployer Wallet
A dedicated wallet separate from your treasury wallets
~0.1-0.3 ETH
To cover gas fees for all 6 contract deployments
Alchemy or Infura API Key
Free tier is sufficient - get at alchemy.com or infura.io
Etherscan API Key
Free - get at etherscan.io/myapikey for contract verification
Foundry Installed
The Solidity development toolkit (installed in Step 1)

Revenue Auto-Routes To:

Primary (50%)
0xCCB35E27Fd929DA3DEf18454C85e1a16cE867fBC
Secondary (50%)
0xE5aeF3D885cc9764Cbeb67fBFAd5F7Ddb35479D8