{"id":7,"date":"2025-02-18T13:10:17","date_gmt":"2025-02-18T10:10:17","guid":{"rendered":"https:\/\/cryppi.mkhananov.ru\/?p=7"},"modified":"2025-02-18T13:40:57","modified_gmt":"2025-02-18T10:40:57","slug":"7","status":"publish","type":"post","link":"https:\/\/cryppi.mkhananov.ru\/?p=7","title":{"rendered":"Web3 &#8212; Lesson 1"},"content":{"rendered":"\n<figure class=\"wp-block-video\"><video controls src=\"\/files\/video\/lesson_01_basic_read.mp4\"><\/video><\/figure>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Notion<\/summary>\n<p class=\"wp-block-paragraph\">\u041e\u0441\u043d\u043e\u0432\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 EVM \u0441\u0435\u0442\u044f\u043c\u0438<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">About the author<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Author: <a href=\"https:\/\/t.me\/ahillary\">https:\/\/t.me\/ahillary<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Resources<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Channel: <a href=\"https:\/\/t.me\/semolina_code_python\">https:\/\/t.me\/semolina_code_python<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Chat: <a href=\"https:\/\/t.me\/python_with_ahillary\">https:\/\/t.me\/python_with_ahillary<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">YouTube: <a href=\"https:\/\/www.youtube.com\/@semolinacode\">https:\/\/www.youtube.com\/@semolinacode<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Coding training: <a href=\"https:\/\/t.me\/how_to_code_web3\">https:\/\/t.me\/how_to_code_web3<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Prop trading: <a href=\"https:\/\/t.me\/semolina_prop\">https:\/\/t.me\/semolina_prop<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">\u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u0412\u0435\u0440\u0441\u0438\u044f python<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 <code>python 3.11<\/code> \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f (python 3.12) \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043d\u0430\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.python.org\/downloads\/\">Download Python<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>virtualenv venv --python=python3.11\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u0412\u0435\u0440\u0441\u0438\u044f <a href=\"http:\/\/web3.py\">web3.py<\/a><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 <code>web3.py 6.14.0<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/web3py.readthedocs.io\/en\/stable\/release_notes.html#web3-py-v6-14-0-2024-01-10\">Release Notes \u2014 web3.py 7.2.0 documentation<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install web3==6.14.0\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0443\u0440\u043e\u043a\u0430<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0444\u0430\u0439\u043b <code>requirements.txt<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>web3==6.14.0\ncurl_cffi==0.7.1\nfake-useragent==1.4.0\n<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f <a href=\"http:\/\/web3.py\">web3.py<\/a><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/web3py.readthedocs.io\/en\/stable\/quickstart.html\">Quickstart \u2014 web3.py 7.2.0 documentation<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041c\u0435\u0442\u043e\u0434\u0438\u0447\u043a\u0438 \u0410\u043b\u0435\u043a\u0441\u0430 \u041a\u0440\u044e\u0433\u0435\u0440\u0430<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u0438\u0447\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0433\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 web3 \u0438 \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441. web3 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0434<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/telegra.ph\/Tehnicheskij-kurs-pro-DeFi-dlya-nachinayushchih-11-28\">\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u0443\u0440\u0441 \u043f\u0440\u043e DeFi \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e.<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0410\u0432\u0442\u043e\u0440\u0441\u043a\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u201cHow to Code \u0438\u043b\u0438 \u043a\u0430\u043a \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430 1000 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432\u201d<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/teletype.in\/@cryppi\/howtocode\">How to Code \u0438\u043b\u0438 \u043a\u0430\u043a \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430 1000 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0443<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>import asyncio\n\nfrom web3 import AsyncWeb3\n\nasync def main():\n    rpc = '&lt;https:\/\/rpc.ankr.com\/eth\/&gt;'\n    w3 = AsyncWeb3(AsyncWeb3.AsyncHTTPProvider(rpc))\n    print(await w3.is_connected())  # True\n\nif __name__ == '__main__':\n    asyncio.run(main())\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>RPC<\/strong> (Remote Procedure Call) \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 (\u0441\u0435\u0440\u0432\u0435\u0440\u0435) \u0442\u0430\u043a, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u043e\u0432 \u0438, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, Ethereum, <strong>RPC<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0443\u0437\u043b\u043e\u043c (node) \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043f\u0438\u0441\u043e\u043a RPC \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/chainlist.org\/\">ChainList<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>import asyncio\n\nfrom web3 import AsyncWeb3\n\nasync def main():\n    rpc = '&lt;https:\/\/rpc.ankr.com\/eth\/&gt;'\n    w3 = AsyncWeb3(AsyncWeb3.AsyncHTTPProvider(rpc))\n\n    # \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 gas_price\n    gas_price = await w3.eth.gas_price\n    print(f\"gas price: {gas_price} Wei\")\n    print(f\"gas price: {gas_price \/ 10 ** 9} GWei\")\n    print(f\"gas price: {gas_price \/ 10 ** 18} ETH\")\n\n    # \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 max_priority_fee (\u0434\u043b\u044f EIP-1559 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u0435\u0442\u044f\u0445)\n    max_priority_fee = await w3.eth.max_priority_fee\n    print(f\"max priority fee: {max_priority_fee}\")\n\n    # \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 id \u0441\u0435\u0442\u0438\n    chain_id = await w3.eth.chain_id\n    print(f\"number of current chain is {chain_id}\")\n\n    # \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430\n    block_number = await w3.eth.block_number\n    print(f\"current block number: {block_number}\")\n\nif __name__ == '__main__':\n    asyncio.run(main())\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>wei<\/strong> &#8212; \u0441\u0430\u043c\u0430\u044f \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u044d\u0444\u0438\u0440\u0430 (ETH), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 Ethereum (1 ETH = 10^18 wei).<\/li>\n\n\n\n<li><strong>gwei<\/strong> &#8212; \u043e\u0434\u043d\u0430 \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446 \u044d\u0444\u0438\u0440\u0430, \u0440\u0430\u0432\u043d\u0430\u044f 1 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434 wei (10^9 wei), \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0446\u0435\u043d\u044b \u0433\u0430\u0437\u0430).<\/li>\n\n\n\n<li><strong>gas_price<\/strong> &#8212; \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0433\u043e\u0442\u043e\u0432 \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0433\u0430\u0437\u0430 (\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438) \u0432 Ethereum, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u043d\u0430\u044f \u0432 gwei.<\/li>\n\n\n\n<li><strong>max_priority_fee<\/strong> &#8212; \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0433\u043e\u0442\u043e\u0432 \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u043c\u0430\u0439\u043d\u0435\u0440\u0430\u043c \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0431\u043b\u043e\u043a.<\/li>\n\n\n\n<li><strong>chain_id<\/strong> &#8212; \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 Ethereum (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0441\u0435\u0442\u044c, \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0435\u0442\u044c).<\/li>\n\n\n\n<li><strong>block_number<\/strong> &#8212; \u043d\u043e\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0431\u043b\u043e\u043a\u043e\u0432 (\u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0441\u0435\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0441\u0435\u0442\u0438.<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">Checksum address<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Checksum address<\/strong> (\u0447\u0435\u043a\u0441\u0443\u0301\u043c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441) \u0432 Ethereum \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u0432\u043e\u0434\u0430 \u0430\u0434\u0440\u0435\u0441\u0430.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u0417\u0430\u0447\u0435\u043c \u043e\u043d \u043d\u0443\u0436\u0435\u043d?<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438<\/strong>: \u0427\u0435\u043a\u0441\u0443\u0301\u043c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435, \u0442\u0430\u043a \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0430\u0434\u0440\u0435\u0441\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u0430 \u043e\u0434\u043d\u0430 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u043a\u0432 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0441\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0438\u043b\u0438 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435), \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0443.<\/li>\n\n\n\n<li><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/strong>: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0447\u0435\u043a\u0441\u0443\u0301\u043c\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043b\u0438 \u0440\u0443\u0447\u043d\u043e\u043c \u0432\u0432\u043e\u0434\u0435 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043d\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441. \u0415\u0441\u043b\u0438 \u0430\u0434\u0440\u0435\u0441 \u0432\u0432\u0435\u0434\u0435\u043d \u043d\u0435\u0432\u0435\u0440\u043d\u043e, \u043c\u043d\u043e\u0433\u0438\u0435 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0438 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u044e\u0442 \u044d\u0442\u043e \u0438 \u0432\u044b\u0434\u0430\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ethereum-\u0430\u0434\u0440\u0435\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0447\u0435\u043a\u0441\u0443\u0301\u043c\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u0443\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 Keccak-256. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u0430\u0434\u0440\u0435\u0441\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u00ab\u0447\u0435\u043a\u0441\u0443\u0301\u043c\u043d\u044b\u0439\u00bb \u043f\u0430\u0442\u0442\u0435\u0440\u043d.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 python<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>from web3 import AsyncWeb3\n\naddress = '0x672009c467b943eea16cdf53549c5fb94a36cfbf'\nchecksum_address = AsyncWeb3.to_checksum_address(address)\nprint(checksum_address)  # 0x672009c467B943EeA16cDf53549C5FB94a36cfBf\n<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043c\u043e\u043d\u0435\u0442\u044b<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>import asyncio\n\nfrom web3 import AsyncWeb3\n\nasync def main():\n    rpc = '&lt;https:\/\/rpc.ankr.com\/eth\/&gt;'\n    w3 = AsyncWeb3(AsyncWeb3.AsyncHTTPProvider(rpc))\n\n    address = '0x672009c467b943eea16cdf53549c5fb94a36cfbf'\n    checksum_address = AsyncWeb3.to_checksum_address(address)\n    balance = await w3.eth.get_balance(checksum_address)\n    print(f'balance: {balance} Wei')\n    print(f'balance: {balance \/ 10 ** 18} ETH')\n\nif __name__ == '__main__':\n    asyncio.run(main())\n<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\"><code>from_wei<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>import asyncio\n\nfrom web3 import AsyncWeb3\n\nasync def main():\n    # \u0431\u0430\u043b\u0430\u043d\u0441 \u0432 Wei\n    balance = 1_000_000_000_000_000_000\n    print(balance)                                      # 1000000000000000000\n    \n    print(AsyncWeb3.from_wei(balance, 'kwei'))          # 1000000000000000\n    print(AsyncWeb3.from_wei(balance, 'babbage'))       # 1000000000000000\n    print(AsyncWeb3.from_wei(balance, 'femtoether'))    # 1000000000000000\n\n    print(AsyncWeb3.from_wei(balance, 'mwei'))          # 1000000000000\n    print(AsyncWeb3.from_wei(balance, 'lovelace'))      # 1000000000000\n    print(AsyncWeb3.from_wei(balance, 'picoether'))     # 1000000000000\n\n    print(AsyncWeb3.from_wei(balance, 'gwei'))          # 1000000000\n    print(AsyncWeb3.from_wei(balance, 'shannon'))       # 1000000000\n    print(AsyncWeb3.from_wei(balance, 'nanoether'))     # 1000000000\n    print(AsyncWeb3.from_wei(balance, 'nano'))          # 1000000000\n\n    print(AsyncWeb3.from_wei(balance, 'szabo'))         # 1000000\n    print(AsyncWeb3.from_wei(balance, 'microether'))    # 1000000\n    print(AsyncWeb3.from_wei(balance, 'micro'))         # 1000000\n\n    print(AsyncWeb3.from_wei(balance, 'finney'))        # 1000\n    print(AsyncWeb3.from_wei(balance, 'milliether'))    # 1000\n    print(AsyncWeb3.from_wei(balance, 'milli'))         # 1000\n\n    print(AsyncWeb3.from_wei(balance, 'ether'))         # 1\n\n    print(AsyncWeb3.from_wei(balance, 'kether'))        # 0.001\n    print(AsyncWeb3.from_wei(balance, 'grand'))         # 0.001\n\n    print(AsyncWeb3.from_wei(balance, 'mether'))        # 0.000001\n\n    print(AsyncWeb3.from_wei(balance, 'gether'))        # 0.000000001\n\n    print(AsyncWeb3.from_wei(balance, 'tether'))        # 0.000000000001\n\nif __name__ == '__main__':\n    asyncio.run(main())\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><code>to_wei<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>import asyncio\n\nfrom web3 import AsyncWeb3\n\nasync def main():\n    balance = 1\n    print(balance)                                    # 1\n\n    print(AsyncWeb3.to_wei(balance, 'kwei'))          # 1000\n    print(AsyncWeb3.to_wei(balance, 'babbage'))       # 1000\n    print(AsyncWeb3.to_wei(balance, 'femtoether'))    # 1000\n\n    print(AsyncWeb3.to_wei(balance, 'mwei'))          # 1000000\n    print(AsyncWeb3.to_wei(balance, 'lovelace'))      # 1000000\n    print(AsyncWeb3.to_wei(balance, 'picoether'))     # 1000000\n\n    print(AsyncWeb3.to_wei(balance, 'gwei'))          # 1000000000\n    print(AsyncWeb3.to_wei(balance, 'shannon'))       # 1000000000\n    print(AsyncWeb3.to_wei(balance, 'nanoether'))     # 1000000000\n    print(AsyncWeb3.to_wei(balance, 'nano'))          # 1000000000\n\n    print(AsyncWeb3.to_wei(balance, 'szabo'))         # 1000000000000\n    print(AsyncWeb3.to_wei(balance, 'microether'))    # 1000000000000\n    print(AsyncWeb3.to_wei(balance, 'micro'))         # 1000000000000\n\n    print(AsyncWeb3.to_wei(balance, 'finney'))        # 1000000000000000\n    print(AsyncWeb3.to_wei(balance, 'milliether'))    # 1000000000000000\n    print(AsyncWeb3.to_wei(balance, 'milli'))         # 1000000000000000\n\n    print(AsyncWeb3.to_wei(balance, 'ether'))         # 1000000000000000000\n\n    print(AsyncWeb3.to_wei(balance, 'kether'))        # 1000000000000000000000\n    print(AsyncWeb3.to_wei(balance, 'grand'))         # 1000000000000000000000\n\n    print(AsyncWeb3.to_wei(balance, 'mether'))        # 1000000000000000000000000\n\n    print(AsyncWeb3.to_wei(balance, 'gether'))        # 1000000000000000000000000000\n\n    print(AsyncWeb3.to_wei(balance, 'tether'))        # 1000000000000000000000000000000\n\nif __name__ == '__main__':\n    asyncio.run(main())\n<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u0412\u044b\u0437\u043e\u0432 read \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441\u043c\u0430\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 read \u0438 write \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0432 Ethereum \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430: <strong>read<\/strong> (\u0447\u0442\u0435\u043d\u0438\u0435) \u0438 <strong>write<\/strong> (\u0437\u0430\u043f\u0438\u0441\u044c). \u041e\u043d\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0446\u0435\u043b\u044f\u043c, \u0437\u0430\u0442\u0440\u0430\u0442\u0430\u043c \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u043e\u043c.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Read-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0447\u0442\u0435\u043d\u0438\u0435)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/strong>: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u0438\u043b\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430. \u042d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.<\/li>\n\n\n\n<li><strong>\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c<\/strong>: \u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u043f\u043b\u0430\u0442\u044b \u0437\u0430 \u0433\u0430\u0437. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0442\u0430\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u0437\u0430\u0442\u0440\u0430\u0442.<\/li>\n\n\n\n<li><strong>\u0422\u0438\u043f \u0432\u044b\u0437\u043e\u0432\u0430<\/strong>: \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 (off-chain), \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0441\u0435\u0442\u044c\u044e.<\/li>\n\n\n\n<li><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong>: \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0438\u043b\u0438 \u0447\u0442\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Write-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0437\u0430\u043f\u0438\u0441\u044c)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/strong>: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0438\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438. \u0412\u044b\u0437\u043e\u0432 \u0442\u0430\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0435\u0442\u0438.<\/li>\n\n\n\n<li><strong>\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c<\/strong>: \u0422\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u043f\u043b\u0430\u0442\u0443 \u0433\u0430\u0437\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430, \u0438 \u043c\u0430\u0439\u043d\u0435\u0440\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e.<\/li>\n\n\n\n<li><strong>\u0422\u0438\u043f \u0432\u044b\u0437\u043e\u0432\u0430<\/strong>: \u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f (on-chain), \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0430\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u0441\u0435\u0442\u0438 \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d.<\/li>\n\n\n\n<li><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong>: \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, <strong>read-\u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u0430 <strong>write-\u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong> \u2014 \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0437\u0430\u0442\u0440\u0430\u0442 \u043d\u0430 \u0433\u0430\u0437 \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>import json\nimport asyncio\n\nfrom web3 import AsyncWeb3\n\nasync def main():\n    rpc = '&lt;https:\/\/arbitrum-one.publicnode.com&gt;'\n    w3 = AsyncWeb3(AsyncWeb3.AsyncHTTPProvider(rpc))\n\n    my_address = AsyncWeb3.to_checksum_address('0x0bB902fC9e168343a19d622E79cE033452e64Dd8')\n\n    arbitrum_usdc_address = AsyncWeb3.to_checksum_address('0xaf88d065e77c8cC2239327C5EDb3A432268e5831')\n    arbitrum_usdc_abi = json.loads('&lt;CONTRACT ABI HERE&gt;')\n\n    contract = w3.eth.contract(arbitrum_usdc_address, abi=arbitrum_usdc_abi)\n    # \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 name()\n    print('name', await contract.functions.name().call())\n    # \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 symbol()\n    print('symbol', await contract.functions.symbol().call())\n\n    # \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 decimals() \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e decimals\n    decimals = await contract.functions.decimals().call()\n    print('decimals', decimals)\n    # \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 balanceOf(address) \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e balance\n    balance = await contract.functions.balanceOf(my_address).call()\n    print('balance', balance)\n    print('balance', balance \/ 10 ** decimals)\n\nif __name__ == '__main__':\n    asyncio.run(main())\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u0410\u0434\u0440\u0435\u0441 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0442\u043e\u043a\u0435\u043d\u0430<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>arbitrum_usdc_address = '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0434\u043b\u044f USDC \u043d\u0430 Arbitrum.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u0434\u0440\u0435\u0441 USDC \u0430\u0440\u0431\u0438\u0442\u0440\u0443\u043c: <code>0xaf88d065e77c8cC2239327C5EDb3A432268e5831<\/code> \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0435\u0433\u043e \u0432 \u044d\u043a\u0441\u043f\u043b\u043e\u0440\u0435\u0440\u0435:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/arbiscan.io\/token\/0xaf88d065e77c8cc2239327c5edb3a432268e5831\">USD Coin (USDC)<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/01eb86cc-9ab3-49e1-a3b2-edcc29ba6597\/Untitled.png\" alt=\"Untitled\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>ABI \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>arbitrum_usdc_abi = json.loads('&lt;CONTRACT ABI HERE&gt;')\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c ABI (Application Binary Interface) \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 USDC \u043d\u0430 Arbitrum. ABI \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f ABI, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <code>Contract<\/code>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/bdf94ac3-3f81-4ee8-b73c-7bf162c2eb3d\/Untitled.png\" alt=\"Untitled\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/9cc881ae-b59f-43fc-a1a8-e0952dfee3b7\/Untitled.png\" alt=\"Untitled\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0430 \u044d\u0442\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u0438\u0449\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c (\u0438\u0449\u0435\u043c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0430\u0445 <code>Read Contract<\/code>, <code>Write Contract<\/code>, <code>Read as Proxy<\/code>, <code>Write as Proxy<\/code>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u041f\u0440\u0438\u043c\u0435\u0440 1:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0425\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>admin<\/code> \u0441 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 <code>Read Contract<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/4a5b8098-0f3e-48f8-a37b-cfaf1015a8e5\/Untitled.png\" alt=\"Untitled\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <code>Code<\/code> \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c ABI \u043e\u0442\u0442\u0443\u0434\u0430.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/ad684de4-5c0a-469a-8f88-78a53681046a\/Untitled.png\" alt=\"Untitled\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/5105771b-532b-42d1-b835-d70b4d6ba826\/Untitled.png\" alt=\"Untitled\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u041f\u0440\u0438\u043c\u0435\u0440 2:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0425\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>balanceOf<\/code> \u0441 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 <code>Read as Proxy<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/5c5889c2-e5d0-449d-8a15-11e08caf371b\/Untitled.png\" alt=\"Untitled\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u0430\u0431\u0438 \u0441 Proxy \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 Proxy \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/e518f021-068a-47d7-aa4c-79e2f967d8f8\/Untitled.png\" alt=\"Untitled\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 Proxy \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <code>Code<\/code> \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c ABI \u043e\u0442\u0442\u0443\u0434\u0430.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/4fa57809-993d-4746-9348-17a707d3c51a\/Untitled.png\" alt=\"Untitled\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/6e2ef675-104a-42fa-bba0-a15e7068f465\/Untitled.png\" alt=\"Untitled\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 ABI \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u0434 \u0432\u043c\u0435\u0441\u0442\u043e \u201c<code>&lt;CONTRACT ABI HERE&gt;<\/code>&#171;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">ABI \u0438\u0437 \u0444\u0430\u0439\u043b\u0430<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b ABI \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043e\u0434:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>arbitrum_usdc_abi = json.loads('&lt;CONTRACT ABI HERE&gt;')\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0415\u0441\u043b\u0438 \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432, ABI \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043a\u043e\u0434 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043a\u043e\u0434\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0425\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 abis) \u0438 \u0432\u0441\u0435 ABI \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043d\u0435\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <code>.json<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/7963c18d-f470-45a8-bb17-111b7aa20dfb\/image.png\" alt=\"image.png\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u043e\u0442\u0442\u0443\u0434\u0430 ABI \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 python \u043e\u0431\u044a\u0435\u043a\u0442<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import json\nimport asyncio\n\nfrom web3 import AsyncWeb3\n\ndef read_json(path: str, encoding: str | None = None) -&gt; list | dict:\n    with open(path, encoding=encoding) as f:\n        return json.load(f)\n\nasync def main():\n    rpc = '&lt;https:\/\/arbitrum-one.publicnode.com&gt;'\n    w3 = AsyncWeb3(AsyncWeb3.AsyncHTTPProvider(rpc))\n\n    my_address = AsyncWeb3.to_checksum_address('0x0bB902fC9e168343a19d622E79cE033452e64Dd8')\n\n    arbitrum_usdc_address = AsyncWeb3.to_checksum_address('0xaf88d065e77c8cC2239327C5EDb3A432268e5831')\n    arbitrum_usdc_abi = read_json(path='&lt;PATH TO ABI&gt;')\n    ...\n\nif __name__ == '__main__':\n    asyncio.run(main())\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">ABI \u0438\u0437 python \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0430\u043a \u043a\u0430\u043a ABI \u0442\u043e\u043b\u044c\u043a\u043e <strong>\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442<\/strong> \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import asyncio\n\nfrom web3 import AsyncWeb3\n\nTokenABI = &#91;\n    {\n        'constant': True,\n        'inputs': &#91;],\n        'name': 'name',\n        'outputs': &#91;{'name': '', 'type': 'string'}],\n        'payable': False,\n        'stateMutability': 'view',\n        'type': 'function'\n    },\n    {\n        'constant': True,\n        'inputs': &#91;],\n        'name': 'symbol',\n        'outputs': &#91;{'name': '', 'type': 'string'}],\n        'payable': False,\n        'stateMutability': 'view',\n        'type': 'function'\n    },\n    {\n        'constant': True,\n        'inputs': &#91;],\n        'name': 'totalSupply',\n        'outputs': &#91;{'name': '', 'type': 'uint256'}],\n        'payable': False,\n        'stateMutability': 'view',\n        'type': 'function'\n    },\n    {\n        'constant': True,\n        'inputs': &#91;],\n        'name': 'decimals',\n        'outputs': &#91;{'name': '', 'type': 'uint256'}],\n        'payable': False,\n        'stateMutability': 'view',\n        'type': 'function'\n    },\n    {\n        'constant': True,\n        'inputs': &#91;{'name': 'who', 'type': 'address'}],\n        'name': 'balanceOf',\n        'outputs': &#91;{'name': '', 'type': 'uint256'}],\n        'payable': False,\n        'stateMutability': 'view',\n        'type': 'function'\n    },\n    {\n        'constant': True,\n        'inputs': &#91;{'name': '_owner', 'type': 'address'}, {'name': '_spender', 'type': 'address'}],\n        'name': 'allowance',\n        'outputs': &#91;{'name': 'remaining', 'type': 'uint256'}],\n        'payable': False,\n        'stateMutability': 'view',\n        'type': 'function'\n    },\n    {\n        'constant': False,\n        'inputs': &#91;{'name': '_spender', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}],\n        'name': 'approve',\n        'outputs': &#91;],\n        'payable': False,\n        'stateMutability': 'nonpayable',\n        'type': 'function'\n    },\n    {\n        'constant': False,\n        'inputs': &#91;{'name': '_to', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}],\n        'name': 'transfer',\n        'outputs': &#91;], 'payable': False,\n        'stateMutability': 'nonpayable',\n        'type': 'function'\n    }\n]\n\nasync def main():\n    rpc = '&lt;https:\/\/arbitrum-one.publicnode.com&gt;'\n    w3 = AsyncWeb3(AsyncWeb3.AsyncHTTPProvider(rpc))\n\n    my_address = AsyncWeb3.to_checksum_address('0x0bB902fC9e168343a19d622E79cE033452e64Dd8')\n\n    arbitrum_usdc_address = AsyncWeb3.to_checksum_address('0xaf88d065e77c8cC2239327C5EDb3A432268e5831')\n    arbitrum_usdc_abi = TokenABI\n    ...\n\nif __name__ == '__main__':\n    asyncio.run(main())\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u0442\u0430\u043a \u043a\u0430\u043a 99% \u0432\u0441\u0435\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 ERC-20, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u0443 \u0432\u0441\u0435\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 ABI \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c (\u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 python \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>models.py<\/code>) \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0442\u0443\u0434\u0430<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u041a\u0430\u043a \u044d\u0442\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 json:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;\n  {\n    \"inputs\": &#91;],\n    \"name\": \"name\",\n    \"outputs\": &#91;\n      {\n        \"internalType\": \"string\",\n        \"name\": \"\",\n        \"type\": \"string\"\n      }\n    ],\n    \"stateMutability\": \"view\",\n    \"type\": \"function\"\n  },\n  {\n    \"inputs\": &#91;],\n    \"name\": \"symbol\",\n    \"outputs\": &#91;\n      {\n        \"internalType\": \"string\",\n        \"name\": \"\",\n        \"type\": \"string\"\n      }\n    ],\n    \"stateMutability\": \"view\",\n    \"type\": \"function\"\n  },\n  {\n    \"inputs\": &#91;],\n    \"name\": \"totalSupply\",\n    \"outputs\": &#91;\n      {\n        \"internalType\": \"uint256\",\n        \"name\": \"\",\n        \"type\": \"uint256\"\n      }\n    ],\n    \"stateMutability\": \"view\",\n    \"type\": \"function\"\n  },\n  {\n    \"inputs\": &#91;],\n    \"name\": \"decimals\",\n    \"outputs\": &#91;\n      {\n        \"internalType\": \"uint8\",\n        \"name\": \"\",\n        \"type\": \"uint8\"\n      }\n    ],\n    \"stateMutability\": \"view\",\n    \"type\": \"function\"\n  },\n  {\n    \"inputs\": &#91;\n      {\n        \"internalType\": \"address\",\n        \"name\": \"account\",\n        \"type\": \"address\"\n      }\n    ],\n    \"name\": \"balanceOf\",\n    \"outputs\": &#91;\n      {\n        \"internalType\": \"uint256\",\n        \"name\": \"\",\n        \"type\": \"uint256\"\n      }\n    ],\n    \"stateMutability\": \"view\",\n    \"type\": \"function\"\n  },\n  {\n    \"inputs\": &#91;\n      {\n        \"internalType\": \"address\",\n        \"name\": \"owner\",\n        \"type\": \"address\"\n      },\n      {\n        \"internalType\": \"address\",\n        \"name\": \"spender\",\n        \"type\": \"address\"\n      }\n    ],\n    \"name\": \"allowance\",\n    \"outputs\": &#91;\n      {\n        \"internalType\": \"uint256\",\n        \"name\": \"\",\n        \"type\": \"uint256\"\n      }\n    ],\n    \"stateMutability\": \"view\",\n    \"type\": \"function\"\n  },\n  {\n    \"inputs\": &#91;\n      {\n        \"internalType\": \"address\",\n        \"name\": \"spender\",\n        \"type\": \"address\"\n      },\n      {\n        \"internalType\": \"uint256\",\n        \"name\": \"value\",\n        \"type\": \"uint256\"\n      }\n    ],\n    \"name\": \"approve\",\n    \"outputs\": &#91;\n      {\n        \"internalType\": \"bool\",\n        \"name\": \"\",\n        \"type\": \"bool\"\n      }\n    ],\n    \"stateMutability\": \"nonpayable\",\n    \"type\": \"function\"\n  },\n  {\n    \"inputs\": &#91;\n      {\n        \"internalType\": \"address\",\n        \"name\": \"to\",\n        \"type\": \"address\"\n      },\n      {\n        \"internalType\": \"uint256\",\n        \"name\": \"value\",\n        \"type\": \"uint256\"\n      }\n    ],\n    \"name\": \"transfer\",\n    \"outputs\": &#91;\n      {\n        \"internalType\": \"bool\",\n        \"name\": \"\",\n        \"type\": \"bool\"\n      }\n    ],\n    \"stateMutability\": \"nonpayable\",\n    \"type\": \"function\"\n  }\n]\n<\/code><\/pre>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u043c\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c ABI \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043d\u043e \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c ABI \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 ABI \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>contract = w3.eth.contract(arbitrum_usdc_address, abi=arbitrum_usdc_abi)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0430\u0434\u0440\u0435\u0441 \u0438 ABI. \u042d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u0412\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>name<\/code><\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>print('name', await contract.functions.name().call())\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>name<\/code> \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#171;USD Coin&#187;).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u0412\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>symbol<\/code><\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>print('symbol', await contract.functions.symbol().call())\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>symbol<\/code> \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b \u0442\u043e\u043a\u0435\u043d\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#171;USDC&#187;).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 <code>decimals<\/code><\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>decimals = await contract.functions.decimals().call()\nprint('decimals', decimals)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>decimals<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u0442\u043e\u043a\u0435\u043d\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 6 \u0434\u043b\u044f USDC).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>balance = await contract.functions.balanceOf(my_address).call()\nprint('balance', balance)\nprint('balance', balance \/ 10 ** decimals)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>balanceOf<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430. \u0411\u0430\u043b\u0430\u043d\u0441 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432 &#171;\u0441\u044b\u0440\u044b\u0445&#187; \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445 (\u0442.\u0435. \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u0432), \u0430 \u0437\u0430\u0442\u0435\u043c \u0432 &#171;\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c&#187; \u0432\u0438\u0434\u0435 (\u043f\u043e\u0434\u0435\u043b\u0438\u0432 \u043d\u0430 10 \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <code>decimals<\/code>).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Decimals<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442 \u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a USDC, \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>decimals<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u043e\u043a\u0435\u043d. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u0440\u0438\u043c\u0435\u0440<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c 1 \u0442\u043e\u043a\u0435\u043d, \u0438 <code>decimals<\/code> \u0440\u0430\u0432\u0435\u043d 6. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 1 \u0442\u043e\u043a\u0435\u043d \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a 1000000 (\u043e\u0434\u0438\u043d \u0441 \u0448\u0435\u0441\u0442\u044c\u044e \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u043a\u0430\u043c\u0438). \u0415\u0441\u043b\u0438 <code>decimals<\/code> \u0440\u0430\u0432\u0435\u043d 18, \u0442\u043e 1 \u0442\u043e\u043a\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u0430\u043a 1000000000000000000 (\u043e\u0434\u0438\u043d \u0441 \u0432\u043e\u0441\u0435\u043c\u043d\u0430\u0434\u0446\u0430\u0442\u044c\u044e \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u043a\u0430\u043c\u0438).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e?<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432:<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u0432, \u0442\u0435\u043c \u0442\u043e\u0447\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u0445 \u0432\u0430\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u0423\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0445 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 0.000001 \u0442\u043e\u043a\u0435\u043d\u0430 \u0441 <code>decimals<\/code> 6 \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0435\u043c 1 \u0442\u043e\u043a\u0435\u043d \u0441 <code>decimals<\/code> 6 \u0432 &#171;\u0441\u044b\u0440\u044b\u0445&#187; \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043e\u0434\u0430<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u043b\u044f \u0442\u043e\u043a\u0435\u043d\u0430\ndecimals = await contract.functions.decimals().call()\nprint('decimals', decimals)\n\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>decimals<\/code> \u0443 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0431\u0430\u043b\u0430\u043d\u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c &#171;\u0441\u044b\u0440\u043e\u0435&#187; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u043d\u0430 10 \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <code>decimals<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0431\u0430\u043b\u0430\u043d\u0441 \u0430\u0434\u0440\u0435\u0441\u0430\nbalance = await contract.functions.balanceOf(my_address).call()\n# \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0431\u0430\u043b\u0430\u043d\u0441 \u0432 \"\u0441\u044b\u0440\u044b\u0445\" \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445\nprint('balance', balance)\n# \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0431\u0430\u043b\u0430\u043d\u0441 \u0432 \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\nprint('balance', balance \/ 10 ** decimals)\n\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0417\u0434\u0435\u0441\u044c <code>balance<\/code> \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 &#171;\u0441\u044b\u0440\u044b\u0445&#187; \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445, \u0430 \u0437\u0430\u0442\u0435\u043c \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 10 \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 <code>decimals<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0431\u0430\u043b\u0430\u043d\u0441 \u0440\u0430\u0432\u0435\u043d 1000000 \u0438 <code>decimals<\/code> \u0440\u0430\u0432\u0435\u043d 6, \u0442\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043a\u0430\u043a 1.0 \u0442\u043e\u043a\u0435\u043d\u0430.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 <code>account<\/code><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\"><code>account<\/code> \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f <code>web3.eth.account<\/code> \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <code>web3.py<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Ethereum-\u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430\u043c\u0438 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u043d\u0435 \u043f\u043e\u043b\u0430\u0433\u0430\u044f\u0441\u044c \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0438 \u0438\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 <code>account<\/code> \u0438\u0437 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>import asyncio\n\nfrom eth_account.signers.local import LocalAccount\nfrom web3 import AsyncWeb3\n\nasync def main():\n    rpc = '&lt;https:\/\/rpc.ankr.com\/eth\/&gt;'\n    w3 = AsyncWeb3(AsyncWeb3.AsyncHTTPProvider(rpc))\n\n    private_key = '&lt;YOUR PRIVATE KEY HERE&gt;'\n    account: LocalAccount = w3.eth.account.from_key(private_key)\n    address = account.address\n    print(address)\n\nif __name__ == '__main__':\n    asyncio.run(main())\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e \u0442\u0438\u043f\u0430 <code>account: LocalAccount<\/code> \u0447\u0435\u0442\u043a\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0442\u043e\u0447\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0438\u043f \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0438 \u043c\u0435\u0442\u043e\u0434\u044b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 account \u0438\u0437 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0444\u0440\u0430\u0437\u044b<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>import asyncio\n\nfrom eth_account.signers.local import LocalAccount\nfrom web3 import AsyncWeb3\n\nasync def main():\n    rpc = '&lt;https:\/\/rpc.ankr.com\/eth\/&gt;'\n    w3 = AsyncWeb3(AsyncWeb3.AsyncHTTPProvider(rpc))\n\n    w3.eth.account.enable_unaudited_hdwallet_features()    \n\n    mnemonic = '&lt;YOUR MNEMONIC PHRASE HERE&gt;'\n    account: LocalAccount = w3.eth.account.from_mnemonic(mnemonic)\n    address = account.address\n    print(address)\n\nif __name__ == '__main__':\n    asyncio.run(main())\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <code>account<\/code> \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0444\u0440\u0430\u0437\u044b. \u0412\u044b\u043b\u0435\u0442\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 (\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 Account \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 API)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AttributeError: The use of the Mnemonic features of Account is disabled by \ndefault until its API stabilizes. \n**To use these features, please enable them by running \nAccount.enable_unaudited_hdwallet_features()** and try again.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u0437 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 hdwallet \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>w3.eth.account.from_mnemonic(mnemonic)<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>w3.eth.account.enable_unaudited_hdwallet_features()\n<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u0412\u044b\u0437\u043e\u0432 write \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441\u043c\u0430\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u041a\u043b\u0430\u0441\u0441 <code>Client<\/code><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 write \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 <code>AsyncWeb3<\/code> \u0438 <code>account<\/code> \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441 <code>Client<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from web3 import AsyncWeb3\nfrom eth_account.signers.local import LocalAccount\n\nclass Client:\n    private_key: str\n    rpc: str\n    w3: AsyncWeb3\n    account: LocalAccount\n\n    def __init__(self, private_key: str, rpc: str):\n        self.private_key = private_key\n        self.rpc = rpc\n        self.w3 = AsyncWeb3(AsyncWeb3.AsyncHTTPProvider(rpc))\n        self.account = self.w3.eth.account.from_key(private_key)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u041c\u0435\u0442\u043e\u0434 <code>send_transaction<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>from web3 import AsyncWeb3\nfrom eth_typing import ChecksumAddress, HexStr\nfrom eth_account.signers.local import LocalAccount\n\nclass Client:\n    ...\n\n    async def send_transaction(\n            self,\n            to: str | ChecksumAddress,\n            data: HexStr | None = None,\n            from_: str | ChecksumAddress | None = None,\n            increase_gas: float = 1,\n            value: int | None = None,\n    ) -&gt; HexBytes | None:\n        if not from_:\n            from_ = self.account.address\n\n        tx_params = {\n            'chainId': await self.w3.eth.chain_id,\n            'nonce': await self.w3.eth.get_transaction_count(self.account.address),\n            'from': AsyncWeb3.to_checksum_address(from_),\n            'to': AsyncWeb3.to_checksum_address(to),\n            'gasPrice': await self.w3.eth.gas_price\n        }\n        if data:\n            tx_params&#91;'data'] = data\n        if value:\n            tx_params&#91;'value'] = value\n\n        gas = await self.w3.eth.estimate_gas(tx_params)\n        tx_params&#91;'gas'] = int(gas * increase_gas)\n\n        sign = self.w3.eth.account.sign_transaction(tx_params, self.private_key)\n        return await self.w3.eth.send_raw_transaction(sign.rawTransaction)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441 \u043c\u0435\u0442\u043e\u0434 <code>send_transaction<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f<\/strong> \u2014 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432 \u0441\u0435\u0442\u0438 Ethereum, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 ETH \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438\u043b\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c.<\/li>\n\n\n\n<li><strong>\u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438<\/strong> \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u044b \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0442 \u0432\u0430\u0441, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430.<\/li>\n\n\n\n<li><strong>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438<\/strong> \u2014 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0441\u0435\u0442\u044c, \u0433\u0434\u0435 \u043c\u0430\u0439\u043d\u0435\u0440\u044b \u0435\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u0430 <code>send_transaction<\/code><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><code>to: str | ChecksumAddress<\/code><\/strong> \u2014 \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u043e\u0442, \u043a\u043e\u043c\u0443 \u0432\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u0430\u0434\u0440\u0435\u0441 \u0441\u043c\u0430\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442\u0435. \u0410\u0434\u0440\u0435\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0438\u043b\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c Ethereum Checksum Address (\u0430\u0434\u0440\u0435\u0441 \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c).<\/li>\n\n\n\n<li><strong><code>data: HexStr | None<\/code><\/strong> \u2014 \u044d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u043e \u0441\u043c\u0430\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u043c\u0438. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <code>None<\/code>, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/li>\n\n\n\n<li><strong><code>from_: str | ChecksumAddress | None<\/code><\/strong> \u2014 \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0430\u0448 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 (<code>self.account.address<\/code>).<\/li>\n\n\n\n<li><strong><code>increase_gas: float = 1<\/code><\/strong> \u2014 \u044d\u0442\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0433\u0430\u0437\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0432 1 (\u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0441\u0447\u0435\u0442\u043d\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0433\u0430\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0435\u0441\u0442\u044c), \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e.<\/li>\n\n\n\n<li><strong><code>value: int | None<\/code><\/strong> \u2014 \u044d\u0442\u043e \u0441\u0443\u043c\u043c\u0430 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 (\u0432 Wei), \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435, \u0442\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 ETH.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <code>send_transaction<\/code><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u0410\u0434\u0440\u0435\u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f<\/strong>: <code>if not from_: from_ = self.account.address<\/code> \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0430\u0434\u0440\u0435\u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0430\u0448 \u0430\u043a\u043a\u0430\u0443\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430.<\/li>\n\n\n\n<li><strong>\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 (<code>tx_params<\/code>)<\/strong>: <code>tx_params = { 'chainId': await self.w3.eth.chain_id, 'nonce': await self.w3.eth.get_transaction_count(self.account.address), 'from': AsyncWeb3.to_checksum_address(from_), 'to': AsyncWeb3.to_checksum_address(to), 'gasPrice': await self.w3.eth.gas_price }<\/code> \u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438:\n<ul class=\"wp-block-list\">\n<li><strong><code>chainId<\/code><\/strong> \u2014 \u044d\u0442\u043e ID \u0441\u0435\u0442\u0438 Ethereum (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0435\u0442\u044c).<\/li>\n\n\n\n<li><strong><code>nonce<\/code><\/strong> \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u0430\u0448\u0438\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.<\/li>\n\n\n\n<li><strong><code>from<\/code><\/strong> \u0438 <strong><code>to<\/code><\/strong> \u2014 \u0430\u0434\u0440\u0435\u0441\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f.<\/li>\n\n\n\n<li><strong><code>gasPrice<\/code><\/strong> \u2014 \u0446\u0435\u043d\u0430 \u0437\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0433\u0430\u0437\u0430 (\u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438) \u0432 \u0441\u0435\u0442\u0438.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 <code>value<\/code> (\u0435\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u044b)<\/strong>: <code>if data: tx_params['data'] = data if value: tx_params['value'] = value<\/code> \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 <code>value<\/code> \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438, \u043e\u043d\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.<\/li>\n\n\n\n<li><strong>\u041e\u0446\u0435\u043d\u043a\u0430 \u0433\u0430\u0437\u0430<\/strong>: <code>gas = await self.w3.eth.estimate_gas(tx_params) tx_params['gas'] = int(gas * increase_gas)<\/code> \u0422\u0443\u0442 \u043c\u0435\u0442\u043e\u0434 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u0430\u0437\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438. \u042d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u043e\u0439 \u0433\u0430\u0437\u0430. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0433\u0430\u0437\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>increase_gas<\/code>.<\/li>\n\n\n\n<li><strong>\u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438<\/strong>: <code>sign = self.w3.eth.account.sign_transaction(tx_params, self.private_key)<\/code> \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0438 \u0433\u0430\u0437 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d, \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430. \u042d\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438.<\/li>\n\n\n\n<li><strong>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0441\u0435\u0442\u044c<\/strong>: <code>return await self.w3.eth.send_raw_transaction(sign.rawTransaction)<\/code> \u041f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u0435\u0442\u044c Ethereum. \u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u0435\u0448 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0435\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u0430.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u041c\u0435\u0442\u043e\u0434 <code>verif_tx<\/code><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u0435\u0442\u043e\u0434 <code>verif_tx<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 Ethereum. \u041e\u043d \u0436\u0434\u0435\u0442, \u043f\u043e\u043a\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f (\u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d), \u0438 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043b\u0438 \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430. \u0415\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u043c\u0435\u0442\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0445\u0435\u0448 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u0443\u0434\u0430\u043b\u0430\u0441\u044c, \u043e\u043d \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from hexbytes import HexBytes\n\nfrom web3 import AsyncWeb3\nfrom web3.exceptions import Web3Exception\nfrom eth_account.signers.local import LocalAccount\n\nclass Client:\n    ...\n\n    async def verif_tx(self, tx_hash: HexBytes, timeout: int = 200) -&gt; str:\n        data = await self.w3.eth.wait_for_transaction_receipt(tx_hash, timeout=timeout)\n        if data.get('status') == 1:\n            return tx_hash.hex()\n        raise Web3Exception(f'transaction failed {data&#91;\"transactionHash\"].hex()}')\n\n    ...\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u0430<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><code>tx_hash: HexBytes<\/code><\/strong> \u2014 \u044d\u0442\u043e \u0445\u0435\u0448 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c. \u0425\u0435\u0448 \u2014 \u044d\u0442\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0441\u0435\u0442\u0438 Ethereum.<\/li>\n\n\n\n<li><strong><code>timeout: int = 200<\/code><\/strong> \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u0415\u0441\u043b\u0438 \u0437\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430, \u043c\u0435\u0442\u043e\u0434 \u0432\u0435\u0440\u043d\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438<\/strong>: <code>data = await self.w3.eth.wait_for_transaction_receipt(tx_hash, timeout=timeout)<\/code> \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <code>wait_for_transaction_receipt<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 &#171;\u0436\u0434\u0435\u0442&#187;, \u043f\u043e\u043a\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d. \u042d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 \u0431\u043b\u043e\u043a \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430, \u043b\u0438\u0431\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u0438\u0441\u0442\u0435\u0447\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f (<code>timeout<\/code>).<\/li>\n\n\n\n<li><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438<\/strong>: <code>if data.get('status') == 1:<\/code> \u041a\u043e\u0433\u0434\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f, \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0435\u0435 \u0441\u0442\u0430\u0442\u0443\u0441:\n<ul class=\"wp-block-list\">\n<li>\u0421\u0442\u0430\u0442\u0443\u0441 <code>1<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e.<\/li>\n\n\n\n<li>\u0415\u0441\u043b\u0438 \u0441\u0442\u0430\u0442\u0443\u0441 \u0434\u0440\u0443\u0433\u043e\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>0<\/code>), \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u0443\u0434\u0430\u043b\u0430\u0441\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0433\u0430\u0437\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0445\u0435\u0448\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0445\u0435<\/strong>: <code>return tx_hash.hex()<\/code> \u0415\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439, \u043c\u0435\u0442\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0445\u0435\u0448 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.<\/li>\n\n\n\n<li><strong>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u0435<\/strong>: <code>raise Web3Exception(f'transaction failed {data[\"transactionHash\"].hex()}')<\/code> \u0415\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u0443\u0434\u0430\u043b\u0430\u0441\u044c, \u043c\u0435\u0442\u043e\u0434 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 (\u043e\u0448\u0438\u0431\u043a\u0443) \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u043d\u0430 \u0445\u0435\u0448 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u043f\u0440\u043e\u0448\u043b\u0430.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d \u043c\u0435\u0442\u043e\u0434<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/li>\n\n\n\n<li>\u0412 Ethereum \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043e\u043d\u0430 \u043d\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d \u2014 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f, \u0447\u0442\u043e\u0431\u044b \u043c\u0430\u0439\u043d\u0435\u0440\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0435\u0435. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0436\u0434\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/li>\n\n\n\n<li>\u0415\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043c\u043e\u0436\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c \u043e\u0431 \u044d\u0442\u043e\u043c \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0438\u043b\u0438 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>send_transaction<\/code> \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <code>approve<\/code><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u0420\u0430\u0437\u0431\u043e\u0440 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0435\u043a\u0441\u043f\u043b\u043e\u0440\u0435\u0440\u0435<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 approve \u0432 \u0441\u043a\u0430\u043d\u0435\u0440\u0435:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/bscscan.com\/tx\/0x78f4b61862bd145ad5cf7d1f0fe994feabaa7a01f22875065fb908ee75dc618f\"><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0434\u0430\u0451\u043c \u0430\u043f\u0440\u0443\u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 uniswap \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0438\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 USDT.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u0437 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043e\u043d\u0430 \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 USDT:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/1d8416d0-c276-4736-b9ff-9ed075c5c4f0\/image.png\" alt=\"image.png\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c data \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u0442\u043e \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043a\u0430\u043a\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0443 \u043c\u044b \u0434\u0430\u0451\u043c \u0430\u043f\u0440\u0443\u0432 (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>spender<\/code>). \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 uniswap<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0430\u043a\u0436\u0435 \u0432 data \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 Wei, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0430\u043f\u0440\u0443\u0432\u0430\u0435\u043c \u0434\u043b\u044f uniswap:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/741318d3-ae17-4082-ac34-31e5dc87b006\/image.png\" alt=\"image.png\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 value \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0435\u043a\u0441\u043f\u043b\u043e\u0440\u0435\u0440\u0435. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f 0:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/3c3d5506-fbb5-441d-b6ec-15232a2d7ae8\/image.png\" alt=\"image.png\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>import asyncio\n\nclass Client:\n    ...\n\nasync def main():\n    # \u0417\u0430\u0434\u0430\u0447\u0430: \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043f\u0440\u0443\u0432 \u0432\u0441\u0435\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430 USDT \u0434\u043b\u044f uniswap\n\n    token_address = AsyncWeb3.to_checksum_address('0x55d398326f99059fF775485246999027B3197955')\n    spender = AsyncWeb3.to_checksum_address('0x000000000022D473030F116dDEE9F6B43aC78BA3')\n\n    client = Client(\n        private_key='&lt;\u0422\u0423\u0422 \u0412\u0410\u0428 \u041f\u0420\u0418\u0412\u0410\u0422\u041d\u042b\u0419 \u041a\u041b\u042e\u0427&gt;',\n        rpc='&lt;https:\/\/1rpc.io\/bnb&gt;'\n    )\n\n    contract = client.w3.eth.contract(\n        address=token_address,\n        abi=TokenABI\n    )\n\n    decimals = await contract.functions.decimals().call()\n    token_balance = await contract.functions.balanceOf(client.account.address).call()\n    approved_amount = await contract.functions.allowance(client.account.address, spender).call()\n\n    print('decimals:', decimals)\n    print('token_balance:', token_balance \/ 10 ** decimals)\n    print('approved_amount:', approved_amount \/ 10 ** decimals)\n\n    if approved_amount &lt; token_balance:\n        tx_hash = await client.send_transaction(\n            to=token_address,\n            data=contract.encodeABI('approve',\n                                    args=(\n                                        spender,\n                                        token_balance\n                                    ))\n        )\n        if tx_hash:\n            try:\n                await client.verif_tx(tx_hash=tx_hash)\n                print(f'Transaction success!! tx_hash: {tx_hash.hex()}')\n            except Exception as err:\n                print(f'Transaction error!! tx_hash: {tx_hash.hex()}; error: {err}')\n        else:\n            print(f'Transaction error!!')\n    else:\n        print('Already approved')\n\nif __name__ == '__main__':\n    asyncio.run(main())\n\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0448\u0430\u0433\u0438<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0430\u0436\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>token_address<\/code> \u2014 \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0442\u043e\u043a\u0435\u043d\u0430 USDT \u043d\u0430 \u0441\u0435\u0442\u0438 BNB Chain.<\/li>\n\n\n\n<li><code>spender<\/code> \u2014 \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 Uniswap (\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u043d\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/strong>: <code>client = Client( private_key='&lt;\u0422\u0423\u0422 \u0412\u0410\u0428 \u041f\u0420\u0418\u0412\u0410\u0422\u041d\u042b\u0419 \u041a\u041b\u042e\u0427>', rpc='&lt;https:\/\/1rpc.io\/bnb>' )<\/code> \u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u043e\u043c. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u0430\u0448\u0435\u043c\u0443 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0443) \u0438 \u0430\u0434\u0440\u0435\u0441 RPC-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043b\u044f BNB Chain (\u044d\u0442\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0441\u0435\u0442\u0438).<\/li>\n\n\n\n<li><strong>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0442\u043e\u043a\u0435\u043d\u0430<\/strong>: <code>contract = client.w3.eth.contract( address=token_address, abi=TokenABI )<\/code> \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0443 USDT, \u0443\u043a\u0430\u0437\u0430\u0432 \u0435\u0433\u043e \u0430\u0434\u0440\u0435\u0441 \u0438 ABI (Application Binary Interface) \u2014 \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435.<\/li>\n\n\n\n<li><strong>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0430\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<\/strong>: <code>decimals = await contract.functions.decimals().call() token_balance = await contract.functions.balanceOf(client.account.address).call() approved_amount = await contract.functions.allowance(client.account.address, spender).call()<\/code>\n<ul class=\"wp-block-list\">\n<li><strong><code>decimals<\/code><\/strong> \u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u043d\u0430\u043a\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0443 \u0442\u043e\u043a\u0435\u043d\u0430 USDT. \u0423 USDT \u043e\u0431\u044b\u0447\u043d\u043e 6 \u0437\u043d\u0430\u043a\u043e\u0432 (\u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e 1 USDT = 1 * 10^6 \u0432 &#171;\u0441\u044b\u0440\u044b\u0445&#187; \u0434\u0430\u043d\u043d\u044b\u0445).<\/li>\n\n\n\n<li><strong><code>token_balance<\/code><\/strong> \u2014 \u044d\u0442\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 USDT \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435.<\/li>\n\n\n\n<li><strong><code>approved_amount<\/code><\/strong> \u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0443\u0436\u0435 \u043e\u0434\u043e\u0431\u0440\u0438\u043b\u0438 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>spender<\/code> (Uniswap).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u0412\u044b\u0432\u043e\u0434 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<\/strong>: <code>print('decimals:', decimals) print('token_balance:', token_balance \/ 10 ** decimals) print('approved_amount:', approved_amount \/ 10 ** decimals)<\/code> \u0417\u0434\u0435\u0441\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0435 \u0438 \u0443\u0436\u0435 \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u0430\u0445 \u0432 \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 USDT, \u0430 \u043d\u0435 \u0432 &#171;\u0441\u044b\u0440\u044b\u0445&#187; \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445.<\/li>\n\n\n\n<li><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u0434\u0435\u043b\u0430\u0442\u044c approve<\/strong>: <code>if approved_amount &lt; token_balance:<\/code> \u0415\u0441\u043b\u0438 \u0443\u0436\u0435 \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0431\u0430\u043b\u0430\u043d\u0441, \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432. \u0415\u0441\u043b\u0438 \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u043d\u044c\u0448\u0435, \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u0438\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/li>\n\n\n\n<li><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 <code>approve<\/code><\/strong>: <code>tx_hash = await client.send_transaction( to=token_address, data=contract.encodeABI('approve', args=( spender, token_balance )) )<\/code> \u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>approve<\/code> \u0432 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 USDT. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 Uniswap (<code>spender<\/code>) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448 \u0431\u0430\u043b\u0430\u043d\u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u0432. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <code>encodeABI<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>approve<\/code> \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438: <code>spender<\/code> \u0438 \u0441\u0443\u043c\u043c\u0430 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0434\u043b\u044f \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u0438\u044f.<\/li>\n\n\n\n<li><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438<\/strong>:\n<ul class=\"wp-block-list\">\n<li>\u0415\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430, \u043c\u0435\u0442\u043e\u0434 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0435\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 <code>verif_tx<\/code>.\u0415\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u0445\u0435\u0448\u0435\u043c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438:\u0415\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439, \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439: <code>await client.verif_tx(tx_hash=tx_hash)<\/code> <code>print(f'Transaction success!! tx_hash: {tx_hash.hex()}')<\/code> <code>print(f'Transaction error!! tx_hash: {tx_hash.hex()}; error: {err}')<\/code><\/li>\n\n\n\n<li>\u0415\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430, \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435: <code>print(f'Transaction error!!')<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u0423\u0436\u0435 \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u043e<\/strong>: \u0415\u0441\u043b\u0438 \u0443\u0436\u0435 \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u043d\u044b\u0439 \u043b\u0438\u043c\u0438\u0442 (approved_amount) \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u0435\u043d \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0431\u0430\u043b\u0430\u043d\u0441\u0443, \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435: <code>print('Already approved')<\/code><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e <code>contract.encodeABI<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u0435\u0442\u043e\u0434 <code>encodeABI<\/code> \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u044d\u0442\u0438 \u0431\u0430\u0439\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 (<code>data<\/code>), \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0443. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u043c\u0438 \u0432 \u0441\u0435\u0442\u0438.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0411\u043b\u043e\u043a\u0447\u0435\u0439\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0438 \u043e\u043d \u0436\u0434\u0451\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/b44925e0-f88a-4e37-8b7f-1689790ffaf4\/image.png\" alt=\"image.png\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0443\u0442 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0431\u0430\u0439\u0442\u044b, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e, \u043c\u044b \u0442\u0443\u0442 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0434\u0433\u043b\u044f\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f (<code>approve<\/code>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>ontract.encodeABI()<\/code> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>contract.encodeABI(fn_name='function_name', args=&#91;arg1, arg2, ...])\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u043e \u0435\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#8212; \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <code>approve<\/code>), \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#8212; \u0430\u0433\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0435\u043a\u0441\u043f\u043b\u043e\u0440\u0435\u0440\u0435 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 <strong>Decode Input Data<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/81d2f4d5-b888-464f-95d4-30540c2ebfe5\/image.png\" alt=\"image.png\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>data=contract.encodeABI('approve',\n                        args=(\n                            spender,\n                            token_balance\n                        ))\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>contract = client.w3.eth.contract(\n    address=token_address,\n    abi=TokenABI\n)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418 \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0432 \u043d\u0451\u043c <code>abi=TokenABI<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>encodeABI(\u2026)<\/code> \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0432 <code>TokenABI<\/code> \u043d\u0443\u0436\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u0448\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0431\u0430\u0439\u0442 \u043a\u043e\u0434 (\u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430\u043c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 ABI \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c ABI \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">EIP-1559 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438<\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Python \u0441 \u043d\u0443\u043b\u044f \u0434\u043b\u044f \u043a\u0440\u0438\u043f\u0442\u0430\u043d\u043e\u0432 (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e) \u2116 12 | EIP-1559 - \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0439 \u0442\u0440\u0430\u043d\u0437\u044b, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043f\u043e\u0431\u0440\u0435\u044e\u0442\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/K_D_TLgMNQY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>EIP-1559<\/strong> \u2014 \u044d\u0442\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0441\u0435\u0442\u0438 Ethereum, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u043d\u043e\u0435 \u0441 \u0446\u0435\u043b\u044c\u044e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438 \u0437\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435. \u041e\u043d\u043e \u0431\u044b\u043b\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c <strong>London Hard Fork<\/strong> \u0432 \u0430\u0432\u0433\u0443\u0441\u0442\u0435 2021 \u0433\u043e\u0434\u0430. EIP-1559 \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438 \u0437\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c\u0438 \u0438 \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u043b\u0430\u0442\u044b \u0437\u0430 \u0433\u0430\u0437.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 EIP-1559<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Base Fee (\u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f)<\/strong> \u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0442\u0438. \u042d\u0442\u0430 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u0441\u0436\u0438\u0433\u0430\u0435\u0442\u0441\u044f (\u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u043e\u0431\u043e\u0440\u043e\u0442\u0430), \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0439 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0446\u0435\u043d\u0443 ETH \u0437\u0430 \u0441\u0447\u0435\u0442 \u0434\u0435\u0444\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430.<\/li>\n\n\n\n<li><strong>Max Fee Per Gas<\/strong> \u2014 \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0433\u043e\u0442\u043e\u0432 \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0433\u0430\u0437\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.<\/li>\n\n\n\n<li><strong>Max Priority Fee Per Gas<\/strong> \u2014 \u044d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0435\u0432\u044b\u0435 \u043c\u0430\u0439\u043d\u0435\u0440\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u041a\u0430\u043a EIP-1559 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 &#171;\u043e\u0431\u044b\u0447\u043d\u044b\u0445&#187; \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 (legacy)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043e EIP-1559 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043f\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e <strong>gas price<\/strong> (\u0446\u0435\u043d\u0430 \u0437\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0433\u0430\u0437\u0430), \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0433\u043e\u0442\u043e\u0432 \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c.<\/li>\n\n\n\n<li>\u0412\u0441\u0435 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438 \u043f\u043b\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u043c\u0430\u0439\u043d\u0435\u0440\u0430\u043c. <img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/de6e7f4d-b386-4fff-a011-a998cd5137ad\/image.png\" alt=\"image.png\"><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 EIP-1559 \u0432\u043c\u0435\u0441\u0442\u043e \u0435\u0434\u0438\u043d\u043e\u0433\u043e <strong>gas price<\/strong> \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Base Fee<\/strong> (\u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f, \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c).<\/li>\n\n\n\n<li><strong>Max Fee Per Gas<\/strong> (\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0433\u0430\u0437\u0430).<\/li>\n\n\n\n<li><strong>Max Priority Fee<\/strong> (\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u0434\u043b\u044f \u043c\u0430\u0439\u043d\u0435\u0440\u043e\u0432).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/59934949-5639-452f-98a0-72ca4b33924f\/image.png\" alt=\"image.png\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u041e\u0442\u043b\u0438\u0447\u0438\u044f \u0432 Python<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Legacy-\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 (\u0434\u043e EIP-1559)<\/strong>: \u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 legacy-\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438 \u0434\u043e EIP-1559 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e <strong>gasPrice<\/strong> \u2014 \u0446\u0435\u043d\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 &#171;\u0433\u0430\u0437&#187;. \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438: <code>tx_params = { 'chainId': await self.w3.eth.chain_id, 'nonce': await self.w3.eth.get_transaction_count(self.account.address), 'from': AsyncWeb3.to_checksum_address(from_), 'to': AsyncWeb3.to_checksum_address(to), 'gasPrice': await self.w3.eth.gas_price, 'data': data, # \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c 'value': value, # \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c }<\/code> \u0417\u0434\u0435\u0441\u044c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u2014 \u044d\u0442\u043e <strong>gasPrice<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043c\u0430\u0439\u043d\u0435\u0440\u0430\u043c.<\/li>\n\n\n\n<li><strong>EIP-1559 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438:<\/strong> \u0421 EIP-1559 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043b\u0438\u0441\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:<ul><li><strong>maxFeePerGas<\/strong>: \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u0437\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0433\u0430\u0437\u0430 (\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044e \u0438 \u0447\u0430\u0435\u0432\u044b\u0435).<\/li><li><strong>maxPriorityFeePerGas<\/strong>: \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f (\u0447\u0430\u0435\u0432\u044b\u0435 \u043c\u0430\u0439\u043d\u0435\u0440\u0443).<\/li><\/ul>\u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438: <code>max_priority_fee_per_gas = await self.w3.eth.max_priority_fee base_fee = (await self.w3.eth.get_block('latest'))['baseFeePerGas'] max_fee_per_gas = base_fee + max_priority_fee_per_gas tx_params = { 'chainId': await self.w3.eth.chain_id, 'nonce': await self.w3.eth.get_transaction_count(self.account.address), 'from': AsyncWeb3.to_checksum_address(from_), 'to': AsyncWeb3.to_checksum_address(to), 'maxFeePerGas': max_fee_per_gas, # \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0449\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f 'maxPriorityFeePerGas': max_priority_fee_per_gas, # \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u043c\u0430\u0439\u043d\u0435\u0440\u0443 'data': data, # \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c 'value': value, # \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c }<\/code> <strong>\u0420\u0430\u0441\u0447\u0435\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438 (<code>max_priority_fee_per_gas<\/code>)<\/strong> <code>max_priority_fee_per_gas = await self.w3.eth.max_priority_fee<\/code><ul><li><strong>max_priority_fee_per_gas<\/strong> \u2014 \u044d\u0442\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f (\u0447\u0430\u0435\u0432\u044b\u0435), \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043f\u043b\u0430\u0442\u0438\u0442\u0435 \u043c\u0430\u0439\u043d\u0435\u0440\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/li><li><code>self.w3.eth.max_priority_fee<\/code> \u2014 \u044d\u0442\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0443 \u0441\u0435\u0442\u0438 Ethereum \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0443\u044e \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044e. \u041e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0441\u0435\u0442\u044c.<\/li><\/ul><strong>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 Base Fee (\u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438)<\/strong> <code>base_fee = (await self.w3.eth.get_block('latest'))['baseFeePerGas']<\/code><ul><li><strong>base_fee<\/strong> \u2014 \u044d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u0437\u0430 \u0433\u0430\u0437, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u0442\u044c\u044e Ethereum \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430. \u041e\u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0442\u0438 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430.<\/li><li><code>self.w3.eth.get_block('latest')<\/code> \u2014 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430. \u0412 \u043d\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>baseFeePerGas<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0435\u0441\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f.<\/li><\/ul><strong>\u0420\u0430\u0441\u0447\u0435\u0442 Max Fee Per Gas<\/strong> <code>max_fee_per_gas = base_fee + max_priority_fee_per_gas<\/code><ul><li><strong>max_fee_per_gas<\/strong> \u2014 \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0433\u0430\u0437\u0430. \u041e\u043d\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<ol><li><strong>Base Fee (\u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f)<\/strong> \u2014 \u0441\u0436\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u0442\u044c\u044e.<\/li><li><strong>Priority Fee (\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f)<\/strong> \u2014 \u0432\u044b\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0439\u043d\u0435\u0440\u0430\u043c \u043a\u0430\u043a \u0447\u0430\u0435\u0432\u044b\u0435.<\/li><\/ol><\/li><\/ul>\u0417\u0434\u0435\u0441\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0441\u0443\u043c\u043c\u044b \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438 \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 <code>send_transaction<\/code> \u0441 \u0443\u0447\u0435\u0442\u043e\u043c eip-1559<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>class Client:\n    ...\n\n    async def send_transaction(\n            self,\n            to: str | ChecksumAddress,\n            data: HexStr | None = None,\n            from_: str | ChecksumAddress | None = None,\n            increase_gas: float = 1,\n            value: int | None = None,\n            eip1559: bool = True,\n            max_priority_fee_per_gas: int | None = None\n    ) -&gt; HexBytes | None:\n        if not from_:\n            from_ = self.account.address\n\n        tx_params = {\n            'chainId': await self.w3.eth.chain_id,\n            'nonce': await self.w3.eth.get_transaction_count(self.account.address),\n            'from': AsyncWeb3.to_checksum_address(from_),\n            'to': AsyncWeb3.to_checksum_address(to),\n        }\n\n        if eip1559:\n            if max_priority_fee_per_gas is None:\n                max_priority_fee_per_gas = await self.w3.eth.max_priority_fee\n            base_fee = (await self.w3.eth.get_block('latest'))&#91;'baseFeePerGas']\n            max_fee_per_gas = base_fee + max_priority_fee_per_gas\n            tx_params&#91;'maxFeePerGas'] = max_fee_per_gas  # \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0449\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f\n            tx_params&#91;'maxPriorityFeePerGas'] = max_priority_fee_per_gas  # \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u043c\u0430\u0439\u043d\u0435\u0440\u0443\n        else:\n            tx_params&#91;'gasPrice'] = await self.w3.eth.gas_price\n\n        if data:\n            tx_params&#91;'data'] = data\n        if value:\n            tx_params&#91;'value'] = value\n\n        gas = await self.w3.eth.estimate_gas(tx_params)\n        tx_params&#91;'gas'] = int(gas * increase_gas)\n\n        sign = self.w3.eth.account.sign_transaction(tx_params, self.private_key)\n        return await self.w3.eth.send_raw_transaction(sign.rawTransaction)\n\n    ...\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>eip1559<\/code> \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>send_transaction<\/code> \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>True<\/code>, \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c <code>tx_params<\/code> \u0434\u043e\u0431\u0430\u0432\u044f\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0438 <code>maxFeePerGas<\/code> \u0438 <code>maxPriorityFeePerGas<\/code>. \u0412 \u0438\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043a\u043b\u044e\u0447 <code>gasPrice<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>max_priority_fee_per_gas<\/code>, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0442\u044c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 proxy \u0438 <code>headers<\/code> \u0432 <code>Client<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>from fake_useragent import UserAgent\nfrom web3 import AsyncWeb3\nfrom eth_account.signers.local import LocalAccount\n\nclass Client:\n    private_key: str\n    rpc: str\n    proxy: str | None\n    w3: AsyncWeb3\n    account: LocalAccount\n\n    def __init__(self, private_key: str, rpc: str, proxy: str | None = None):\n        self.private_key = private_key\n        self.rpc = rpc\n        self.proxy = proxy\n        \n        if self.proxy:\n            if ':\/\/' not in self.proxy:\n                self.proxy = f'http:\/\/{self.proxy}'\n\n        self.headers = {\n            'accept': '*\/*',\n            'accept-language': 'en-US,en;q=0.9',\n            'content-type': 'application\/json',\n            'user-agent': UserAgent().chrome\n        }\n\n        self.w3 = AsyncWeb3(AsyncWeb3.AsyncHTTPProvider(\n            endpoint_uri=rpc,\n            request_kwargs={'proxy': self.proxy, 'headers': self.headers}\n        ))\n        self.account = self.w3.eth.account.from_key(private_key)\n<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">API \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0446\u0435\u043d\u044b<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u041a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>get_token_price()<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>from curl_cffi.requests import AsyncSession\n\nasync def get_token_price(token_symbol='ETH') -&gt; float | None:\n    token_symbol = token_symbol.upper()\n\n    if token_symbol in ('USDC', 'USDT', 'DAI', 'CEBUSD', 'BUSD', 'USDC.E'):\n        return 1\n    if token_symbol == 'WETH':\n        token_symbol = 'ETH'\n    if token_symbol == 'WBTC':\n        token_symbol = 'BTC'\n\n    for _ in range(5):\n        try:\n            async with AsyncSession() as session:\n                response = await session.get(f'&lt;https:\/\/api.binance.com\/api\/v3\/depth?limit=1&amp;symbol={token_symbol}USDT&gt;')\n                result_dict = response.json()\n                if 'asks' not in result_dict:\n                    return\n                return float(result_dict&#91;'asks']&#91;0]&#91;0])\n        except Exception:\n            await asyncio.sleep(5)\n    raise ValueError(f'Can not get {token_symbol} price from Binance API')\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0446\u0435\u043d\u0443 \u0442\u043e\u043a\u0435\u043d\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0441\u0447\u0438\u0442\u0430\u0442\u044c slippage)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Binance API<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432 \u043d\u0435\u0451 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0438<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a Binance API \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0442\u0430\u043a\u0430\u043d \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u043a USDT<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <code>curl_cffi<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pypi.org\/project\/curl-cffi\/\">curl-cffi<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043b\u044e\u0431\u0430\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pypi.org\/project\/aiohttp\/\">aiohttp<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pypi.org\/project\/httpx\/\">httpx<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 GET \u0437\u0430\u043f\u0440\u043e\u0441?<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>from curl_cffi.requests import AsyncSession\n\nasync with AsyncSession() as session:\n    response = await session.get(\n        f'&lt;https:\/\/api.binance.com\/api\/v3\/depth?limit=1&amp;symbol={token_symbol}USDT&gt;'\n    )\n    result_dict = response.json()\n    if 'asks' not in result_dict:\n        return\n    return float(result_dict&#91;'asks']&#91;0]&#91;0])\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0441\u0441\u0438\u044f<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>AsyncSession()<\/code> \u2014 \u044d\u0442\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0435\u0441\u0441\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/li>\n\n\n\n<li>\u0421\u0435\u0441\u0441\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 <code>async with<\/code>, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439, \u0443\u043f\u0440\u043e\u0449\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 <code>GET<\/code><\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>await session.get(...)<\/code> \u2014 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 <code>GET<\/code> \u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 URL. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c API Binance.<\/li>\n\n\n\n<li><code>await<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u043c \u0447\u0430\u0441\u0442\u044f\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f, \u043f\u043e\u043a\u0430 \u0438\u0434\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0437\u0431\u043e\u0440 \u043e\u0442\u0432\u0435\u0442\u0430<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>response.json()<\/code> \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c Python. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u043a\u0430\u043a JSON.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e<\/strong>:\n<ul class=\"wp-block-list\">\n<li>\u0415\u0441\u043b\u0438 \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043d\u0435\u0442 \u043a\u043b\u044e\u0447\u0430 <code>'asks'<\/code>, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>None<\/code>.<\/li>\n\n\n\n<li>\u0415\u0441\u043b\u0438 \u043a\u043b\u044e\u0447 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u044b \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <code>'asks'<\/code>, \u0438 \u043e\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0447\u0438\u0441\u043b\u043e \u0442\u0438\u043f\u0430 <code>float<\/code>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <code>get_token_price()<\/code> \u0432 <code>Client<\/code><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u043d\u0430\u043c \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043a\u0430\u043a \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import asyncio\n\nfrom curl_cffi.requests import AsyncSession\n\nclass Client:\n    ...\n\n    @staticmethod\n    async def get_token_price(token_symbol='ETH') -&gt; float | None:\n        token_symbol = token_symbol.upper()\n\n        if token_symbol in ('USDC', 'USDT', 'DAI', 'CEBUSD', 'BUSD', 'USDC.E'):\n            return 1\n        if token_symbol == 'WETH':\n            token_symbol = 'ETH'\n        if token_symbol == 'WBTC':\n            token_symbol = 'BTC'\n\n        for _ in range(5):\n            try:\n                async with AsyncSession() as session:\n                    response = await session.get(\n                        f'&lt;https:\/\/api.binance.com\/api\/v3\/depth?limit=1&amp;symbol={token_symbol}USDT&gt;')\n                    result_dict = response.json()\n                    if 'asks' not in result_dict:\n                        return\n                    return float(result_dict&#91;'asks']&#91;0]&#91;0])\n            except Exception:\n                await asyncio.sleep(5)\n        raise ValueError(f'Can not get {token_symbol} price from Binance API')\n\n    ...\n<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 (\u0432 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b)<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>import asyncio\nfrom hexbytes import HexBytes\n\nfrom curl_cffi.requests import AsyncSession\nfrom fake_useragent import UserAgent\n\nfrom web3 import AsyncWeb3\nfrom web3.exceptions import Web3Exception\nfrom eth_typing import ChecksumAddress, HexStr\nfrom eth_account.signers.local import LocalAccount\n\nTokenABI = &#91;\n    {\n        'constant': True,\n        'inputs': &#91;],\n        'name': 'name',\n        'outputs': &#91;{'name': '', 'type': 'string'}],\n        'payable': False,\n        'stateMutability': 'view',\n        'type': 'function'\n    },\n    {\n        'constant': True,\n        'inputs': &#91;],\n        'name': 'symbol',\n        'outputs': &#91;{'name': '', 'type': 'string'}],\n        'payable': False,\n        'stateMutability': 'view',\n        'type': 'function'\n    },\n    {\n        'constant': True,\n        'inputs': &#91;],\n        'name': 'totalSupply',\n        'outputs': &#91;{'name': '', 'type': 'uint256'}],\n        'payable': False,\n        'stateMutability': 'view',\n        'type': 'function'\n    },\n    {\n        'constant': True,\n        'inputs': &#91;],\n        'name': 'decimals',\n        'outputs': &#91;{'name': '', 'type': 'uint256'}],\n        'payable': False,\n        'stateMutability': 'view',\n        'type': 'function'\n    },\n    {\n        'constant': True,\n        'inputs': &#91;{'name': 'who', 'type': 'address'}],\n        'name': 'balanceOf',\n        'outputs': &#91;{'name': '', 'type': 'uint256'}],\n        'payable': False,\n        'stateMutability': 'view',\n        'type': 'function'\n    },\n    {\n        'constant': True,\n        'inputs': &#91;{'name': '_owner', 'type': 'address'}, {'name': '_spender', 'type': 'address'}],\n        'name': 'allowance',\n        'outputs': &#91;{'name': 'remaining', 'type': 'uint256'}],\n        'payable': False,\n        'stateMutability': 'view',\n        'type': 'function'\n    },\n    {\n        'constant': False,\n        'inputs': &#91;{'name': '_spender', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}],\n        'name': 'approve',\n        'outputs': &#91;],\n        'payable': False,\n        'stateMutability': 'nonpayable',\n        'type': 'function'\n    },\n    {\n        'constant': False,\n        'inputs': &#91;{'name': '_to', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}],\n        'name': 'transfer',\n        'outputs': &#91;], 'payable': False,\n        'stateMutability': 'nonpayable',\n        'type': 'function'\n    }\n]\n\nclass Client:\n    private_key: str\n    rpc: str\n    proxy: str | None\n    w3: AsyncWeb3\n    account: LocalAccount\n\n    def __init__(self, private_key: str, rpc: str, proxy: str | None = None):\n        self.private_key = private_key\n        self.rpc = rpc\n        self.proxy = proxy\n\n        self.headers = {\n            'accept': '*\/*',\n            'accept-language': 'en-US,en;q=0.9',\n            'content-type': 'application\/json',\n            'user-agent': UserAgent().chrome\n        }\n\n        self.w3 = AsyncWeb3(AsyncWeb3.AsyncHTTPProvider(\n            endpoint_uri=rpc,\n            request_kwargs={'proxy': self.proxy, 'headers': self.headers}\n        ))\n        self.account = self.w3.eth.account.from_key(private_key)\n\n        if self.proxy:\n            if 'http' not in self.proxy:\n                self.proxy = f'http:\/\/{self.proxy}'\n\n    async def send_transaction(\n            self,\n            to: str | ChecksumAddress,\n            data: HexStr | None = None,\n            from_: str | ChecksumAddress | None = None,\n            increase_gas: float = 1,\n            value: int | None = None,\n            eip1559: bool = True,\n            max_priority_fee_per_gas: int | None = None\n    ) -&gt; HexBytes | None:\n        if not from_:\n            from_ = self.account.address\n\n        tx_params = {\n            'chainId': await self.w3.eth.chain_id,\n            'nonce': await self.w3.eth.get_transaction_count(self.account.address),\n            'from': AsyncWeb3.to_checksum_address(from_),\n            'to': AsyncWeb3.to_checksum_address(to),\n        }\n\n        if eip1559:\n            if max_priority_fee_per_gas is None:\n                max_priority_fee_per_gas = await self.w3.eth.max_priority_fee\n            base_fee = (await self.w3.eth.get_block('latest'))&#91;'baseFeePerGas']\n            max_fee_per_gas = base_fee + max_priority_fee_per_gas\n            tx_params&#91;'maxFeePerGas'] = max_fee_per_gas  # \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0449\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f\n            tx_params&#91;'maxPriorityFeePerGas'] = max_priority_fee_per_gas  # \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u043c\u0430\u0439\u043d\u0435\u0440\u0443\n        else:\n            tx_params&#91;'gasPrice'] = await self.w3.eth.gas_price\n\n        if data:\n            tx_params&#91;'data'] = data\n        if value:\n            tx_params&#91;'value'] = value\n\n        gas = await self.w3.eth.estimate_gas(tx_params)\n        tx_params&#91;'gas'] = int(gas * increase_gas)\n\n        sign = self.w3.eth.account.sign_transaction(tx_params, self.private_key)\n        return await self.w3.eth.send_raw_transaction(sign.rawTransaction)\n\n    async def verif_tx(self, tx_hash: HexBytes, timeout: int = 200) -&gt; str:\n        data = await self.w3.eth.wait_for_transaction_receipt(tx_hash, timeout=timeout)\n        if data.get('status') == 1:\n            return tx_hash.hex()\n        raise Web3Exception(f'transaction failed {data&#91;\"transactionHash\"].hex()}')\n\n    @staticmethod\n    async def get_token_price(token_symbol='ETH') -&gt; float | None:\n        token_symbol = token_symbol.upper()\n\n        if token_symbol in ('USDC', 'USDT', 'DAI', 'CEBUSD', 'BUSD', 'USDC.E'):\n            return 1\n        if token_symbol == 'WETH':\n            token_symbol = 'ETH'\n        if token_symbol == 'WBTC':\n            token_symbol = 'BTC'\n\n        for _ in range(5):\n            try:\n                async with AsyncSession() as session:\n                    response = await session.get(\n                        f'&lt;https:\/\/api.binance.com\/api\/v3\/depth?limit=1&amp;symbol={token_symbol}USDT&gt;')\n                    result_dict = response.json()\n                    if 'asks' not in result_dict:\n                        return\n                    return float(result_dict&#91;'asks']&#91;0]&#91;0])\n            except Exception:\n                await asyncio.sleep(5)\n        raise ValueError(f'Can not get {token_symbol} price from Binance API')\n\nasync def main():\n    # \u0417\u0430\u0434\u0430\u0447\u0430: \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043f\u0440\u0443\u0432 \u0432\u0441\u0435\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430 USDT \u0434\u043b\u044f uniswap\n\n    token_address = AsyncWeb3.to_checksum_address('0x55d398326f99059fF775485246999027B3197955')\n    spender = AsyncWeb3.to_checksum_address('0x000000000022D473030F116dDEE9F6B43aC78BA3')\n\n    client = Client(\n        private_key='&lt;YOUR PRIVATE KEY HERE&gt;',\n        rpc='&lt;https:\/\/1rpc.io\/bnb&gt;',\n        proxy='&lt;YOUR PROXY HERE&gt;'\n    )\n\n    contract = client.w3.eth.contract(\n        address=token_address,\n        abi=TokenABI\n    )\n\n    decimals = await contract.functions.decimals().call()\n    token_balance = await contract.functions.balanceOf(client.account.address).call()\n    approved_amount = await contract.functions.allowance(client.account.address, spender).call()\n\n    print('decimals:', decimals)\n    print('token_balance:', token_balance \/ 10 ** decimals)\n    print('approved_amount:', approved_amount \/ 10 ** decimals)\n\n    if approved_amount &lt; token_balance:\n        tx_hash = await client.send_transaction(\n            to=token_address,\n            data=contract.encodeABI('approve',\n                                    args=(\n                                        spender,\n                                        token_balance\n                                    ))\n        )\n        if tx_hash:\n            try:\n                await client.verif_tx(tx_hash=tx_hash)\n                print(f'Transaction success!! tx_hash: {tx_hash.hex()}')\n            except Exception as err:\n                print(f'Transaction error!! tx_hash: {tx_hash.hex()}; error: {err}')\n        else:\n            print(f'Transaction error!!')\n    else:\n        print('Already approved')\n\nif __name__ == '__main__':\n    asyncio.run(main())\n<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b \u2013 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u0434 \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0442\u0438 \u0438 \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043a\u043e\u0434 \u043d\u0430 34872364826348 \u0441\u0442\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c. \u0427\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u0441 \u043d\u0430\u043c\u0438 \u043d\u0435 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u043a\u043e\u0434\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u043b\u0430\u0441\u0441 <code>TokenABI<\/code> \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0432 \u0444\u0430\u0439\u043b <code>data.models<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u043b\u0430\u0441\u0441 Client \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0432 \u0444\u0430\u0439\u043b <code>client<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>abis<\/code> \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>data<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" fetchpriority=\"low\" src=\"https:\/\/prod-files-secure.s3.us-west-2.amazonaws.com\/55910650-7650-473f-a946-4ff3e70b0ef0\/ab1eec8d-cec3-4c2c-bde0-547c1bbf6d43\/image.png\" alt=\"image.png\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0444\u0430\u0439\u043b <code>main.py<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import asyncio\n\nfrom web3 import AsyncWeb3\n\nfrom data.models import TokenABI\nfrom client import Client\n\nasync def main():\n    # \u0417\u0430\u0434\u0430\u0447\u0430: \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043f\u0440\u0443\u0432 \u0432\u0441\u0435\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430 USDT \u0434\u043b\u044f uniswap\n\n    token_address = AsyncWeb3.to_checksum_address('0x55d398326f99059fF775485246999027B3197955')\n    spender = AsyncWeb3.to_checksum_address('0x000000000022D473030F116dDEE9F6B43aC78BA3')\n\n    client = Client(\n        private_key='&lt;YOUR PRIVATE KEY HERE&gt;',\n        rpc='&lt;https:\/\/1rpc.io\/bnb&gt;',\n        proxy='&lt;YOUR PROXY HERE&gt;'\n    )\n\n    contract = client.w3.eth.contract(\n        address=token_address,\n        abi=TokenABI\n    )\n\n    decimals = await contract.functions.decimals().call()\n    token_balance = await contract.functions.balanceOf(client.account.address).call()\n    approved_amount = await contract.functions.allowance(client.account.address, spender).call()\n\n    print('decimals:', decimals)\n    print('token_balance:', token_balance \/ 10 ** decimals)\n    print('approved_amount:', approved_amount \/ 10 ** decimals)\n\n    if approved_amount &lt; token_balance:\n        tx_hash = await client.send_transaction(\n            to=token_address,\n            data=contract.encodeABI('approve',\n                                    args=(\n                                        spender,\n                                        token_balance\n                                    ))\n        )\n        if tx_hash:\n            try:\n                await client.verif_tx(tx_hash=tx_hash)\n                print(f'Transaction success!! tx_hash: {tx_hash.hex()}')\n            except Exception as err:\n                print(f'Transaction error!! tx_hash: {tx_hash.hex()}; error: {err}')\n        else:\n            print(f'Transaction error!!')\n    else:\n        print('Already approved')\n\nif __name__ == '__main__':\n    asyncio.run(main())\n\n<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 GitHub<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/fidry\/python_web3_course_3\/tree\/main\/lesson_02_send_transaction\">https:\/\/github.com\/fidry\/python_web3_course_3\/tree\/main\/lesson_02_send_transaction<\/a><\/p>\n<\/details>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>\u0423\u0420\u041e\u041a 1 \u041c\u041e\u0414\u0423\u041b\u042c: WEB3 \u041e\u0421\u041d\u041e\u0412\u041d\u0410\u042f \u0427\u0410\u0421\u0422\u042c \u0422\u0415\u041c\u0410:<\/p>\n<h2>\u041e\u0421\u041d\u041e\u0412\u042b WEB3<\/h2>\n<p><a href=\"https:\/\/darkened-currency-983.notion.site\/EVM-1eca286225fe494bbaf3a1853b5e1cee\">\u043c\u0435\u0442\u043e\u0434\u0438\u0447\u043a\u0430 \u0432 notion<\/a><\/p>\n<p>00:00 &#8212; \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c\n02:03 &#8212; \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\n07:14 &#8212; \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b\n09:10 &#8212; \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0443\n16:20 &#8212; \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0438\u0437 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430\n20:51 &#8212; ChecksumAddress\n23:27 &#8212; \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043c\u043e\u043d\u0435\u0442\u044b\n25:51 &#8212; \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0447\u0438\u0441\u0435\u043b \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f (Ether, Wei, Gwei, \u2026)\n29:47 &#8212; \u043e\u0431\u0437\u043e\u0440 read \u0438 write \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441\u043c\u0430\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\n33:51 &#8212; \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 ABI \u0438 \u0433\u0434\u0435 \u0435\u0433\u043e \u0432\u0437\u044f\u0442\u044c\n38:20 &#8212; \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 read \u0444\u0443\u043d\u043a\u0446\u0438\u0439\n40:40 &#8212; \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 read \u0444\u0443\u043d\u043a\u0446\u0438\u0439\n53:00 &#8212; \u0447\u0442\u0435\u043d\u0438\u0435 ABI \u0438\u0437 \u0444\u0430\u0439\u043b\u0430\n55:40 &#8212; ABI \u0438\u0437 python \u043e\u0431\u044a\u0435\u043a\u0442\u0430\n01:01:40 &#8212; \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u043c\u0441\u044f \u043f\u043e \u043a\u043e\u0434\u0443 \u0435\u0449\u0435 \u0440\u0430\u0437\n01:03:45 &#8212; \u0438\u0442\u043e\u0433\u0438<\/p>\n<p>\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0430:<\/p>\n<ol>\n<li>\n<p>\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441 \u043b\u044e\u0431\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u043d\u0444\u0442\u0448\u043a\u0430 \u043d\u0430 OpenSea Mints): \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0444\u0442, \u0431\u0430\u043b\u0430\u043d\u0441 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0444\u0442\u0438\u0448\u0435\u043a \u0443 \u0442\u043e\u043f \u0445\u043e\u043b\u0434\u0435\u0440\u0430, \u0441\u0438\u043c\u0432\u043e\u043b \u043d\u0444\u0442. \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0441 10 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0441\u043e \u0441\u043a\u0430\u043d\u0435\u0440\u0430 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441Of USDT \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 \u0432 \u0441\u0435\u0442\u0438 Ethereum (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440), \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0445\u043e\u043b\u0434\u0435\u0440\u043e\u0432 \u043f\u043e \u043a\u043e\u043b-\u0432\u0443 USDT (\u043e\u0442 \u0431\u043e\u0433\u0430\u0442\u043e\u0433\u043e \u043a \u0431\u0435\u0434\u043d\u043e\u043c\u0443). \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.<\/p>\n<\/li>\n<\/ol>\n<p>3*) \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u21161, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043a\u0442\u043e owner \u044d\u0442\u043e\u0439 \u043d\u0444\u0442, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043b\u0438 \u043c\u0438\u043d\u0442 \u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u0444\u0442.<\/p>\n<p>4**) \u0412 \u0441\u0435\u0442\u0438 zkSync Era \u0435\u0441\u0442\u044c \u043d\u0435\u0432\u0435\u0440\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u043c \u0430\u0431\u0438. \u0412 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438\nname, symbol \u0438 decimals \u0434\u0432\u0443\u0445 NFT-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432. \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.\n\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438:<\/p>\n<ul>\n<li>\u0435\u0441\u043b\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b NFT, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043d\u0438\u0436\u0435;\n\u2013 \u041f\u0440\u0438\u043c\u0435\u0440 \u21161: 0xc94025c2eA9512857BD8E1e611aB9b773b769350\n\u2013 \u041f\u0440\u0438\u043c\u0435\u0440 \u21162: 0xD43A183C97dB9174962607A8b6552CE320eAc5aA\n\u2013 \u041f\u0440\u0438\u043c\u0435\u0440 \u21163: 0xee0d4a8f649d83f6ba5e5c9e6c4d4f6ae846846a<\/li>\n<li>\u0432\u044b\u0437\u043e\u0432 decimals \u0434\u0435\u043b\u0430\u0442\u044c \u0432 try-except, \u0432 except \u0432\u044b\u0432\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.<\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7","post","type-post","status-publish","format-standard","hentry","category-1"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cryppi.mkhananov.ru\/index.php?rest_route=\/wp\/v2\/posts\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cryppi.mkhananov.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cryppi.mkhananov.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cryppi.mkhananov.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cryppi.mkhananov.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7"}],"version-history":[{"count":5,"href":"https:\/\/cryppi.mkhananov.ru\/index.php?rest_route=\/wp\/v2\/posts\/7\/revisions"}],"predecessor-version":[{"id":12,"href":"https:\/\/cryppi.mkhananov.ru\/index.php?rest_route=\/wp\/v2\/posts\/7\/revisions\/12"}],"wp:attachment":[{"href":"https:\/\/cryppi.mkhananov.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cryppi.mkhananov.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cryppi.mkhananov.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}