Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(erc8004): stop reading an RPC plan limit as a block-range ceiling on BSC testnet

nirholas3723335d1ca4
diff --git a/api/_lib/erc8004-chains.js b/api/_lib/erc8004-chains.js
index 4753d9764..155ec1c50 100644
--- a/api/_lib/erc8004-chains.js
+++ b/api/_lib/erc8004-chains.js
@@ -242,7 +242,17 @@ export const CHAINS = [
testnet: true,
registry: IDENTITY_REGISTRY_TESTNET,
explorer: 'https://testnet.bscscan.com',
- rpcUrls: ['https://data-seed-prebsc-1-s1.bnbchain.org:8545', 'https://data-seed-prebsc-2-s1.bnbchain.org:8545'],
+ // PublicNode leads because the bnbchain data-seed nodes answer
+ // eth_blockNumber fine but refuse EVERY eth_getLogs with `-32005 limit
+ // exceeded`, down to a single-block range. That is a plan limit on the
+ // method, not a range the crawl can shrink into, so with only data-seed
+ // lanes configured this chain could never index a single log. Verified
+ // 2026-08-14: publicnode serves 2,000-block getLogs here.
+ rpcUrls: [
+ 'https://bsc-testnet-rpc.publicnode.com',
+ 'https://data-seed-prebsc-1-s1.bnbchain.org:8545',
+ 'https://data-seed-prebsc-2-s1.bnbchain.org:8545',
+ ],
},
{
id: 84532,
diff --git a/api/cron/[name].js b/api/cron/[name].js
index e05377f66..ef8287baa 100644
--- a/api/cron/[name].js
+++ b/api/cron/[name].js
@@ -342,7 +342,13 @@ const ERC8004_MAX_BLOCK_CHUNK = 8_000;
const ERC8004_MIN_BLOCK_CHUNK = 100;
// Range rejections name the range rather than a stable error code, and every
// provider words it differently.
-const RANGE_REJECTED = /block range|range is too large|too many blocks|limit exceeded|query returned more than|exceed maximum block range|response size|logs matched/i;
+//
+// A bare "limit exceeded" is deliberately NOT here. It is the wording of the
+// JSON-RPC -32005 rate/compute limit (bnbchain data-seed, zan.top), which no
+// smaller range fixes: matching it made the crawl read a plan limit as a range
+// ceiling and shrink to the floor forever instead of surfacing the real fault.
+// Every entry below names a range or a result volume, which shrinking does fix.
+const RANGE_REJECTED = /block range|range is too large|too wide|too many blocks|query returned more than|exceed maximum block range|limited to|response size|logs matched/i;
/**
* The block window to request for a chain this tick.