Created
February 20, 2023 14:54
-
-
Save nemanja-da/fa30c48d46d8f355a340ce226a0fea03 to your computer and use it in GitHub Desktop.
TransactionRequest - Financial credit reporting & management using Daml smart contracts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template TransactionRequest | |
with | |
customer: Party | |
balance: Decimal | |
creditLimit: Decimal | |
company: Party | |
amount: Decimal | |
date: Date | |
authorizationSystem: Party | |
where | |
signatory customer | |
observer authorizationSystem | |
choice AuthorizeTransaction: ContractId AuthorizedTransaction | |
with | |
fraudSystem : Party | |
controller authorizationSystem | |
do | |
-- check balance here | |
create AuthorizedTransaction with .. | |
template AuthorizedTransaction | |
with | |
customer: Party | |
balance: Decimal | |
creditLimit: Decimal | |
company: Party | |
amount: Decimal | |
date: Date | |
authorizationSystem: Party | |
fraudSystem : Party | |
where | |
signatory authorizationSystem | |
observer fraudSystem | |
choice ApproveTransaction: ContractId ApprovedTransaction | |
with | |
paymentSystem: Party | |
reportingApp: Party | |
controller fraudSystem | |
do | |
create ApprovedReport with .. | |
create ApprovedTransaction with .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment