Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "too many requests" error (#110) #111

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data-sources/citizens/generate-citizen-count-csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions data-sources/citizens/generate-citizens-csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion data-sources/citizens/generate-voting-power-datasets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions data-sources/discord/src/generate-csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
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')
Expand All @@ -32,7 +32,7 @@
{ id: 'discord_username_ens', title: 'discord_username_ens' }
]
})
const csvRows: any[] = []

Check warning on line 35 in data-sources/discord/src/generate-csv.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Unexpected any. Specify a different type

Check warning on line 35 in data-sources/discord/src/generate-csv.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Unexpected any. Specify a different type

const citizensJson = require('../../citizens/output/citizens.json')
for (const passportId in citizensJson) {
Expand Down
4 changes: 2 additions & 2 deletions data-sources/discourse/src/generate-csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
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')
Expand All @@ -31,7 +31,7 @@
{ id: 'discourse_username', title: 'discourse_username' }
]
})
const csvRows: any[] = []

Check warning on line 34 in data-sources/discourse/src/generate-csv.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Unexpected any. Specify a different type

Check warning on line 34 in data-sources/discourse/src/generate-csv.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Unexpected any. Specify a different type

const citizensJson = require('../../citizens/output/citizens.json')
for (const passportId in citizensJson) {
Expand Down
4 changes: 2 additions & 2 deletions data-sources/github/src/generate-csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion nationcred/src/update-smart-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
const csvData = file.toString()
console.info('csvData:\n', csvData)

const promise: Promise<number[]> = new Promise((resolve, reject) => {

Check warning on line 20 in nationcred/src/update-smart-contract.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

'reject' is defined but never used

Check warning on line 20 in nationcred/src/update-smart-contract.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

'reject' is defined but never used
Papa.parse(csvData, {
header: true,
skipEmptyLines: true,
complete: (results: any) => {

Check warning on line 24 in nationcred/src/update-smart-contract.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Unexpected any. Specify a different type

Check warning on line 24 in nationcred/src/update-smart-contract.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Unexpected any. Specify a different type
const data = results.data
console.log('data.length:', data.length)

Expand Down Expand Up @@ -54,7 +54,7 @@
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()
Expand Down
Loading