diff --git a/src/contracts/Cash.kt b/src/contracts/Cash.kt index 2fc207c7e7..45484d3446 100644 --- a/src/contracts/Cash.kt +++ b/src/contracts/Cash.kt @@ -7,6 +7,11 @@ import java.time.Instant ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Cash +// +// Open issues: +// - Cannot do currency exchanges this way, as the contract insists that there be a single currency involved! +// - Nothing ensures cash states are not created out of thin air. +// - Complex logic to do grouping: can it be generalised out into platform code? // Just a fake program identifier for now. In a real system it could be, for instance, the hash of the program bytecode. val CASH_PROGRAM_ID = SecureHash.sha256("cash") diff --git a/src/core/Main.kt b/src/core/Main.kt index 29ce357fcf..7a6337482d 100644 --- a/src/core/Main.kt +++ b/src/core/Main.kt @@ -1,7 +1,9 @@ package core +// TODO: Implement transaction processing logic first pass (selection of contract types to run). Ensure that outputs are all accounted for. +// // TODO: Make a decision on basic timestamping approach (use external TSAs? use fake TSA?) -// TODO: Think about how to expose time to the contract // TODO: Pick a serialisation solution for the prototype (kryo?) // TODO: Store transactions to a database, design some conflict detection and rollback -// TODO: Implement a basic UI that shows contracts and very basic network layer (with chat?) \ No newline at end of file +// TODO: Implement a basic UI that shows contracts and very basic network layer (with chat?) + diff --git a/src/core/Structures.kt b/src/core/Structures.kt index 36460167aa..42b5ab60c4 100644 --- a/src/core/Structures.kt +++ b/src/core/Structures.kt @@ -94,6 +94,7 @@ interface Contract { /** Must throw an exception if there's a problem that should prevent state transition. */ fun verify(inStates: List, outStates: List, args: List>, time: Instant) + // TODO: This should probably be a hash of a document, rather than a URL to it. /** Unparsed reference to the natural language contract that this code is supposed to express (usually a URL). */ val legalContractReference: String }