Commit Graph

8 Commits

Author SHA1 Message Date
Mike Hearn
ac9a371179 Platform: commands can now have multiple signatures per command (i.e. you only have one command of any type per transaction even if there are multiple authorisations). 2015-11-09 19:27:53 +00:00
Mike Hearn
12b7c7c184 Platform: fix the ability to summon cash in uncontrolled ways.
Introduce three ways to represent transactions: wire, ledger and for-verification.

TransactionForVerification contains the arguments formally passed to verify(). Making Contract.verify() take only a single object as the argument makes it easier to evolve the Contract binary interface without breaking backwards compatibility with existing contracts that are uploaded to the ledger. The Kotlin "with" construct can be used to bring the members into scope, thus acting syntactically like function arguments.

Make the contracts to be run depend on both input AND output states: this approach seems simpler than trying to have some notion of marking outputs that are checked. The TransactionForVerification class implements this simple logic (it's all moved into Transactions.kt).
2015-11-09 18:18:03 +00:00
Mike Hearn
b8c7f949f4 Misc changes from Monday meeting. 2015-11-09 17:23:05 +00:00
Mike Hearn
5022f11d9e More moving around and renaming, to have a consistent style between contracts. 2015-11-08 13:34:24 +01:00
Mike Hearn
83eb45732f Some renaming and moving around (Children's Paper becomes Comedy Paper to make it clearer that it's sort of a joke implementation) 2015-11-08 12:30:02 +01:00
Mike Hearn
0131c2cc1d CP: check in a "childrens paper" contract that is sort of like commercial paper, but not really. Tests are incomplete. 2015-11-06 17:55:20 +01:00
Mike Hearn
163175860d Improve the contracts DSL, make the Cash contract extend the DSL in a small way to make working with arrays of cash outputs easier. 2015-11-06 16:35:51 +01:00
Mike Hearn
847770ed2e Move Cash into new contracts subfolder, move base code into core 2015-11-06 14:56:00 +01:00