From 94103fc63953384a25ed9576701f812be6424a75 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Mon, 4 Nov 2024 17:51:34 +0700 Subject: [PATCH] script: update rpc --- script/operations/bulk-renew.mjs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/script/operations/bulk-renew.mjs b/script/operations/bulk-renew.mjs index 9d57c3a..a79ae95 100644 --- a/script/operations/bulk-renew.mjs +++ b/script/operations/bulk-renew.mjs @@ -4,7 +4,7 @@ import dotenv from "dotenv"; dotenv.config(); -const provider = new ethers.JsonRpcProvider("https://api-archived.roninchain.com/rpc"); +const provider = new ethers.JsonRpcProvider(process.env.RONIN_MAINNET_RPC); const wallet = new ethers.Wallet(process.env.RONIN_MAINNET_PK, provider); const renewList = JSON.parse(fs.readFileSync("renew-list.json", "utf8")); // Verify: https://app.roninchain.com/address/0x662852853614cbbb5d04bf2e29955b97e3c50b69 @@ -20,10 +20,10 @@ console.log(`Current nonce: ${nonce}`); const account = wallet.address; const shouldSimulate = true; // Assert the list is unique -// if (new Set(renewList).size !== renewList.length) { -// console.error("List is not unique"); -// process.exit(1); -// } +if (new Set(renewList).size !== renewList.length) { + console.error("List is not unique"); + process.exit(1); +} const contract = new ethers.Contract(ronRegistrarControllerAddr, abi, provider); const chunkSize = 20;