digital-asset / da-marketplace

BSD Zero Clause License
17 stars 13 forks source link

Syndication 2 #458

Closed judywu-da closed 2 years ago

judywu-da commented 2 years ago

This PR includes changes for FL-170 and FL-218

Changes for FL-218 includes https://digitalasset.atlassian.net/browse/FL-218 (see commit aa4579e6f482f654b63e2732eae6f53ca0b61362 for the code changes)

  1. Remove ConsumerResponse data record
  2. Remove SwiftOutboundMessageResponse template
  3. Add Processed and Failed "error message" enum into MessageType
  4. Add RespondSuccess choice and RespondFailed with errorMessage choice into SwiftOutboundMessage template
  5. Removed Respond choice

Changes for https://digitalasset.atlassian.net/browse/FL-170 includes:

  1. Add payingAgent into Tranche
  2. Allow payingAgent to see AssetDescription and Observables
  3. Dedicate the work below from BondRegistrar to payingAgent
    • Use payingAgent to create/set Today contract,
    • queryAssetDescription for max asset version
    • calculateEffect (but separate updating the assetDescription work in calculateEffect out, so that it can still be done by bond Registrar
    • queryEffect (note that requestSnapshot is still done by bondRegistrar)
    • agent for instructing life cycle (note that instructions are still created by operator)
    • settle deliveries
  4. Modify Hedging.daml to fix failed test