Deprecated

This Splice documentation site is deprecated. Use the current Canton Network docs.

Open current docs

Splice.GovernanceLock

FA and SV locks and the operations on them.

Templates

template GovernanceLock

Signatory: dso, owner

Field

Type

Description

dso

Party

owner

Party

Lock owner

amount

Decimal

The amount that is locked.

lockedAmulet

ContractId LockedAmulet

specification

GovernanceLockSpecification

originalLockCid

Optional AnyContractId

requestedAt

Time

Time of the request to create this lock.

Data Types

data FetchAndMergeLocksResult

data FullLockSpecification

data GovernanceLockKey

GovernanceLockKey

Field

Type

Description

dso

Party

owner

Party

specification

GovernanceLockSpecification

instance Serializable GovernanceLockKey

instance Eq GovernanceLockKey

instance Show GovernanceLockKey

instance GetField "dso" GovernanceLockKey Party

instance GetField "owner" GovernanceLockKey Party

instance GetField "source" GovernanceLockTransfer GovernanceLockKey

instance GetField "source" LockTransferArgs GovernanceLockKey

instance GetField "specification" GovernanceLockKey GovernanceLockSpecification

instance GetField "target" GovernanceLockRequest GovernanceLockKey

instance GetField "target" CreateSubstitutionArgs GovernanceLockKey

instance GetField "target" GovernanceLockSubstitution GovernanceLockKey

instance SetField "dso" GovernanceLockKey Party

instance SetField "owner" GovernanceLockKey Party

instance SetField "source" GovernanceLockTransfer GovernanceLockKey

instance SetField "source" LockTransferArgs GovernanceLockKey

instance SetField "specification" GovernanceLockKey GovernanceLockSpecification

instance SetField "target" GovernanceLockRequest GovernanceLockKey

instance SetField "target" CreateSubstitutionArgs GovernanceLockKey

instance SetField "target" GovernanceLockSubstitution GovernanceLockKey

instance HasExerciseByKey GovernanceLock GovernanceLockKey GovernanceLock_DsoConvertProvisionalFeaturedAppLock GovernanceLock_DsoConvertProvisionalFeaturedAppLockResult

instance HasExerciseByKey GovernanceLock GovernanceLockKey GovernanceLock_DsoExpire GovernanceLock_DsoExpireResult

instance HasExerciseByKey GovernanceLock GovernanceLockKey Archive ()

instance HasFetchByKey GovernanceLock GovernanceLockKey

instance HasKey GovernanceLock GovernanceLockKey

instance HasLookupByKey GovernanceLock GovernanceLockKey

instance HasLookupNByKey GovernanceLock GovernanceLockKey

instance HasMaintainer GovernanceLock GovernanceLockKey

data GovernanceLockKind

GLK_FeaturedApp

Field

Type

Description

provider

Party

Featured app provider party.

GLK_ProvisionalFeaturedApp

Field

Type

Description

provider

Party

Provisional featured app provider party.

GLK_SuperValidatorRightsOwner

Field

Type

Description

svName

Text

Name of the SV rights owner for whom the funds are locked.

instance Serializable GovernanceLockKind

instance Eq GovernanceLockKind

instance Show GovernanceLockKind

instance GetField "kind" FullLockSpecification GovernanceLockKind

instance GetField "kind" VestingLockSpecification GovernanceLockKind

instance GetField "provider" GovernanceLockKind Party

instance GetField "svName" GovernanceLockKind Text

instance SetField "kind" FullLockSpecification GovernanceLockKind

instance SetField "kind" VestingLockSpecification GovernanceLockKind

instance SetField "provider" GovernanceLockKind Party

instance SetField "svName" GovernanceLockKind Text

data GovernanceLockSpecification

data GovernanceLockTag

data GovernanceLock_DsoConvertProvisionalFeaturedAppLockResult

data GovernanceLock_DsoExpireResult

GovernanceLock_DsoExpireResult

The GovernanceLock_DsoExpire choice doesn’t return anything because an SV trigger that cleans up expired vesting locks doesn’t care to do anything with the now unlocked lockedAmulet.

(no fields)

instance Serializable GovernanceLock_DsoExpireResult

instance HasExercise GovernanceLock GovernanceLock_DsoExpire GovernanceLock_DsoExpireResult

instance HasExerciseByKey GovernanceLock GovernanceLockKey GovernanceLock_DsoExpire GovernanceLock_DsoExpireResult

instance HasFromAnyChoice GovernanceLock GovernanceLock_DsoExpire GovernanceLock_DsoExpireResult

instance HasToAnyChoice GovernanceLock GovernanceLock_DsoExpire GovernanceLock_DsoExpireResult

data GovernanceLock_DsoSplitForSubstitutionResult

GovernanceLock_DsoSplitForSubstitutionResult

Field

Type

Description

remainingLockCid

Optional (ContractId GovernanceLock)

The lock that keeps the funds that were not split off, if any.

splitAmulet

ContractId LockedAmulet

The funds that were split off, locked for the new lock.

instance GetField "remainingLockCid" GovernanceLock_DsoSplitForSubstitutionResult (Optional (ContractId GovernanceLock))

instance GetField "splitAmulet" GovernanceLock_DsoSplitForSubstitutionResult (ContractId LockedAmulet)

instance SetField "remainingLockCid" GovernanceLock_DsoSplitForSubstitutionResult (Optional (ContractId GovernanceLock))

instance SetField "splitAmulet" GovernanceLock_DsoSplitForSubstitutionResult (ContractId LockedAmulet)

data GovernanceLock_DsoSubstituteResult

GovernanceLock_DsoSubstituteResult

Field

Type

Description

remainingLockCid

Optional (ContractId GovernanceLock)

The lock that keeps the funds that were not substituted, if any.

unlockedAmulet

ContractId Amulet

The substituted funds, returned to the owner.

instance GetField "remainingLockCid" GovernanceLock_DsoSubstituteResult (Optional (ContractId GovernanceLock))

instance GetField "unlockedAmulet" GovernanceLock_DsoSubstituteResult (ContractId Amulet)

instance SetField "remainingLockCid" GovernanceLock_DsoSubstituteResult (Optional (ContractId GovernanceLock))

instance SetField "unlockedAmulet" GovernanceLock_DsoSubstituteResult (ContractId Amulet)

data GovernanceLock_DsoTransferResult

GovernanceLock_DsoTransferResult

Field

Type

Description

remainingLockCid

Optional (ContractId GovernanceLock)

The lock that keeps the funds that were not transferred, if any.

unlockedAmulet

ContractId Amulet

The transferred funds, returned to the owner of the source lock.

instance GetField "remainingLockCid" GovernanceLock_DsoTransferResult (Optional (ContractId GovernanceLock))

instance GetField "unlockedAmulet" GovernanceLock_DsoTransferResult (ContractId Amulet)

instance SetField "remainingLockCid" GovernanceLock_DsoTransferResult (Optional (ContractId GovernanceLock))

instance SetField "unlockedAmulet" GovernanceLock_DsoTransferResult (ContractId Amulet)

data LockState

data VestingLockSpecification

VestingLockSpecification

Field

Type

Description

kind

GovernanceLockKind

vestingPeriod

RelTime

Duration over which the amount vests in a linear fashion.

endTime

Time

Time at which vesting completes.

instance Serializable VestingLockSpecification

instance Eq VestingLockSpecification

instance Show VestingLockSpecification

instance GetField "endTime" VestingLockSpecification Time

instance GetField "kind" VestingLockSpecification GovernanceLockKind

instance GetField "vestingPeriod" VestingLockSpecification RelTime

instance GetField "vestingSpecification" GovernanceLockRequest VestingLockSpecification

instance SetField "endTime" VestingLockSpecification Time

instance SetField "kind" VestingLockSpecification GovernanceLockKind

instance SetField "vestingPeriod" VestingLockSpecification RelTime

instance SetField "vestingSpecification" GovernanceLockRequest VestingLockSpecification

Functions

requireVestingLock

: CanAssert m => GovernanceLockSpecification -> m VestingLockSpecification

governanceLockExpiresAt

: GovernanceLockSpecification -> Time

fetchAndMergeGovernanceLocks

: GovernanceLockKey -> ExternalPartyTransferContext -> ExternalPartyConfigState -> Text -> Update FetchAndMergeLocksResult

governanceLock_unlockImpl

: ContractId GovernanceLock -> GovernanceLock -> Decimal -> Optional Time -> [Party] -> ExternalPartyTransferContext -> ExternalPartyConfigState -> Text -> Update GovernanceLock_UnlockResult

Unlocks unlockAmount of a governance lock. optVestingStartTime may only be None for locks which have no vesting period.

vestingLock_withdrawImpl

: ContractId GovernanceLock -> GovernanceLock -> Time -> [Party] -> ExternalPartyTransferContext -> Text -> Update VestingLock_WithdrawResult

calculateUnvestedAmount

: Time -> Decimal -> VestingLockSpecification -> Optional Decimal

Uses None to represent that no amount remains.

governanceLock_lockForGovernance_impl

: Party -> Decimal -> [ContractId Holding] -> FullLockSpecification -> ExtraArgs -> Party -> Time -> Text -> Update (GovernanceLock, ContractId GovernanceLock, Optional (ContractId Amulet))

Create a GovernanceLock, used by the core implementation of token standard interfaces.

governanceLock_dsoSubstituteImpl

: ForOwner -> ContractId GovernanceLock -> Decimal -> Text -> ExtraArgs -> Update GovernanceLock_DsoSubstituteResult

Release substitutedAmount of the locked funds to the owner as part of an approved substitution. Only the accept step of a GovernanceLockSubstitution calls this.

governanceLock_dsoSplitForSubstitutionImpl

: ForOwner -> ContractId GovernanceLock -> Decimal -> GovernanceLockSpecification -> Text -> ExtraArgs -> Update GovernanceLock_DsoSplitForSubstitutionResult

Split splitAmount of the locked funds off into a LockedAmulet for a new lock with newSpecification, as part of an approved substitution proposed by the owner of this lock. Only the accept step of a GovernanceLockSubstitution calls this.

governanceLockKind

: GovernanceLockSpecification -> GovernanceLockKind

governanceLockObservers

: GovernanceLockSpecification -> [Party]

vestingDurationFor

: GovernanceLockKind -> Optional GovernanceLockConfig -> RelTime

requireMinimumLock

: ExternalPartyConfigState -> Decimal -> Update ()

assertInPast24Hours

: Text -> Time -> Update ()

unfeaturedPaymentContextAndConfigFromChoiceContext

: Party -> ChoiceContext -> Update (ExternalPartyTransferContext, ExternalPartyConfigState)

governanceLock_dsoTransferImpl

: ForOwner -> ContractId GovernanceLock -> Decimal -> Text -> ExtraArgs -> Update GovernanceLock_DsoTransferResult

Release transferredAmount of the locked funds as part of an approved transfer. The accept step of a GovernanceLockTransfer calls this, and locks the unlocked funds again for the receiver, as only that step has the receiver’s authority.

unlockAmulet

: ForOwner -> ContractId LockedAmulet -> Update (ContractId Amulet, LockSpecification)

lockAmulet

: ForOwner -> [LockSpecification] -> [ContractId Holding] -> ExternalPartyTransferContext -> Text -> Update ([ContractId LockedAmulet], Optional (ContractId Amulet))

lockAmuletFor

: ForOwner -> Party -> [LockSpecification] -> [ContractId Holding] -> ExternalPartyTransferContext -> Text -> Update ([ContractId LockedAmulet], Optional (ContractId Amulet))

Locks specs for receiver, funded by the holdingInputs of the owner. reason is the memo of the request being handled, which the transfer legs report as their reason.

cipMetaPrefix

: Text

Prefix of the metadata keys used to pass extra choice parameters.

cipMemoPrefix

: Text

Prefix of the memo tag used to specify lock attributes.

requestMetaKey

: Text

Metadata key that specifies the requested lock operation.

unlockAmountMetaKey

: Text

Metadata key of a GovernanceLock unlock that specifies how much to unlock.

transferAmountMetaKey

: Text

Metadata key specifies how much of a lock to transfer.

lockKindMetaKey

: Text

Metadata key of a GovernanceLock kind.

lockSubjectMetaKey

: Text

Metadata key of a GovernanceLock subject.

lockStatusMetaKey

: Text

Metadata key that specifies the status of a lock.

vestingStartTimeMetaKey

: Text

Metadata key that specifies the time at which vesting should start.

vestedUntilTimeMetaKey

: Text

Metadata key that specifies the time as of which vested funds should be computed and withdrawn.

lockVestingDurationMetaKey

: Text

Metadata key that specifies the duration of a vesting GovernanceLock.

lockVestingEndTimeMetaKey

: Text

Metadata key that specifies the end time of a vesting GovernanceLock.

newLockOwnerMetaKey

: Text

Metadata key that specifies the new owner of a transferred lock.

targetLockOwnerMetaKey

: Text

Metadata key that specifies the owner of a target lock.

encodeCommonLockMetadataEntries

: GovernanceLockKind -> LockState -> [(Text, Text)]

The metadata entries of the kind, subject and status of a lock, in the order of the CIP.

encodeGovernanceLockMetadataWithRequest

: Text -> GovernanceLockSpecification -> Metadata

encodeLockCompatMemo

: [(Text, Text)] -> Text

The memo of the given metadata entries. It keeps the order of the entries, so that wallets show the memos as the CIP writes them.

lockManagerParty

: Party

Special party used to identify lock transfers.

governanceLockTagToText

: GovernanceLockTag -> Text

dataFromText

: Eq a => (a -> Text) -> [a] -> Text -> Optional a

governanceLockTagFromText

: Text -> Optional GovernanceLockTag

governanceLockKindToTagAndSubject

: GovernanceLockKind -> (GovernanceLockTag, Text)

governanceLockKindFromTagAndSubject

: CanAssert m => GovernanceLockTag -> Text -> m GovernanceLockKind

lockStateToText

: LockState -> Text

lockStateFromText

: Text -> Optional LockState

Comments