Created
November 6, 2020 15:25
-
-
Save zhfnjust/584867f863a3a209e03ffad3f84944f3 to your computer and use it in GitHub Desktop.
sCrypt DemoP2PKH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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