Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created January 4, 2018 20:28
Show Gist options
  • Save azamsharp/a4f05071c98070d38b3425bf4402a140 to your computer and use it in GitHub Desktop.
Save azamsharp/a4f05071c98070d38b3425bf4402a140 to your computer and use it in GitHub Desktop.
class MaximumAmountTransferFundsContract : SmartContract {
func apply(to transaction: Transaction) {
if transaction.amount > 5000 {
transaction.addBrokenRule(BrokenRule(contractName: "MaximumAmountTransferFundsContract", message: "Your amount is more than $5000"))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment