In Daml, I have setup an Agent
contract. This is its down Agent.daml
file. I then have a proposal contract (Proposal.daml
), in which I imported the Agent
module. I wanted to specify agentname
is the signatory for the proposal contract, but compiler tells me that no such party exists.
There are no parties in my Proposal
contract which is why I chose a party from another contract. I'm not sure how to solve this?
This is the agent contract
module Agent where
-- MAIN_TEMPLATE_BEGIN
template Agent with
agentname: Party
guarantors: [Party]
where
signatory agentname
observer guarantors
And this is the Proposal
contract
module Proposal where
import Agent
-- MAIN_TEMPLATE_BEGIN
template Proposal with
projectdescription: Text
unitsrequired: Int
marketingcost: Int
distributioncost: Int
additionalcost: Int
where
signatory agentname
observer guarantors
-- MAIN_TEMPLATE_END
key agentname: Party
maintainer key