You need to flll in the other fields when you are creating ForExToken
in ForExIssueAgreement:Issue
.
One option is to take them as arguments to the Issue
choice:
template ForExIssueAgreement
with
provider : Party
client : Party
where
signatory provider, client
nonconsuming choice Issue : ContractId ForExToken
with
baseCurrency : Text
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]
controller provider
do create ForExToken with ..
You might want to factor this into a record to make it easier to keep in sync with the fields in ForExToken
. See Workflow template factoring with records for some examples of doing that.