Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created January 4, 2018 20:36
Show Gist options
  • Save azamsharp/ae9e56aeaebfe34c4e2c66a72aa67981 to your computer and use it in GitHub Desktop.
Save azamsharp/ae9e56aeaebfe34c4e2c66a72aa67981 to your computer and use it in GitHub Desktop.
func addTransaction(transaction :Transaction, contracts :[SmartContract] = [SmartContract]()) {
// run the smart contracts
contracts.forEach { contract in
contract.apply(to: transaction)
}
if transaction.isValid {
self.transactions.append(transaction)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment