-
Notifications
You must be signed in to change notification settings - Fork 206
Description
Error: bad response (status=413, headers={"access-control-allow-credentials":"true","access-control-allow-headers":"Content-Type,Authorization,User-Agent","access-control-allow-methods":"GET, POST, OPTIONS","access-control-allow-origin":"","content-type":"application/json","vary":"Accept-Encoding","x-node-id":"ethereum_mainnet_fra","date":"Mon, 11 Aug 2025 21:14:37 GMT","content-length":"102"}, body="{\"jsonrpc\":\"2.0\",\"id\":56,\"error\":{\"code\":-32614,\"message\":\"eth_getLogs is limited to a 10,000 range\"}}", requestBody="{\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"0x16015bd\",\"toBlock\":\"latest\",\"address\":\"0x4dceb440657f21083db8add07665f8ddbe1dcfc0\",\"topics\":[\"0x901c3aee23cf4478825462caaab375c606ab83516060388344f0650340753630\"]}],\"id\":56,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url=RPC_URL, code=SERVER_ERROR, version=web/5.8.0) at Logger.Logger.makeError (C:\Users\jordyn\PhpstormProjects\viem-playground\node_modules\.pnpm\@[email protected]\node_modules\@ethersproject\logger\src.ts\index.ts:269:28) at Logger.Logger.throwError (C:\Users\jordyn\PhpstormProjects\viem-playground\node_modules\.pnpm\@[email protected]\node_modules\@ethersproject\logger\src.ts\index.ts:281:20) at <anonymous> (C:\Users\jordyn\PhpstormProjects\viem-playground\node_modules\.pnpm\@[email protected]\node_modules\@ethersproject\web\src.ts\index.ts:308:24) at step (C:\Users\jordyn\PhpstormProjects\viem-playground\node_modules\.pnpm\@[email protected]\node_modules\@ethersproject\web\src.ts\index.ts:1:14) at Object.next (C:\Users\jordyn\PhpstormProjects\viem-playground\node_modules\.pnpm\@[email protected]\node_modules\@ethersproject\web\src.ts\index.ts:1:14) at fulfilled (C:\Users\jordyn\PhpstormProjects\viem-playground\node_modules\.pnpm\@[email protected]\node_modules\@ethersproject\web\src.ts\index.ts:1:14) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) { reason: 'bad response', code: 'SERVER_ERROR', status: 413, headers: { 'access-control-allow-credentials': 'true', 'access-control-allow-headers': 'Content-Type,Authorization,User-Agent', 'access-control-allow-methods': 'GET, POST, OPTIONS', 'access-control-allow-origin': '', 'content-type': 'application/json', vary: 'Accept-Encoding', 'x-node-id': 'ethereum_mainnet_fra', date: 'Mon, 11 Aug 2025 21:14:37 GMT', 'content-length': '102' }, body: '{"jsonrpc":"2.0","id":56,"error":{"code":-32614,"message":"eth_getLogs is limited to a 10,000 range"}}', requestBody: '{"method":"eth_getLogs","params":[{"fromBlock":"0x16015bd","toBlock":"latest","address":"0x4dceb440657f21083db8add07665f8ddbe1dcfc0","topics":["0x901c3aee23cf4478825462caaab375c606ab83516060388344f0650340753630"]}],"id":56,"jsonrpc":"2.0"}', requestMethod: 'POST', url: RPC_URL }
It seems there is no max block range option in the code so this function, as well as waitUntilReadyToExecute not usable. It would be nice to be able to set max polling range as this varies between RPC providers.