Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created January 4, 2018 21:20
Show Gist options
  • Save azamsharp/3cb71f148720b117540e46232af641f1 to your computer and use it in GitHub Desktop.
Save azamsharp/3cb71f148720b117540e46232af641f1 to your computer and use it in GitHub Desktop.
class Blockchain {
private (set) var blocks :[Block] = [Block]()
private (set) var contracts :[SmartContract] = [SmartContract]()
init() {
// initialize contracts
initializeContracts()
}
private func initializeContracts() {
self.contracts = [InternationalDomesticTransferFeesContract(),MaximumAmountTransferFundsContract()]
}
// there is more code to the blockchain which you can download from the link in the post
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment