Commit Graph

6 Commits

Author SHA1 Message Date
Mike Hearn
5b4969d366 Minor: make commands singletons when they contain no data and are purely type system markers.
This may not be really compatible with sandboxing, later on. But we can always change it back if not.
2015-11-13 14:43:59 +01:00
Mike Hearn
1b44081880 Minor: tweak the cash/amount API 2015-11-12 23:38:02 +01:00
Mike Hearn
32143160c2 Minor: reformat code a bit, introduce TimestampedWireTransaction as a wrapper, fix ContractStateRef to be the same as a Bitcoin COutPoint structure. 2015-11-12 23:18:15 +01:00
Mike Hearn
0b02f64f3d Contracts: a bit more work on the CP implementation, add a unit test for redemption at time. 2015-11-12 22:58:47 +01: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
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