Skip to content

Instantly share code, notes, and snippets.

@zhfnjust
Created November 6, 2020 15:25
Show Gist options
  • Save zhfnjust/584867f863a3a209e03ffad3f84944f3 to your computer and use it in GitHub Desktop.
Save zhfnjust/584867f863a3a209e03ffad3f84944f3 to your computer and use it in GitHub Desktop.
sCrypt DemoP2PKH
contract DemoP2PKH {
Ripemd160 pubKeyHash;
constructor(Ripemd160 pubKeyHash) {
this.pubKeyHash = pubKeyHash;
}
public function unlock(Sig sig, PubKey pubKey) {
require(hash160(pubKey) == this.pubKeyHash);
require(checkSig(sig, pubKey));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment