“O” and “S” stand for “Observer” and “Signatory” in that table. You have to tick “Show detailed” to see that.
To see a more complex interaction, I’ve split out the roles here somewhat:
module Disclosure where
import Daml.Script
template Account
with
creator : Party
archiver : Party
client : Party
where
signatory creator
observer client, archiver
choice DelegatedArchive : ()
controller archiver
do return ()
template AccountCreator
with
creatorRoot : Party
creatorController : Party
where
signatory creatorRoot
observer creatorController
nonconsuming choice CreateMany: [ContractId Account]
with
parties: [Party]
archiver: Party
controller creatorController
do
forA parties (\client -> create Account with creator = creatorRoot; ..)
template AccountArchiver
with
archiverRoot : Party
archiverController : Party
where
signatory archiverRoot
observer archiverController
nonconsuming choice ArchiveMany: ()
with
accounts: [ContractId Account]
controller archiverController
do
forA accounts (\cid -> exercise cid DelegatedArchive)
return ()
test_disclosure : Script ()
test_disclosure = script do
[creatorRoot, creatorController, archiverRoot, archiverController, alice, bob] <-
mapA allocateParty ["creatorRoot", "creatorController", "archiverRoot", "archiverController", "alice", "bob"]
creator <- submit creatorRoot do createCmd AccountCreator with ..
archiver <- submit archiverRoot do createCmd AccountArchiver with ..
accounts <- submit creatorController do
exerciseCmd creator CreateMany with
parties = [alice, bob]
archiver = archiverController
submit archiverController do exerciseCmd archiver ArchiveMany with accounts
return ()
What you now see is this:
creatorController
has witnessed (W) the creation of the contract. They are an informee of the exercise of CreateMany
since they are the controller. The creates are a consequence of CreateMany
. archiverRoot
has had the accounts divulged (D) to them since they are a signatory on the AccountArchiver
and the exercises of DelegatedArchive
are a consequence of that.
You can see a lot of that info in the transaction view in the IDE as well:
TX 3 1970-01-01T00:00:00Z (Disclosure:60:3)
#3:0
│ disclosed to (since): 'archiverController' (3), 'archiverRoot' (3)
└─> 'archiverController' exercises ArchiveMany on #1:0 (Disclosure:AccountArchiver)
with
accounts = [#2:1, #2:2]
children:
#3:1
│ disclosed to (since): 'archiverController' (3), 'archiverRoot' (3), 'alice' (3),
'creatorRoot' (3)
└─> 'archiverController' exercises DelegatedArchive on #2:1 (Disclosure:Account)
#3:2
│ disclosed to (since): 'archiverController' (3), 'archiverRoot' (3), 'bob' (3),
'creatorRoot' (3)
└─> 'archiverController' exercises DelegatedArchive on #2:2 (Disclosure:Account)
You can see on #3:1 that that event is disclosed to archiverRoot
. The reason is that it’s a consequence of #3:1, which is disclosed to archiverRoot
.