The D disclosure type is new for submitMulti?
I might be mistaken, but I don’t remember we had this earlier. I remember S for Signatory, O for observer, W for Witness.
Without submitMulti we have this kind of disclosure, without the D for Alice in contract T:
2 Likes
The W disclosure type is not specific to submitMulti. The documentation has a brief summary:
The party sees the contract because they have been divulged the contract, e.g., because they witnessed an exercise that resulted in a fetch of this contract.
With a tiny modification to the example from Can I fetch a contract visible to another party with submitMulti? - #4, we can reproduce the same disclosure: Bob can access the fetch choice directly since the contract is visible to him. Alice is a signatory on TFetch so she will witness the exercise and thereby also witness the fetch of the contract.
module Main where
import Daml.Script
template T
with
p : Party
where
signatory p
template FetchTpl
with
p1 : Party
p2 : Party
where
signatory p1
observer p2
nonconsuming choice Fetch : T
with
cid : ContractId T
controller p2
do fetch cid
test = do
alice <- allocateParty "Alice"
bob <- allocateParty "Bob"
fetchCid <- submit alice $ createCmd (FetchTpl alice bob)
tCid <- submit bob $ createCmd (T bob)
submit bob $ exerciseCmd fetchCid (Fetch tCid)
pure ()
3 Likes