From 4d63a6de33d77c00d6e5189e28216c3334de8378 Mon Sep 17 00:00:00 2001 From: Aahna Ashina <95955389+aahna-ashina@users.noreply.github.com> Date: Wed, 27 Dec 2023 11:21:24 +0700 Subject: [PATCH] fix: "too many requests" error (#110) close #110 --- data-sources/citizens/generate-citizen-count-csv.ts | 2 +- data-sources/citizens/generate-citizens-csv.ts | 4 ++-- data-sources/citizens/generate-voting-power-datasets.ts | 2 +- data-sources/discord/src/generate-csv.ts | 4 ++-- data-sources/discourse/src/generate-csv.ts | 4 ++-- data-sources/github/src/generate-csv.ts | 4 ++-- nationcred/src/update-smart-contract.ts | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/data-sources/citizens/generate-citizen-count-csv.ts b/data-sources/citizens/generate-citizen-count-csv.ts index 0bc0b8f84..4f2e87ecd 100644 --- a/data-sources/citizens/generate-citizen-count-csv.ts +++ b/data-sources/citizens/generate-citizen-count-csv.ts @@ -4,7 +4,7 @@ const csvWriter = require('csv-writer') const fs = require('fs') const Papa = require('papaparse') -const web3 = new Web3('https://rpc.ankr.com/eth') +const web3 = new Web3('https://eth.llamarpc.com') console.info('web3.version:', web3.version) const PassportContract = new web3.eth.Contract( diff --git a/data-sources/citizens/generate-citizens-csv.ts b/data-sources/citizens/generate-citizens-csv.ts index e8e08cf42..4cdb4b977 100644 --- a/data-sources/citizens/generate-citizens-csv.ts +++ b/data-sources/citizens/generate-citizens-csv.ts @@ -5,11 +5,11 @@ const csvWriter = require('csv-writer') const fs = require('fs') const ethers = require('ethers') -const web3 = new Web3('https://rpc.ankr.com/eth') +const web3 = new Web3('https://eth.llamarpc.com') console.info('web3.version:', web3.version) const ethersProvider = new ethers.providers.JsonRpcProvider( - 'https://rpc.ankr.com/eth' + 'https://eth.llamarpc.com' ) console.info('ethersProvider:', ethersProvider) diff --git a/data-sources/citizens/generate-voting-power-datasets.ts b/data-sources/citizens/generate-voting-power-datasets.ts index 44ea1480d..d603463b2 100644 --- a/data-sources/citizens/generate-voting-power-datasets.ts +++ b/data-sources/citizens/generate-voting-power-datasets.ts @@ -14,7 +14,7 @@ console.info('web3.version:', web3.version) const dater = new EthDater(web3) console.info('dater:', dater) -const ethersProvider = new ethers.providers.JsonRpcProvider('https://rpc.ankr.com/eth') +const ethersProvider = new ethers.providers.JsonRpcProvider('https://eth.llamarpc.com') console.info('ethersProvider:', ethersProvider) const VotingEscrowContract = new web3.eth.Contract(VotingEscrow.abi, '0xf7def1d2fbda6b74bee7452fdf7894da9201065d') diff --git a/data-sources/discord/src/generate-csv.ts b/data-sources/discord/src/generate-csv.ts index 501bc1872..dfb3814fc 100644 --- a/data-sources/discord/src/generate-csv.ts +++ b/data-sources/discord/src/generate-csv.ts @@ -3,10 +3,10 @@ const Web3 = require('web3') const ethers = require('ethers') const Discord = require('../abis/Discord.json') -const web3 = new Web3('https://rpc.ankr.com/eth') +const web3 = new Web3('https://eth.llamarpc.com') console.info('web3.version:', web3.version) -const ethersProvider = new ethers.providers.JsonRpcProvider('https://rpc.ankr.com/eth') +const ethersProvider = new ethers.providers.JsonRpcProvider('https://eth.llamarpc.com') console.info('ethersProvider:', ethersProvider) const DiscordContract = new web3.eth.Contract(Discord.abi, '0x3415f4ffb9f89fba0ab446da4a78223e4cd73bad') diff --git a/data-sources/discourse/src/generate-csv.ts b/data-sources/discourse/src/generate-csv.ts index 9dda5c8ad..c89fb095e 100644 --- a/data-sources/discourse/src/generate-csv.ts +++ b/data-sources/discourse/src/generate-csv.ts @@ -3,10 +3,10 @@ const Web3 = require('web3') const ethers = require('ethers') const Discourse = require('../abis/Discourse.json') -const web3 = new Web3('https://rpc.ankr.com/eth') +const web3 = new Web3('https://eth.llamarpc.com') console.info('web3.version:', web3.version) -const ethersProvider = new ethers.providers.JsonRpcProvider('https://rpc.ankr.com/eth') +const ethersProvider = new ethers.providers.JsonRpcProvider('https://eth.llamarpc.com') console.info('ethersProvider:', ethersProvider) const DiscourseContract = new web3.eth.Contract(Discourse.abi, '0xC396F3536Cc67913bbE1e5E454c10BBA4ae8928F') diff --git a/data-sources/github/src/generate-csv.ts b/data-sources/github/src/generate-csv.ts index 0d33118ff..334da2f0b 100644 --- a/data-sources/github/src/generate-csv.ts +++ b/data-sources/github/src/generate-csv.ts @@ -3,10 +3,10 @@ const Web3 = require('web3') const ethers = require('ethers') const GitHub = require('../abis/GitHub.json') -const web3 = new Web3('https://rpc.ankr.com/eth') +const web3 = new Web3('https://eth.llamarpc.com') console.info('web3.version:', web3.version) -const ethersProvider = new ethers.providers.JsonRpcProvider('https://rpc.ankr.com/eth') +const ethersProvider = new ethers.providers.JsonRpcProvider('https://eth.llamarpc.com') console.info('ethersProvider:', ethersProvider) const GitHubContract = new web3.eth.Contract(GitHub.abi, '0xb989c0c17a3bce679d7586d9e55b6eab11c18687') diff --git a/nationcred/src/update-smart-contract.ts b/nationcred/src/update-smart-contract.ts index b0073d00f..a2605c3fb 100644 --- a/nationcred/src/update-smart-contract.ts +++ b/nationcred/src/update-smart-contract.ts @@ -54,7 +54,7 @@ const lookupActiveCitizensFromCSV = async (): Promise => { const wallet = new ethers.Wallet(privateKey) console.log('wallet.address:', wallet.address) - const provider = new ethers.providers.JsonRpcProvider('https://rpc.ankr.com/eth') + const provider = new ethers.providers.JsonRpcProvider('https://eth.llamarpc.com') console.log('provider.getNetwork().name:', (await provider.getNetwork()).name) const feeData = await provider.getFeeData()