Trying to create an Initiate and Accept but this is giving an error… Any suggestion where this may have gone wrong. Thanks in advance
import Payment
makePartiesFrom names = mapA getParty names
makeParties = makePartiesFrom []
template ForExTokenMaster
with
provider : Party
where
signatory provider
nonconsuming choice Invite : ContractId ForExIssueProposal
with client : Party
controller provider
do create ForExIssueProposal
with forExAgreement = ForExIssueAgreement with provider; client
template ForExIssueProposal
with
forExAgreement : ForExIssueAgreement
where
signatory forExAgreement.provider
observer forExAgreement.client
choice AcceptForExTokenProposal
: ContractId ForExIssueAgreement
controller forExAgreement.client
do create forExAgreement
template ForExIssueAgreement
with
provider : Party
client : Party
where
signatory provider, client
nonconsuming choice Issue : ContractId ForExToken
controller provider
do create ForExToken with ..
template ForExToken
with
baseCurrency : Text
provider : Party --this is the seller of the currency
client: Party
description : Text
networkAdmin : Party -- this is to make sure that the provider and currency buyer are legal
quote : Text -- this is the currency you will accept in exchange for base currency
lastRate : Numeric 2 --Decimal -- this is the exchange rate of quote per base curency
baseCurrencyAmount : Numeric 2 --Decimal -- qty to purchase in quoted currency
lastExchangeAmount : Numeric 2 --Decimal
issued :Time -- time the token was launched for sale
royaltyRate : Numeric 2 --Decimal
--exchangeAmount : Numeric 2
delegates : [Party]
where
signatory provider, client
observer delegates