From 5727083ead198543e0236a6b359677ece8f66d11 Mon Sep 17 00:00:00 2001 From: darwintree <17946284+darwintree@users.noreply.github.com> Date: Wed, 8 Apr 2026 18:07:26 +0800 Subject: [PATCH 1/2] chore: update documentation theme options for English and Chinese versions to include new launch button URLs and enable Thebe integration --- docs/en/conf.py | 2 +- docs/zh-CN/conf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/conf.py b/docs/en/conf.py index 90541df..852aa27 100644 --- a/docs/en/conf.py +++ b/docs/en/conf.py @@ -17,7 +17,7 @@ html_logo = '../logo.png' html_sourcelink_suffix = '' html_theme = 'sphinx_book_theme' -html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': '', 'jupyterhub_url': '', 'thebe': False, 'colab_url': '', 'deepnote_url': ''}, 'path_to_docs': 'docs/en', 'repository_url': 'https://github.com/conflux-chain/python-conflux-sdk', 'repository_branch': 'v1', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'analytics': {'google_analytics_id': '', 'plausible_analytics_domain': '', 'plausible_analytics_url': 'https://plausible.io/js/script.js'}, 'use_repository_button': True, 'use_edit_page_button': False, 'use_issues_button': True} +html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': 'https://mybinder.org', 'jupyterhub_url': '', 'thebe': True, 'colab_url': 'https://colab.research.google.com', 'deepnote_url': ''}, 'path_to_docs': 'docs/en', 'repository_url': 'https://github.com/conflux-chain/python-conflux-sdk', 'repository_branch': 'v1', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'analytics': {'google_analytics_id': '', 'plausible_analytics_domain': '', 'plausible_analytics_url': 'https://plausible.io/js/script.js'}, 'use_repository_button': True, 'use_edit_page_button': False, 'use_issues_button': True} html_title = 'python-conflux-sdk' latex_engine = 'pdflatex' myst_enable_extensions = ['colon_fence', 'dollarmath', 'linkify', 'substitution', 'tasklist'] diff --git a/docs/zh-CN/conf.py b/docs/zh-CN/conf.py index 7ccb936..3230055 100644 --- a/docs/zh-CN/conf.py +++ b/docs/zh-CN/conf.py @@ -17,7 +17,7 @@ html_logo = '../logo.png' html_sourcelink_suffix = '' html_theme = 'sphinx_book_theme' -html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': '', 'jupyterhub_url': '', 'thebe': False, 'colab_url': '', 'deepnote_url': ''}, 'path_to_docs': 'docs/zh-CN', 'repository_url': 'https://github.com/conflux-chain/python-conflux-sdk', 'repository_branch': 'v1', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'analytics': {'google_analytics_id': '', 'plausible_analytics_domain': '', 'plausible_analytics_url': 'https://plausible.io/js/script.js'}, 'use_repository_button': True, 'use_edit_page_button': False, 'use_issues_button': True} +html_theme_options = {'search_bar_text': 'Search this book...', 'launch_buttons': {'notebook_interface': 'classic', 'binderhub_url': 'https://mybinder.org', 'jupyterhub_url': '', 'thebe': True, 'colab_url': 'https://colab.research.google.com', 'deepnote_url': ''}, 'path_to_docs': 'docs/zh-CN', 'repository_url': 'https://github.com/conflux-chain/python-conflux-sdk', 'repository_branch': 'v1', 'extra_footer': '', 'home_page_in_toc': True, 'announcement': '', 'analytics': {'google_analytics_id': '', 'plausible_analytics_domain': '', 'plausible_analytics_url': 'https://plausible.io/js/script.js'}, 'use_repository_button': True, 'use_edit_page_button': False, 'use_issues_button': True} html_title = 'python-conflux-sdk' latex_engine = 'pdflatex' myst_enable_extensions = ['colon_fence', 'dollarmath', 'linkify', 'substitution', 'tasklist'] From a00b3ad7ecc74e0ead3078db54dd8b62908357ad Mon Sep 17 00:00:00 2001 From: darwintree <17946284+darwintree@users.noreply.github.com> Date: Wed, 8 Apr 2026 18:17:22 +0800 Subject: [PATCH 2/2] fix: update quickstart examples to use consistent formatting for transaction hashes and account details, and update Python version in metadata --- docs/en/examples/01-quickstart.ipynb | 31 +++++++++------------ docs/examples/base/01-quickstart.base.ipynb | 4 +-- docs/zh-CN/examples/01-quickstart.ipynb | 4 +-- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/docs/en/examples/01-quickstart.ipynb b/docs/en/examples/01-quickstart.ipynb index 4b50ce1..43b7aa5 100644 --- a/docs/en/examples/01-quickstart.ipynb +++ b/docs/en/examples/01-quickstart.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "# Quickstart\n", - "Run this example online by clicking `\ud83d\ude80` -> `Binder` on the top bar!\n", + "Run this example online by clicking `🚀` -> `Binder` on the top bar!\n", "This example will present:\n", "* how to connect to the blockchain via a node\n", "* how to create and use an account \n", @@ -48,22 +48,22 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "account address: cfxtest:aaswj28188e35rh1vguksgnuz2xy4f8apye3745zxb\n", - "account secret key: 0x54d957b2485980fc2119ccce6480ad0d53219161595424fbf7dc452d59c6bc82\n", - "balance for cfxtest:aaswj28188e35rh1vguksgnuz2xy4f8apye3745zxb: 0 Drip\n" + "account address: cfxtest:aak6aj273w2gxgp6svhs8s337k6zuxxnwehxyhx0v6\n", + "account secret key: 0xc48bd6bcdf4097efad39846f14e66d8796dec116783930baf35a595a99a84f94\n", + "balance for cfxtest:aak6aj273w2gxgp6svhs8s337k6zuxxnwehxyhx0v6: 0 Drip\n" ] } ], "source": [ "acct = w3.account.create()\n", - "print(f\"account address: {acct.address}\")\n", + "print(f\"account address: 0x{acct.address}\")\n", "# WARNING: Don't run the following line in unsafe environment, private key should be kept secret\n", "print(f\"account secret key: {acct.key.hex()}\")\n", "balance = w3.cfx.get_balance(acct.address)\n", @@ -85,7 +85,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -106,8 +106,8 @@ "faucet = w3.cfx.contract(name=\"Faucet\")\n", "tx_hash = faucet.functions.claimCfx().transact()\n", "\n", - "print(f\"tx hash is: {tx_hash.hex()}\\n\"\n", - " f\"confluxscan link: https://testnet.confluxscan.net/transaction/{tx_hash.hex()}\")" + "print(f\"tx hash is: 0x{tx_hash.hex()}\\n\"\n", + " f\"confluxscan link: https://testnet.confluxscan.net/transaction/0x{tx_hash.hex()}\")" ] }, { @@ -167,7 +167,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3.9.13 ('venv39': venv)", + "display_name": "web3py7", "language": "python", "name": "python3" }, @@ -181,15 +181,10 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.12.7" }, - "orig_nbformat": 4, - "vscode": { - "interpreter": { - "hash": "9b7fb9a8ba8be13c6b92820560c2e7f0c114ca03a55934a046d1bf6afa009968" - } - } + "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 -} \ No newline at end of file +} diff --git a/docs/examples/base/01-quickstart.base.ipynb b/docs/examples/base/01-quickstart.base.ipynb index 58e006a..6b74571 100644 --- a/docs/examples/base/01-quickstart.base.ipynb +++ b/docs/examples/base/01-quickstart.base.ipynb @@ -157,8 +157,8 @@ "faucet = w3.cfx.contract(name=\"Faucet\")\n", "tx_hash = faucet.functions.claimCfx().transact()\n", "\n", - "print(f\"tx hash is: {tx_hash.hex()}\\n\"\n", - " f\"confluxscan link: https://testnet.confluxscan.net/transaction/{tx_hash.hex()}\")" + "print(f\"tx hash is: 0x{tx_hash.hex()}\\n\"\n", + " f\"confluxscan link: https://testnet.confluxscan.net/transaction/0x{tx_hash.hex()}\")" ] }, { diff --git a/docs/zh-CN/examples/01-quickstart.ipynb b/docs/zh-CN/examples/01-quickstart.ipynb index c613573..762261f 100644 --- a/docs/zh-CN/examples/01-quickstart.ipynb +++ b/docs/zh-CN/examples/01-quickstart.ipynb @@ -109,8 +109,8 @@ "faucet = w3.cfx.contract(name=\"Faucet\")\n", "tx_hash = faucet.functions.claimCfx().transact()\n", "\n", - "print(f\"tx hash is: {tx_hash.hex()}\\n\"\n", - " f\"confluxscan link: https://testnet.confluxscan.net/transaction/{tx_hash.hex()}\")" + "print(f\"tx hash is: 0x{tx_hash.hex()}\\n\"\n", + " f\"confluxscan link: https://testnet.confluxscan.net/transaction/0x{tx_hash.hex()}\")" ] }, {