Created
March 5, 2026 11:50
-
-
Save ordishs/a2e0ba58cbd4e9d84d5b27c89076c637 to your computer and use it in GitHub Desktop.
P2PKH in Rúnar Solidity-like
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
| pragma runar ^0.1.0; | |
| contract P2PKH is SmartContract { | |
| Addr immutable pubKeyHash; | |
| constructor(Addr _pubKeyHash) { | |
| pubKeyHash = _pubKeyHash; | |
| } | |
| function unlock(Sig sig, PubKey pubKey) public { | |
| require(hash160(pubKey) == pubKeyHash); | |
| require(checkSig(sig, pubKey)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment