mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
Encumbrances implemented by reference to an index of an output state
This commit is contained in:
@ -120,6 +120,12 @@ public class JavaCommercialPaper implements Contract {
|
||||
public List<PublicKey> getParticipants() {
|
||||
return ImmutableList.of(this.owner);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Integer getEncumbrance() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public interface Clause {
|
||||
|
@ -74,12 +74,14 @@ class Cash : OnLedgerAsset<Currency, Cash.State>() {
|
||||
class ConserveAmount : AbstractConserveAmount<State, Currency>()
|
||||
}
|
||||
|
||||
/** A state representing a cash claim against some party */
|
||||
/** A state representing a cash claim against some party. */
|
||||
data class State(
|
||||
override val amount: Amount<Issued<Currency>>,
|
||||
|
||||
/** There must be a MoveCommand signed by this key to claim the amount */
|
||||
override val owner: PublicKey
|
||||
/** There must be a MoveCommand signed by this key to claim the amount. */
|
||||
override val owner: PublicKey,
|
||||
/** Cash may be encumbered by an additional state. */
|
||||
override val encumbrance: Int? = null
|
||||
) : FungibleAsset<Currency> {
|
||||
constructor(deposit: PartyAndReference, amount: Amount<Currency>, owner: PublicKey)
|
||||
: this(Amount(amount.quantity, Issued(deposit, amount.token)), owner)
|
||||
|
Reference in New Issue
Block a user