diff --git a/src/contracts/Cash.kt b/src/contracts/Cash.kt index 0b3203ba6c..d0928911d1 100644 --- a/src/contracts/Cash.kt +++ b/src/contracts/Cash.kt @@ -27,6 +27,8 @@ class InsufficientBalanceException(val amountMissing: Amount) : Exception() * vaults can ignore the issuer/depositRefs and just examine the amount fields. */ object Cash : Contract { + override val legalContractReference: String = "https://www.big-book-of-banking-law.gov/cash-claims.html" + /** A state representing a cash claim against some institution */ data class State( /** Where the underlying currency backing this ledger entry can be found (propagated) */ diff --git a/src/contracts/ComedyPaper.kt b/src/contracts/ComedyPaper.kt index fa019d5782..fe41fc1573 100644 --- a/src/contracts/ComedyPaper.kt +++ b/src/contracts/ComedyPaper.kt @@ -23,6 +23,8 @@ val CP_PROGRAM_ID = SecureHash.sha256("comedy-paper") // TODO: Generalise the notion of an owned instrument into a superclass/supercontract. Consider composition vs inheritance. object ComedyPaper : Contract { + override val legalContractReference: String = "https://www.gotlines.com/jokes/1" + data class State( val issuance: InstitutionReference, val owner: PublicKey, diff --git a/src/core/Structures.kt b/src/core/Structures.kt index e3f611c3cd..36460167aa 100644 --- a/src/core/Structures.kt +++ b/src/core/Structures.kt @@ -93,6 +93,9 @@ data class VerifiedSigned( 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) + + /** Unparsed reference to the natural language contract that this code is supposed to express (usually a URL). */ + val legalContractReference: String } /**