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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user