Update poly_merger configuration and documentation

- Update RPC endpoint from llamarpc to polygon-rpc.com for better reliability
- Improve .env file loading to check both local and parent directory
- Update README example to use proper condition_id format (0x...) instead of numeric
- Clarify that condition_id should be hex format in documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
warproxxx
2025-06-22 10:37:08 -07:00
co-authored by Claude
parent 652e330424
commit a3ba8b7fca
2 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -15,14 +15,18 @@
const { ethers } = require('ethers');
const { resolve } = require('path');
const { existsSync } = require('fs');
const { signAndExecuteSafeTransaction } = require('./safe-helpers');
const { safeAbi } = require('./safeAbi');
// Load environment variables
require('dotenv').config()
const localEnvPath = resolve(__dirname, '.env');
const parentEnvPath = resolve(__dirname, '../.env');
const envPath = existsSync(localEnvPath) ? localEnvPath : parentEnvPath;
require('dotenv').config({ path: envPath })
// Connect to Polygon network
const provider = new ethers.providers.JsonRpcProvider("https://polygon.llamarpc.com");
const provider = new ethers.providers.JsonRpcProvider("https://polygon-rpc.com");
const privateKey = process.env.PK;
const wallet = new ethers.Wallet(privateKey, provider);