You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
queriedDisclosuresAreValid : Script ()
queriedDisclosuresAreValid = do
a <- allocatePartyOn "alice" participant0
cid <- a `submit` createExactCmd V1.QueryDisclosureTemplate with party = a
let v2Cid = coerceContractId @V1.QueryDisclosureTemplate @V2.QueryDisclosureTemplate cid
disclosure <- fromSome <$> queryDisclosure a v2Cid
submitWithDisclosures a [disclosure] $ exerciseCmd v2Cid V2.QueryDisclosureChoice
Fails with this error:
INVALID_ARGUMENT: INVALID_ARGUMENT(8,961b09b6): The submitted request has invalid arguments: Mismatch between DisclosedContract.template_id (72684bade0a0af9e5cbc87ae932cab0901cad9166cb854c61d8f4c7672a4a5cf:QueryDisclosure:QueryDisclosureTemplate) and template_id from decoded DisclosedContract.created_event_blob (debf7a4d67d6d2c7ef956c5d8703f9fb14ee0413150af49bbcf5f09b2af75729:QueryDisclosure:QueryDisclosureTemplate)
* repro of #19162 as a test and fix for daml3
* use a different party for exercising a choice on the disclosed contract
* factorize TemplateTypeRep svalue creation
* Move makePair/makeTriplet to Converter.makeTuple
The following script
Fails with this error:
That's because
GrpcLedgerClient
returns the requested template ID rather than the actual one in the disclosure: https://github.com/digital-asset/daml/blob/main/sdk/daml-script/runner/src/main/scala/com/daml/lf/engine/script/v2/ledgerinteraction/grpcLedgerClient/GrpcLedgerClient.scala#L160.But also because
queryDisclosure
stores the requested template ID in theDisclosure
record that it builds:daml/sdk/daml-script/daml/Daml/Script.daml
Line 318 in e40aad8
I see how to fix the former, I'm not sure how to fix the latter yet. I'm not sure what the semantics should be.
The text was updated successfully, but these errors were encountered: