Skip to content

Instantly share code, notes, and snippets.

@yurial
Created December 20, 2018 19:08
Show Gist options
  • Save yurial/eb04c0c5f0c0f06928c9ec024a646755 to your computer and use it in GitHub Desktop.
Save yurial/eb04c0c5f0c0f06928c9ec024a646755 to your computer and use it in GitHub Desktop.
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