This repository contains the necessary configuration files to deploy and run a Mee Node. This guide will walk you through the setup process and provide information about node maintenance.
Watch the Asciinema video: https://asciinema.org/a/747767
- Main Directory - Production MEE node deployment files
demo/Directory - Fusion supertransaction demo with DeFi integration
π₯ For Node Operators: Follow the setup guide below
π§ͺ For Developers: Check out the demo/ folder for fusion supertransaction examples
Before starting, ensure Docker Desktop is actively running:
# Check Docker is running (should show version info)
docker --version
# Verify Docker daemon is active (should list containers, may be empty)
docker psIf Docker is not running:
- macOS: Open Docker Desktop application
- Linux:
sudo systemctl start docker - Windows: Start Docker Desktop
- β Docker and Docker Compose (must be actively running)
- β Node.js 18+ (for demo scripts)
- β Foundry tools (anvil, cast) for blockchain interaction
- Access to RPC endpoints for the chains you want to support
- Sufficient funds in native tokens for the supported chains
# Run the complete fusion demo with DeFi integration
cd demo/
chmod +x *.sh # Make scripts executable
./check-prerequisites.sh # Check requirements
./run-complete-demo.sh # Run demo- π demo/QUICK_START.md - One-minute demo setup
- π demo/SETUP_GUIDE.md - Detailed demo instructions
- π demo/FINAL_AAVE_FIX.md - DeFi integration troubleshooting
git clone https://github.com/bcnmy/mee-node-deployment
cd mee-node-deployment-
Navigate to the appropriate chains folder:
chains-prod/for mainnet networkschains-testnet/for testnet networks
-
For each chain you want to support, create a JSON file with the RPC configuration.
Note: For mainnet node operators, it's recommended to support all 9 mainnet networks from the
chains-prodfolder.
-
Open
docker-compose.ymland ensure the volumes section points to your chosen chains folder:volumes: - ./chains-testnet:/app/chains # Change to chains-prod for mainnet
-
You can support both mainnet and testnet by adding JSON files to the loaded chains folder.
First, copy the example environment file:
cp .env.example .envYou can provide environment variables in two ways:
-
Edit the
.envfile with your configuration:KEY=<your-private-key> PORT=3000 REDIS_HOST=redis REDIS_PORT=6379
To use the
.envfile, run Docker Compose with the--env-fileflag:docker compose --env-file .env up -d
Or you can add the
env_filedirective to yourdocker-compose.yml:services: node: env_file: - .env
-
Or provide them directly in the
docker-compose.ymlfile as shown in the example:environment: - KEY=<your-private-key> - PORT=3000 - REDIS_HOST=redis - REDIS_PORT=6379
Note: If you're using your own Redis instance, update
REDIS_HOSTandREDIS_PORTaccordingly.
Ensure your node's private key address is funded with sufficient native tokens on all supported chains. Recommended minimum funding:
| Chain | Minimum Native Token |
|---|---|
| ETH-based chains | 0.05 ETH |
| Gnosis Chain | 100 xDAI |
| BSC | 0.17 BNB |
| Sonic Chain | 50 S |
| Polygon | 500 POL |
| Avax C-Chain | 5 AVAX |
docker compose up -dUpon successful startup, you should see logs indicating:
- Node initialization
- Chain health checks
- Simulator status
The following environment variables can be added to your .env file for additional configuration:
| Variable | Description | Default |
|---|---|---|
FEE_BENEFICIARY |
Address that collects node fees | Node's private key address |
FEE_PERCENTAGE |
Percentage added to gas fees | 10 |
GATEWAY_URL |
Biconomy Network URL | Required for mainnet |
ENV_ENC_PASSWORD |
Password for encrypted key file | - |
USEROP_MIN_EXEC_WINDOW_DURATION |
Minimum execution window (seconds) | 180 |
USEROP_MAX_EXEC_WINDOW_DURATION |
Maximum execution window (seconds) | 600 |
USEROP_MAX_WAIT_BEFORE_EXEC_START |
Maximum future execution time (seconds) | 300 |
USEROP_TRACE_CALL_SIMULATION_POLL_INTERVAL |
Simulation check interval (seconds) | 2 |
USEROP_SAFE_WINDOW_BEFORE_EXEC_END |
Early execution threshold (seconds) | 30 |
MAX_CALLDATA_GAS_LIMIT |
Maximum calldata gas limit | 330000001 |
HEALTH_CHECK_INTERVAL |
How often the node performs chain health checks (seconds) | 300 |
GLUEX_PARTNER_UNIQUE_ID |
Partner ID for GlueX integration | - |
GLUEX_API_KEY |
API key for GlueX integration | - |
Instead of providing the raw private key, you can use an encrypted key file:
-
Install the ChainLink env-enc package:
npm install -g @chainlink/env-enc
-
Generate encrypted key:
npx env-enc set-pw npx env-enc setWhen prompted, enter "KEY" as the variable name and your private key as the value.
-
Rename the generated file to
key.encand place it in the./keystorefolder. -
In your
.envfile, replace theKEYvariable with:ENV_ENC_PASSWORD=<your-encryption-password>
If you want to support additional gas tokens beyond what's explicitly allowed by the chain configuration, you can activate GlueX integration. This feature enables users to pay for transaction execution using any supported token, while your node receives the native coin.
GlueX integration works by automatically swapping the user's chosen token into the native coin required for execution. This means:
- Users can spend any supported token
- Your node receives the native coin for gas fees
- The swap happens automatically as part of the transaction
To activate GlueX support, add the following environment variables to your configuration:
GLUEX_PARTNER_UNIQUE_ID=<your-partner-id>
GLUEX_API_KEY=<your-api-key>-
Check the node status endpoint:
http://localhost:3000/v3/info -
Monitor chain health status in the response. A healthy chain status looks like:
{ "chainId": "11155420", "name": "OP Sepolia", "healthCheck": { "rpcOperational": true, "debugTraceCallSupported": true, "nativeBalance": "528841195784636675", "nonce": 5055, "execQueueActiveJobs": 0, "execQueuePendingJobs": 0, "lastChecked": 1743538429111, "status": "healthy" } }
- Regularly monitor native token balances across all supported chains
- Swap earned ERC20 tokens for native tokens when needed
- Maintain sufficient funding for gas fees
If a chain shows unhealthy status:
{
"chainId": "421614",
"name": "Arbitrum Sepolia",
"healthCheck": {
"status": "not-healthy",
"reason": "native coin balance too low"
}
}Take appropriate action based on the reported reason:
- Add more native tokens if balance is low
- Check RPC connectivity if RPC is not operational
- Review execution queue if jobs are stuck
Feel free to reach out to Julien on Farcaster, Element, Status, Telegram, Twitter, Discord, or LinkedIn.