Skip to content

Commit

Permalink
Update how-to-write-a-contract.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufidimaina9989 authored Sep 23, 2023
1 parent 87c087e commit 0a2eebc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/how-to-write-a-contract/how-to-write-a-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,8 @@ There are several domain types, specific to the Bitcoin context, used to further
```ts
@method()
public unlock(sig: Sig, pubkey: PubKey) {
// The hash160() function takes a ByteString as input, but it can also accept 'pubkey', which is of type PubKey.
assert(hash160(pubkey) == this.pubKeyHash)
// The pubKey2Addr() function takes a 'pubkey', which is of type PubKey.
assert(pubKey2Addr(pubkey) == this.pubKeyHash)
assert(this.checkSig(sig, pubkey), 'signature check failed')
}
```
Expand Down Expand Up @@ -761,4 +761,4 @@ add(x0: bigint, x1:bigint) : bigint {

:::note
`**` is not supported currently.
:::
:::

0 comments on commit 0a2eebc

Please sign in to comment.