Skip to content

Commit

Permalink
update link
Browse files Browse the repository at this point in the history
  • Loading branch information
hh committed Oct 9, 2021
1 parent 04ff25b commit 38d3750
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 28 deletions.
7 changes: 5 additions & 2 deletions docs/asm.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
===============
Inline Assembly
===============
Script is a low-level language and acts as assembly for the `Bitcoin Virtual Machine <https://medium.com/@xiaohuiliu/introduction-to-bitcoin-smart-contracts-9c0ea37dc757>`_.
Script is a low-level language and acts as assembly for the `Bitcoin Virtual Machine`_.
Usually, developers do not have to deal with it directly and can use high-level languages like sCrypt. However, there are cases where using Script is desirable.
For example, customized script is optimized and thus more efficient than script generated by sCrypt.
Or script is generated using external tools (like `MiniForth <https://powping.com/posts/95e53a7305ad9d333d072575946d0cfd0d6321f40af40f9c66c70955ada94e58>`_) and needs to be integrated into sCrypt.
Expand Down Expand Up @@ -65,4 +65,7 @@ An example is shown below.
Notes
=====
Inline assembly bypasses many features of sCrypt such as type checking. Extreme caution has to be taken using this advanced feature.
Also it is case-insensitive for compatibility with external tools.
Also it is case-insensitive for compatibility with external tools.

.. _Bitcoin Virtual Machine: https://medium.com/@xiaohuiliu/introduction-to-bitcoin-smart-contracts-9c0ea37dc757
.. _比特币虚拟机: https://blog.csdn.net/freedomhero/article/details/106801904
9 changes: 7 additions & 2 deletions docs/contracts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ As an example, contract ``CheckLockTimeVerify`` ensures coins are timelocked and
}
}
More details can be found in `this article <https://medium.com/@xiaohuiliu/op-push-tx-3d3d279174c1>`_.
To customize ECDSA signing, such as choosing ephemeral key, there is a more general version called `Tx.checkPreimageAdvanced() <https://medium.com/@xiaohuiliu/advanced-op-push-tx-78ce84f69a66>`_.
More details can be found in this article `OP_PUSH_TX`_.
To customize ECDSA signing, such as choosing ephemeral key, there is a more general version called ``Tx.checkPreimageAdvanced()``. see `Advanced OP_PUSH_TX`_.

Full List
---------
Expand Down Expand Up @@ -185,3 +185,8 @@ Full List
.. _BIP143: https://github.com/bitcoin-sv/bitcoin-sv/blob/master/doc/abc/replay-protected-sighash.md
.. _OP_CLTV: https://en.bitcoin.it/wiki/Timelock#CheckLockTimeVerify
.. _OP_PUSH_TX: https://medium.com/@xiaohuiliu/op-push-tx-3d3d279174c1
.. _Advanced OP_PUSH_TX: https://medium.com/@xiaohuiliu/op-push-tx-3d3d279174c1
.. _OP_PUSH_TX 技术: https://blog.csdn.net/freedomhero/article/details/107306604
.. _高级 OP_PUSH_TX 技术: https://blog.csdn.net/freedomhero/article/details/107333738

Binary file modified docs/locale/zh_CN/LC_MESSAGES/asm.mo
Binary file not shown.
23 changes: 10 additions & 13 deletions docs/locale/zh_CN/LC_MESSAGES/asm.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sCrypt\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-08 12:13+0800\n"
"POT-Creation-Date: 2021-10-09 11:04+0800\n"
"PO-Revision-Date: 2021-10-07 14:25+0000\n"
"Last-Translator: qtom zheng <zhfnjust@qq.com>, 2021\n"
"Language-Team: Chinese (China) (https://www.transifex.com/scrypt-1/teams/121283/zh_CN/)\n"
Expand All @@ -28,19 +28,16 @@ msgstr "内联汇编"
#: ../../asm.rst:4 d611070155fc4a2eb449204dfbac9c9f
msgid ""
"Script is a low-level language and acts as assembly for the `Bitcoin Virtual"
" Machine <https://medium.com/@xiaohuiliu/introduction-to-bitcoin-smart-"
"contracts-9c0ea37dc757>`_. Usually, developers do not have to deal with it "
"directly and can use high-level languages like sCrypt. However, there are "
"cases where using Script is desirable. For example, customized script is "
"optimized and thus more efficient than script generated by sCrypt. Or script"
" is generated using external tools (like `MiniForth "
" Machine`_. Usually, developers do not have to deal with it directly and can"
" use high-level languages like sCrypt. However, there are cases where using "
"Script is desirable. For example, customized script is optimized and thus "
"more efficient than script generated by sCrypt. Or script is generated using"
" external tools (like `MiniForth "
"<https://powping.com/posts/95e53a7305ad9d333d072575946d0cfd0d6321f40af40f9c66c70955ada94e58>`_)"
" and needs to be integrated into sCrypt."
msgstr ""
"脚本是一种低级语言,可以看作是 `比特币虚拟机 <https://medium.com/@xiaohuiliu/introduction-to-"
"bitcoin-smart-contracts-9c0ea37dc757>`_ "
"的汇编语言。通常,开发人员不用直接使用它,而是用像sCrypt这样的高级语言。但有些情况下用脚本语言更合适。例如,直接写出更优化的脚本,比用sCrypt生成的更高效。或者脚本是用外部工具(如"
" `MiniForth "
"脚本是一种低级语言,充当 `比特币虚拟机`_ 的程序集。通常,开发人员不必直接处理它,可以使用 sCrypt 等高级语言。但是,有些情况下需要使用 "
"Script。例如,自定义脚本经过优化,因此比 sCrypt 生成的脚本更高效。或者脚本是使用外部工具(如 `MiniForth "
"<https://powping.com/posts/95e53a7305ad9d333d072575946d0cfd0d6321f40af40f9c66c70955ada94e58>`_)生成的,需要集成到sCrypt中。"

#: ../../asm.rst:9 ccbc29af4fa54a85a87ccf41eadd9e3c
Expand All @@ -65,8 +62,8 @@ msgid ""
"items in the stack before the call must remain intact."
msgstr ""
"对于用脚本编写的函数,它的整个函数主体必须用 ``asm`` 块包围。函数参数位于栈顶,与声明的顺序相反。例如,对于签名为 ``function "
"foo(int p0, bytes p1, bool p2) : int`` 的函数,``p2`` 位于栈顶,``p1`` 是从栈顶倒数第二个,而 ` "
"`p0`` 进入 `asm` 是第三个。当退出 ``asm`` 模式时,需要弹出栈里的所有参数,并把返回值放到栈顶。栈里其他元素保持不变。"
"foo(int p0, bytes p1, bool p2) : int`` 的函数,``p2`` 位于栈顶,``p1`` 是从栈顶倒数第二个,而 "
"``p0`` 进入 `asm` 是第三个。当退出 ``asm`` 模式时,需要弹出栈里的所有参数,并把返回值放到栈顶。栈里其他元素保持不变。"

#: ../../asm.rst:18 a3377dc437464863b24295569c54aee5
msgid "Three assembly functions are shown below."
Expand Down
Binary file modified docs/locale/zh_CN/LC_MESSAGES/contracts.mo
Binary file not shown.
15 changes: 6 additions & 9 deletions docs/locale/zh_CN/LC_MESSAGES/contracts.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sCrypt\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-08 12:13+0800\n"
"POT-Creation-Date: 2021-10-09 11:17+0800\n"
"PO-Revision-Date: 2021-10-07 06:10+0000\n"
"Last-Translator: qtom zheng <zhfnjust@qq.com>, 2021\n"
"Language-Team: Chinese (China) (https://www.transifex.com/scrypt-1/teams/121283/zh_CN/)\n"
Expand Down Expand Up @@ -169,15 +169,12 @@ msgstr ""

#: ../../contracts.rst:153 c6d73b9e75434d659cbb472b88f657d4
msgid ""
"More details can be found in `this article <https://medium.com/@xiaohuiliu"
"/op-push-tx-3d3d279174c1>`_. To customize ECDSA signing, such as choosing "
"ephemeral key, there is a more general version called "
"`Tx.checkPreimageAdvanced() <https://medium.com/@xiaohuiliu/advanced-op-"
"push-tx-78ce84f69a66>`_."
"More details can be found in this article `OP_PUSH_TX`_. To customize ECDSA "
"signing, such as choosing ephemeral key, there is a more general version "
"called ``Tx.checkPreimageAdvanced()``. see `Advanced OP_PUSH_TX`_."
msgstr ""
"更多细节可以在 `这篇文章 <https://medium.com/@xiaohuiliu/op-push-tx-3d3d279174c1>`_ "
"中找到。要自定义 ECDSA 签名,比如选择临时密钥,可以使用一个更加通用的版本 `Tx.checkPreimageAdvanced() "
"<https://medium.com/@xiaohuiliu/advanced-op-push-tx-78ce84f69a66>`_。"
"更多细节可以在这篇文章 `OP_PUSH_TX 技术`_ 中找到。要自定义 ECDSA 签名,例如选择临时密钥,有一个更通用的版本,称为 "
"``Tx.checkPreimageAdvanced()`` 。请参阅 `高级 OP_PUSH_TX 技术`_。"

#: ../../contracts.rst:157 f1531513074247cc87f1ff92ced9c248
msgid "Full List"
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"push:all": "npm run gettext && tx push -s",
"push": "npm run gettext && tx push -s -r ",
"pull:all": "tx pull -a",
"postpull:all": "npm run build:cn && npm run build:en",
"postpull:all": "npm run build:cn",
"pull": "tx pull -s -r ",
"postpull": "npm run build:cn && npm run build:en",
"postpull": "npm run build:cn",
"build": ".\\make.bat html",
"build:en": "set SPHINXOPTS=-Dlanguage=en && npm run build",
"build:cn": "set SPHINXOPTS=-Dlanguage=zh_CN && npm run build",
Expand Down

0 comments on commit 38d3750

Please sign in to comment.