I am actually working on an API
that much more convenient / faster to use for this task than web3.js.
Just run the request below (and replace the placeholder address 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
with the address you have in mind in both places). This should get you all transactions an address has made in a single request (if there are more than 100,000 transactions you can use the cursor to fetch the next page of results - docs here: syve.ai).
curl --location --request POST 'https://api.syve.ai/v1/transactions' \
--header 'Content-Type: application/json' \
--data-raw '{
"filter": {
"type": "or",
"params": {
"filters": [
{
"type": "eq",
"params": {
"field": "to_address",
"value": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
}
},
{
"type": "eq",
"params": {
"field": "from_address",
"value": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
}
}
]
}
},
"options" : [
{
"type" : "size",
"params" : {
"value" : 100000
}
}
]
}'
geth
doesn't index transactions by sender