{"id":373800,"date":"2024-05-21T05:44:37","date_gmt":"2024-05-21T05:44:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=373800"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=373800","title":{"rendered":"<span>ethers.js \u2013 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 JSON-RPC<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><a href=\"https:\/\/github.com\/ethers-io\/ethers.js\" rel=\"noopener noreferrer nofollow\">ethers.js<\/a> \u2013 TypeScript \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a EVM \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430\u043c. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0435\u0435 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u043f\u043e \u043d\u0435\u0439 \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 (<a href=\"https:\/\/habr.com\/ru\/articles\/722816\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0441\u043d\u043e\u0432\u044b<\/a>, <a href=\"https:\/\/habr.com\/ru\/articles\/731786\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439<\/a>). \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 ethers js \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430\u043c\u0438 JSON-RPC (Alchemy, Infura) \u0438 self-hosted \u043d\u043e\u0434\u043e\u0439. \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0438 \u0447\u0442\u043e \u0441 \u044d\u0442\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043a\u0438\u0434\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f ethers.js <a href=\"https:\/\/docs.ethers.org\/v6\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0440\u0441\u0438\u0438 6.11<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0441 \u043f\u044f\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0438\u0437 \u0441\u0442\u0430\u0442\u0435\u0439, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435, \u0445\u043e\u0442\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043b\u0435\u0433\u043a\u043e.<\/p>\n<h2>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h2>\n<p>\u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0432 CSV \u0431\u0430\u043b\u0430\u043d\u0441\u044b \u0432 USDT 0xc2132D05D31c914a87C6611C10748AEb04B58e8F \u043d\u0430 \u041f\u043e\u043b\u0438\u0433\u043e\u043d\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 (\u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u044b\u043b\u043e \u043e\u043a\u043e\u043b\u043e 30\u0442\u0438). \u041f\u0435\u0440\u0432\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0430\u044f (wallets \u2013 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438):<\/p>\n<pre><code class=\"typescript\">const provider = new ethers.JsonRpcProvider(rpcUrl);   wallets.map(async (wallet) => {   const contract = new ethers.Contract(     \"0xc2132D05D31c914a87C6611C10748AEb04B58e8F\",     abi,     provider   );   const bal = await contract.balanceOf(wallet);    console.log(`Wallet: ${wallet}, Balance: ${bal}`); });<\/code><\/pre>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 rpcUrl \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043e\u0442 Infura. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0437\u0430\u0432\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 5 \u043c\u0438\u043d\u0443\u0442 (!) \u0438 \u043f\u043e\u0442\u043e\u043c \u043e\u0448\u0438\u0431\u043a\u0443 (\u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438):<\/p>\n<blockquote>\n<p>JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)<\/p>\n<p>Error: exceeded maximum retry limit (request={ }, response={ }, error=null, code=SERVER_ERROR, version=6.6.7) at makeError<\/p>\n<\/blockquote>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 2 \u0432\u043e\u043f\u0440\u043e\u0441\u0430:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0434\u043e\u043b\u0433\u043e?<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f retry limit \u043d\u0430 30\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445?<\/p>\n<\/li>\n<\/ul>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 1 \u2013 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0442\u0447\u0438\u043d\u0433<\/h2>\n<p>\u041f\u0435\u0440\u0432\u043e\u0439 \u043f\u043e\u043f\u044b\u0442\u043a\u043e\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0431\u044b\u043b \u0431\u0430\u0442\u0447\u0438\u043d\u0433 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. Ethereum JSON-RPC <a href=\"https:\/\/geth.ethereum.org\/docs\/interacting-with-geth\/rpc\/batch\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442<\/a> \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 Ethereum \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u0422\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 curl \u2013 \u0437\u0430\u043f\u0440\u043e\u0441 \u0431\u0430\u043b\u0430\u043d\u0441\u0430 USDT \u043d\u0430 \u041f\u043e\u043b\u0438\u0433\u043e\u043d\u0435 \u0434\u0432\u0443\u0445 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 0x2066fc1cac710806c8ffcc8539ec69d6ce2ee489 \u0438 0x5f4d4b6b59a88fd83aa754bdd12afc73f53830ec.<\/p>\n<pre><code class=\"bash\">curl https:\/\/ethnode.mydomain.com \\   -X POST \\   -H \"Content-Type: application\/json\" \\   -d '[   {     \"jsonrpc\": \"2.0\",     \"method\": \"eth_call\",     \"params\": [       {         \"to\": \"0xc2132D05D31c914a87C6611C10748AEb04B58e8F\",         \"data\": \"0x70a082310000000000000000000000002066fc1cac710806c8ffcc8539ec69d6ce2ee489\"       },       \"latest\"     ],     \"id\": 1   },   {     \"jsonrpc\": \"2.0\",     \"method\": \"eth_call\",     \"params\": [       {         \"to\": \"0xc2132D05D31c914a87C6611C10748AEb04B58e8F\",         \"data\": \"0x70a082310000000000000000000000005f4d4b6b59a88fd83aa754bdd12afc73f53830ec\"       },       \"latest\"     ],     \"id\": 1   } ] '<\/code><\/pre>\n<p>\u0412 ethers.js \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a (\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u043e\u043f\u0443\u0449\u0435\u043d\u044b):<\/p>\n<pre><code class=\"typescript\">const createPayload = async (   token: string,   wallet: string,   provider: ethers.JsonRpcProvider ) => {   const contract = new ethers.Contract(token, abi, provider);   const byContract = await contract.balanceOf.populateTransaction(wallet);    return {     method: \"eth_call\",     id: 1,     params: [byContract, \"latest\"],     jsonrpc: \"2.0\",   } as JsonRpcPayload; };  const provider = new ethers.JsonRpcProvider(rpcUrl);  const payloads = await Promise.all(   wallets.map(async (wallet) => {     return {       payload: createPayload(         \"0xc2132D05D31c914a87C6611C10748AEb04B58e8F\",         wallet,         provider       ),       wallet: wallet,     };   }) );  const res = await provider._send(   await Promise.all(payloads.map((p) => p.payload)) );  \/\/ print res<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>JsonRpcProvider._send<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 <em>ethers.JsonRpcPayload<\/em> \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u0442\u043e \u0432 \u043e\u0434\u043d\u043e\u043c HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u041f\u043e \u0441\u0443\u0442\u0438, \u044d\u0442\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0432\u044b\u0437\u043e\u0432 curl \u0432\u044b\u0448\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e.<\/p>\n<p><em>contract.balanceOf.populateTransaction(wallet)<\/em> \u2013 \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c calldata, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0438\u0437 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>balanceOf<\/em> (0x70a08231) \u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u043a\u043e\u0434 \u0432\u044b\u0448\u0435 \u0441 30\u044e \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430\u043c\u0438, \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u0443 \u0436\u0435 \u0441\u0430\u043c\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 (&#171;exceeded maximum retry limit&#187;) \u0441 \u0437\u0430\u0432\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043d\u0430 5 \u043c\u0438\u043d\u0443\u0442. \u041f\u0443\u0442\u0435\u043c \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0432 10 JSON-RPC \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043d\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u043c \u043f\u043b\u0430\u043d\u0435 Infura.<\/p>\n<p>\u0420\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c Alchemy \u0438 <a href=\"https:\/\/t.me\/web3dev_notes\/56\" rel=\"noopener noreferrer nofollow\">self-hosted \u043d\u043e\u0434\u043e\u0439 \u044d\u0444\u0438\u0440\u0430<\/a> \u043d\u0430 Geth:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\"><strong>Infura free<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"156\" width=\"156\">\n<p align=\"left\"><strong>Alchemy free<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043d\u043e\u0434\u0430 (\u0432 \u043c\u043e\u0435\u043c \u0433\u043e\u0440\u043e\u0434\u0435)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\u041b\u0438\u043c\u0438\u0442 \u043a\u043e\u043b-\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0431\u0430\u0442\u0447\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">10<\/p>\n<\/td>\n<td data-colwidth=\"156\" width=\"156\">\n<p align=\"left\">1000<\/p>\n<\/td>\n<td>\n<p align=\"left\">1000<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0438 \u043b\u0438\u043c\u0438\u0442\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">HTTP 429 Too Many Requests<\/p>\n<p align=\"left\">-32005 batch item count exceeded<\/p>\n<\/td>\n<td data-colwidth=\"156\" width=\"156\">\n<p align=\"left\">HTTP 400 Bad Request<\/p>\n<p align=\"left\">-32600 Sorry, the maximum batch request size is 1000<\/p>\n<\/td>\n<td>\n<p align=\"left\">HTTP 200<\/p>\n<p align=\"left\">-32600 batch too large<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 ethers.js \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0417\u0430\u0432\u0438\u0441\u0430\u043d\u0438\u0435 5 \u043c\u0438\u043d\u0443\u0442<\/p>\n<\/td>\n<td data-colwidth=\"156\" width=\"156\">\n<p align=\"left\">\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\u0412\u0440\u0435\u043c\u044f \u043e\u0442\u043a\u043b\u0438\u043a\u0430 \u043d\u0430 \u043b\u0438\u043c\u0438\u0442\u043d\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0431\u0430\u0442\u0447\u0430, \u0441\u0435\u043a.<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,85<\/p>\n<\/td>\n<td data-colwidth=\"156\" width=\"156\">\n<p align=\"left\">3,1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,75<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\u0412\u0440\u0435\u043c\u044f \u043e\u0442\u043a\u043b\u0438\u043a\u0430 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0431\u0430\u0442\u0447\u0435 \u0432 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0441\u0435\u043a.<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,85<\/p>\n<\/td>\n<td data-colwidth=\"156\" width=\"156\">\n<p align=\"left\">0,6<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,1<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0422\u0430\u043a\u0436\u0435, \u043a\u043e\u0433\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b \u043d\u0430 \u0441\u0432\u043e\u044e \u043d\u043e\u0434\u0443 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0431\u0430\u0442\u0447 (\u0431\u043e\u043b\u0435\u0435 5200 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432), \u043f\u043e\u043b\u0443\u0447\u0430\u043b HTTP 413 Request Entity Too Large.<\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 2 \u2013 \u0431\u0430\u0442\u0447\u0438\u043d\u0433 \u043e\u0442 ethers<\/h2>\n<p>\u0421\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043d\u0430 \u043d\u0438\u0445 \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 ethers. \u041d\u0430\u0447\u0430\u043b \u0434\u0443\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0435\u043c. \u0412\u0435\u0434\u044c \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0437\u0430\u0432\u0438\u0441\u043b\u0430 \u043d\u0430 5 \u043c\u0438\u043d\u0443\u0442, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0431\u0430\u0442\u0447\u0438 \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435. \u041d\u0430\u0447\u0430\u043b \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u0432 ethers. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0430 Infura, \u0442\u043a \u0441\u0430\u043c\u044b\u0435 \u0441\u0442\u0440\u043e\u0433\u0438\u0435 \u043b\u0438\u043c\u0438\u0442\u044b.<\/p>\n<p>\u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e ethers \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u0430\u0442\u0447\u0438\u043d\u0433 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/docs.ethers.org\/v6\/api\/providers\/jsonrpc\/#JsonRpcApiProviderOptions\" rel=\"noopener noreferrer nofollow\">JsonRpcApiProviderOptions<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0440\u0435\u0442\u044c\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 <em>JsonRpcProvider<\/em>. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u0442\u043e:<\/p>\n<ul>\n<li>\n<p>batchStallTime \u2013 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0432 \u043c\u0441) \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0431\u0430\u0442\u0447 (\u0438 \u043f\u043e\u0442\u043e\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u0433\u043e). \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 10 \u043c\u0441.<\/p>\n<\/li>\n<li>\n<p>batchMaxSize \u2013 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u0442\u0447 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 1 \u041c\u0411).<\/p>\n<\/li>\n<li>\n<p>batchMaxCount \u2013 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e JSON-RPC \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c HTTP \u0431\u0430\u0442\u0447\u0435 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 100).<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0443\u043c\u0430\u044e, \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b Infura \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. batchMaxCount \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432 10 (\u043c\u0430\u043a\u0441 \u0447\u0438\u0441\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c \u0431\u0430\u0442\u0447\u0435), \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c batchStallTime, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0436\u0435 \u0431\u043e\u043c\u0431\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438. \u0423 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c 1000 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 batchMaxCount: 10, batchStallTime \u043e\u0442 100. \u041d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e, \u043a\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 batchStallTime \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c throttling (429 \u043a\u043e\u0434), \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \/ \u043d\u043e\u0434\u044b, \u0442\u0430\u043a\u0436\u0435 \u043e\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f balanceOf \u043d\u0430 1000 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043e\u0442 2 \u0434\u043e 60 \u0441\u0435\u043a\u0443\u043d\u0434 (\u043d\u0435\u043c\u0430\u043b\u044b\u0439 \u0440\u0430\u0437\u0431\u0435\u0433!).<\/p>\n<pre><code class=\"typescript\">  const req = new ethers.FetchRequest(rpcUrl);    req.timeout = 10000;   req.setThrottleParams({     maxAttempts: 12,   });    const provider = new ethers.JsonRpcProvider(req, undefined, {     batchMaxCount: 10,     batchStallTime: 100,   });    await Promise.all(     wallets.map(async (wallet) => {       const contract = new ethers.Contract(         \"0xc2132D05D31c914a87C6611C10748AEb04B58e8F\",         abi,         provider       );       const bal = await contract.balanceOf(wallet);        console.log(`Wallet: ${wallet}, Balance: ${bal}`);     })   ); <\/code><\/pre>\n<p>\u0415\u0449\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/docs.ethers.org\/v6\/api\/utils\/fetching\/#FetchRequest\" rel=\"noopener noreferrer nofollow\">FetchRequest<\/a>:<\/p>\n<ul>\n<li>\n<p>timeout (\u0432 \u043c\u0441) &#8212; \u043f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u043d 300 000 (5 \u043c\u0438\u043d\u0443\u0442).<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.ethers.org\/v6\/api\/utils\/fetching\/#FetchThrottleParams\" rel=\"noopener noreferrer nofollow\">FetchThrottleParams<\/a><\/p>\n<ul>\n<li>\n<p>maxAttempts \u2013 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 429 \u043e\u0448\u0438\u0431\u043a\u0438 (throttling) (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 12). \u0415\u0441\u043b\u0438 \u044d\u0442\u043e 1, \u0442\u043e HTTP \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 429 \u043e\u0448\u0438\u0431\u043a\u0438. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0432 ethers 6.11 \u0431\u044b\u043b \u0431\u0430\u0433 \u2013 \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u043b\u0441\u044f, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043b\u0435\u0437 \u0441\u0434\u0435\u043b\u0430\u0442\u044c PR, \u043a\u0430\u043a \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435 \u044d\u0442\u043e <a href=\"https:\/\/github.com\/ethers-io\/ethers.js\/commit\/12772e9498b70f8538838f30e16f3792ea90e173\" rel=\"noopener noreferrer nofollow\">\u0443\u0436\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e<\/a>, \u0438 \u0432\u044b\u0439\u0434\u0435\u0442, \u0432\u0438\u0434\u0438\u043c\u043e, \u0432 6.12 \ud83d\ude42<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u0414\u0443\u043c\u0430\u044e, \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0431\u044b\u043b\u043e \u0437\u0430\u0432\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 5 \u043c\u0438\u043d\u0443\u0442 \u0438 \u043e\u0448\u0438\u0431\u043a\u0438 exceeded maximum retry limit. ethers \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0442\u0447\u0438, \u043f\u043e\u043b\u0443\u0447\u0430\u043b 429, \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u043b \u0435\u0449\u0435 \u0440\u0430\u0437, \u0438 \u0442\u0430\u043a 12 \u0440\u0430\u0437 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c backoff.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u2013 \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u0432 \u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435), \u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0438 \u0437\u0430\u0442\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u043d\u0435\u0435. \u0411\u044b\u0441\u0442\u0440\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u043e\u0432 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e \u0432 \u0432\u0438\u0434\u0435 ethers.<\/p>\n<p>\u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, ethers \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043e \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u0434\u0430\u0436\u0435 \u043c\u0438\u043d\u043e\u0440\u043d\u043e\u0439, \u0438\u043c\u0435\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0448\u0430\u043d\u0441 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043b\u043e\u043c\u0430\u0442\u044c. \u041b\u0443\u0447\u0448\u0435 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0442\u0430\u043c \u0433\u0434\u0435 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u0439 \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 JSON RPC \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u043b\u0438\u043c\u0438\u0442\u0430\u043c.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435, \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 ethers \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u044e\u0437\u043a\u0435\u0439\u0441\u043e\u0432, \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u0443\u0447\u0435\u0441\u0442\u044c \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435.<\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, self-hosted \u043d\u043e\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0430 \u043e\u0442\u043a\u043b\u0438\u043a\u0430 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432 \u0441\u0432\u043e\u0435\u043c \u0434\u0430\u0442\u0430\u0446\u0435\u043d\u0442\u0440\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u043d\u043e \u043a\u043e\u0441\u0442\u044b \u0435\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438.<\/p>\n<p>\u041a\u043e\u0434 \u043d\u0430 Github <a href=\"https:\/\/github.com\/TechGeorgii\/ethers.js-performance\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/TechGeorgii\/ethers.js-performance<\/a><\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0442\u043a\u0430 PR<\/strong>. \u0412\u0435\u0434\u0443 \u0442\u0433\u2011\u043a\u0430\u043d\u0430\u043b\u00a0<a href=\"https:\/\/t.me\/web3dev_notes\" rel=\"noopener noreferrer nofollow\">Web3\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a>. \u041f\u0438\u0448\u0443 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0437\u0430\u043c\u0435\u0442\u043a\u0438 (\u043d\u0435 \u0447\u0430\u0441\u0442\u043e) \u043e\u00a0\u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u043f\u043e\u00a0\u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0443\/\u043a\u0440\u0438\u043f\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0448\u0430\u044e. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0440\u0435\u0434\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/808111\/\"> https:\/\/habr.com\/ru\/articles\/808111\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><a href=\"https:\/\/github.com\/ethers-io\/ethers.js\" rel=\"noopener noreferrer nofollow\">ethers.js<\/a> \u2013 TypeScript \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a EVM \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430\u043c. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0435\u0435 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u043f\u043e \u043d\u0435\u0439 \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 (<a href=\"https:\/\/habr.com\/ru\/articles\/722816\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0441\u043d\u043e\u0432\u044b<\/a>, <a href=\"https:\/\/habr.com\/ru\/articles\/731786\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439<\/a>). \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 ethers js \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430\u043c\u0438 JSON-RPC (Alchemy, Infura) \u0438 self-hosted \u043d\u043e\u0434\u043e\u0439. \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0438 \u0447\u0442\u043e \u0441 \u044d\u0442\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043a\u0438\u0434\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f ethers.js <a href=\"https:\/\/docs.ethers.org\/v6\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0440\u0441\u0438\u0438 6.11<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0441 \u043f\u044f\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0438\u0437 \u0441\u0442\u0430\u0442\u0435\u0439, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435, \u0445\u043e\u0442\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043b\u0435\u0433\u043a\u043e.<\/p>\n<h2>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h2>\n<p>\u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0432 CSV \u0431\u0430\u043b\u0430\u043d\u0441\u044b \u0432 USDT 0xc2132D05D31c914a87C6611C10748AEb04B58e8F \u043d\u0430 \u041f\u043e\u043b\u0438\u0433\u043e\u043d\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 (\u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u044b\u043b\u043e \u043e\u043a\u043e\u043b\u043e 30\u0442\u0438). \u041f\u0435\u0440\u0432\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0430\u044f (wallets \u2013 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438):<\/p>\n<pre><code class=\"typescript\">const provider = new ethers.JsonRpcProvider(rpcUrl);   wallets.map(async (wallet) => {   const contract = new ethers.Contract(     \"0xc2132D05D31c914a87C6611C10748AEb04B58e8F\",     abi,     provider   );   const bal = await contract.balanceOf(wallet);    console.log(`Wallet: ${wallet}, Balance: ${bal}`); });<\/code><\/pre>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 rpcUrl \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043e\u0442 Infura. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0437\u0430\u0432\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 5 \u043c\u0438\u043d\u0443\u0442 (!) \u0438 \u043f\u043e\u0442\u043e\u043c \u043e\u0448\u0438\u0431\u043a\u0443 (\u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438):<\/p>\n<blockquote>\n<p>JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)<\/p>\n<p>Error: exceeded maximum retry limit (request={ }, response={ }, error=null, code=SERVER_ERROR, version=6.6.7) at makeError<\/p>\n<\/blockquote>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 2 \u0432\u043e\u043f\u0440\u043e\u0441\u0430:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0434\u043e\u043b\u0433\u043e?<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f retry limit \u043d\u0430 30\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445?<\/p>\n<\/li>\n<\/ul>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 1 \u2013 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0442\u0447\u0438\u043d\u0433<\/h2>\n<p>\u041f\u0435\u0440\u0432\u043e\u0439 \u043f\u043e\u043f\u044b\u0442\u043a\u043e\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0431\u044b\u043b \u0431\u0430\u0442\u0447\u0438\u043d\u0433 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. Ethereum JSON-RPC <a href=\"https:\/\/geth.ethereum.org\/docs\/interacting-with-geth\/rpc\/batch\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442<\/a> \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 Ethereum \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u0422\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 curl \u2013 \u0437\u0430\u043f\u0440\u043e\u0441 \u0431\u0430\u043b\u0430\u043d\u0441\u0430 USDT \u043d\u0430 \u041f\u043e\u043b\u0438\u0433\u043e\u043d\u0435 \u0434\u0432\u0443\u0445 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 0x2066fc1cac710806c8ffcc8539ec69d6ce2ee489 \u0438 0x5f4d4b6b59a88fd83aa754bdd12afc73f53830ec.<\/p>\n<pre><code class=\"bash\">curl https:\/\/ethnode.mydomain.com \\   -X POST \\   -H \"Content-Type: application\/json\" \\   -d '[   {     \"jsonrpc\": \"2.0\",     \"method\": \"eth_call\",     \"params\": [       {         \"to\": \"0xc2132D05D31c914a87C6611C10748AEb04B58e8F\",         \"data\": \"0x70a082310000000000000000000000002066fc1cac710806c8ffcc8539ec69d6ce2ee489\"       },       \"latest\"     ],     \"id\": 1   },   {     \"jsonrpc\": \"2.0\",     \"method\": \"eth_call\",     \"params\": [       {         \"to\": \"0xc2132D05D31c914a87C6611C10748AEb04B58e8F\",         \"data\": \"0x70a082310000000000000000000000005f4d4b6b59a88fd83aa754bdd12afc73f53830ec\"       },       \"latest\"     ],     \"id\": 1   } ] '<\/code><\/pre>\n<p>\u0412 ethers.js \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a (\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u043e\u043f\u0443\u0449\u0435\u043d\u044b):<\/p>\n<pre><code class=\"typescript\">const createPayload = async (   token: string,   wallet: string,   provider: ethers.JsonRpcProvider ) => {   const contract = new ethers.Contract(token, abi, provider);   const byContract = await contract.balanceOf.populateTransaction(wallet);    return {     method: \"eth_call\",     id: 1,     params: [byContract, \"latest\"],     jsonrpc: \"2.0\",   } as JsonRpcPayload; };  const provider = new ethers.JsonRpcProvider(rpcUrl);  const payloads = await Promise.all(   wallets.map(async (wallet) => {     return {       payload: createPayload(         \"0xc2132D05D31c914a87C6611C10748AEb04B58e8F\",         wallet,         provider       ),       wallet: wallet,     };   }) );  const res = await provider._send(   await Promise.all(payloads.map((p) => p.payload)) );  \/\/ print res<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>JsonRpcProvider._send<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 <em>ethers.JsonRpcPayload<\/em> \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u0442\u043e \u0432 \u043e\u0434\u043d\u043e\u043c HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u041f\u043e \u0441\u0443\u0442\u0438, \u044d\u0442\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0432\u044b\u0437\u043e\u0432 curl \u0432\u044b\u0448\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e.<\/p>\n<p><em>contract.balanceOf.populateTransaction(wallet)<\/em> \u2013 \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c calldata, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0438\u0437 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>balanceOf<\/em> (0x70a08231) \u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u043a\u043e\u0434 \u0432\u044b\u0448\u0435 \u0441 30\u044e \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430\u043c\u0438, \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u0443 \u0436\u0435 \u0441\u0430\u043c\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 (&#171;exceeded maximum retry limit&#187;) \u0441 \u0437\u0430\u0432\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043d\u0430 5 \u043c\u0438\u043d\u0443\u0442. \u041f\u0443\u0442\u0435\u043c \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0432 10 JSON-RPC \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043d\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u043c \u043f\u043b\u0430\u043d\u0435 Infura.<\/p>\n<p>\u0420\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c Alchemy \u0438 <a href=\"https:\/\/t.me\/web3dev_notes\/56\" rel=\"noopener noreferrer nofollow\">self-hosted \u043d\u043e\u0434\u043e\u0439 \u044d\u0444\u0438\u0440\u0430<\/a> \u043d\u0430 Geth:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\"><strong>Infura free<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"156\" width=\"156\">\n<p align=\"left\"><strong>Alchemy free<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043d\u043e\u0434\u0430 (\u0432 \u043c\u043e\u0435\u043c \u0433\u043e\u0440\u043e\u0434\u0435)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\u041b\u0438\u043c\u0438\u0442 \u043a\u043e\u043b-\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0431\u0430\u0442\u0447\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">10<\/p>\n<\/td>\n<td data-colwidth=\"156\" width=\"156\">\n<p align=\"left\">1000<\/p>\n<\/td>\n<td>\n<p align=\"left\">1000<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0438 \u043b\u0438\u043c\u0438\u0442\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">HTTP 429 Too Many Requests<\/p>\n<p align=\"left\">-32005 batch item count exceeded<\/p>\n<\/td>\n<td data-colwidth=\"156\" width=\"156\">\n<p align=\"left\">HTTP 400 Bad Request<\/p>\n<p align=\"left\">-32600 Sorry, the maximum batch request size is 1000<\/p>\n<\/td>\n<td>\n<p align=\"left\">HTTP 200<\/p>\n<p align=\"left\">-32600 batch too large<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 ethers.js \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0417\u0430\u0432\u0438\u0441\u0430\u043d\u0438\u0435 5 \u043c\u0438\u043d\u0443\u0442<\/p>\n<\/td>\n<td data-colwidth=\"156\" width=\"156\">\n<p align=\"left\">\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\u0412\u0440\u0435\u043c\u044f \u043e\u0442\u043a\u043b\u0438\u043a\u0430 \u043d\u0430 \u043b\u0438\u043c\u0438\u0442\u043d\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0431\u0430\u0442\u0447\u0430, \u0441\u0435\u043a.<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,85<\/p>\n<\/td>\n<td data-colwidth=\"156\" width=\"156\">\n<p align=\"left\">3,1<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,75<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"234\" width=\"234\">\n<p align=\"left\">\u0412\u0440\u0435\u043c\u044f \u043e\u0442\u043a\u043b\u0438\u043a\u0430 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0431\u0430\u0442\u0447\u0435 \u0432 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0441\u0435\u043a.<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,85<\/p>\n<\/td>\n<td data-colwidth=\"156\" width=\"156\">\n<p align=\"left\">0,6<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,1<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0422\u0430\u043a\u0436\u0435, \u043a\u043e\u0433\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b \u043d\u0430 \u0441\u0432\u043e\u044e \u043d\u043e\u0434\u0443 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0431\u0430\u0442\u0447 (\u0431\u043e\u043b\u0435\u0435 5200 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432), \u043f\u043e\u043b\u0443\u0447\u0430\u043b HTTP 413 Request Entity Too Large.<\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 2 \u2013 \u0431\u0430\u0442\u0447\u0438\u043d\u0433 \u043e\u0442 ethers<\/h2>\n<p>\u0421\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043d\u0430 \u043d\u0438\u0445 \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 ethers. \u041d\u0430\u0447\u0430\u043b \u0434\u0443\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0435\u043c. \u0412\u0435\u0434\u044c \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0437\u0430\u0432\u0438\u0441\u043b\u0430 \u043d\u0430 5 \u043c\u0438\u043d\u0443\u0442, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0431\u0430\u0442\u0447\u0438 \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435. \u041d\u0430\u0447\u0430\u043b \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u0432 ethers. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0430 Infura, \u0442\u043a \u0441\u0430\u043c\u044b\u0435 \u0441\u0442\u0440\u043e\u0433\u0438\u0435 \u043b\u0438\u043c\u0438\u0442\u044b.<\/p>\n<p>\u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e ethers \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u0430\u0442\u0447\u0438\u043d\u0433 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/docs.ethers.org\/v6\/api\/providers\/jsonrpc\/#JsonRpcApiProviderOptions\" rel=\"noopener noreferrer nofollow\">JsonRpcApiProviderOptions<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0440\u0435\u0442\u044c\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 <em>JsonRpcProvider<\/em>. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u0442\u043e:<\/p>\n<ul>\n<li>\n<p>batchStallTime \u2013 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0432 \u043c\u0441) \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0431\u0430\u0442\u0447 (\u0438 \u043f\u043e\u0442\u043e\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u0433\u043e). \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 10 \u043c\u0441.<\/p>\n<\/li>\n<li>\n<p>batchMaxSize \u2013 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u0442\u0447 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 1 \u041c\u0411).<\/p>\n<\/li>\n<li>\n<p>batchMaxCount \u2013 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e JSON-RPC \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c HTTP \u0431\u0430\u0442\u0447\u0435 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 100).<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0443\u043c\u0430\u044e, \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b Infura \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. batchMaxCount \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432 10 (\u043c\u0430\u043a\u0441 \u0447\u0438\u0441\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c \u0431\u0430\u0442\u0447\u0435), \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c batchStallTime, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0436\u0435 \u0431\u043e\u043c\u0431\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438. \u0423 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c 1000 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 batchMaxCount: 10, batchStallTime \u043e\u0442 100. \u041d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e, \u043a\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 batchStallTime \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c throttling (429 \u043a\u043e\u0434), \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \/ \u043d\u043e\u0434\u044b, \u0442\u0430\u043a\u0436\u0435 \u043e\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f balanceOf \u043d\u0430 1000 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043e\u0442 2 \u0434\u043e 60 \u0441\u0435\u043a\u0443\u043d\u0434 (\u043d\u0435\u043c\u0430\u043b\u044b\u0439 \u0440\u0430\u0437\u0431\u0435\u0433!).<\/p>\n<pre><code class=\"typescript\">  const req = new ethers.FetchRequest(rpcUrl);    req.timeout = 10000;   req.setThrottleParams({     maxAttempts: 12,   });    const provider = new ethers.JsonRpcProvider(req, undefined, {     batchMaxCount: 10,     batchStallTime: 100,   });    await Promise.all(     wallets.map(async (wallet) => {       const contract = new ethers.Contract(         \"0xc2132D05D31c914a87C6611C10748AEb04B58e8F\",         abi,         provider       );       const bal = await contract.balanceOf(wallet);        console.log(`Wallet: ${wallet}, Balance: ${bal}`);     })   ); <\/code><\/pre>\n<p>\u0415\u0449\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/docs.ethers.org\/v6\/api\/utils\/fetching\/#FetchRequest\" rel=\"noopener noreferrer nofollow\">FetchRequest<\/a>:<\/p>\n<ul>\n<li>\n<p>timeout (\u0432 \u043c\u0441) &#8212; \u043f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u043d 300 000 (5 \u043c\u0438\u043d\u0443\u0442).<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.ethers.org\/v6\/api\/utils\/fetching\/#FetchThrottleParams\" rel=\"noopener noreferrer nofollow\">FetchThrottleParams<\/a><\/p>\n<ul>\n<li>\n<p>maxAttempts \u2013 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 429 \u043e\u0448\u0438\u0431\u043a\u0438 (throttling) (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 12). \u0415\u0441\u043b\u0438 \u044d\u0442\u043e 1, \u0442\u043e HTTP \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 429 \u043e\u0448\u0438\u0431\u043a\u0438. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0432 ethers 6.11 \u0431\u044b\u043b \u0431\u0430\u0433 \u2013 \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u043b\u0441\u044f, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043b\u0435\u0437 \u0441\u0434\u0435\u043b\u0430\u0442\u044c PR, \u043a\u0430\u043a \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435 \u044d\u0442\u043e <a href=\"https:\/\/github.com\/ethers-io\/ethers.js\/commit\/12772e9498b70f8538838f30e16f3792ea90e173\" rel=\"noopener noreferrer nofollow\">\u0443\u0436\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e<\/a>, \u0438 \u0432\u044b\u0439\u0434\u0435\u0442, \u0432\u0438\u0434\u0438\u043c\u043e, \u0432 6.12 \ud83d\ude42<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u0414\u0443\u043c\u0430\u044e, \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0431\u044b\u043b\u043e \u0437\u0430\u0432\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 5 \u043c\u0438\u043d\u0443\u0442 \u0438 \u043e\u0448\u0438\u0431\u043a\u0438 exceeded maximum retry limit. ethers \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0442\u0447\u0438, \u043f\u043e\u043b\u0443\u0447\u0430\u043b 429, \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u043b \u0435\u0449\u0435 \u0440\u0430\u0437, \u0438 \u0442\u0430\u043a 12 \u0440\u0430\u0437 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c backoff.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u2013 \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u0432 \u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435), \u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0438 \u0437\u0430\u0442\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u043d\u0435\u0435. \u0411\u044b\u0441\u0442\u0440\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u043e\u0432 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e \u0432 \u0432\u0438\u0434\u0435 ethers.<\/p>\n<p>\u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, ethers \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043e \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u0434\u0430\u0436\u0435 \u043c\u0438\u043d\u043e\u0440\u043d\u043e\u0439, \u0438\u043c\u0435\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0448\u0430\u043d\u0441 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043b\u043e\u043c\u0430\u0442\u044c. \u041b\u0443\u0447\u0448\u0435 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0442\u0430\u043c \u0433\u0434\u0435 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u0439 \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 JSON RPC \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u043b\u0438\u043c\u0438\u0442\u0430\u043c.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435, \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 ethers \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u044e\u0437\u043a\u0435\u0439\u0441\u043e\u0432, \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u0443\u0447\u0435\u0441\u0442\u044c \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435.<\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, self-hosted \u043d\u043e\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0430 \u043e\u0442\u043a\u043b\u0438\u043a\u0430 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432 \u0441\u0432\u043e\u0435\u043c \u0434\u0430\u0442\u0430\u0446\u0435\u043d\u0442\u0440\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u043d\u043e \u043a\u043e\u0441\u0442\u044b \u0435\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438.<\/p>\n<p>\u041a\u043e\u0434 \u043d\u0430 Github <a href=\"https:\/\/github.com\/TechGeorgii\/ethers.js-performance\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/TechGeorgii\/ethers.js-performance<\/a><\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0442\u043a\u0430 PR<\/strong>. \u0412\u0435\u0434\u0443 \u0442\u0433\u2011\u043a\u0430\u043d\u0430\u043b\u00a0<a href=\"https:\/\/t.me\/web3dev_notes\" rel=\"noopener noreferrer nofollow\">Web3\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a>. \u041f\u0438\u0448\u0443 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0437\u0430\u043c\u0435\u0442\u043a\u0438 (\u043d\u0435 \u0447\u0430\u0441\u0442\u043e) \u043e\u00a0\u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u043f\u043e\u00a0\u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0443\/\u043a\u0440\u0438\u043f\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0448\u0430\u044e. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0440\u0435\u0434\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/808111\/\"> https:\/\/habr.com\/ru\/articles\/808111\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-373800","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/373800","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=373800"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/373800\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=373800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=373800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=373800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}