Skip to content
Merged

Dev #74

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
31 changes: 13 additions & 18 deletions docs/en/examples/01-quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -85,7 +85,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -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()}\")"
]
},
{
Expand Down Expand Up @@ -167,7 +167,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.9.13 ('venv39': venv)",
"display_name": "web3py7",
"language": "python",
"name": "python3"
},
Expand All @@ -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
}
}
4 changes: 2 additions & 2 deletions docs/examples/base/01-quickstart.base.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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()}\")"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
4 changes: 2 additions & 2 deletions docs/zh-CN/examples/01-quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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()}\")"
]
},
{
Expand Down
Loading