Skip to content

Commit

Permalink
update OCS example
Browse files Browse the repository at this point in the history
  • Loading branch information
xhliu committed Dec 7, 2021
1 parent 3d5aa0e commit 711660e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions docs/syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,16 @@ Note there is no ``;`` at the end.

.. code-block:: solidity
contract TestSeparator {
public function equal(int y) {
int a = 0;
// separator 1
contract P2PKH_OCS {
Ripemd160 pubKeyHash;
public function unlock(Sig sig, PubKey pubKey) {
// code separator 1
***
int b = 2;
// separator 2
require(hash160(pubKey) == this.pubKeyHash);
// code separator 2
*****
require(y > 0);
require(checkSig(sig, pubKey));
}
}
Expand Down

0 comments on commit 711660e

Please sign in to comment.