Created
December 20, 2018 19:08
-
-
Save yurial/eb04c0c5f0c0f06928c9ec024a646755 to your computer and use it in GitHub Desktop.
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
let main_pubkey = base58'qweqwe' | |
let main_address = addressFromPublicKey(main_pubkey) | |
match tx { | |
case t:ExchangeTransaction => sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
case t:TransferTransaction => main_address == addressFromRecipient(t.recipient) | |
case t:SetScriptTransaction => sigVerify(tx.bodyBytes, tx.proofs[0], main_pubkey) | |
case _ => false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment