Deprecated

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

Open current docs

Splice.GovernanceLock.Request

Data Types

data GovernanceLockRequest

GLR_CreateGovernanceLock

Field

Type

Description

fullSpecification

FullLockSpecification

GLR_UnlockGovernanceLock

Field

Type

Description

fullSpecification

FullLockSpecification

unlockAmount

Decimal

vestingStartTime

Optional Time

None for provisional featured app locks, as they do not vest.

GLR_TransferLock

Field

Type

Description

specification

GovernanceLockSpecification

newOwner

Party

transferAmount

Decimal

GLR_WithdrawVestingLock

Field

Type

Description

vestingSpecification

VestingLockSpecification

vestedUntilTime

Time

GLR_SubstituteLock

Field

Type

Description

target

GovernanceLockKey

instance Show GovernanceLockRequest

instance GetField "fullSpecification" GovernanceLockRequest FullLockSpecification

instance GetField "newOwner" GovernanceLockRequest Party

instance GetField "specification" GovernanceLockRequest GovernanceLockSpecification

instance GetField "target" GovernanceLockRequest GovernanceLockKey

instance GetField "transferAmount" GovernanceLockRequest Decimal

instance GetField "unlockAmount" GovernanceLockRequest Decimal

instance GetField "vestedUntilTime" GovernanceLockRequest Time

instance GetField "vestingSpecification" GovernanceLockRequest VestingLockSpecification

instance GetField "vestingStartTime" GovernanceLockRequest (Optional Time)

instance SetField "fullSpecification" GovernanceLockRequest FullLockSpecification

instance SetField "newOwner" GovernanceLockRequest Party

instance SetField "specification" GovernanceLockRequest GovernanceLockSpecification

instance SetField "target" GovernanceLockRequest GovernanceLockKey

instance SetField "transferAmount" GovernanceLockRequest Decimal

instance SetField "unlockAmount" GovernanceLockRequest Decimal

instance SetField "vestedUntilTime" GovernanceLockRequest Time

instance SetField "vestingSpecification" GovernanceLockRequest VestingLockSpecification

instance SetField "vestingStartTime" GovernanceLockRequest (Optional Time)

data GovernanceLockRequestTag

data Parser i o

A parser of an input i into an output o.

Parsers form a monad ("action" in Daml parlance). Combining them with <*> reports the errors of all of them, as for Validation, while >>= stops at the first error, as the second parser depends on the output of the first one.

do blocks of parsers need the ApplicativeDo extension to report all errors. Without it, a do block desugars into >>= and >>, and the Daml-LF conversion replaces x >> y with x >>= \_ -> y, so even do { p1; p2; p2} with independent p* stop at the first error. With ApplicativeDo, statements that do not depend on each other are combined with <*> instead even if it is an a <- pa statement.

For all independent statements to be combined with <*> including the last one, the do-block must end with literally pure x or pure $ x: GHC recognises the final return only by its shape, and any other final statement is joined with a bind:

For example, we want compiler to produce (\a b c -> E) <$> pa <*> pb <*> pc from do { pa; pb; pc; pure E}. We want to avoid join ((\a b c -> pure . f $ E) <$> pa <*> pb <*> pc) coming from do { pa; pb; pc; pure . f $ E} where f is itself pure.

Parser (i -> Validation Text o)

instance Functor (Parser i)

instance CanAssert (Parser i)

instance Action (Parser i)

instance Applicative (Parser i)

Functions

governanceLockRequestTagToText

: GovernanceLockRequestTag -> Text

missingMetadataMessage

: Text -> Text

governanceLock_transferFactoryV1_transferImpl

: Party -> [Party] -> TransferFactory_Transfer -> Update TransferInstructionResult

runParser

: Parser i o -> i -> Validation Text o

assertParsed

: CanAssert m => Parser i o -> i -> m o

governanceLockTagParser

: Parser Metadata GovernanceLockTag

governanceLockKindParser

: Parser Metadata GovernanceLockKind

governanceLockMetadataParser

: Parser Metadata Metadata

fullLockSpecificationParser

: Parser Metadata FullLockSpecification

governanceLockRequestTSv1Parser

: Party -> Party -> Optional GovernanceLockConfig -> Parser Metadata GovernanceLockRequest

parseGovernanceLockRequestTSv1

: CanAssert m => Party -> Party -> Optional GovernanceLockConfig -> Metadata -> m GovernanceLockRequest

Comments